GUI Components - GUI126
Since we are going through the BYW Method (Build Your Widgets) we then need to understand the components of a GUI
GUI Components
- Window Library
- Frames (basically an image)
- States
1. Window Library
The Window library provides a simple API for creating windows, contexts and surfaces, receiving input and events. It presents ways of registering functions that would respond to mouse clicks, mouse drags, keyboard taps etc.
There is not so much choices here. I used the GLFW
GLFW has a lot of possibilities, you can get the whole view from the API documentation
2. Frames (basically an image)
Frames is the technical term for an image used in GUI window. We can create our frame using 2d graphics library. You can search for one using Google but I picked gg to do this for me.
3. States
States are basically global variables. They glue the window library events to the functions that updates your frames.
A common one is the map of rectangles to the Widget Description Objects. This enables you to know what part of your frame was clicked.