32 #ifndef WIDGETS_HELPER_H
34 #define WIDGETS_HELPER_H
36 #include "ui_manager.h"
40 void wh_put_in_hbox_and_attach_to_vbox(GtkWidget *widget, GtkWidget *vbox, gint vertical_margin);
41 GtkWidget *wh_put_in_new_hbox_with_margin_level(GtkWidget *widget, gint margin_level);
42 void wh_put_in_hbox_and_attach_to_vbox_with_bottom_margin(GtkWidget *widget, GtkWidget *vbox,
43 gint vertical_margin, gint bottom_margin);
45 GtkWidget *wh_new_table();
46 void wh_add_in_table(GtkWidget *table, GtkWidget *widget);
47 void wh_add_in_table_with_label(GtkWidget *table,
const gchar *label_text,
49 void wh_add_in_table_with_label_expand(GtkWidget *table,
const gchar *label_text,
52 GtkWidget *wh_new_entry(gpointer callback,
ui_state *ui);
54 GtkWidget *wh_new_button(
const gchar *button_label);
56 void wh_get_widget_size(GtkWidget *widget, gint *width, gint *height);
58 void wh_set_browser_directory_handler(
ui_state *ui, GtkWidget* dialog);
60 GtkWidget *wh_create_int_spinner_in_box(gchar *before_label, gchar *after_label,
61 gdouble initial_value,
62 gdouble minimum_value, gdouble maximum_value,
63 gdouble step_increment, gdouble page_increment,
64 gchar *after_newline_label,
65 void (*spinner_callback)(GtkWidget *spinner,
ui_state *ui),
69 GtkWidget *wh_create_int_spinner_in_box_with_top_width(gchar *before_label, gchar *after_label,
70 gdouble initial_value,
71 gdouble minimum_value, gdouble maximum_value,
72 gdouble step_increment, gdouble page_increment,
73 gchar *after_newline_label,
74 void (*spinner_callback)(GtkWidget *spinner,
ui_state *ui),
76 GtkWidget *box, gint top_width);
78 GtkWidget *wh_hbox_new();
79 GtkWidget *wh_vbox_new();
80 GtkWidget *wh_hscale_new(GtkAdjustment *adjustment);
81 GtkWidget *wh_hscale_new_with_range(gdouble min, gdouble max, gdouble step);
82 void wh_get_pointer(GdkEventMotion *event, gint *x, gint *y, GdkModifierType *state);
90 GtkWidget *wh_create_cool_label(gchar *stock_id, gchar *label_text);
92 void wh_set_image_on_button(GtkButton *button, GtkWidget *image);
94 GtkWidget *wh_create_window_with_close_button(gchar *title, gint width, gint height,
95 GtkWindowPosition position, GtkWindow *parent_window,
96 GtkWidget *main_area_widget, GtkWidget *bottom_widget, ...);
97 void wh_show_window(GtkWidget *window);