28 |
28 |
29 #ifndef TOOLBAR_H |
29 #ifndef TOOLBAR_H |
30 #define TOOLBAR_H |
30 #define TOOLBAR_H |
31 |
31 |
32 #include "../ui/toolbar.h" |
32 #include "../ui/toolbar.h" |
33 #include <ucx/map.h> |
33 #include "../common/toolbar.h" |
34 #include <ucx/list.h> |
34 #include <cx/map.h> |
|
35 #include <cx/list.h> |
35 |
36 |
36 #include "model.h" |
37 #include "list.h" |
37 #include "tree.h" |
|
38 |
38 |
39 #ifdef __cplusplus |
39 #ifdef __cplusplus |
40 extern "C" { |
40 extern "C" { |
41 #endif |
41 #endif |
42 |
42 |
|
43 #if UI_GTK2 || UI_GTK3 |
|
44 |
43 typedef struct UiToolItemI UiToolItemI; |
45 typedef struct UiToolItemI UiToolItemI; |
44 typedef struct UiToolItem UiToolItem; |
46 typedef struct UiToolItem UiToolItem; |
45 typedef struct UiStToolItem UiStToolItem; |
47 typedef struct UiStToolItem UiStToolItem; |
46 typedef struct UiToggleToolItem UiToggleToolItem; |
48 typedef struct UiToggleToolItem UiToggleToolItem; |
47 |
49 |
112 void *userdata, |
113 void *userdata, |
113 va_list ap); |
114 va_list ap); |
114 |
115 |
115 GtkWidget* ui_create_toolbar(UiObject *obj); |
116 GtkWidget* ui_create_toolbar(UiObject *obj); |
116 |
117 |
117 void add_toolitem_widget(GtkToolbar *tb, UiToolItem *item, UiObject *obj); |
118 void ui_toolbar_add_items(UiObject *obj, GtkWidget *toolbar, CxMap *items, CxList *defaults); |
118 void add_toolitem_st_widget(GtkToolbar *tb, UiStToolItem *item, UiObject *obj); |
|
119 void add_toolitem_toggle_widget(GtkToolbar *tb, UiToggleToolItem *item, UiObject *obj); |
|
120 |
119 |
|
120 void add_toolitem_widget(GtkToolbar *tb, UiToolbarItem *item, UiObject *obj); |
|
121 void add_toolitem_toggle_widget(GtkToolbar *tb, UiToolbarToggleItem *item, UiObject *obj); |
|
122 void add_toolitem_menu_widget(GtkToolbar *tb, UiToolbarMenuItem *item, UiObject *obj); |
|
123 |
|
124 void ui_tool_button_toggled(GtkToggleToolButton *widget, UiVarEventData *event); |
|
125 int64_t ui_tool_toggle_button_get(UiInteger *integer); |
|
126 void ui_tool_toggle_button_set(UiInteger *integer, int64_t value); |
|
127 |
|
128 GtkWidget* ui_create_headerbar(UiObject *obj); |
|
129 |
|
130 void ui_toolbar_headerbar_add_items(UiObject *obj, GtkWidget *headerbar, CxMap *items, CxList *defaults); |
|
131 |
|
132 void add_headerbar_item_widget(GtkHeaderBar *hb, UiToolbarItem *item, UiObject *obj); |
|
133 void add_headerbar_item_toggle_widget(GtkHeaderBar *hb, UiToolbarToggleItem *item, UiObject *obj); |
|
134 void add_headerbar_item_menu_widget(GtkHeaderBar *hb, UiToolbarMenuItem *item, UiObject *obj); |
|
135 |
|
136 |
|
137 /* |
121 void add_toolbar_combobox(GtkToolbar *tb, UiToolbarComboBox *cb, UiObject *obj); |
138 void add_toolbar_combobox(GtkToolbar *tb, UiToolbarComboBox *cb, UiObject *obj); |
122 void add_toolbar_combobox_nv(GtkToolbar *tb, UiToolbarComboBoxNV *cb, UiObject *obj); |
139 void add_toolbar_combobox_nv(GtkToolbar *tb, UiToolbarComboBoxNV *cb, UiObject *obj); |
123 void ui_combobox_change_event(GtkComboBox *widget, UiEventData *e); |
140 void ui_combobox_change_event(GtkComboBox *widget, UiEventData *e); |
124 void ui_combobox_update(UiEvent *event, void *combobox); |
141 void ui_combobox_update(UiEvent *event, void *combobox); |
|
142 */ |
125 |
143 |
126 void ui_tool_button_toggled(GtkToggleToolButton *widget, UiEventData *event); |
144 #endif |
127 int64_t ui_tool_toggle_button_get(UiInteger *integer); |
|
128 void ui_tool_toggle_button_set(UiInteger *integer, int64_t value); |
|
129 |
145 |
130 #ifdef __cplusplus |
146 #ifdef __cplusplus |
131 } |
147 } |
132 #endif |
148 #endif |
133 |
149 |