|
libtextscreen
|
Base "widget" GUI component class. More...
Typedefs | |
| typedef struct txt_widget_s | txt_widget_t |
| A GUI widget. More... | |
Functions | |
| void | TXT_SignalConnect (txt_widget_t *widget, const char *signal_name, TxtWidgetSignalFunc func, void *user_data) |
| Set a callback function to be invoked when a signal occurs. More... | |
| void | TXT_SetWidgetAlign (txt_widget_t *widget, txt_horiz_align_t horiz_align) |
| Set the policy for how a widget should be aligned within a table. More... | |
| int | TXT_SelectableWidget (txt_widget_t *widget) |
| Query whether a widget is selectable with the cursor. More... | |
| int | TXT_HoveringOverWidget (txt_widget_t *widget) |
| Query whether the mouse is hovering over the specified widget. More... | |
| void | TXT_SetWidgetBG (txt_widget_t *widget) |
| Set the background to draw the specified widget, depending on whether it is selected and the mouse is hovering over it. More... | |
| int | TXT_ContainsWidget (txt_widget_t *haystack, txt_widget_t *needle) |
| Query whether the specified widget is contained within another widget. More... | |
Base "widget" GUI component class.
| typedef struct txt_widget_s txt_widget_t |
A GUI widget.
A widget is an individual component of a GUI. Various different widget types exist.
Widgets may emit signals. The types of signal emitted by a widget depend on the type of the widget. It is possible to be notified when a signal occurs using the TXT_SignalConnect function.
| int TXT_ContainsWidget | ( | txt_widget_t * | haystack, |
| txt_widget_t * | needle | ||
| ) |
Query whether the specified widget is contained within another widget.
| haystack | The widget that might contain needle. |
| needle | The widget being queried. |
| int TXT_HoveringOverWidget | ( | txt_widget_t * | widget | ) |
Query whether the mouse is hovering over the specified widget.
| widget | The widget. |
| int TXT_SelectableWidget | ( | txt_widget_t * | widget | ) |
Query whether a widget is selectable with the cursor.
| widget | The widget. |
| void TXT_SetWidgetAlign | ( | txt_widget_t * | widget, |
| txt_horiz_align_t | horiz_align | ||
| ) |
Set the policy for how a widget should be aligned within a table.
By default, widgets are aligned to the left of the column.
| widget | The widget. |
| horiz_align | The alignment to use. |
| void TXT_SetWidgetBG | ( | txt_widget_t * | widget | ) |
Set the background to draw the specified widget, depending on whether it is selected and the mouse is hovering over it.
| widget | The widget. |
| void TXT_SignalConnect | ( | txt_widget_t * | widget, |
| const char * | signal_name, | ||
| TxtWidgetSignalFunc | func, | ||
| void * | user_data | ||
| ) |
Set a callback function to be invoked when a signal occurs.
| widget | The widget to watch. |
| signal_name | The signal to watch. |
| func | The callback function to invoke. |
| user_data | User-specified pointer to pass to the callback function. |
1.8.13