Rev 6466 | Rev 6489 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6466 | Rev 6479 | ||
---|---|---|---|
Line -... | Line 1... | ||
- | 1 | /* |
|
- | 2 | KolibriGUI demobox |
|
- | 3 | -Button |
|
- | 4 | -CheckBox |
|
- | 5 | -EditBox |
|
- | 6 | -Frame |
|
- | 7 | ||
- | 8 | Free for all |
|
- | 9 | ||
- | 10 | Initially written by ashmew2, 2015 |
|
- | 11 | ||
- | 12 | Updated by Siemargl, 2016 |
|
- | 13 | ||
- | 14 | ToDo |
|
- | 15 | */ |
|
- | 16 | ||
- | 17 | #include |
|
- | 18 | #include |
|
- | 19 | #include |
|
1 | #include |
20 | #include |
Line 2... | Line 21... | ||
2 | 21 | ||
3 | int main() |
22 | int main() |
4 | { |
23 | { |
Line 10... | Line 29... | ||
10 | kolibri_gui_init(); |
29 | kolibri_gui_init(); |
11 | /* Set gui_event to REDRAW so that window is drawn in first iteration */ |
30 | /* Set gui_event to REDRAW so that window is drawn in first iteration */ |
12 | unsigned int gui_event = KOLIBRI_EVENT_REDRAW; |
31 | unsigned int gui_event = KOLIBRI_EVENT_REDRAW; |
13 | oskey_t key; |
32 | oskey_t key; |
Line 14... | Line 33... | ||
14 | 33 | ||
15 | kolibri_window *main_window = kolibri_new_window(50, 50, 400, 100, "BoardMsg: OpenDialog 0.12"); |
34 | kolibri_window *main_window = kolibri_new_window(50, 50, 400, 120, "BoardMsg: OpenDialog 0.12"); |
- | 35 | check_box *checkbox = kolibri_new_check_box(20, 45, 12, 12, "Append BOARDMSG to entered message."); |
|
- | 36 | ||
16 | check_box *checkbox = kolibri_new_check_box(20, 45, 12, 12, "Append BOARDMSG to entered message."); |
37 | edit_box *editbox_interlock = NULL; |
- | 38 | edit_box *textbox = kolibri_new_edit_box(20, 60, 40, &editbox_interlock); |
|
17 | edit_box *textbox = kolibri_new_edit_box(20, 60, 40); |
39 | edit_box *textbox2 = kolibri_new_edit_box(20, 80, 40, &editbox_interlock); |
18 | kolibri_button *button = kolibri_new_button(310, 60, 24, 14, 0x21, kolibri_color_table.color_work_button); |
40 | kolibri_button *button = kolibri_new_button(310, 60, 24, 14, 0x21, kolibri_color_table.color_work_button); |
Line 19... | Line 41... | ||
19 | frame *fr = kolibri_new_frame(12, 35, 350, 50, 0x00FCFCFC, 0x00DCDCDC, 1, "Frame Title", 0, kolibri_color_table.color_work_text, kolibri_color_table.color_work_area); |
41 | frame *fr = kolibri_new_frame(X_Y(12, 350), X_Y(35, 70), 0x00FCFCFC, 0x00DCDCDC, "Frame Title", 0, kolibri_color_table.color_work_text, kolibri_color_table.color_work_area); |
- | 42 | ||
20 | 43 | kolibri_window_add_element(main_window, KOLIBRI_EDIT_BOX, textbox); |
|
21 | kolibri_window_add_element(main_window, KOLIBRI_EDIT_BOX, textbox); |
44 | kolibri_window_add_element(main_window, KOLIBRI_EDIT_BOX, textbox2); |
22 | kolibri_window_add_element(main_window, KOLIBRI_CHECK_BOX, checkbox); |
45 | kolibri_window_add_element(main_window, KOLIBRI_CHECK_BOX, checkbox); |
Line 23... | Line 46... | ||
23 | kolibri_window_add_element(main_window, KOLIBRI_BUTTON, button); |
46 | kolibri_window_add_element(main_window, KOLIBRI_BUTTON, button); |