Mon, 05 Jan 2015 11:49:46 +0100
added textfield and some container fixes (Motif)
4
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
1 | /* |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
3 | * |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
4 | * Copyright 2014 Olaf Wintermann. All rights reserved. |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
5 | * |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
6 | * Redistribution and use in source and binary forms, with or without |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
7 | * modification, are permitted provided that the following conditions are met: |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
8 | * |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
9 | * 1. Redistributions of source code must retain the above copyright |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
10 | * notice, this list of conditions and the following disclaimer. |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
11 | * |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
12 | * 2. Redistributions in binary form must reproduce the above copyright |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
13 | * notice, this list of conditions and the following disclaimer in the |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
14 | * documentation and/or other materials provided with the distribution. |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
15 | * |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
26 | * POSSIBILITY OF SUCH DAMAGE. |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
27 | */ |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
28 | |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
29 | #include <stdio.h> |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
30 | #include <stdlib.h> |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
31 | |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
32 | #include "container.h" |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
33 | #include "../common/context.h" |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
34 | #include "../common/object.h" |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
35 | |
59
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
36 | static UiBool ui_lb2bool(UiLayoutBool b) { |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
37 | return b == UI_LAYOUT_TRUE ? TRUE : FALSE; |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
38 | } |
4
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
39 | |
59
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
40 | static UiLayoutBool ui_bool2lb(UiBool b) { |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
41 | return b ? UI_LAYOUT_TRUE : UI_LAYOUT_FALSE; |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
42 | } |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
43 | |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
44 | GtkWidget* ui_gtk_vbox_new() { |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
45 | #ifdef UI_GTK3 |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
46 | return gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
47 | #else |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
48 | return gtk_vbox_new(FALSE, 0); |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
49 | #endif |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
50 | } |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
51 | |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
52 | GtkWidget* ui_gtk_hbox_new() { |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
53 | #ifdef UI_GTK3 |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
54 | return gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
55 | #else |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
56 | return gtk_hbox_new(FALSE, 0); |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
57 | #endif |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
58 | } |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
59 | |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
60 | /* -------------------- Frame Container (deprecated) -------------------- */ |
4
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
61 | UiContainer* ui_frame_container(UiObject *obj, GtkWidget *frame) { |
59
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
62 | UiContainer *ct = ucx_mempool_calloc( |
4
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
63 | obj->ctx->mempool, |
59
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
64 | 1, |
4
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
65 | sizeof(UiContainer)); |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
66 | ct->widget = frame; |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
67 | ct->add = ui_frame_container_add; |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
68 | return ct; |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
69 | } |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
70 | |
59
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
71 | void ui_frame_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill) { |
4
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
72 | gtk_container_add(GTK_CONTAINER(ct->widget), widget); |
59
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
73 | ui_reset_layout(ct->layout); |
4
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
74 | } |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
75 | |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
76 | |
59
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
77 | /* -------------------- Box Container -------------------- */ |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
78 | UiContainer* ui_box_container(UiObject *obj, GtkWidget *box) { |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
79 | UiBoxContainer *ct = ucx_mempool_calloc( |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
80 | obj->ctx->mempool, |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
81 | 1, |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
82 | sizeof(UiBoxContainer)); |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
83 | ct->container.widget = box; |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
84 | ct->container.add = ui_box_container_add; |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
85 | return (UiContainer*)ct; |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
86 | } |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
87 | |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
88 | void ui_box_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill) { |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
89 | UiBoxContainer *bc = (UiBoxContainer*)ct; |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
90 | if(ct->layout.fill != UI_LAYOUT_UNDEFINED) { |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
91 | fill = ui_lb2bool(ct->layout.fill); |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
92 | } |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
93 | |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
94 | if(bc->has_fill && fill) { |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
95 | fprintf(stderr, "UiError: container has 2 filled widgets"); |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
96 | fill = FALSE; |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
97 | } |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
98 | if(fill) { |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
99 | bc->has_fill = TRUE; |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
100 | } |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
101 | |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
102 | UiBool expand = fill; |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
103 | gtk_box_pack_start(GTK_BOX(ct->widget), widget, expand, fill, 0); |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
104 | |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
105 | ui_reset_layout(ct->layout); |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
106 | } |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
107 | |
62
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
108 | UIWIDGET ui_vbox(UiObject *obj) { |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
109 | UiContainer *ct = uic_get_current_container(obj); |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
110 | |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
111 | GtkWidget *vbox = ui_gtk_vbox_new(); |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
112 | ct->add(ct, vbox, TRUE); |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
113 | |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
114 | UiObject *newobj = uic_object_new(obj, vbox); |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
115 | newobj->container = ui_box_container(obj, vbox); |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
116 | uic_obj_add(obj, newobj); |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
117 | |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
118 | return vbox; |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
119 | } |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
120 | |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
121 | UIWIDGET ui_hbox(UiObject *obj) { |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
122 | UiContainer *ct = uic_get_current_container(obj); |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
123 | |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
124 | GtkWidget *hbox = ui_gtk_hbox_new(); |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
125 | ct->add(ct, hbox, TRUE); |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
126 | |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
127 | UiObject *newobj = uic_object_new(obj, hbox); |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
128 | newobj->container = ui_box_container(obj, hbox); |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
129 | uic_obj_add(obj, newobj); |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
130 | |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
131 | return hbox; |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
132 | } |
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
133 | |
59
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
134 | |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
135 | /* -------------------- Sidebar -------------------- */ |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
136 | UIWIDGET ui_sidebar(UiObject *obj) { |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
137 | #ifdef UI_GTK3 |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
138 | GtkWidget *paned = gtk_paned_new(GTK_ORIENTATION_HORIZONTAL); |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
139 | #else |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
140 | GtkWidget *paned = gtk_hpaned_new(); |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
141 | #endif |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
142 | gtk_paned_set_position(GTK_PANED(paned), 200); |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
143 | |
59
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
144 | GtkWidget *sidebar = ui_gtk_vbox_new(); |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
145 | gtk_paned_pack1(GTK_PANED(paned), sidebar, TRUE, FALSE); |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
146 | |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
147 | UiObject *left = uic_object_new(obj, sidebar); |
59
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
148 | UiContainer *ct1 = ui_box_container(obj, sidebar); |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
149 | left->container = ct1; |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
150 | |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
151 | UiObject *right = uic_object_new(obj, sidebar); |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
152 | UiContainer *ct2 = ucx_mempool_malloc( |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
153 | obj->ctx->mempool, |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
154 | sizeof(UiContainer)); |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
155 | ct2->widget = paned; |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
156 | ct2->add = ui_split_container_add2; |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
157 | right->container = ct2; |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
158 | |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
159 | UiContainer *ct = uic_get_current_container(obj); |
59
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
160 | ct->add(ct, paned, TRUE); |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
161 | |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
162 | uic_obj_add(obj, right); |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
163 | uic_obj_add(obj, left); |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
164 | |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
165 | return sidebar; |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
166 | } |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
167 | |
59
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
168 | void ui_split_container_add1(UiContainer *ct, GtkWidget *widget, UiBool fill) { |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
169 | // TODO: remove |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
170 | gtk_paned_pack1(GTK_PANED(ct->widget), widget, TRUE, FALSE); |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
171 | } |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
172 | |
59
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
173 | void ui_split_container_add2(UiContainer *ct, GtkWidget *widget, UiBool fill) { |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
174 | gtk_paned_pack2(GTK_PANED(ct->widget), widget, TRUE, FALSE); |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
175 | } |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
176 | |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
4
diff
changeset
|
177 | |
59
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
178 | /* -------------------- Document Tabview -------------------- */ |
52
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
179 | static void page_change(GtkNotebook *notebook, GtkWidget *page, guint page_num, gpointer data) { |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
180 | GQuark q = g_quark_from_static_string("ui.tab.object"); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
181 | UiObject *tab = g_object_get_qdata(G_OBJECT(page), q); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
182 | if(!tab) { |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
183 | return; |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
184 | } |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
185 | |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
186 | printf("page_change: %d\n", page_num); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
187 | UiContext *ctx = tab->ctx; |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
188 | ctx->parent->set_document(ctx->parent, ctx->document); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
189 | } |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
190 | |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
191 | UiTabbedPane* ui_tabbed_document_view(UiObject *obj) { |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
192 | GtkWidget *tabview = gtk_notebook_new(); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
193 | gtk_notebook_set_show_border(GTK_NOTEBOOK(tabview), FALSE); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
194 | |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
195 | g_signal_connect( |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
196 | tabview, |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
197 | "switch-page", |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
198 | G_CALLBACK(page_change), |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
199 | NULL); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
200 | |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
201 | UiContainer *ct = uic_get_current_container(obj); |
59
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
202 | ct->add(ct, tabview, TRUE); |
52
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
203 | |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
204 | UiTabbedPane *tabbedpane = ui_malloc(obj->ctx, sizeof(UiTabbedPane)); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
205 | tabbedpane->ctx = uic_current_obj(obj)->ctx; |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
206 | tabbedpane->widget = tabview; |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
207 | tabbedpane->document = NULL; |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
208 | |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
209 | return tabbedpane; |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
210 | } |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
211 | |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
212 | UiObject* ui_document_tab(UiTabbedPane *view) { |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
213 | GtkWidget *frame = gtk_alignment_new(0.5, 0.5, 1, 1); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
214 | // TODO: label |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
215 | gtk_notebook_append_page(GTK_NOTEBOOK(view->widget), frame, NULL); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
216 | |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
217 | UiObject *tab = ui_malloc(view->ctx, sizeof(UiObject)); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
218 | tab->widget = NULL; // initialization for uic_context() |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
219 | tab->ctx = uic_context(tab, view->ctx->mempool); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
220 | tab->ctx->parent = view->ctx; |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
221 | tab->ctx->set_document = ui_tab_set_document; |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
222 | tab->ctx->detach_document = ui_tab_detach_document; |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
223 | tab->widget = frame; |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
224 | tab->window = view->ctx->obj->window; |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
225 | tab->container = ui_frame_container(tab, frame); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
226 | tab->next = NULL; |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
227 | |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
228 | GQuark q = g_quark_from_static_string("ui.tab.object"); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
229 | g_object_set_qdata(G_OBJECT(frame), q, tab); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
230 | |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
231 | return tab; |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
232 | } |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
233 | |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
234 | void ui_tab_set_document(UiContext *ctx, void *document) { |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
235 | if(ctx->parent->document) { |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
236 | //ctx->parent->detach_document(ctx->parent, ctx->parent->document); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
237 | } |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
238 | uic_context_set_document(ctx, document); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
239 | //uic_context_set_document(ctx->parent, document); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
240 | //ctx->parent->document = document; |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
241 | } |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
242 | |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
243 | void ui_tab_detach_document(UiContext *ctx, void *document) { |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
244 | uic_context_detach_document(ctx->parent, document); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
245 | } |
59
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
246 | |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
247 | |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
248 | /* |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
249 | * -------------------- Layout Functions -------------------- |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
250 | * |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
251 | * functions for setting layout attributes for the current container |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
252 | * |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
253 | */ |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
254 | |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
255 | void ui_layout_fill(UiObject *obj, UiBool fill) { |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
256 | UiContainer *ct = uic_get_current_container(obj); |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
257 | ct->layout.fill = ui_bool2lb(fill); |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
258 | } |