|
RMGui 0.15.0
C11 retained-mode UI library: layout kernel, style schema, widget painters, fonts, software framebuffer
|
Retained dropdown state, caller-owned, written by rmgui_dropdown_init and rmgui_dropdown_input only; the host reads open (declare the popup while 1), selected and first_visible, and sets or clears RMGUI_STYLE_STATE_DISABLED in states. More...
#include <dropdown.h>
Data Fields | |
| size_t | count |
| size_t | visible_rows |
| size_t | selected |
| size_t | highlighted |
| size_t | first_visible |
| size_t | hover |
| size_t | pressed |
| uint8_t | open |
| uint8_t | capture |
| uint8_t | states |
Retained dropdown state, caller-owned, written by rmgui_dropdown_init and rmgui_dropdown_input only; the host reads open (declare the popup while 1), selected and first_visible, and sets or clears RMGUI_STYLE_STATE_DISABLED in states.
Invariants after a successful init: 1 <= count <= INT_MAX (the input result index type ceiling); 1 <= visible_rows <= count; selected, highlighted < count; first_visible <= count - visible_rows; hover and pressed are an option index or RMGUI_DROPDOWN_NONE.
options
popup rows shown at once
the committed option
keyboard cursor over the popup
rmgui_dropdown_t.first_visible
option shown in the popup's first row
popup option under the pointer
popup option the held press began on
1 while the popup is shown
element-private pointer capture
closed row: HOVER/PRESSED/FOCUSED (input), DISABLED (host)
| size_t rmgui_dropdown_t::count |
| size_t rmgui_dropdown_t::visible_rows |
| size_t rmgui_dropdown_t::selected |
| size_t rmgui_dropdown_t::highlighted |
| size_t rmgui_dropdown_t::first_visible |
| size_t rmgui_dropdown_t::hover |
| size_t rmgui_dropdown_t::pressed |
| uint8_t rmgui_dropdown_t::open |
| uint8_t rmgui_dropdown_t::capture |
| uint8_t rmgui_dropdown_t::states |