ui/gtk/container.h

Sun, 10 Nov 2024 09:12:30 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 10 Nov 2024 09:12:30 +0100
changeset 75
73c8a3780c72
parent 60
ee4e4742391e
permissions
-rw-r--r--

toolkit update, small UI adjustments

0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1 /*
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
3 *
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
4 * Copyright 2017 Olaf Wintermann. All rights reserved.
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
5 *
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
6 * Redistribution and use in source and binary forms, with or without
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
7 * modification, are permitted provided that the following conditions are met:
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
8 *
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
9 * 1. Redistributions of source code must retain the above copyright
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
10 * notice, this list of conditions and the following disclaimer.
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
11 *
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
12 * 2. Redistributions in binary form must reproduce the above copyright
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
13 * notice, this list of conditions and the following disclaimer in the
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
14 * documentation and/or other materials provided with the distribution.
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
15 *
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2483f517c562 add existing toolkit code
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
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
26 * POSSIBILITY OF SUCH DAMAGE.
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
27 */
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
28
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
29 #ifndef CONTAINER_H
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
30 #define CONTAINER_H
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
31
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
32 #include "../ui/toolkit.h"
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
33 #include "../ui/container.h"
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
34 #include <string.h>
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
35
51
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
36 #include <cx/allocator.h>
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
37
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
38 #ifdef __cplusplus
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
39 extern "C" {
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
40 #endif
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
41
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
42 #define ui_reset_layout(layout) memset(&(layout), 0, sizeof(UiLayout))
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
43 #define ui_lb2bool(b) ((b) == UI_LAYOUT_TRUE ? TRUE : FALSE)
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
44 #define ui_bool2lb(b) ((b) ? UI_LAYOUT_TRUE : UI_LAYOUT_FALSE)
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
45
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
46 typedef void (*ui_container_add_f)(UiContainer*, GtkWidget*, UiBool);
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
47
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
48 typedef struct UiDocumentView UiDocumentView;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
49
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
50 typedef struct UiLayout UiLayout;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
51 typedef enum UiLayoutBool UiLayoutBool;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
52
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
53 enum UiLayoutBool {
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
54 UI_LAYOUT_UNDEFINED = 0,
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
55 UI_LAYOUT_TRUE,
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
56 UI_LAYOUT_FALSE,
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
57 };
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
58
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
59 struct UiLayout {
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
60 UiLayoutBool fill;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
61 UiBool newline;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
62 char *label;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
63 UiBool hexpand;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
64 UiBool vexpand;
75
73c8a3780c72 toolkit update, small UI adjustments
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 60
diff changeset
65 UiBool hfill;
73c8a3780c72 toolkit update, small UI adjustments
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 60
diff changeset
66 UiBool vfill;
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
67 int width;
29
3fc287f06305 add minimal working download
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
68 int colspan;
3fc287f06305 add minimal working download
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
69 int rowspan;
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
70 };
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
71
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
72 struct UiContainer {
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
73 GtkWidget *widget;
42
9af327d0e0e4 update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 32
diff changeset
74 UIMENU menu;
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
75 GtkWidget *current;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
76
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
77 void (*add)(UiContainer*, GtkWidget*, UiBool);
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
78 UiLayout layout;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
79
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
80 int close;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
81 };
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
82
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
83 typedef struct UiBoxContainer {
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
84 UiContainer container;
44
473954dc6b74 update toolkit: gtk4 improvements
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 42
diff changeset
85 UiSubContainerType type;
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
86 UiBool has_fill;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
87 } UiBoxContainer;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
88
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
89 typedef struct UiGridContainer {
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
90 UiContainer container;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
91 int x;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
92 int y;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
93 #ifdef UI_GTK2
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
94 int width;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
95 int height;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
96 #endif
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
97 } UiGridContainer;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
98
51
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
99 /*
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
100 typedef struct UiPanedContainer {
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
101 UiContainer container;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
102 GtkWidget *current_pane;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
103 int orientation;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
104 int max;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
105 int cur;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
106 } UiPanedContainer;
51
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
107 */
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
108
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
109 typedef struct UiTabViewContainer {
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
110 UiContainer container;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
111 } UiTabViewContainer;
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
112
51
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
113 typedef void (*ui_select_tab_func)(UIWIDGET widget, int tab);
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
114 typedef void (*ui_add_tab_func)(UIWIDGET widget, int index, const char *name, UIWIDGET child);
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
115
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
116 typedef struct UiGtkTabView {
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
117 UiObject *obj;
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
118 GtkWidget *widget;
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
119 ui_select_tab_func select_tab;
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
120 ui_select_tab_func remove_tab;
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
121 ui_add_tab_func add_tab;
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
122 UiSubContainerType subcontainer;
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
123 int margin;
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
124 int spacing;
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
125 int columnspacing;
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
126 int rowspacing;
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
127 } UiGtkTabView;
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
128
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
129 typedef struct UiHeaderbarContainer {
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
130 UiContainer container;
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
131 GtkWidget *centerbox;
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
132 int part;
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
133 UiHeaderbarAlternative alternative; /* only used by fallback headerbar */
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
134 } UiHeaderbarContainer;
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
135
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
136 GtkWidget* ui_gtk_vbox_new(int spacing);
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
137 GtkWidget* ui_gtk_hbox_new(int spacing);
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
138
60
ee4e4742391e add settings window and implement repository editing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 56
diff changeset
139 GtkWidget* ui_subcontainer_create(
ee4e4742391e add settings window and implement repository editing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 56
diff changeset
140 UiSubContainerType type,
ee4e4742391e add settings window and implement repository editing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 56
diff changeset
141 UiObject *newobj,
ee4e4742391e add settings window and implement repository editing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 56
diff changeset
142 int spacing,
ee4e4742391e add settings window and implement repository editing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 56
diff changeset
143 int columnspacing,
ee4e4742391e add settings window and implement repository editing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 56
diff changeset
144 int rowspacing,
ee4e4742391e add settings window and implement repository editing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 56
diff changeset
145 int margin);
ee4e4742391e add settings window and implement repository editing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 56
diff changeset
146
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
147 UiContainer* ui_frame_container(UiObject *obj, GtkWidget *frame);
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
148 void ui_frame_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill);
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
149
56
294d5515583a add authentication dialog
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 51
diff changeset
150 GtkWidget* ui_box_set_margin(GtkWidget *box, int margin);
29
3fc287f06305 add minimal working download
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
151 UIWIDGET ui_box_create(UiObject *obj, UiContainerArgs args, UiSubContainerType type);
3fc287f06305 add minimal working download
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 0
diff changeset
152
44
473954dc6b74 update toolkit: gtk4 improvements
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 42
diff changeset
153 UiContainer* ui_box_container(UiObject *obj, GtkWidget *box, UiSubContainerType type);
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
154 void ui_box_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill);
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
155
56
294d5515583a add authentication dialog
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 51
diff changeset
156 GtkWidget* ui_create_grid_widget(int colspacing, int rowspacing);
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
157 UiContainer* ui_grid_container(UiObject *obj, GtkWidget *grid);
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
158 void ui_grid_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill);
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
159
60
ee4e4742391e add settings window and implement repository editing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 56
diff changeset
160 UiContainer* ui_frame_container(UiObject *obj, GtkWidget *frame);
ee4e4742391e add settings window and implement repository editing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 56
diff changeset
161 void ui_frame_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill);
ee4e4742391e add settings window and implement repository editing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 56
diff changeset
162
ee4e4742391e add settings window and implement repository editing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 56
diff changeset
163 UiContainer* ui_expander_container(UiObject *obj, GtkWidget *expander);
ee4e4742391e add settings window and implement repository editing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 56
diff changeset
164 void ui_expander_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill);
ee4e4742391e add settings window and implement repository editing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 56
diff changeset
165
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
166 UiContainer* ui_scrolledwindow_container(UiObject *obj, GtkWidget *scrolledwindow);
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
167 void ui_scrolledwindow_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill);
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
168
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
169 UiContainer* ui_tabview_container(UiObject *obj, GtkWidget *tabview);
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
170 void ui_tabview_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill);
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
171
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
172 void ui_paned_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill);
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
173
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
174 void ui_split_container_add1(UiContainer *ct, GtkWidget *widget, UiBool fill);
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
175 void ui_split_container_add2(UiContainer *ct, GtkWidget *widget, UiBool fill);
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
176
51
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
177 UiGtkTabView* ui_widget_get_tabview_data(UIWIDGET tabview);
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
178
51
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
179 void ui_gtk_notebook_select_tab(GtkWidget *widget, int tab);
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
180
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
181 #if GTK_CHECK_VERSION(3, 10, 0)
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
182 UiContainer* ui_headerbar_container(UiObject *obj, GtkWidget *headerbar);
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
183 void ui_headerbar_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill);
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
184 #endif
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
185
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
186 UiContainer* ui_headerbar_fallback_container(UiObject *obj, GtkWidget *headerbar);
e324291ca9f8 add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 44
diff changeset
187 void ui_headerbar_fallback_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill);
0
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
188
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
189 #ifdef __cplusplus
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
190 }
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
191 #endif
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
192
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
193 #endif /* CONTAINER_H */
2483f517c562 add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
194

mercurial