32#ifndef WIDGETS_HELPER_H
34#define WIDGETS_HELPER_H
36#include "ui_manager.h"
40void wh_put_in_hbox_and_attach_to_vbox(GtkWidget *widget, GtkWidget *vbox, gint vertical_margin);
41GtkWidget *wh_put_in_new_hbox_with_margin_level(GtkWidget *widget, gint margin_level);
42GtkWidget *wh_put_in_new_hbox(GtkWidget *widget, gint margin, gboolean expand, gboolean fill);
43void wh_put_in_hbox_and_attach_to_vbox_with_bottom_margin(GtkWidget *widget, GtkWidget *vbox,
44 gint vertical_margin, gint bottom_margin);
46void wh_add_box_to_scrolled_window(GtkWidget *box, GtkWidget *scrolled_window);
48GtkWidget *wh_new_table();
49void wh_add_in_table(GtkWidget *table, GtkWidget *widget);
50void wh_add_in_table_with_label(GtkWidget *table,
const gchar *label_text,
52void wh_add_in_table_with_label_expand(GtkWidget *table,
const gchar *label_text,
55GtkWidget *wh_new_entry(gpointer callback,
ui_state *ui);
57GtkWidget *wh_new_button(
const gchar *button_label);
59void wh_get_widget_size(GtkWidget *widget, gint *width, gint *height);
61void wh_set_browser_directory_handler(
ui_state *ui, GtkWidget* dialog);
63GtkWidget *wh_create_int_spinner_in_box(gchar *before_label, gchar *after_label,
64 gdouble initial_value,
65 gdouble minimum_value, gdouble maximum_value,
66 gdouble step_increment, gdouble page_increment,
67 gchar *after_newline_label,
68 void (*spinner_callback)(GtkWidget *spinner,
ui_state *ui),
72GtkWidget *wh_create_int_spinner_in_box_with_top_width(gchar *before_label, gchar *after_label,
73 gdouble initial_value,
74 gdouble minimum_value, gdouble maximum_value,
75 gdouble step_increment, gdouble page_increment,
76 gchar *after_newline_label,
77 void (*spinner_callback)(GtkWidget *spinner,
ui_state *ui),
79 GtkWidget *box, gint top_width);
81GtkWidget *wh_hbox_new();
82GtkWidget *wh_vbox_new();
83GtkWidget *wh_hscale_new(GtkAdjustment *adjustment);
84GtkWidget *wh_hscale_new_with_range(gdouble min, gdouble max, gdouble step);
85void wh_get_pointer(GdkEventMotion *event, gint *x, gint *y, GdkModifierType *state);
91GtkWidget *wh_create_cool_button(gchar *stock_id, gchar *label_text,
93GtkWidget *wh_create_cool_label(gchar *stock_id, gchar *label_text);
95void wh_set_image_on_button(GtkButton *button, GtkWidget *image);
97GtkWidget *wh_create_window_with_close_button(gchar *title, gint width, gint height,
98 GtkWindowPosition position, GtkWindow *parent_window,
99 GtkWidget *main_area_widget, GtkWidget *bottom_widget, ...);
100void wh_show_window(GtkWidget *window);