ui/ui/tree.h

Sun, 26 Nov 2023 15:44:28 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 26 Nov 2023 15:44:28 +0100
branch
newapi
changeset 225
097f45f9c1fa
parent 224
88bc21b19213
child 241
c51dd0e9ecb7
permissions
-rw-r--r--

add new path textfield (WinUI3)

33
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1 /*
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
3 *
140
c03c338a7dcf refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 129
diff changeset
4 * Copyright 2017 Olaf Wintermann. All rights reserved.
33
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
5 *
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
6 * Redistribution and use in source and binary forms, with or without
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
7 * modification, are permitted provided that the following conditions are met:
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
8 *
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
9 * 1. Redistributions of source code must retain the above copyright
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
10 * notice, this list of conditions and the following disclaimer.
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
11 *
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
12 * 2. Redistributions in binary form must reproduce the above copyright
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
13 * notice, this list of conditions and the following disclaimer in the
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
14 * documentation and/or other materials provided with the distribution.
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
15 *
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
458831c574f4 added listview, sidebar and toolbar image button (GTK)
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
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
26 * POSSIBILITY OF SUCH DAMAGE.
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
27 */
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
28
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
29 #ifndef UI_TREE_H
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
30 #define UI_TREE_H
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
31
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
32 #include "toolkit.h"
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
33
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
34 #ifdef __cplusplus
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
35 extern "C" {
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
36 #endif
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
37
142
46448d38885c new checkbox and radionbutton features and more refactoring
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 140
diff changeset
38 typedef struct UiModel UiModel;
46448d38885c new checkbox and radionbutton features and more refactoring
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 140
diff changeset
39 typedef struct UiListCallbacks UiListCallbacks;
42
29b2821d1262 added table view events (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
40 typedef struct UiListSelection UiListSelection;
224
88bc21b19213 add minimal working dnd implementation (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 223
diff changeset
41 typedef struct UiListDnd UiListDnd;
39
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
42
196
320d85f3cd14 add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 150
diff changeset
43 typedef struct UiListArgs UiListArgs;
320d85f3cd14 add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 150
diff changeset
44
58
2b124f8ebd95 added table view (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 42
diff changeset
45 typedef enum UiModelType {
39
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
46 UI_STRING = 0,
129
5babf09f5f19 fixes stultus commit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 128
diff changeset
47 UI_INTEGER,
5babf09f5f19 fixes stultus commit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 128
diff changeset
48 UI_ICON,
5babf09f5f19 fixes stultus commit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 128
diff changeset
49 UI_ICON_TEXT,
58
2b124f8ebd95 added table view (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 42
diff changeset
50 } UiModelType;
39
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
51
142
46448d38885c new checkbox and radionbutton features and more refactoring
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 140
diff changeset
52 struct UiModel {
39
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
53 /*
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
54 * number of columns
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
55 */
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
56 int columns;
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
57
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
58 /*
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
59 * array of column types
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
60 * array length is the number of columns
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
61 */
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
62 UiModelType *types;
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
63
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
64 /*
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
65 * array of column titles
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
66 * array length is the number of columns
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
67 */
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
68 char **titles;
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
69
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
70 /*
107
9aff1dc3990d improved box container and added radio button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 58
diff changeset
71 * function for translating model data to view data
9aff1dc3990d improved box container and added radio button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 58
diff changeset
72 * first argument is the pointer returned by UiList->get or UiTree->get
39
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
73 * second argument is the column index
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
74 * TODO: return
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
75 */
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
76 void*(*getvalue)(void*, int);
142
46448d38885c new checkbox and radionbutton features and more refactoring
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 140
diff changeset
77 };
46448d38885c new checkbox and radionbutton features and more refactoring
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 140
diff changeset
78
46448d38885c new checkbox and radionbutton features and more refactoring
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 140
diff changeset
79 struct UiListCallbacks {
39
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
80 /*
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
81 * selection callback
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
82 */
42
29b2821d1262 added table view events (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
83 ui_callback activate;
29b2821d1262 added table view events (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
84
29b2821d1262 added table view events (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
85 /*
29b2821d1262 added table view events (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
86 * cursor callback
29b2821d1262 added table view events (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
87 */
29b2821d1262 added table view events (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
88 ui_callback selection;
39
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
89
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
90 /*
147
2e384acc89a6 adds simple drag and drop support (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 146
diff changeset
91 * userdata for all callbacks
39
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
92 */
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
93 void *userdata;
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
94 };
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
95
42
29b2821d1262 added table view events (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
96 struct UiListSelection {
29b2821d1262 added table view events (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
97 /*
29b2821d1262 added table view events (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
98 * number of selected items
29b2821d1262 added table view events (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
99 */
29b2821d1262 added table view events (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
100 int count;
29b2821d1262 added table view events (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
101
29b2821d1262 added table view events (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
102 /*
29b2821d1262 added table view events (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
103 * indices of selected rows
29b2821d1262 added table view events (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
104 */
29b2821d1262 added table view events (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
105 int *rows;
29b2821d1262 added table view events (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
106 };
29b2821d1262 added table view events (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 39
diff changeset
107
224
88bc21b19213 add minimal working dnd implementation (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 223
diff changeset
108 struct UiListDnd {
223
8d7ca1b320e2 prepare table dnd (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 221
diff changeset
109 UiListSelection selection;
224
88bc21b19213 add minimal working dnd implementation (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 223
diff changeset
110 UiDnD *dnd;
223
8d7ca1b320e2 prepare table dnd (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 221
diff changeset
111 };
8d7ca1b320e2 prepare table dnd (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 221
diff changeset
112
196
320d85f3cd14 add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 150
diff changeset
113 struct UiListArgs {
320d85f3cd14 add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 150
diff changeset
114 UiTri fill;
320d85f3cd14 add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 150
diff changeset
115 UiBool hexpand;
320d85f3cd14 add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 150
diff changeset
116 UiBool vexpand;
320d85f3cd14 add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 150
diff changeset
117 int colspan;
320d85f3cd14 add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 150
diff changeset
118 int rowspan;
320d85f3cd14 add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 150
diff changeset
119
320d85f3cd14 add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 150
diff changeset
120 UiList* list;
320d85f3cd14 add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 150
diff changeset
121 const char* varname;
320d85f3cd14 add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 150
diff changeset
122 UiModel* model;
320d85f3cd14 add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 150
diff changeset
123 ui_getvaluefunc getvalue;
320d85f3cd14 add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 150
diff changeset
124 ui_callback onactivate;
320d85f3cd14 add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 150
diff changeset
125 void* onactivatedata;
320d85f3cd14 add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 150
diff changeset
126 ui_callback onselection;
320d85f3cd14 add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 150
diff changeset
127 void* onselectiondata;
221
a82d9beaa94a add semi-functional pathbar (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
128 ui_callback ondragstart;
a82d9beaa94a add semi-functional pathbar (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
129 void* ondragstartdata;
a82d9beaa94a add semi-functional pathbar (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
130 ui_callback ondragcomplete;
a82d9beaa94a add semi-functional pathbar (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
131 void* ondragcompletedata;
a82d9beaa94a add semi-functional pathbar (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
132 ui_callback ondrop;
a82d9beaa94a add semi-functional pathbar (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
133 void* ondropsdata;
196
320d85f3cd14 add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 150
diff changeset
134 UiBool multiselection;
221
a82d9beaa94a add semi-functional pathbar (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
135 };
a82d9beaa94a add semi-functional pathbar (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
136
201
7f67ebbb0c1c add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 196
diff changeset
137 UIEXPORT UiModel* ui_model(UiContext *ctx, ...);
215
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
138 UIEXPORT UiModel* ui_model_copy(UiContext *ctx, UiModel* model);
201
7f67ebbb0c1c add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 196
diff changeset
139 UIEXPORT void ui_model_free(UiContext *ctx, UiModel *mi);
39
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
140
196
320d85f3cd14 add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 150
diff changeset
141 #define ui_listview(obj, ...) ui_listview_create(obj, (UiListArgs) { __VA_ARGS__ } )
320d85f3cd14 add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 150
diff changeset
142 #define ui_table(obj, ...) ui_table_create(obj, (UiListArgs) { __VA_ARGS__ } )
320d85f3cd14 add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 150
diff changeset
143 #define ui_combobox(obj, ...) ui_combobox_create(obj, (UiListArgs) { __VA_ARGS__ } )
204
4a258d47f964 add breadcrumb bar
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 201
diff changeset
144 #define ui_breadcrumbbar(obj, ...) ui_breadcrumbbar_create(obj, (UiListArgs) { __VA_ARGS__ } )
39
4e66271541e8 added table view (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 33
diff changeset
145
201
7f67ebbb0c1c add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 196
diff changeset
146 UIEXPORT UIWIDGET ui_listview_create(UiObject* obj, UiListArgs args);
7f67ebbb0c1c add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 196
diff changeset
147 UIEXPORT UIWIDGET ui_table_create(UiObject* obj, UiListArgs args);
204
4a258d47f964 add breadcrumb bar
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 201
diff changeset
148 UIEXPORT UIWIDGET ui_combobox_create(UiObject* obj, UiListArgs args);
4a258d47f964 add breadcrumb bar
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 201
diff changeset
149 UIEXPORT UIWIDGET ui_breadcrumbbar_create(UiObject* obj, UiListArgs args);
196
320d85f3cd14 add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 150
diff changeset
150
142
46448d38885c new checkbox and radionbutton features and more refactoring
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 140
diff changeset
151
147
2e384acc89a6 adds simple drag and drop support (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 146
diff changeset
152 void ui_table_dragsource(UIWIDGET tablewidget, int actions, char *target0, ...);
2e384acc89a6 adds simple drag and drop support (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 146
diff changeset
153 void ui_table_dragsource_a(UIWIDGET tablewidget, int actions, char **targets, int nelm);
2e384acc89a6 adds simple drag and drop support (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 146
diff changeset
154 void ui_table_dragdest(UIWIDGET tablewidget, int actions, char *target0, ...);
2e384acc89a6 adds simple drag and drop support (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 146
diff changeset
155 void ui_table_dragdest_a(UIWIDGET tablewidget, int actions, char **targets, int nelm);
2e384acc89a6 adds simple drag and drop support (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 146
diff changeset
156
33
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
157 #ifdef __cplusplus
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
158 }
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
159 #endif
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
160
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
161 #endif /* UI_TREE_H */
458831c574f4 added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
162

mercurial