This structure describes an instantiated control on a window. More...
#include <control.h>
Data Fields | |
| int16_t | id_ |
| group number, if this control is part of a group of controls. -1 (no group) is default. Typical use case: radio buttons. | |
| control_type | type_ |
| used to identify the control in the control list, etc. | |
| Control * | next_ |
| button vs checkbox vs radio button, etc. | |
| Window * | parent_win_ |
| next control in the list | |
| Rectangle * | parent_rect_ |
| parent window | |
| Rectangle | rect_ |
| parent rectangle (the window segment it belongs to: titlebar, contentarea, iconbar | |
| h_align_type | h_align_ |
| coordinates relative to the parent window (ie, these are not global coordinates) | |
| v_align_type | v_align_ |
| whether the control should be positioned relative to the left side, right side, or centered | |
| int16_t | x_offset_ |
| whether the control should be positioned relative to the top edge, bottom edge, or centered | |
| int16_t | y_offset_ |
| horizontal coordinate relative to the parent window's left or right edge. If h_align_ is H_ALIGN_CENTER, this value will be ignored. | |
| int16_t | width_ |
| vertical coordinate relative to the parent window's top or bottom edge. If v_align_ is V_ALIGN_CENTER, this value will be ignored. | |
| int16_t | height_ |
| width of the control | |
| bool | visible_ |
| height of the control | |
| bool | enabled_ |
| is the control activated or not (in appearance). Does not affect ability to receive events. | |
| bool | pressed_ |
| is the control enabled or not. If not enabled, it will not receive events. | |
| bool | invalidated_ |
| is the control currently in a clicked/pushed/depressed state or not. Drives rendering choice. Does not affect ability to receive events. | |
| int16_t | min_ |
| current value of the control | |
| int16_t | max_ |
| minimum allowed value | |
| Bitmap * | image_ [2][2] |
| maximum allowed value | |
| char * | caption_ |
| 4 image state bitmaps: [active yes/no][pushed down yes/no] | |
| int16_t | avail_text_width_ |
| optional string to draw centered horizontally and vertically on the control. Typical use cases include buttons and labels. | |
This structure describes an instantiated control on a window.