Difference between revisions of "Windows"
From uGFX Wiki
(→Window creation) |
|||
Line 11: | Line 11: | ||
== Window creation == | == Window creation == | ||
− | + | <syntaxhighlight lang=c> | |
+ | typedef struct GWindowInit { | ||
+ | coord_t x, y; // The initial position relative to its parent | ||
+ | coord_t width, height; // The initial dimension | ||
+ | bool_t show; // Should the window be visible initially | ||
+ | #if GWIN_NEED_CONTAINERS | ||
+ | GHandle parent; // The parent - must be a container or NULL | ||
+ | #endif | ||
+ | } GWindowInit; | ||
+ | </syntaxhighlight> | ||
== Implemented Windows == | == Implemented Windows == |
Revision as of 16:48, 1 July 2014
A window is the most basic GWIN element. All the other elements (widget, container) are based on this one. A window consists the following attributes:
- Position
- Size
- Foreground color
- Background color
- Font
Therefore, a window is a completely passive element. It does not accept any kind of input. A list with description of the common window API can be found here.
Window creation
typedef struct GWindowInit { coord_t x, y; // The initial position relative to its parent coord_t width, height; // The initial dimension bool_t show; // Should the window be visible initially #if GWIN_NEED_CONTAINERS GHandle parent; // The parent - must be a container or NULL #endif } GWindowInit;
Implemented Windows
These are the currently implemented windows: