|
atomes 1.2.1
atomes: an atomic scale modeling tool box
|
GTK3/GTK4 utility subroutines, instead of having pre-processor flags everywhere in the code.
Whenever I need to use a GTK function that changed between v3 and v4,
I created an home made function declared in this file, and deal then here with the potential GTK versions issues.
More...
Include dependency graph for gtk-misc.c:Go to the source code of this file.
Functions | |
| void | adjust_preferences_window () |
| adjust the widgets of the preferences window | |
| void | show_the_widgets (GtkWidget *widg) |
| show GtkWidget | |
| void | hide_the_widgets (GtkWidget *widg) |
| hide GtkWidget | |
| void | widget_set_sensitive (GtkWidget *widg, gboolean sensitive) |
| Set sensitivity for a GtkWidget, ensuring it is a GtkWidget. | |
| void | add_container_child (int type, GtkWidget *widg, GtkWidget *child) |
| Add a GtkWidget into another GtkWidget. | |
| void | add_box_child_end (GtkWidget *widg, GtkWidget *child, gboolean expand, gboolean fill, int padding) |
| Add a GtkWidget in a GtkBox at the end position. | |
| void | add_box_child_start (int orientation, GtkWidget *widg, GtkWidget *child, gboolean expand, gboolean fill, int padding) |
| Add a GtkWidget in a GtkBox at the initial position. | |
| GtkWidget * | new_gtk_window () |
| create a new GtkWindow | |
| GtkWidget * | create_win (gchar *str, GtkWidget *parent, gboolean modal, gboolean resiz) |
| create a new GtkWindow | |
| void | run_this_gtk_dialog (GtkWidget *dial, GCallback handler, gpointer data) |
| run a GTK (3 and 4) basic GtkDialog | |
| GtkWidget * | dialogmodal (gchar *str, GtkWindow *parent) |
| Create a new dialog modal window. | |
| GtkWidget * | message_dialogmodal (gchar *message, gchar *title, GtkMessageType mtype, GtkButtonsType buttons, GtkWidget *parent) |
| create a modal (cannot be ignored) message window | |
| GtkWidget * | dialog_cancel_apply (gchar *title, GtkWidget *parent, gboolean resiz) |
| create a dialog modal offering a choice to apply something or not | |
| void | resize_this_window (GtkWidget *window, int x, int y) |
| resize this GtkWindow | |
| const gchar * | entry_get_text (GtkEntry *entry) |
| get the text in a GtkEntry | |
| void | update_entry_int (GtkEntry *entry, int intval) |
| update the content of a GtkEntry as int | |
| void | update_entry_double (GtkEntry *entry, double doubleval) |
| update the content of a GtkEntry as double | |
| void | update_entry_long_double (GtkEntry *entry, double doubleval) |
| update the content of a GtkEntry as long double | |
| void | update_entry_text (GtkEntry *entry, gchar *text) |
| update the content of a GtkEntry as string | |
| void | text_view_set_monospace (GtkWidget *view) |
| set the font of a GtkTextView as monospace | |
| void | gtk_label_align (GtkWidget *lab, float ax, float ay) |
| set text alignment in a GtkLabel | |
| gboolean | is_the_widget_visible (GtkWidget *widg) |
| test if a GtkWidget exist, then return if it is visible or not | |
| GtkWidget * | create_hscale (float min, float max, float delta, float val, int pos, int round, int size, GCallback handler, GCallback scroll_handler, gpointer data) |
| create an horizontal scale GtkWidget | |
| GtkWidget * | create_vscale (float min, float max, float delta, float val, int pos, int round, int size, GCallback handler, GCallback scroll_handler, gpointer data) |
| create an vertical scale GtkWidget | |
| GtkWidget * | create_vbox (int spacing) |
| create a GtkBox with vertical orientation | |
| GtkWidget * | create_hbox (int spacing) |
| create a GtkBox with horizontal orientation | |
| GtkWidget * | dialog_get_content_area (GtkWidget *widg) |
| prepare GtkWidget to insert content in a GtkDialog window | |
| void | layout_add_widget (GtkWidget *layout, GtkWidget *child, int x_pos, int y_pos) |
| Add a GtkWidget in a GtkLayout. | |
| GtkWidget * | add_vbox_to_layout (GtkWidget *layout, int size_x, int size_y) |
| Insert a vertical GtkBox in a GtkLatout then send back the GtkBox. | |
| GtkWidget * | create_layout (int x, int y) |
| create a GtkLayout / GtkFixed widget | |
| int | combo_get_active (GtkWidget *combo) |
| retrieve the active item's position | |
| void | combo_set_active (GtkWidget *combo, int pos) |
| set the active item's position | |
| void | combo_set_markup (GtkWidget *combo) |
| use pango markup in combo widget | |
| void | combo_text_append (GtkWidget *combo, gchar *text) |
| append text in GtkComboBox widget | |
| void | combo_text_prepend (GtkWidget *combo, gchar *text) |
| prepend text in GtkComboBox widget | |
| GtkWidget * | create_combo () |
| create a GtkCombox widget, note deprecated in GTK4 | |
| void | setup_text_tags (GtkTextBuffer *buffer) |
| prepare the available text tags for the GtkTextBuffer | |
| GtkTextBuffer * | add_buffer (GCallback handler, gpointer data, gchar *text) |
| create a GtkTextBuffer | |
| GtkWidget * | create_text_view (int dimx, int dimy, int edit, int mono, GCallback handler, gpointer data, gchar *text) |
| create a GtkTextView and display some text | |
| GdkPixbuf * | convert_to_pixbuf (cairo_surface_t *surf) |
| convert cairo surface to GdkPixbuf | |
| G_MODULE_EXPORT void | to_activate_entry (GtkEventControllerFocus *focus, gpointer data) |
| GtkEntry activate signal managment. | |
| GtkWidget * | create_entry (GCallback handler, int dim, int cdim, gboolean key_release, gpointer data) |
| Create a GtkEntry. | |
| GtkWidget * | stock_image (const gchar *stock_id) |
| create a GtkImage for the Gtk database | |
| GtkWidget * | create_image_from_data (int format, gpointer item_image) |
| create Gtk image for data | |
| GtkWidget * | markup_label (gchar *text, int dimx, int dimy, float ax, float ay) |
| create a GtkLabel with pango markup | |
| ColRGBA * | duplicate_color (int num, ColRGBA *col) |
| duplicate a ColRGBA pointer | |
| ColRGBA | gdkrgba_to_rgba (GdkRGBA colgdk) |
| convert GdkRGBA color to ColRGBA color | |
| GdkRGBA | colrgba_togtkrgba (ColRGBA col) |
| convert ColRGBA color to GdkRGBA color | |
| void | set_renderer_color (int tocol, GtkCellRenderer *renderer, ColRGBA col) |
| set the color of a GtkCellRenderer | |
| void | button_set_image (GtkButton *but, gchar *text, int format, gpointer image) |
| Add an image to a GtkButton. | |
| void | adjust_label (GtkWidget *lab, int dimx, int dimy, float ax, float ay) |
| adjust the text position, and widget size of a GtkLabel | |
| GtkWidget * | color_button (ColRGBA col, gboolean alpha, int dimx, int dimy, GCallback handler, gpointer data) |
| create a color selection button | |
| GtkWidget * | font_button (gchar *font, int dimx, int dimy, GCallback handler, gpointer data) |
| create a font selection button | |
| GtkWidget * | spin_button (GCallback handler, double value, double start, double end, double step, int digits, int dim, gpointer data) |
| create a spin button | |
| int | button_get_status (GtkWidget *button) |
| get status of check / toggle button | |
| void | button_set_status (GtkWidget *button, int status) |
| set status of check / toggle button | |
| GtkWidget * | check_button (gchar *text, int dimx, int dimy, gboolean state, GCallback handler, gpointer data) |
| create a check button | |
| GtkWidget * | radio_button (gchar *text, int dimx, int dimy, gboolean state, GCallback handler, gpointer data) |
| create a radio button | |
| GtkWidget * | create_button (gchar *text, int image_format, gchar *image, int dimx, int dimy, int relief, GCallback handler, gpointer data) |
| create a simple button | |
| void | set_image_from_icon_name (GtkWidget *widg, gchar *icon) |
| set a image from a stock icon name | |
| void | append_comments (GtkWidget *vbox, gchar *symbol, gchar *legend) |
| append comments to a vertical box | |
| GtkWidget * | abox (GtkWidget *box, char *lab, int vspace) |
| box creating routine, to help design faster elements for the GUI | |
| GtkWidget * | bbox (GtkWidget *box, char *lab) |
| box creating routine, to help design faster elements for the GUI | |
| GtkWidget * | cbox (GtkWidget *box, char *lab) |
| box creating routine, to help design faster elements for the GUI | |
| GtkWidget * | fbox (GtkWidget *box, char *lab) |
| box creating routine, to help design faster elements for the GUI | |
| GtkWidget * | create_scroll (GtkWidget *box, int dimx, int dimy, int shadow) |
| create a scroll window | |
| GtkWidget * | create_expander (gchar *name, gchar *file_img) |
| create GtkExpander | |
| void | provide_gtk_css (gchar *css) |
| create a css provider based on the css data | |
| GtkWidget * | destroy_this_widget (GtkWidget *widg) |
| destroy a GtkWidget | |
| void | destroy_this_dialog (GtkDialog *dialog) |
| destroy a GtkDialog | |
| void | destroy_this_native_dialog (GtkNativeDialog *dialog) |
| destroy a GtkNativeDialog | |
| G_MODULE_EXPORT void | run_destroy_dialog (GtkDialog *dialog, gint response_id, gpointer data) |
| to destroy a GtkDialog when the dialog emit the closing signal | |
| GSList * | file_chooser_get_file_names (GtkFileChooser *chooser) |
| create a file list from files selected using a GtkFileChooser | |
| gchar * | file_chooser_get_file_name (GtkFileChooser *chooser) |
| get a file name from a GtkFileChooser (single file selected) | |
| gchar * | file_chooser_get_current_folder (GtkFileChooser *chooser) |
| get the current folder for a GtkFileChooser | |
| gboolean | file_chooser_set_file_name (GtkFileChooser *chooser, gchar *filename) |
| set file name in a GtkFilechooser | |
| void | file_chooser_set_current_folder (GtkFileChooser *chooser) |
| set current folder in a GtkFilechooser | |
| GtkWidget * | create_file_chooser (const gchar *title, GtkWindow *parent, GtkFileChooserAction act, const gchar *act_name) |
| create a GtkFileChooser, utility to select file(s) | |
| ColRGBA | get_button_color (GtkColorChooser *colob) |
| get the ColRGBA color from a GtkColorChooser button | |
| ColRGBA | get_window_color (GtkWidget *color_win) |
| get the ColRGBA color from a color selection window | |
| void | set_color_chooser_color (GtkWidget *color_win, ColRGBA col) |
| set the color of a color selection window | |
| void | pop_menu_at_pointer (GtkWidget *widg, GdkEvent *event) |
| popup a menu at pointer location | |
| GtkWidget * | get_top_level (GtkWidget *widg) |
| get the top level container, window, of a widget | |
| G_MODULE_EXPORT gboolean | destroy_this_window (GtkWidget *win, GdkEvent *event, gpointer data) |
| destroy a GtkWindow | |
| G_MODULE_EXPORT gboolean | hide_this_window (GtkWidget *win, GdkEvent *event, gpointer data) |
| hide a GtkWindow | |
| void | add_gtk_close_event (GtkWidget *widg, GCallback handler, gpointer data) |
| add a close event signal and callback to a GtkWidget | |
| int | get_widget_width (GtkWidget *widg) |
| retrive GtkWidget width | |
| int | get_widget_height (GtkWidget *widg) |
| retrive GtkWidget height | |
GTK3/GTK4 utility subroutines, instead of having pre-processor flags everywhere in the code.
Whenever I need to use a GTK function that changed between v3 and v4,
I created an home made function declared in this file, and deal then here with the potential GTK versions issues.
Definition in file gtk-misc.c.
| GtkWidget * abox | ( | GtkWidget * | box, |
| char * | lab, | ||
| int | vspace ) |
box creating routine, to help design faster elements for the GUI
| box | the box to insert the new box into |
| lab | string to display |
| vspace | vertical space |
Definition at line 2023 of file gtk-misc.c.
| void add_box_child_end | ( | GtkWidget * | widg, |
| GtkWidget * | child, | ||
| gboolean | expand, | ||
| gboolean | fill, | ||
| int | padding ) |
Add a GtkWidget in a GtkBox at the end position.
| widg | the GtkBox |
| child | the GtkWidget to add |
| expand | GTK3 only: expandable |
| fill | GTK3 only: fill |
| padding | GTK3 only: box padding |
Definition at line 286 of file gtk-misc.c.
| void add_box_child_start | ( | int | orientation, |
| GtkWidget * | widg, | ||
| GtkWidget * | child, | ||
| gboolean | expand, | ||
| gboolean | fill, | ||
| int | padding ) |
Add a GtkWidget in a GtkBox at the initial position.
| orientation | horizontal or vertical |
| widg | the GtkBox |
| child | the GtkWidget to add |
| expand | GTK3 only: expandable |
| fill | GTK3 only: fill |
| padding | GTK3 only: box padding |
Definition at line 308 of file gtk-misc.c.
| GtkTextBuffer * add_buffer | ( | GCallback | handler, |
| gpointer | data, | ||
| gchar * | text ) |
create a GtkTextBuffer
| handler | the callback on buffer changed |
| data | the associated data pointer |
| text | the text to display |
Definition at line 1232 of file gtk-misc.c.
| void add_container_child | ( | int | type, |
| GtkWidget * | widg, | ||
| GtkWidget * | child ) |
Add a GtkWidget into another GtkWidget.
| type | GTK4 only: the type of container |
| widg | the container Gtkwidget |
| child | the child GtkWidget |
Definition at line 235 of file gtk-misc.c.
| void add_gtk_close_event | ( | GtkWidget * | widg, |
| GCallback | handler, | ||
| gpointer | data ) |
add a close event signal and callback to a GtkWidget
| widg | the GtkWidget |
| handler | the callback for the close event |
| data | the associated data pointer |
Definition at line 2522 of file gtk-misc.c.
| GtkWidget * add_vbox_to_layout | ( | GtkWidget * | layout, |
| int | size_x, | ||
| int | size_y ) |
Insert a vertical GtkBox in a GtkLatout then send back the GtkBox.
| layout | the GtkLayout |
| size_x | the x size of the box |
| size_y | the y size of the box |
Definition at line 874 of file gtk-misc.c.
| void adjust_label | ( | GtkWidget * | lab, |
| int | dimx, | ||
| int | dimy, | ||
| float | ax, | ||
| float | ay ) |
adjust the text position, and widget size of a GtkLabel
| lab | the GtkLabel to adjust |
| dimx | the x size |
| dimy | the y size |
| ax | the x alignment |
| ay | the y alignment |
Definition at line 1769 of file gtk-misc.c.
|
extern |
adjust the widgets of the preferences window
Definition at line 4687 of file preferences.c.
| void append_comments | ( | GtkWidget * | vbox, |
| gchar * | symbol, | ||
| gchar * | legend ) |
append comments to a vertical box
| vbox | the target vertical box |
| symbol | the symbol to legend |
| legend | the associated legend |
Definition at line 2004 of file gtk-misc.c.
| GtkWidget * bbox | ( | GtkWidget * | box, |
| char * | lab ) |
box creating routine, to help design faster elements for the GUI
| box | the box to insert the new box into |
| lab | string to display |
Definition at line 2040 of file gtk-misc.c.
| int button_get_status | ( | GtkWidget * | button | ) |
get status of check / toggle button
| button | the button to check |
Definition at line 1855 of file gtk-misc.c.
| void button_set_image | ( | GtkButton * | but, |
| gchar * | text, | ||
| int | format, | ||
| gpointer | image ) |
Add an image to a GtkButton.
| but | the GtkButton |
| text | the message to display |
| format | the image format |
| image | the data of the image |
Definition at line 1738 of file gtk-misc.c.
| void button_set_status | ( | GtkWidget * | button, |
| int | status ) |
set status of check / toggle button
| button | the button to update |
| status | the new status |
Definition at line 1872 of file gtk-misc.c.
| GtkWidget * cbox | ( | GtkWidget * | box, |
| char * | lab ) |
box creating routine, to help design faster elements for the GUI
| box | the box to insert the new box into |
| lab | string to display |
Definition at line 2058 of file gtk-misc.c.
| GtkWidget * check_button | ( | gchar * | text, |
| int | dimx, | ||
| int | dimy, | ||
| gboolean | state, | ||
| GCallback | handler, | ||
| gpointer | data ) |
create a check button
| text | the message to display |
| dimx | the x size |
| dimy | the y size |
| state | Checked or not (1/0) |
| handler | the callback for the button |
| data | the associated data pointer |
Definition at line 1893 of file gtk-misc.c.
| GtkWidget * color_button | ( | ColRGBA | col, |
| gboolean | alpha, | ||
| int | dimx, | ||
| int | dimy, | ||
| GCallback | handler, | ||
| gpointer | data ) |
create a color selection button
| col | the color to use |
| alpha | Use alpha channel (1/0) |
| dimx | Size x of the button |
| dimy | Size y of the button |
| handler | the callback for the button |
| data | the associated data pointer |
Definition at line 1789 of file gtk-misc.c.
| GdkRGBA colrgba_togtkrgba | ( | ColRGBA | col | ) |
convert ColRGBA color to GdkRGBA color
| col | the ColRGBA to convert |
Definition at line 1695 of file gtk-misc.c.
| int combo_get_active | ( | GtkWidget * | combo | ) |
retrieve the active item's position
| combo | the target GtkWidget |
Definition at line 909 of file gtk-misc.c.
| void combo_set_active | ( | GtkWidget * | combo, |
| int | pos ) |
set the active item's position
| combo | the target GtkWidget |
| pos | the position to set |
Definition at line 932 of file gtk-misc.c.
| void combo_set_markup | ( | GtkWidget * | combo | ) |
use pango markup in combo widget
| combo | to the target widget |
Definition at line 944 of file gtk-misc.c.
| void combo_text_append | ( | GtkWidget * | combo, |
| gchar * | text ) |
append text in GtkComboBox widget
| combo | the GtkWidget |
| text | the text to append |
Definition at line 961 of file gtk-misc.c.
| void combo_text_prepend | ( | GtkWidget * | combo, |
| gchar * | text ) |
prepend text in GtkComboBox widget
| combo | the GtkWidget |
| text | the text to prepend |
Definition at line 974 of file gtk-misc.c.
| GdkPixbuf * convert_to_pixbuf | ( | cairo_surface_t * | surf | ) |
convert cairo surface to GdkPixbuf
| surf | the cairo sufrace to convert |
Definition at line 1325 of file gtk-misc.c.
| GtkWidget * create_button | ( | gchar * | text, |
| int | image_format, | ||
| gchar * | image, | ||
| int | dimx, | ||
| int | dimy, | ||
| int | relief, | ||
| GCallback | handler, | ||
| gpointer | data ) |
create a simple button
| text | the message to display |
| image_format | the image format |
| image | the name of the stock image |
| dimx | the x size |
| dimy | the y size |
| relief | button should appear pressed or not (1/0) |
| handler | the callback for the button |
| data | the associated data pointer |
Definition at line 1955 of file gtk-misc.c.
| GtkWidget * create_combo | ( | ) |
create a GtkCombox widget, note deprecated in GTK4
Definition at line 984 of file gtk-misc.c.
| GtkWidget * create_entry | ( | GCallback | handler, |
| int | dim, | ||
| int | cdim, | ||
| gboolean | key_release, | ||
| gpointer | data ) |
Create a GtkEntry.
| handler | the callback |
| dim | the x size |
| cdim | the maximum number of character to display |
| key_release | Use release event (1/0) |
| data | the data pointer for the callback |
Definition at line 1375 of file gtk-misc.c.
| GtkWidget * create_expander | ( | gchar * | name, |
| gchar * | file_img ) |
create GtkExpander
| name | Name of the expander tab |
| file_img | image file to add if required |
Definition at line 2119 of file gtk-misc.c.
| GtkWidget * create_file_chooser | ( | const gchar * | title, |
| GtkWindow * | parent, | ||
| GtkFileChooserAction | act, | ||
| const gchar * | act_name ) |
create a GtkFileChooser, utility to select file(s)
| title | the title of the window |
| parent | the parent window, if any |
| act | the action to perform (read or write) |
| act_name | the action name to display |
Definition at line 2358 of file gtk-misc.c.
| GtkWidget * create_hbox | ( | int | spacing | ) |
create a GtkBox with horizontal orientation
| spacing | spacing between elements |
Definition at line 823 of file gtk-misc.c.
| GtkWidget * create_hscale | ( | float | min, |
| float | max, | ||
| float | delta, | ||
| float | val, | ||
| int | pos, | ||
| int | round, | ||
| int | size, | ||
| GCallback | handler, | ||
| GCallback | scroll_handler, | ||
| gpointer | data ) |
create an horizontal scale GtkWidget
| min | Min value for the h scale |
| max | Max value for the h scale |
| delta | the step on the h scale |
| val | the value to position to set on the h scale |
| pos | the location where the value is on display |
| round | the rounding digit for the value on display |
| size | the x size of the GtkWdiget |
| handler | the callback to move the h scale |
| scroll_handler | the callback on mouse scroll |
| data | the associated data pointer |
Definition at line 754 of file gtk-misc.c.
| GtkWidget * create_image_from_data | ( | int | format, |
| gpointer | item_image ) |
create Gtk image for data
| format | Image format |
| item_image | the data to create the image |
Definition at line 1504 of file gtk-misc.c.
| GtkWidget * create_layout | ( | int | x, |
| int | y ) |
create a GtkLayout / GtkFixed widget
| x | the x size of the widget |
| y | the y size of the widget |
Definition at line 890 of file gtk-misc.c.
| GtkWidget * create_scroll | ( | GtkWidget * | box, |
| int | dimx, | ||
| int | dimy, | ||
| int | shadow ) |
create a scroll window
| box | the box to insert the scroll window in, if any |
| dimx | the x size of the widget |
| dimy | the x size of the widget |
| shadow | Add shadow (1/0) |
Definition at line 2095 of file gtk-misc.c.
| GtkWidget * create_text_view | ( | int | dimx, |
| int | dimy, | ||
| int | edit, | ||
| int | mono, | ||
| GCallback | handler, | ||
| gpointer | data, | ||
| gchar * | text ) |
create a GtkTextView and display some text
| dimx | the x size of the GtkTextView |
| dimy | the y size of the GtkTextView |
| edit | Is the text view editable (1/0) |
| mono | Use monospace font (1/0) |
| handler | the callback on buffer changed |
| data | the associated data pointer |
| text | the text to display |
Definition at line 1260 of file gtk-misc.c.
| GtkWidget * create_vbox | ( | int | spacing | ) |
create a GtkBox with vertical orientation
| spacing | spacing between elements |
Definition at line 811 of file gtk-misc.c.
| GtkWidget * create_vscale | ( | float | min, |
| float | max, | ||
| float | delta, | ||
| float | val, | ||
| int | pos, | ||
| int | round, | ||
| int | size, | ||
| GCallback | handler, | ||
| GCallback | scroll_handler, | ||
| gpointer | data ) |
create an vertical scale GtkWidget
| min | Min value for the v scale |
| max | Max value for the v scale |
| delta | the step on the v scale |
| val | the value to position to set on the h scale |
| pos | the location where the value is on display |
| round | the rounding digit for the value on display |
| size | the x size of the GtkWdiget |
| handler | the callback to move the v scale |
| scroll_handler | the callback on mouse scroll |
| data | the associated data pointer |
Definition at line 788 of file gtk-misc.c.
| GtkWidget * create_win | ( | gchar * | str, |
| GtkWidget * | parent, | ||
| gboolean | modal, | ||
| gboolean | resiz ) |
create a new GtkWindow
| str | Title |
| parent | Parent GtkWidget (if any) |
| modal | Modal (TRUE/FALSE) |
| resiz | Can be re-sized (TRUE/FALSE) |
Definition at line 454 of file gtk-misc.c.
| void destroy_this_dialog | ( | GtkDialog * | dialog | ) |
destroy a GtkDialog
| dialog | the GtkDialog to destroy |
Definition at line 2200 of file gtk-misc.c.
| void destroy_this_native_dialog | ( | GtkNativeDialog * | dialog | ) |
destroy a GtkNativeDialog
| dialog | the GtkNativeDialog to destroy |
Definition at line 2219 of file gtk-misc.c.
| GtkWidget * destroy_this_widget | ( | GtkWidget * | widg | ) |
destroy a GtkWidget
| widg | the GtkWidget to destroy |
Definition at line 2169 of file gtk-misc.c.
| G_MODULE_EXPORT gboolean destroy_this_window | ( | GtkWidget * | win, |
| GdkEvent * | event, | ||
| gpointer | data ) |
destroy a GtkWindow
| win | the GtkWindow to destroy |
| event | the GdkEvent triggering the signal |
| data | the associated data pointer |
Definition at line 2479 of file gtk-misc.c.
| GtkWidget * dialog_cancel_apply | ( | gchar * | title, |
| GtkWidget * | parent, | ||
| gboolean | resiz ) |
create a dialog modal offering a choice to apply something or not
| title | the message |
| parent | the parent window, if any |
| resiz | Is the new window re-sizable ? |
Definition at line 571 of file gtk-misc.c.
| GtkWidget * dialog_get_content_area | ( | GtkWidget * | widg | ) |
prepare GtkWidget to insert content in a GtkDialog window
| widg | the GtkDialog window |
Definition at line 835 of file gtk-misc.c.
| GtkWidget * dialogmodal | ( | gchar * | str, |
| GtkWindow * | parent ) |
Create a new dialog modal window.
| str | Title |
| parent | Parent GtkWindow, if any |
Definition at line 520 of file gtk-misc.c.
duplicate a ColRGBA pointer
| num | Size of the pointer |
| col | ColRGBA pointer to duplicate |
Definition at line 1663 of file gtk-misc.c.
| const gchar * entry_get_text | ( | GtkEntry * | entry | ) |
| GtkWidget * fbox | ( | GtkWidget * | box, |
| char * | lab ) |
box creating routine, to help design faster elements for the GUI
| box | the box to insert the new box into |
| lab | string to display |
Definition at line 2076 of file gtk-misc.c.
| gchar * file_chooser_get_current_folder | ( | GtkFileChooser * | chooser | ) |
get the current folder for a GtkFileChooser
| chooser | the GtkFilechooser |
Definition at line 2287 of file gtk-misc.c.
| gchar * file_chooser_get_file_name | ( | GtkFileChooser * | chooser | ) |
get a file name from a GtkFileChooser (single file selected)
| chooser | the GtkFilechooser |
Definition at line 2271 of file gtk-misc.c.
| GSList * file_chooser_get_file_names | ( | GtkFileChooser * | chooser | ) |
create a file list from files selected using a GtkFileChooser
Definition at line 2258 of file gtk-misc.c.
| void file_chooser_set_current_folder | ( | GtkFileChooser * | chooser | ) |
set current folder in a GtkFilechooser
| chooser | the GtkFilechooser |
Definition at line 2323 of file gtk-misc.c.
| gboolean file_chooser_set_file_name | ( | GtkFileChooser * | chooser, |
| gchar * | filename ) |
set file name in a GtkFilechooser
| chooser | the GtkFilechooser |
| filename | the file name to appear in the GtkFilechooser |
Definition at line 2304 of file gtk-misc.c.
| GtkWidget * font_button | ( | gchar * | font, |
| int | dimx, | ||
| int | dimy, | ||
| GCallback | handler, | ||
| gpointer | data ) |
create a font selection button
| font | the font to use |
| dimx | Size x of the button |
| dimy | Size y of the button |
| handler | the callback for the button |
| data | the associated data pointer |
Definition at line 1811 of file gtk-misc.c.
| ColRGBA gdkrgba_to_rgba | ( | GdkRGBA | colgdk | ) |
convert GdkRGBA color to ColRGBA color
| colgdk | the GdkRGBA to convert |
Definition at line 1678 of file gtk-misc.c.
| ColRGBA get_button_color | ( | GtkColorChooser * | colob | ) |
get the ColRGBA color from a GtkColorChooser button
| colob | the GtkColorChooser button |
Definition at line 2371 of file gtk-misc.c.
| GtkWidget * get_top_level | ( | GtkWidget * | widg | ) |
get the top level container, window, of a widget
| widg | the GtkWidget |
Definition at line 2450 of file gtk-misc.c.
| int get_widget_height | ( | GtkWidget * | widg | ) |
| int get_widget_width | ( | GtkWidget * | widg | ) |
| ColRGBA get_window_color | ( | GtkWidget * | color_win | ) |
get the ColRGBA color from a color selection window
| color_win | the color selection window |
Definition at line 2385 of file gtk-misc.c.
| void gtk_label_align | ( | GtkWidget * | lab, |
| float | ax, | ||
| float | ay ) |
set text alignment in a GtkLabel
| lab | the GtkLabel |
| ax | the x alignment |
| ay | the Y alignment |
Definition at line 711 of file gtk-misc.c.
| void hide_the_widgets | ( | GtkWidget * | widg | ) |
| G_MODULE_EXPORT gboolean hide_this_window | ( | GtkWidget * | win, |
| GdkEvent * | event, | ||
| gpointer | data ) |
hide a GtkWindow
| win | the GtkWindow to hide |
| event | the GdkEvent triggering the signal |
| data | the associated data pointer |
Definition at line 2506 of file gtk-misc.c.
| gboolean is_the_widget_visible | ( | GtkWidget * | widg | ) |
test if a GtkWidget exist, then return if it is visible or not
| widg | the GtkWidget |
Definition at line 724 of file gtk-misc.c.
| void layout_add_widget | ( | GtkWidget * | layout, |
| GtkWidget * | child, | ||
| int | x_pos, | ||
| int | y_pos ) |
Add a GtkWidget in a GtkLayout.
| layout | the GtkLayout |
| child | the GtkWidget to insert |
| x_pos | the x position to insert at |
| y_pos | the y position to insert at |
Definition at line 856 of file gtk-misc.c.
| GtkWidget * markup_label | ( | gchar * | text, |
| int | dimx, | ||
| int | dimy, | ||
| float | ax, | ||
| float | ay ) |
create a GtkLabel with pango markup
| text | Message to display |
| dimx | y size for the widget |
| dimy | y size for the widget |
| ax | x alignment |
| ay | y alignment |
Definition at line 1646 of file gtk-misc.c.
| GtkWidget * message_dialogmodal | ( | gchar * | message, |
| gchar * | title, | ||
| GtkMessageType | mtype, | ||
| GtkButtonsType | buttons, | ||
| GtkWidget * | parent ) |
create a modal (cannot be ignored) message window
| message | the message |
| title | the title |
| mtype | the message type |
| buttons | the type of closing button to add |
| parent | the parent window, if any |
Definition at line 541 of file gtk-misc.c.
| GtkWidget * new_gtk_window | ( | ) |
create a new GtkWindow
Definition at line 357 of file gtk-misc.c.
| void pop_menu_at_pointer | ( | GtkWidget * | widg, |
| GdkEvent * | event ) |
popup a menu at pointer location
| widg | the menu to popup |
| event | the GdkEvent triggering the signal |
Definition at line 2436 of file gtk-misc.c.
| void provide_gtk_css | ( | gchar * | css | ) |
create a css provider based on the css data
| css | the css data, use the name of the variable to use the css |
Definition at line 2141 of file gtk-misc.c.
| GtkWidget * radio_button | ( | gchar * | text, |
| int | dimx, | ||
| int | dimy, | ||
| gboolean | state, | ||
| GCallback | handler, | ||
| gpointer | data ) |
create a radio button
| text | the message to display |
| dimx | the x size |
| dimy | the y size |
| state | Checked or not (1/0) |
| handler | the callback for the button |
| data | the associated data pointer |
Definition at line 1926 of file gtk-misc.c.
| void resize_this_window | ( | GtkWidget * | window, |
| int | x, | ||
| int | y ) |
resize this GtkWindow
| window | the GtkWidget to resize |
| x | the x size |
| y | the y size |
Definition at line 591 of file gtk-misc.c.
| G_MODULE_EXPORT void run_destroy_dialog | ( | GtkDialog * | dialog, |
| gint | response_id, | ||
| gpointer | data ) |
to destroy a GtkDialog when the dialog emit the closing signal
| dialog | the GtkDialog to destroy |
| response_id | the response id |
| data | the associated data pointer |
Definition at line 2237 of file gtk-misc.c.
| void run_this_gtk_dialog | ( | GtkWidget * | dial, |
| GCallback | handler, | ||
| gpointer | data ) |
run a GTK (3 and 4) basic GtkDialog
| dial | the GtkDialog |
| handler | the callback |
| data | the associated data pointer |
Definition at line 501 of file gtk-misc.c.
| void set_color_chooser_color | ( | GtkWidget * | color_win, |
| ColRGBA | col ) |
set the color of a color selection window
| color_win | the color selection window |
| col | the color to use |
Definition at line 2400 of file gtk-misc.c.
| void set_image_from_icon_name | ( | GtkWidget * | widg, |
| gchar * | icon ) |
set a image from a stock icon name
| widg | the GtkImage to modify |
| icon | the name of the stock icon |
Definition at line 1986 of file gtk-misc.c.
| void set_renderer_color | ( | int | tocol, |
| GtkCellRenderer * | renderer, | ||
| ColRGBA | col ) |
set the color of a GtkCellRenderer
| tocol | Apply color (1/0) |
| renderer | the GtkCellRenderer |
| col | the color to apply |
Definition at line 1714 of file gtk-misc.c.
| void setup_text_tags | ( | GtkTextBuffer * | buffer | ) |
prepare the available text tags for the GtkTextBuffer
| buffer | the GtkTextBuffer |
Definition at line 996 of file gtk-misc.c.
| void show_the_widgets | ( | GtkWidget * | widg | ) |
| GtkWidget * spin_button | ( | GCallback | handler, |
| double | value, | ||
| double | start, | ||
| double | end, | ||
| double | step, | ||
| int | digits, | ||
| int | dim, | ||
| gpointer | data ) |
create a spin button
| handler | the callback for the button |
| value | Initial value for the spin button |
| start | Minimum value |
| end | Maximum value |
| step | Step between values |
| digits | Number of digits displayed |
| dim | Size x of the button |
| data | the associated data pointer |
Definition at line 1833 of file gtk-misc.c.
| GtkWidget * stock_image | ( | const gchar * | stock_id | ) |
create a GtkImage for the Gtk database
| stock_id |
Definition at line 1425 of file gtk-misc.c.
| void text_view_set_monospace | ( | GtkWidget * | view | ) |
set the font of a GtkTextView as monospace
| view | the GtkTextView |
Definition at line 697 of file gtk-misc.c.
| G_MODULE_EXPORT void to_activate_entry | ( | GtkEventControllerFocus * | focus, |
| gpointer | data ) |
GtkEntry activate signal managment.
| focus | Focus event controller |
| data | the associated data pointer |
Definition at line 1358 of file gtk-misc.c.
| void update_entry_double | ( | GtkEntry * | entry, |
| double | doubleval ) |
update the content of a GtkEntry as double
| entry | the GtkEntry |
| doubleval | the new double value to display |
Definition at line 643 of file gtk-misc.c.
| void update_entry_int | ( | GtkEntry * | entry, |
| int | intval ) |
update the content of a GtkEntry as int
| entry | the GtkEntry |
| intval | the new int value to display |
Definition at line 624 of file gtk-misc.c.
| void update_entry_long_double | ( | GtkEntry * | entry, |
| double | doubleval ) |
update the content of a GtkEntry as long double
| entry | the GtkEntry |
| doubleval | the new long double value to display |
Definition at line 662 of file gtk-misc.c.
| void update_entry_text | ( | GtkEntry * | entry, |
| gchar * | text ) |
update the content of a GtkEntry as string
| entry | the GtkEntry |
| text | the new string to display |
Definition at line 681 of file gtk-misc.c.
| void widget_set_sensitive | ( | GtkWidget * | widg, |
| gboolean | sensitive ) |
Set sensitivity for a GtkWidget, ensuring it is a GtkWidget.
| widg | the GtkWidget |
| sensitive | Sensitivity |
Definition at line 215 of file gtk-misc.c.