Sun, 20 Oct 2024 21:26:06 +0200
make ui_getappdir() and ui_configfile() public
84
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
1 | |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
2 | |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
3 | #include "stdafx.h" |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
4 | #include <stdio.h> |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
5 | |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
6 | #include "container.h" |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
7 | |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
8 | #using "UIcore.dll" |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
9 | |
138
d781436e2490
adds scrolledwindow and tabview container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
136
diff
changeset
|
10 | UI_EXPORT void* __stdcall UIvbox(gcroot<UI::Container^> *parent, int margin, int spacing) { |
d781436e2490
adds scrolledwindow and tabview container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
136
diff
changeset
|
11 | UI::BoxContainer ^vbox = gcnew UI::BoxContainer(*parent, UI::BoxOrientation::VERTICAL, margin, spacing); |
84
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
12 | gcroot<UI::BoxContainer^> *container = new gcroot<UI::BoxContainer^>(); |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
13 | *container = vbox; |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
14 | return container; |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
15 | } |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
16 | |
138
d781436e2490
adds scrolledwindow and tabview container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
136
diff
changeset
|
17 | UI_EXPORT void* __stdcall UIhbox(gcroot<UI::Container^> *parent, int margin, int spacing) { |
d781436e2490
adds scrolledwindow and tabview container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
136
diff
changeset
|
18 | UI::BoxContainer ^hbox = gcnew UI::BoxContainer(*parent, UI::BoxOrientation::HORIZONTAL, margin, spacing); |
84
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
19 | gcroot<UI::BoxContainer^> *container = new gcroot<UI::BoxContainer^>(); |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
20 | *container = hbox; |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
21 | return container; |
a56c2baa9429
added vbox,hbox function (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
22 | } |
85
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
23 | |
101
1c943d43fa81
implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
24 | UI_EXPORT void* __stdcall UIgrid(gcroot<UI::Container^> *parent, int margin, int columnspacing, int rowspacing) { |
135
b9dc9cdfa23a
refactors architecture (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
101
diff
changeset
|
25 | UI::GridContainer ^grid = gcnew UI::GridContainer(*parent, margin, columnspacing, rowspacing); |
101
1c943d43fa81
implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
26 | gcroot<UI::GridContainer^> *container = new gcroot<UI::GridContainer^>(); |
1c943d43fa81
implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
27 | *container = grid; |
1c943d43fa81
implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
28 | return container; |
1c943d43fa81
implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
29 | } |
1c943d43fa81
implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
30 | |
138
d781436e2490
adds scrolledwindow and tabview container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
136
diff
changeset
|
31 | UI_EXPORT void* __stdcall UIscrolledwindow(gcroot<UI::Container^> *parent) { |
d781436e2490
adds scrolledwindow and tabview container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
136
diff
changeset
|
32 | UI::ScrollViewerContainer ^scrollviewer = gcnew UI::ScrollViewerContainer(*parent); |
d781436e2490
adds scrolledwindow and tabview container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
136
diff
changeset
|
33 | gcroot<UI::ScrollViewerContainer^> *container = new gcroot<UI::ScrollViewerContainer^>(); |
d781436e2490
adds scrolledwindow and tabview container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
136
diff
changeset
|
34 | *container = scrollviewer; |
d781436e2490
adds scrolledwindow and tabview container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
136
diff
changeset
|
35 | return container; |
d781436e2490
adds scrolledwindow and tabview container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
136
diff
changeset
|
36 | } |
d781436e2490
adds scrolledwindow and tabview container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
136
diff
changeset
|
37 | |
d781436e2490
adds scrolledwindow and tabview container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
136
diff
changeset
|
38 | UI_EXPORT void* __stdcall UItabview(gcroot<UI::Container^> *parent) { |
d781436e2490
adds scrolledwindow and tabview container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
136
diff
changeset
|
39 | UI::TabViewContainer ^tabview = gcnew UI::TabViewContainer(*parent); |
d781436e2490
adds scrolledwindow and tabview container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
136
diff
changeset
|
40 | gcroot<UI::TabViewContainer^> *container = new gcroot<UI::TabViewContainer^>(); |
d781436e2490
adds scrolledwindow and tabview container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
136
diff
changeset
|
41 | *container = tabview; |
d781436e2490
adds scrolledwindow and tabview container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
136
diff
changeset
|
42 | return container; |
d781436e2490
adds scrolledwindow and tabview container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
136
diff
changeset
|
43 | } |
d781436e2490
adds scrolledwindow and tabview container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
136
diff
changeset
|
44 | |
d781436e2490
adds scrolledwindow and tabview container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
136
diff
changeset
|
45 | UI_EXPORT void __stdcall UItab(gcroot<UI::Container^> *container, char *label) { |
d781436e2490
adds scrolledwindow and tabview container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
136
diff
changeset
|
46 | UI::Container ^ct = *container; |
d781436e2490
adds scrolledwindow and tabview container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
136
diff
changeset
|
47 | ct->Layout->Label = gcnew String(label); |
d781436e2490
adds scrolledwindow and tabview container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
136
diff
changeset
|
48 | } |
d781436e2490
adds scrolledwindow and tabview container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
136
diff
changeset
|
49 | |
85
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
50 | |
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
51 | |
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
52 | /* ------------------- layout functions ------------------- */ |
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
53 | |
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
54 | UI_EXPORT void __stdcall UIlayout_fill(gcroot<UI::Container^> *container, int fill) { |
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
55 | UI::Container ^ct = *container; |
88
04c81be1c5a0
added textarea (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
85
diff
changeset
|
56 | ct->Layout->Fill = fill != 0; |
85
91f45354d1e2
added ui_layout_fill (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
84
diff
changeset
|
57 | } |
101
1c943d43fa81
implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
58 | |
1c943d43fa81
implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
59 | UI_EXPORT void __stdcall UIlayout_hexpand(gcroot<UI::Container^> *container, int expand) { |
1c943d43fa81
implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
60 | UI::Container ^ct = *container; |
1c943d43fa81
implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
61 | ct->Layout->Hexpand = expand != 0; |
1c943d43fa81
implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
62 | } |
1c943d43fa81
implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
63 | |
1c943d43fa81
implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
64 | UI_EXPORT void __stdcall UIlayout_vexpand(gcroot<UI::Container^> *container, int expand) { |
1c943d43fa81
implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
65 | UI::Container ^ct = *container; |
1c943d43fa81
implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
66 | ct->Layout->Vexpand = expand != 0; |
1c943d43fa81
implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
67 | } |
1c943d43fa81
implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
68 | |
136
1df2fb3d079c
adds gridwidth layout option (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
135
diff
changeset
|
69 | UI_EXPORT void __stdcall UIlayout_gridwidth(gcroot<UI::Container^> *container, int width) { |
1df2fb3d079c
adds gridwidth layout option (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
135
diff
changeset
|
70 | UI::Container ^ct = *container; |
1df2fb3d079c
adds gridwidth layout option (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
135
diff
changeset
|
71 | ct->Layout->GridWidth = width; |
1df2fb3d079c
adds gridwidth layout option (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
135
diff
changeset
|
72 | } |
1df2fb3d079c
adds gridwidth layout option (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
135
diff
changeset
|
73 | |
101
1c943d43fa81
implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
74 | UI_EXPORT void __stdcall UIlayout_newline(gcroot<UI::Container^> *container) { |
1c943d43fa81
implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
75 | UI::Container ^ct = *container; |
1c943d43fa81
implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
76 | ct->Layout->NewLine = true; |
1c943d43fa81
implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
77 | } |
1c943d43fa81
implemented grid container (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
78 |