Rev 6456 | Rev 6466 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6456 | Rev 6457 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #include "kolibri_gui.h" |
1 | #include |
Line 2... | Line 2... | ||
2 | 2 | ||
3 | int main() |
3 | int main() |
4 | { |
4 | { |
5 | /* Load all libraries, initialize global tables like system color table and |
5 | /* Load all libraries, initialize global tables like system color table and |
Line 10... | Line 10... | ||
10 | kolibri_gui_init(); |
10 | kolibri_gui_init(); |
11 | /* Set gui_event to REDRAW so that window is drawn in first iteration */ |
11 | /* Set gui_event to REDRAW so that window is drawn in first iteration */ |
12 | unsigned int gui_event = KOLIBRI_EVENT_REDRAW; |
12 | unsigned int gui_event = KOLIBRI_EVENT_REDRAW; |
13 | oskey_t key; |
13 | oskey_t key; |
Line 14... | Line 14... | ||
14 | 14 | ||
15 | struct kolibri_window *main_window = kolibri_new_window(50, 50, 400, 100, "BoardMsg: OpenDialog 0.12"); |
15 | kolibri_window *main_window = kolibri_new_window(50, 50, 400, 100, "BoardMsg: OpenDialog 0.12"); |
16 | struct check_box *checkbox = kolibri_new_check_box(20, 40, 12, 12, "Append BOARDMSG to entered message."); |
16 | check_box *checkbox = kolibri_new_check_box(20, 40, 12, 12, "Append BOARDMSG to entered message."); |
17 | struct edit_box *textbox = kolibri_new_edit_box(20, 55, 40); |
17 | edit_box *textbox = kolibri_new_edit_box(20, 55, 40); |
Line 18... | Line 18... | ||
18 | struct kolibri_button *button = kolibri_new_button(310, 55, 24, 14, 0x21, kolibri_color_table.color_work_button); |
18 | kolibri_button *button = kolibri_new_button(310, 55, 24, 14, 0x21, kolibri_color_table.color_work_button); |
19 | 19 | ||
20 | kolibri_window_add_element(main_window, KOLIBRI_EDIT_BOX, textbox); |
20 | kolibri_window_add_element(main_window, KOLIBRI_EDIT_BOX, textbox); |
Line 55... | Line 55... | ||
55 | if(checkbox -> flags & CHECKBOX_IS_SET) /* Append BoardMsg checkbox is set */ |
55 | if(checkbox -> flags & CHECKBOX_IS_SET) /* Append BoardMsg checkbox is set */ |
56 | debug_board_write_str("BOARDMSG: "); |
56 | debug_board_write_str("BOARDMSG: "); |
57 | debug_board_write_str(textbox->text); |
57 | debug_board_write_str(textbox->text); |
58 | debug_board_write_str("\n"); |
58 | debug_board_write_str("\n"); |
59 | break; |
59 | break; |
60 | case 0x00000001: |
60 | case BUTTON_CLOSE: |
61 | kolibri_exit(); |
61 | kolibri_exit(); |
62 | } |
62 | } |
63 | } |
63 | } |
64 | else if(gui_event == KOLIBRI_EVENT_MOUSE) |
64 | else if(gui_event == KOLIBRI_EVENT_MOUSE) |
65 | { |
65 | { |