GnuCash
4.14+
|
The API in this file is designed to provide support functions that wrap the base gtk functions and make them easier to use. More...
Files | |
file | gnc-gtk-utils.h |
gtk helper routines. | |
gtk Miscellaneous Functions | |
void | gnc_cbwe_set_by_string (GtkComboBox *cbwe, const gchar *text) |
Find an entry in the GtkComboBox by its text value, and set the widget to that value. More... | |
void | gnc_cbwe_add_completion (GtkComboBox *cbwe) |
void | gnc_cbwe_require_list_item (GtkComboBox *cbwe) |
gboolean | gnc_is_dark_theme (GdkRGBA *fg_color) |
Return whether the current gtk theme is a dark one. More... | |
void | gnc_style_context_get_background_color (GtkStyleContext *context, GtkStateFlags state, GdkRGBA *color) |
Wrapper to get the background color of a widget for a given state. More... | |
void | gnc_style_context_get_border_color (GtkStyleContext *context, GtkStateFlags state, GdkRGBA *color) |
Wrapper to get the border color of a widget for a given state. More... | |
GtkWidget * | gnc_get_dialog_widget_from_id (GtkDialog *dialog, const gchar *id) |
Find the Widget defined by 'id' in the dialog. More... | |
The API in this file is designed to provide support functions that wrap the base gtk functions and make them easier to use.
void gnc_cbwe_set_by_string | ( | GtkComboBox * | cbwe, |
const gchar * | text | ||
) |
Find an entry in the GtkComboBox by its text value, and set the widget to that value.
This function also records the index of that text value for use when the user leaves the widget.
cbwe | A pointer to a GtkComboBox with entry widget. |
text | The entry text to find in the model of the combo box entry. |
Definition at line 41 of file gnc-gtk-utils.c.
GtkWidget* gnc_get_dialog_widget_from_id | ( | GtkDialog * | dialog, |
const gchar * | id | ||
) |
Find the Widget defined by 'id' in the dialog.
dialog | The dialog to search for 'id'. |
id | The widget name to find in the dialog. |
Definition at line 330 of file gnc-gtk-utils.c.
gboolean gnc_is_dark_theme | ( | GdkRGBA * | fg_color | ) |
Return whether the current gtk theme is a dark one.
A theme is considered "dark" if it has a dark background color with a light foreground color (used for text and so on). We only test on the foreground color assuming a sane theme chooses enough contrast between foreground and background colors.
fg_color | The foreground color to test. |
Definition at line 236 of file gnc-gtk-utils.c.
void gnc_style_context_get_background_color | ( | GtkStyleContext * | context, |
GtkStateFlags | state, | ||
GdkRGBA * | color | ||
) |
Wrapper to get the background color of a widget for a given state.
context | Style context of widget. |
state | The stateflag of the widget. |
color | The returned background color of the widget. |
Definition at line 258 of file gnc-gtk-utils.c.
void gnc_style_context_get_border_color | ( | GtkStyleContext * | context, |
GtkStateFlags | state, | ||
GdkRGBA * | color | ||
) |
Wrapper to get the border color of a widget for a given state.
context | Style context of widget. |
state | The stateflag of the widget. |
color | The returned border color of the widget. |
Definition at line 284 of file gnc-gtk-utils.c.