Rev 6535 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6535 | Rev 8581 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #ifndef KOLIBRI_MENUBAR_H |
1 | #ifndef KOLIBRI_MENUBAR_H |
2 | #define KOLIBRI_MENUBAR_H |
2 | #define KOLIBRI_MENUBAR_H |
Line 3... | Line 3... | ||
3 | 3 | ||
4 | typedef struct |
4 | typedef struct |
5 | { |
5 | { |
Line 6... | Line 6... | ||
6 | uint32_t type; // 1 åñëè íåò ïîäìåíþ, ïðîñòî ïóíêò |
6 | uint32_t type; // 1 ���� ��� �������, ������ ����� |
7 | 7 | ||
Line 8... | Line 8... | ||
8 | uint32_t x_w; // âåðõíèé ïóíêò |
8 | uint32_t x_w; // ������� ����� |
9 | uint32_t y_h; |
9 | uint32_t y_h; |
10 | 10 | ||
11 | char* text_pointer; |
11 | char* text_pointer; |
12 | char* pos_pointer; |
12 | char* pos_pointer; |
Line 13... | Line 13... | ||
13 | char* text_end; |
13 | char* text_end; |
14 | uint32_t mouse_pos; |
14 | uint32_t mouse_pos; |
Line 15... | Line 15... | ||
15 | uint32_t mouse_keys; |
15 | uint32_t mouse_keys; |
16 | 16 | ||
17 | uint32_t x_w1; // ïîäìåíþ |
17 | uint32_t x_w1; // ������� |
18 | uint32_t y_h1; |
18 | uint32_t y_h1; |
19 | 19 | ||
20 | color_t bckg_col; // ôîí âåðõíåãî ïóêòà |
20 | color_t bckg_col; // ��� �������� ����� |
21 | color_t frnt_col; // ôîí âûáðàííîãî âåðõíåãî ïóíêòà |
21 | color_t frnt_col; // ��� ���������� �������� ������ |
22 | color_t menu_col; // ôîí âûïàäàþùåé ÷àñòè (ïîäïóêòû) |
22 | color_t menu_col; // ��� ���������� ����� (��������) |
23 | uint32_t select; |
23 | uint32_t select; |
24 | uint32_t out_select; |
24 | uint32_t out_select; |
25 | char* buf_adress; |
25 | char* buf_adress; |
26 | char* procinfo; |
26 | char* procinfo; |
27 | uint32_t click; |
27 | uint32_t click; |
28 | uint32_t cursor; |
28 | uint32_t cursor; |
29 | uint32_t cursor_old; |
29 | uint32_t cursor_old; |
30 | uint32_t interval; |
30 | uint32_t interval; |
31 | uint32_t cursor_max; |
31 | uint32_t cursor_max; |
32 | uint32_t extended_key; |
32 | uint32_t extended_key; |
33 | color_t menu_sel_col; // öâåò ôîíà âûáðàííîãî ïîäïóíêòà |
33 | color_t menu_sel_col; // ���� ���� ���������� ��������� |
34 | color_t bckg_text_col; // öâåò øðèôòà íåâûáðàííîãî ïóíêòà |
34 | color_t bckg_text_col; // ���� ������ ������������ ������ |
35 | color_t frnt_text_col; // öâåò øðèôòà âûáðàííîãî ïóíêòà |
35 | color_t frnt_text_col; // ���� ������ ���������� ������ |
Line 77... | Line 77... | ||
77 | bar->procinfo = procinfo; |
77 | bar->procinfo = procinfo; |
Line 78... | Line 78... | ||
78 | 78 | ||
79 | return bar; |
79 | return bar; |
Line 80... | Line 80... | ||
80 | } |
80 | } |
81 | 81 | ||
82 | inline menubar* kolibri_new_menubar(uint32_t x_w, uint32_t y_h, uint16_t sub_w, uint16_t sub_h, char **menutext, |
82 | static inline menubar* kolibri_new_menubar(uint32_t x_w, uint32_t y_h, uint16_t sub_w, uint16_t sub_h, char **menutext, |
83 | color_t sel_font, color_t unsel_font, color_t top_bg, color_t top_select, color_t sub_bg, color_t sub_select) |
83 | color_t sel_font, color_t unsel_font, color_t top_bg, color_t top_select, color_t sub_bg, color_t sub_select) |
84 | { |
84 | { |
85 | menubar *new_bar = (menubar*)malloc(sizeof(menubar)); |
85 | menubar *new_bar = (menubar*)malloc(sizeof(menubar)); |
Line 86... | Line 86... | ||
86 | return kolibri_menubar(new_bar, x_w, y_h, sub_w, sub_h, menutext, sel_font, unsel_font, top_bg, top_select, sub_bg, sub_select); |
86 | return kolibri_menubar(new_bar, x_w, y_h, sub_w, sub_h, menutext, sel_font, unsel_font, top_bg, top_select, sub_bg, sub_select); |
87 | } |
87 | } |
88 | 88 | ||
89 | inline menubar* kolibri_menubar_def(menubar* bar, uint32_t x_w, uint32_t y_h, uint16_t sub_w, uint16_t sub_h, char **menutext) |
89 | static inline menubar* kolibri_menubar_def(menubar* bar, uint32_t x_w, uint32_t y_h, uint16_t sub_w, uint16_t sub_h, char **menutext) |
90 | { |
90 | { |
91 | return kolibri_menubar(bar, x_w, y_h, sub_w, sub_h, menutext, |
91 | return kolibri_menubar(bar, x_w, y_h, sub_w, sub_h, menutext, |
Line 92... | Line 92... | ||
92 | kolibri_color_table.color_work_button_text, kolibri_color_table.color_work_text, kolibri_color_table.color_work_area, |
92 | kolibri_color_table.color_work_button_text, kolibri_color_table.color_work_text, kolibri_color_table.color_work_area, |
93 | kolibri_color_table.color_work_button, kolibri_color_table.color_grab_bar_button, kolibri_color_table.color_work_button); |
93 | kolibri_color_table.color_work_button, kolibri_color_table.color_grab_bar_button, kolibri_color_table.color_work_button); |
94 | } |
94 | } |
95 | 95 | ||
96 | inline menubar* kolibri_new_menubar_def(uint32_t x_w, uint32_t y_h, uint16_t sub_w, uint16_t sub_h, char **menutext) |
96 | static inline menubar* kolibri_new_menubar_def(uint32_t x_w, uint32_t y_h, uint16_t sub_w, uint16_t sub_h, char **menutext) |
97 | { |
97 | { |
Line 98... | Line 98... | ||
98 | return kolibri_new_menubar(x_w, y_h, sub_w, sub_h, menutext, |
98 | return kolibri_new_menubar(x_w, y_h, sub_w, sub_h, menutext, |
99 | kolibri_color_table.color_work_button_text, kolibri_color_table.color_work_text, kolibri_color_table.color_work_area, |
99 | kolibri_color_table.color_work_button_text, kolibri_color_table.color_work_text, kolibri_color_table.color_work_area, |
100 | kolibri_color_table.color_work_button, kolibri_color_table.color_grab_bar_button, kolibri_color_table.color_work_button); |
100 | kolibri_color_table.color_work_button, kolibri_color_table.color_grab_bar_button, kolibri_color_table.color_work_button); |
101 | } |
101 | } |