Wed, 27 Jan 2016 12:10:42 +0100
added scrollbar (GTK)
0 | 1 | /* |
2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. | |
3 | * | |
4 | * Copyright 2012 Olaf Wintermann. All rights reserved. | |
5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions are met: | |
8 | * | |
9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | |
11 | * | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | |
15 | * | |
16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | |
17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | |
20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
26 | * POSSIBILITY OF SUCH DAMAGE. | |
27 | */ | |
28 | ||
29 | #include <stdio.h> | |
30 | #include <stdlib.h> | |
31 | ||
32 | #include <ui/ui.h> | |
28
794a5c91c479
added open/save dialogs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
27
diff
changeset
|
33 | #include <ucx/buffer.h> |
794a5c91c479
added open/save dialogs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
27
diff
changeset
|
34 | #include <ucx/utils.h> |
0 | 35 | |
108
fcf6d5fac8f5
radio buttons bind to UiInteger now
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
107
diff
changeset
|
36 | UiInteger radio; |
118
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
37 | UiRange range; |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
38 | UIWIDGET drawingarea; |
107
9aff1dc3990d
improved box container and added radio button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
106
diff
changeset
|
39 | |
82
0cdb8089a29f
added event handler for menus (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
81
diff
changeset
|
40 | void action_menu(UiEvent *event, void *data) { |
0cdb8089a29f
added event handler for menus (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
81
diff
changeset
|
41 | printf("action_menu test: {%s}\n", data); |
88
04c81be1c5a0
added textarea (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
86
diff
changeset
|
42 | printf("text: {%s}\n", ui_gettext(event->obj, "text")); |
04c81be1c5a0
added textarea (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
86
diff
changeset
|
43 | fflush(stdout); |
106
a4f4123ca12a
added simple window and open/save file dialogs for Qt
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
104
diff
changeset
|
44 | |
a4f4123ca12a
added simple window and open/save file dialogs for Qt
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
104
diff
changeset
|
45 | char *file = ui_openfiledialog(event->obj); |
a4f4123ca12a
added simple window and open/save file dialogs for Qt
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
104
diff
changeset
|
46 | printf("file: %s\n", file); |
a4f4123ca12a
added simple window and open/save file dialogs for Qt
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
104
diff
changeset
|
47 | fflush(stdout); |
a4f4123ca12a
added simple window and open/save file dialogs for Qt
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
104
diff
changeset
|
48 | free(file); |
88
04c81be1c5a0
added textarea (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
86
diff
changeset
|
49 | } |
04c81be1c5a0
added textarea (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
86
diff
changeset
|
50 | |
04c81be1c5a0
added textarea (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
86
diff
changeset
|
51 | void action_button(UiEvent *event, void *data) { |
108
fcf6d5fac8f5
radio buttons bind to UiInteger now
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
107
diff
changeset
|
52 | printf("radio: %d\n", ui_getval(radio)); |
82
0cdb8089a29f
added event handler for menus (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
81
diff
changeset
|
53 | } |
103
6a6718269c22
added drawing area (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
54 | |
107
9aff1dc3990d
improved box container and added radio button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
106
diff
changeset
|
55 | void action_button2(UiEvent *event, void *data) { |
108
fcf6d5fac8f5
radio buttons bind to UiInteger now
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
107
diff
changeset
|
56 | ui_setval(radio, 1); |
107
9aff1dc3990d
improved box container and added radio button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
106
diff
changeset
|
57 | } |
9aff1dc3990d
improved box container and added radio button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
106
diff
changeset
|
58 | |
114
909fe96e5659
added ui_draw_line function
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
113
diff
changeset
|
59 | UiTextLayout *text; |
909fe96e5659
added ui_draw_line function
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
113
diff
changeset
|
60 | |
118
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
61 | void action_scroll(UiEvent *event, void *data) { |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
62 | ui_drawingarea_redraw(drawingarea); |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
63 | } |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
64 | |
95
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
65 | void draw(UiEvent *event, UiGraphics *g, void *data) { |
118
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
66 | double adjust = range.get(&range); |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
67 | |
114
909fe96e5659
added ui_draw_line function
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
113
diff
changeset
|
68 | ///* |
95
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
69 | int width = g->width; |
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
70 | int height = g->height; |
114
909fe96e5659
added ui_draw_line function
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
113
diff
changeset
|
71 | //printf("rec[%d,%d]\n", width, height); |
103
6a6718269c22
added drawing area (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
72 | |
95
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
73 | ui_graphics_color(g, 64, 64, 64); |
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
74 | ui_draw_rect(g, 0, 0, width, height, TRUE); |
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
75 | |
114
909fe96e5659
added ui_draw_line function
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
113
diff
changeset
|
76 | if(!text) { |
909fe96e5659
added ui_draw_line function
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
113
diff
changeset
|
77 | text = ui_text(g); |
909fe96e5659
added ui_draw_line function
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
113
diff
changeset
|
78 | ui_text_setfont(text, "Monospace", 12); |
909fe96e5659
added ui_draw_line function
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
113
diff
changeset
|
79 | ui_text_setstring(text, "Hello World"); |
909fe96e5659
added ui_draw_line function
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
113
diff
changeset
|
80 | } |
97
1a786201465f
implemented text layout functions (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
95
diff
changeset
|
81 | int w, h; |
1a786201465f
implemented text layout functions (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
95
diff
changeset
|
82 | ui_text_getsize(text, &w, &h); |
99
ea1a2d5de765
improved grid container (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
98
diff
changeset
|
83 | //printf("ext[%d,%d]\n", w, h); |
95
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
84 | |
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
85 | ui_graphics_color(g, 255, 255, 255); |
118
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
86 | ui_draw_text(g, 50, 50 + adjust, text); |
115
102fc0b8fe3e
improved context menus
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
114
diff
changeset
|
87 | ui_draw_line(g, 50, 55 + h, 50+w, 55 +h); |
102fc0b8fe3e
improved context menus
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
114
diff
changeset
|
88 | ui_draw_line(g, 50, 55 + h, 50, 75 +h); |
95
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
89 | |
114
909fe96e5659
added ui_draw_line function
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
113
diff
changeset
|
90 | ui_draw_line(g, 0, 120, width, 120); |
909fe96e5659
added ui_draw_line function
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
113
diff
changeset
|
91 | ui_draw_line(g, 200, 0, 200, height); |
909fe96e5659
added ui_draw_line function
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
113
diff
changeset
|
92 | |
115
102fc0b8fe3e
improved context menus
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
114
diff
changeset
|
93 | ui_draw_rect(g, 250, 250, 50, 50, FALSE); |
102fc0b8fe3e
improved context menus
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
114
diff
changeset
|
94 | |
114
909fe96e5659
added ui_draw_line function
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
113
diff
changeset
|
95 | //ui_text_free(text); |
909fe96e5659
added ui_draw_line function
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
113
diff
changeset
|
96 | //*/ |
95
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
97 | } |
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
98 | |
115
102fc0b8fe3e
improved context menus
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
114
diff
changeset
|
99 | UIMENU ctxmenu; |
98
efaae97bd95b
added mouse event handler (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
97
diff
changeset
|
100 | void click(UiEvent *event, void *data) { |
efaae97bd95b
added mouse event handler (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
97
diff
changeset
|
101 | UiMouseEvent *me = event->eventdata; |
efaae97bd95b
added mouse event handler (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
97
diff
changeset
|
102 | printf("click[%d](%d,%d)\n", me->type, me->x, me->y); |
115
102fc0b8fe3e
improved context menus
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
114
diff
changeset
|
103 | |
102fc0b8fe3e
improved context menus
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
114
diff
changeset
|
104 | if(me->button == 1) { |
102fc0b8fe3e
improved context menus
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
114
diff
changeset
|
105 | ui_contextmenu_popup(ctxmenu); |
102fc0b8fe3e
improved context menus
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
114
diff
changeset
|
106 | } |
102fc0b8fe3e
improved context menus
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
114
diff
changeset
|
107 | |
98
efaae97bd95b
added mouse event handler (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
97
diff
changeset
|
108 | } |
efaae97bd95b
added mouse event handler (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
97
diff
changeset
|
109 | |
111
40dbf1a7526a
added close handler to UiContext (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
110
diff
changeset
|
110 | void window_close(UiEvent *event, void *data) { |
40dbf1a7526a
added close handler to UiContext (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
110
diff
changeset
|
111 | printf("window close\n"); |
40dbf1a7526a
added close handler to UiContext (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
110
diff
changeset
|
112 | } |
40dbf1a7526a
added close handler to UiContext (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
110
diff
changeset
|
113 | |
29
c96169444d88
added locale support (Cocoa) and ucx update
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
28
diff
changeset
|
114 | int main(int argc, char** argv) { |
88
04c81be1c5a0
added textarea (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
86
diff
changeset
|
115 | ui_init("app1", argc, argv); |
04c81be1c5a0
added textarea (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
86
diff
changeset
|
116 | |
118
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
117 | UiList *list = ui_list_new(); |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
118 | ui_list_append(list, "Hello"); |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
119 | ui_list_append(list, "World"); |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
120 | ui_list_append(list, "Test"); |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
121 | |
88
04c81be1c5a0
added textarea (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
86
diff
changeset
|
122 | ui_menu("File"); |
04c81be1c5a0
added textarea (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
86
diff
changeset
|
123 | ui_menuitem("Hello", action_menu, "hello"); |
04c81be1c5a0
added textarea (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
86
diff
changeset
|
124 | ui_submenu("Submenu1"); |
04c81be1c5a0
added textarea (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
86
diff
changeset
|
125 | ui_submenu("Submenu2"); |
04c81be1c5a0
added textarea (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
86
diff
changeset
|
126 | ui_menuitem("item2", NULL, NULL); |
04c81be1c5a0
added textarea (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
86
diff
changeset
|
127 | ui_submenu_end(); |
04c81be1c5a0
added textarea (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
86
diff
changeset
|
128 | ui_menuitem("item3", NULL, NULL); |
04c81be1c5a0
added textarea (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
86
diff
changeset
|
129 | ui_submenu_end(); |
04c81be1c5a0
added textarea (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
86
diff
changeset
|
130 | ui_menuitem("item4", NULL, NULL); |
04c81be1c5a0
added textarea (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
86
diff
changeset
|
131 | |
89
9a7e4a335b2b
added toolbar (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
132 | ui_toolitem("button1", "Test", action_button, NULL); |
9a7e4a335b2b
added toolbar (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
133 | ui_toolitem("button2", "OK", action_button, NULL); |
118
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
134 | ui_toolbar_combobox_str("combo", list, NULL, NULL); |
89
9a7e4a335b2b
added toolbar (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
135 | ui_toolbar_add_default("button1"); |
9a7e4a335b2b
added toolbar (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
136 | ui_toolbar_add_default("button2"); |
118
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
137 | ui_toolbar_add_default("combo"); |
89
9a7e4a335b2b
added toolbar (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
88
diff
changeset
|
138 | |
114
909fe96e5659
added ui_draw_line function
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
113
diff
changeset
|
139 | UiObject *obj = ui_window("Test", NULL); |
111
40dbf1a7526a
added close handler to UiContext (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
110
diff
changeset
|
140 | ui_context_closefunc(obj->ctx, window_close, NULL); |
115
102fc0b8fe3e
improved context menus
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
114
diff
changeset
|
141 | |
118
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
142 | ///* |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
143 | ui_hbox(obj); |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
144 | |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
145 | drawingarea = ui_drawingarea(obj, draw, NULL); |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
146 | ctxmenu = ui_contextmenu_w(obj, drawingarea); |
115
102fc0b8fe3e
improved context menus
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
114
diff
changeset
|
147 | ui_widget_menuitem(obj, "Test1", NULL, NULL); |
102fc0b8fe3e
improved context menus
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
114
diff
changeset
|
148 | ui_widget_menuitem(obj, "Test2", NULL, NULL); |
102fc0b8fe3e
improved context menus
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
114
diff
changeset
|
149 | ui_widget_menuitem(obj, "Test3", NULL, NULL); |
102fc0b8fe3e
improved context menus
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
114
diff
changeset
|
150 | ui_widget_menuitem(obj, "Test4", NULL, NULL); |
118
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
151 | ui_drawingarea_mousehandler(obj, drawingarea, click, NULL); |
116
480354705c2f
added combobox (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
115
diff
changeset
|
152 | |
118
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
153 | ui_vscrollbar(obj, &range, action_scroll, NULL); |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
154 | range.setrange(&range, 0, 400); |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
155 | range.setextent(&range, 1); |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
117
diff
changeset
|
156 | range.set(&range, 0); |
116
480354705c2f
added combobox (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
115
diff
changeset
|
157 | |
99
ea1a2d5de765
improved grid container (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
98
diff
changeset
|
158 | ui_end(obj); |
104
3efe0210e27e
added grid spacing (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
159 | //*/ |
94
d51e334c1439
added checkbox and labels with alignment (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
90
diff
changeset
|
160 | |
88
04c81be1c5a0
added textarea (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
86
diff
changeset
|
161 | ui_show(obj); |
04c81be1c5a0
added textarea (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
86
diff
changeset
|
162 | ui_main(); |
29
c96169444d88
added locale support (Cocoa) and ucx update
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
28
diff
changeset
|
163 | |
0 | 164 | return (EXIT_SUCCESS); |
165 | } |