Rev 6457 | Rev 6470 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6457 | Rev 6466 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #ifndef KOLIBRI_CHECKBOX_H |
1 | #ifndef KOLIBRI_CHECKBOX_H |
2 | #define KOLIBRI_CHECKBOX_H |
2 | #define KOLIBRI_CHECKBOX_H |
Line 3... | Line 3... | ||
3 | 3 | ||
4 | #include "kolibri_colors.h" |
4 | #include "kolibri_colors.h" |
5 | 5 | ||
6 | enum CHECKBOX_FLAGS { |
6 | enum CHECKBOX_FLAGS { |
7 | CHECKBOX_IS_SET = 0x00000002 |
7 | CHECKBOX_IS_SET = 0x00000002 |
8 | /* Add more flags later */ |
8 | /* Add more flags later */ |
Line 18... | Line 18... | ||
18 | char *text; |
18 | char *text; |
19 | unsigned int flags; |
19 | unsigned int flags; |
Line 20... | Line 20... | ||
20 | 20 | ||
21 | /* Users can use members above this */ |
21 | /* Users can use members above this */ |
22 | unsigned int size_of_str; |
22 | unsigned int size_of_str; |
- | 23 | }check_box; |
|
- | 24 | ||
- | 25 | extern void (*check_box_draw2)(check_box *) __attribute__((__stdcall__)); |
|
- | 26 | extern void (*check_box_mouse2)(check_box *)__attribute__((__stdcall__)); |
|
Line 23... | Line 27... | ||
23 | }check_box; |
27 | extern void (*init_checkbox2)(check_box *)__attribute__((__stdcall__)); |
24 | 28 | ||
25 | check_box* kolibri_new_check_box(unsigned int tlx, unsigned int tly, unsigned int sizex, unsigned int sizey, char *label_text) |
29 | check_box* kolibri_new_check_box(unsigned int tlx, unsigned int tly, unsigned int sizex, unsigned int sizey, char *label_text) |
26 | { |
30 | { |
Line 30... | Line 34... | ||
30 | new_checkbox -> ch_text_margin = 10; |
34 | new_checkbox -> ch_text_margin = 10; |
31 | new_checkbox -> color = 0xFFFFFFFF; |
35 | new_checkbox -> color = 0xFFFFFFFF; |
32 | new_checkbox -> border_color = kolibri_color_table.color_work_graph; |
36 | new_checkbox -> border_color = kolibri_color_table.color_work_graph; |
33 | new_checkbox -> text_color = kolibri_color_table.color_work_text; |
37 | new_checkbox -> text_color = kolibri_color_table.color_work_text; |
34 | new_checkbox -> text = label_text; |
38 | new_checkbox -> text = label_text; |
35 | new_checkbox -> flags = 0x00000008; |
39 | new_checkbox -> flags = 0x00000008; |
- | 40 | ||
- | 41 | (*init_checkbox2)(new_checkbox); // count text width for mouse action and set flags |
|
Line 36... | Line 42... | ||
36 | 42 | ||
37 | return new_checkbox; |
43 | return new_checkbox; |
Line 38... | Line -... | ||
38 | } |
- | |
39 | - | ||
Line 40... | Line 44... | ||
40 | extern void (*check_box_draw2)(check_box *) __attribute__((__stdcall__)); |
44 | } |