ui/gtk/container.h

changeset 102
64ded9f6a6c6
parent 101
7b3a3130be44
equal deleted inserted replaced
101:7b3a3130be44 102:64ded9f6a6c6
29 #ifndef CONTAINER_H 29 #ifndef CONTAINER_H
30 #define CONTAINER_H 30 #define CONTAINER_H
31 31
32 #include "../ui/toolkit.h" 32 #include "../ui/toolkit.h"
33 #include "../ui/container.h" 33 #include "../ui/container.h"
34 #include "toolkit.h"
34 #include <string.h> 35 #include <string.h>
35 36
36 #include <cx/allocator.h> 37 #include <cx/allocator.h>
37 #include <cx/hash_map.h> 38 #include <cx/hash_map.h>
38 39
63 char *label; 64 char *label;
64 UiBool hexpand; 65 UiBool hexpand;
65 UiBool vexpand; 66 UiBool vexpand;
66 UiBool hfill; 67 UiBool hfill;
67 UiBool vfill; 68 UiBool vfill;
69 UiBool override_defaults;
68 int width; 70 int width;
69 int colspan; 71 int colspan;
70 int rowspan; 72 int rowspan;
71 }; 73 };
72 74
87 UiBool has_fill; 89 UiBool has_fill;
88 } UiBoxContainer; 90 } UiBoxContainer;
89 91
90 typedef struct UiGridContainer { 92 typedef struct UiGridContainer {
91 UiContainer container; 93 UiContainer container;
94 UiBool def_hexpand;
95 UiBool def_vexpand;
96 UiBool def_hfill;
97 UiBool def_vfill;
92 int x; 98 int x;
93 int y; 99 int y;
94 #ifdef UI_GTK2 100 #ifdef UI_GTK2
95 int width; 101 int width;
96 int height; 102 int height;
97 #endif 103 #endif
98 } UiGridContainer; 104 } UiGridContainer;
99
100 /*
101 typedef struct UiPanedContainer {
102 UiContainer container;
103 GtkWidget *current_pane;
104 int orientation;
105 int max;
106 int cur;
107 } UiPanedContainer;
108 */
109 105
110 typedef struct UiTabViewContainer { 106 typedef struct UiTabViewContainer {
111 UiContainer container; 107 UiContainer container;
112 } UiTabViewContainer; 108 } UiTabViewContainer;
113 109
124 int margin; 120 int margin;
125 int spacing; 121 int spacing;
126 int columnspacing; 122 int columnspacing;
127 int rowspacing; 123 int rowspacing;
128 } UiGtkTabView; 124 } UiGtkTabView;
125
126
127 typedef struct UiSplitPaneContainer {
128 UiContainer container;
129 GtkWidget *current_pane;
130 UiOrientation orientation;
131 int pos;
132 int max;
133 int nchildren;
134 } UiSplitPaneContainer;
129 135
130 typedef struct UiHeaderbarContainer { 136 typedef struct UiHeaderbarContainer {
131 UiContainer container; 137 UiContainer container;
132 GtkWidget *centerbox; 138 GtkWidget *centerbox;
133 int part; 139 int part;
168 174
169 UiContainer* ui_box_container(UiObject *obj, GtkWidget *box, UiSubContainerType type); 175 UiContainer* ui_box_container(UiObject *obj, GtkWidget *box, UiSubContainerType type);
170 void ui_box_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill); 176 void ui_box_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill);
171 177
172 GtkWidget* ui_create_grid_widget(int colspacing, int rowspacing); 178 GtkWidget* ui_create_grid_widget(int colspacing, int rowspacing);
173 UiContainer* ui_grid_container(UiObject *obj, GtkWidget *grid); 179 UiContainer* ui_grid_container(
180 UiObject *obj,
181 GtkWidget *grid,
182 UiBool def_hexpand,
183 UiBool def_vexpand,
184 UiBool def_hfill,
185 UiBool def_vfill);
174 void ui_grid_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill); 186 void ui_grid_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill);
175 187
176 UiContainer* ui_frame_container(UiObject *obj, GtkWidget *frame); 188 UiContainer* ui_frame_container(UiObject *obj, GtkWidget *frame);
177 void ui_frame_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill); 189 void ui_frame_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill);
178 190
183 void ui_scrolledwindow_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill); 195 void ui_scrolledwindow_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill);
184 196
185 UiContainer* ui_tabview_container(UiObject *obj, GtkWidget *tabview); 197 UiContainer* ui_tabview_container(UiObject *obj, GtkWidget *tabview);
186 void ui_tabview_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill); 198 void ui_tabview_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill);
187 199
188 void ui_paned_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill); 200 UiContainer* ui_splitpane_container(UiObject *obj, GtkWidget *pane, UiOrientation orientation, int max);
189 201 void ui_splitpane_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill);
190 void ui_split_container_add1(UiContainer *ct, GtkWidget *widget, UiBool fill); 202
191 void ui_split_container_add2(UiContainer *ct, GtkWidget *widget, UiBool fill);
192 203
193 UiGtkTabView* ui_widget_get_tabview_data(UIWIDGET tabview); 204 UiGtkTabView* ui_widget_get_tabview_data(UIWIDGET tabview);
194 205
195 void ui_gtk_notebook_select_tab(GtkWidget *widget, int tab); 206 void ui_gtk_notebook_select_tab(GtkWidget *widget, int tab);
196 207

mercurial