Wed, 11 Feb 2015 11:34:55 +0100
added toolbar combobox (GTK)
84
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
1 | #include <stdio.h> |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
2 | #include <stdlib.h> |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
3 | |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
4 | #include "container.h" |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
5 | #include "../common/object.h" |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
6 | |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
7 | UIWIDGET ui_vbox(UiObject *obj) { |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
8 | UiContainer *ct = uic_get_current_container(obj); |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
9 | |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
10 | UIWIDGET *vbox = UIvbox(ct); |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
11 | |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
12 | UiObject *newobj = uic_object_new(obj, vbox); |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
13 | newobj->container = (UiContainer*)vbox; |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
14 | uic_obj_add(obj, newobj); |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
15 | |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
16 | return vbox; |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
17 | } |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
18 | |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
19 | UIWIDGET ui_hbox(UiObject *obj) { |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
20 | UiContainer *ct = uic_get_current_container(obj); |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
21 | |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
22 | UIWIDGET *hbox = UIhbox(ct); |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
23 | |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
24 | UiObject *newobj = uic_object_new(obj, hbox); |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
25 | newobj->container = (UiContainer*)hbox; |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
26 | uic_obj_add(obj, newobj); |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
27 | |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
28 | return hbox; |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
29 | } |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
30 | |
85
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
31 | |
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
32 | /* |
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
33 | * -------------------- Layout Functions -------------------- |
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
34 | * |
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
35 | * functions for setting layout attributes for the current container |
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
36 | * |
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
37 | */ |
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
38 | |
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
39 | void ui_layout_fill(UiObject *obj, UiBool fill) { |
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
40 | UiContainer *ct = uic_get_current_container(obj); |
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
41 | UIlayout_fill(ct, fill); |
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
42 | } |
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
43 | |
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
44 | void ui_newline(UiObject *obj) { |
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
45 | UiContainer *ct = uic_get_current_container(obj); |
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
46 | |
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
47 | } |