acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
user.h
1#pragma once
2
3
4
5
6
7//#define make_int(a, b) ((::i32)(((::u16)(((dword_ptr)(a)) & 0xffff)) | ((::u32)((::u16)(((dword_ptr)(b)) & 0xffff))) << 16))
8
9
10
11enum enum_position
12{
13 e_position_none = 0,
14 e_position_top = 1,
15 e_position_left = 2,
16 e_position_top_left = 3,
17 e_position_right = 4,
18 e_position_top_right = 5,
19 e_position_hcenter = 6,
20 e_position_top_center = 7,
21 e_position_bottom = 8,
22 e_position_vcenter = 9,
23 e_position_bottom_left = 10,
24 e_position_left_center = 11,
25 e_position_bottom_right = 12,
26 e_position_right_center = 13,
27 e_position_bottom_center = 14,
28 e_position_center = 15,
29};
30
31
32namespace user
33{
34
35
36 enum enum_layout
37 {
38
39 e_layout_sketch, // layouting request ("staging area")
40 e_layout_lading, // layouting request ("staging area")
41 e_layout_layout, // to layout
42 e_layout_design, // ready to process
43 // layout_bitmap, // drawn/ready sketch
44 e_layout_output, // screen output
45 e_layout_window, // happening window
46 e_layout_normal, // window last restored state
47
48 e_layout_count_child = e_layout_design + 1,
49 e_layout_count_owner = e_layout_window + 1,
50 e_layout_maximum_count = e_layout_normal + 1,
51
52 };
53
54 enum enum_tool
55 {
56
57 e_tool_none,
58 e_tool_color,
59 e_tool_font,
60
61 };
62
63 enum enum_state
64 {
65
66 e_state_none,
67 e_state_selected = 1 << 0,
68 e_state_hover = 1 << 1,
69 e_state_disabled = 1 << 2,
70 e_state_pressed = 1 << 3,
71 e_state_mask1 = e_state_selected | e_state_hover | e_state_disabled | e_service_status_running,
72 e_state_new_input = 1 << 4,
73 e_state_focused = 1 << 5,
74 e_state_checked = 1 << 6,
75
76 };
78
79 //using color_text = ::color::color;
80 // using color_text_highlight = ::color::color;
81 // using color_text_selected = ::color::color;
82 // using color_text_selected_highlight = ::color::color;
83 // using color_text_focused = ::color::color;
84 // using color_background = ::color::color;
85 // using color_background_highlight = ::color::color;
86 // using color_background_selected = ::color::color;
87 // using color_background_selected_highlight = ::color::color;
88 // using color_background_selected_hover = ::color::color;
89 // using color_border = ::color::color;
90 // using color_border_hover = ::color::color;
91 // using color_border_press = ::color::color;
92 // using color_border_disabled = ::color::color;
93 // using color_background_hover = ::color::color;
94 // using color_background_press = ::color::color;
95 // using color_background_press_hover = ::color::color;
96 // using color_background_disabled = ::color::color;
97 // using color_text_normal = ::color::color;
98 // using color_text_hover = ::color::color;
99 // using color_text_press = ::color::color;
100 // using color_text_press_hover = ::color::color;
101 // using color_text_disabled = ::color::color;
102 // using color_button_background = ::color::color;
103 // using color_button_background_hover = ::color::color;
104 // using color_button_background_press = ::color::color;
105 // using color_button_background_disabled = ::color::color;
106 // using color_button_text = ::color::color;
107 // using color_button_text_hover = ::color::color;
108 // using color_button_text_press = ::color::color;
109 // using color_button_text_disabled = ::color::color;
110 // using color_face = ::color::color;
111 // using color_face_lite = ::color::color;
112 // using color_list_header = ::color::color;
113 // using color_list_header_background = ::color::color;
114 // using color_list_header_separator = ::color::color;
115 // using color_list_item_background = ::color::color;
116 // using color_list_item_background_hover = ::color::color;
117 // using color_list_item_background_selected = ::color::color;
118 // using color_list_item_background_selected_hover = ::color::color;
119 // using color_list_item_text = ::color::color;
120 // using color_list_item_text_hover = ::color::color;
121 // using color_list_item_text_selected = ::color::color;
122 // using color_list_item_text_selected_hover = ::color::color;
123 // using color_list_background = ::color::color;
124 // using color_edit_text = ::color::color;
125 // using color_edit_background = ::color::color;
126 // using color_edit_text_selected = ::color::color;
127 // using color_edit_background_selected = ::color::color;
128 // using color_edit_text_empty = ::color::color;
129 // using color_tree_background = ::color::color;
130 // using color_impact_background = ::color::color;
131 // using color_toolbar_background = ::color::color;
132 // using color_toolbar_separator = ::color::color;
133 // using color_split_layout_background = ::color::color;
134 // using color_tab_client_background = ::color::color;
135 // using color_tab_layout_background = ::color::color;
136 // using color_action_hover_border_color = ::color::color;
137 // using color_scrollbar = ::color::color;
138 // using color_scrollbar_hover = ::color::color;
139 // using color_scrollbar_draw = ::color::color;
140 // using color_scrollbar_draw_hover = ::color::color;
141 // using color_scrollbar_strong = ::color::color;
142 // using color_scrollbar_strong_hover = ::color::color;
143 // using color_scrollbar_border = ::color::color;
144 // using color_scrollbar_border_hover = ::color::color;
145 // using color_scrollbar_lite_border = ::color::color;
146 // using color_scrollbar_lite_border_hover = ::color::color;
147 // using color_scrollbar_background = ::color::color;
148 // using color_scrollbar_background_hover = ::color::color;
149 // using color_menu_background = ::color::color;
150
151 // // Use Good Variable Names instead of the following
152
153 enum enum_int
154 {
155
156 e_int_none,
157 e_int_border,
158 e_int_element_padding,
159 e_int_menu_check_padding,
160 e_int_check_box_size,
161 e_int_still_text_align,
162 e_int_button_text_align,
163 e_int_button_text_and_image_align,
164 e_int_edit_text_align,
165 e_int_menu_item_text_align,
166 e_int_list_item_text_align,
167 e_int_still_draw_text_flags,
168 e_int_button_draw_text_flags,
169 e_int_button_draw_text_and_image_flags,
170 e_int_edit_draw_text_flags,
171 e_int_menu_item_draw_text_flags,
172 e_int_list_item_draw_text_flags,
173 e_int_top_level_drawing_order,
174 e_int_button_press_shift_cx,
175 e_int_button_press_shift_cy,
176 e_int_scroll_bar_thickness,
177
178 };
179
180
181 enum enum_object
182 {
183
184 e_object_list,
185 e_object_tree
186
187 };
188
189
190 enum enum_theme
191 {
192
193 e_theme_lite,
194 e_theme_blue,
195 e_theme_dark
196
197 };
198
199
200 enum enum_translucency
201 {
202
203 e_translucency_undefined,
204 e_translucency_none,
205 e_translucency_present,
206 e_translucency_total
207
208 };
209
210
211 enum enum_control_type
212 {
213 e_control_type_none,
214 e_control_type_static,
215 e_control_type_check_box,
216 e_control_type_edit,
217 e_control_type_simple_list,
218 e_control_type_button,
219 e_control_type_combo_box,
220 e_control_type_edit_plain_text,
221 e_control_type_list,
222 e_control_type_mesh,
223 e_control_type_tree,
224 e_control_type_split,
225 e_control_type_tab,
226 e_control_type_toolbar,
227 e_control_type_statusbar,
228 e_control_type_menu,
229 e_control_type_menu_popup,
230 e_control_type_menu_button,
231 e_control_type_menu_button_close,
232 e_control_type_system_menu,
233 e_control_type_system_menu_popup,
234 e_control_type_system_menu_button,
235 e_control_type_system_menu_close,
236 e_control_type_form,
237 e_control_type_scroll_bar,
238 e_control_type_multiple_option,
239
240 };
241
242
243
244
245
246
247 //enum e_font
248 //{
249
250 // font_default,
251 // font_button,
252 // font_plain_edit,
253 // font_tree,
254 // font_list_item,
255 // font_list_hover,
256 // font_list_header,
257 // font_static,
258 // font_toolbar,
259 // font_tab,
260 // font_tab_hover,
261 // font_tab_sel,
262 // font_tab_sel_hover,
263 // font_tab_big_bold,
264 // font_window_title,
265
266 //};
267
268
269
270 //enum e_rect
271 //{
272 // // Use Good Variable Names instead of the following
273
274 // rect_none,
275 // rect_button_margin,
276 // rect_button_padding,
277 // rect_button_border,
278 // rect_menu_margin,
279 // rect_menu_padding,
280 // rect_menu_border,
281 // rect_menu_item_margin,
282 // rect_menu_item_padding,
283 // rect_menu_item_border,
284 // rect_edit_padding,
285 // rect_tab_margin,
286 // rect_tab_border,
287 // rect_tab_padding,
288
289 //};
290
291
292
293#define DRAWING_ORDER_FRAME_OVER 0
294#define DRAWING_ORDER_CLIENT_OVER 1
295
296 // // Use Good Variable Names instead of the following
297
298 enum enum_f64
299 {
300
301 e_f64_none,
302 e_f64_default_one_min,
303 e_f64_width_rate,
304 e_f64_list_item_height_rate,
305 e_f64_tree_item_height_rate,
306 e_f64_default_one_max,
307 e_f64_focus_height_width,
308
309 };
310
311
312 enum enum_control_function
313 {
314 // Text got from control m_uiId member
315 e_control_function_static,
316 // Text got from control m_uiText member
317 e_control_function_static2,
318 e_control_function_data_selection,
319 e_control_function_check_box,
320 e_control_function_duplicate_on_check_box,
321 e_control_function_disable_on_check_box,
322 e_control_function_save_on_change,
323 e_control_function_vms_data_edit,
324 e_control_function_action,
325 e_control_function_edit_multi_line,
326 };
327
328
329 enum enum_control_data_type
330 {
331 e_control_data_type_string,
332 e_control_data_type_natural,
333 };
334
335
336 enum enum_control_ddx
337 {
338
339 e_control_ddx_none,
340 e_control_ddx_flags,
341 e_control_ddx_dbflags,
342
343 };
344
345
346// enum enum_mouse
347// {
348//
349// e_mouse_none = 0,
350// e_mouse_left_button = 1,
351// e_mouse_right_button = 2,
352// e_mouse_middle_button = 4,
353//
354// };
355
356 enum enum_line_hit
357 {
358 e_line_hit_none,
359 e_line_hit_normal,
360 e_line_hit_link,
361 };
362
363 enum enum_tree_element
364 {
365 e_tree_element_expand_box,
366 e_tree_element_image,
367 e_tree_element_text,
368 };
369
370
371 enum enum_input_type
372 {
373
374 e_input_type_none,
375 e_input_type_action,
376 e_input_type_toggle,
377 e_input_type_list,
378 e_input_type_text,
379
380 };
381
382
383
384 enum enum_activation
385 {
386
387
388 e_activation_no_activate = 0,
389 e_activation_default = 1 << 0,
390 //e_activation_set_active = 1 << 1,
391 e_activation_under_mouse_cursor = 1 << 3,
392 e_activation_display_change = 1 << 5,
393 e_activation_for_context_menu = 1 << 7,
394 e_activation_set_popup = 1 << 14,
395 e_activation_on_center_of_screen = 1 << 15,
396 e_activation_set_foreground = 1 << 16,
397
398 };
399
400
401} // namespace user
402
403
404enum enum_toolbar_style
405{
406
407 e_toolbar_style_none = 0,
408 e_toolbar_style_button = 0,
409 e_toolbar_style_separator = 1,
410 e_toolbar_style_check = 2,
411 e_toolbar_style_group = 4,
412 e_toolbar_style_check_group = e_toolbar_style_check | e_toolbar_style_group,
413 e_toolbar_style_dropdown = 8,
414 e_toolbar_style_autosize = 16,
415 e_toolbar_style_noprefix = 32,
416 e_toolbar_style_tooltips = 256,
417 e_toolbar_style_wrapable = 512,
418 e_toolbar_style_alt_drag = 1024,
419 e_toolbar_style_flat = 2048,
420 e_toolbar_style_list = 4096,
421 e_toolbar_style_custom_erase = 8192,
422 e_toolbar_style_register_drop = 16384,
423 e_toolbar_style_transparent = 32768,
424
425};
426
427
428enum enum_toolbar_style_ex
429{
430 e_toolbar_style_ex_none = 0,
431 e_toolbar_style_ex_drawddarrows = 1,
432
433};
434
435
436enum enum_scroll_command
437{
438
439 e_scroll_command_line_near = 0,
440 e_scroll_command_line_up = e_scroll_command_line_near,
441 e_scroll_command_line_left = e_scroll_command_line_near,
442 e_scroll_command_line_far = 1,
443 e_scroll_command_line_down = e_scroll_command_line_far,
444 e_scroll_command_line_right = e_scroll_command_line_far,
445 e_scroll_command_page_near = 2,
446 e_scroll_command_page_up = e_scroll_command_page_near,
447 e_scroll_command_page_left = e_scroll_command_page_near,
448 e_scroll_command_page_far = 3,
449 e_scroll_command_page_down = e_scroll_command_page_far,
450 e_scroll_command_page_right = e_scroll_command_page_far,
451 e_scroll_command_thumb_position = 4,
452 e_scroll_command_thumb_track = 5,
453 e_scroll_command_home = 6,
454 e_scroll_command_top = e_scroll_command_home,
455 e_scroll_command_left = e_scroll_command_home,
456 e_scroll_command_end = 7,
457 e_scroll_command_bottom = e_scroll_command_end,
458 e_scroll_command_right = e_scroll_command_end,
459 e_scroll_command_wheel_near = 8,
460 e_scroll_command_wheel_up = e_scroll_command_wheel_near,
461 e_scroll_command_wheel_far = 9,
462 e_scroll_command_wheel_down = e_scroll_command_wheel_far,
463 e_scroll_command_end_scroll = 10,
464
465};
466
467
468
469
470
471enum enum_hit_test
472{
473 e_hit_test_error = -2,
474 e_hit_test_transparent = -1,
475 e_hit_test_nowhere = 0,
476 e_hit_test_client = 1,
477 e_hit_test_caption = 2,
478 e_hit_test_sysmenu = 3,
479 e_hit_test_grow_box = 4,
480 e_hit_test_size = e_hit_test_grow_box,
481 e_hit_test_menu = 5,
482 e_hit_test_hscroll = 6,
483 e_hit_test_vscroll = 7,
484 e_hit_test_minimize_button = 8,
485 e_hit_test_maximize_button = 9,
486 e_hit_test_left = 10,
487 e_hit_test_right = 11,
488 e_hit_test_top = 12,
489 e_hit_test_top_left = 13,
490 e_hit_test_top_right = 14,
491 e_hit_test_bottom = 15,
492 e_hit_test_bottom_left = 16,
493 e_hit_test_bottom_right = 17,
494 e_hit_test_border = 18,
495 e_hit_test_reduce = e_hit_test_minimize_button,
496 e_hit_test_zoom = e_hit_test_maximize_button,
497 e_hit_test_size_first = e_hit_test_left,
498 e_hit_test_size_last = e_hit_test_bottom_right,
499 e_hit_test_object = 19,
500 e_hit_test_close = 20,
501 e_hit_test_help = 21,
502
503};
504
505
506#include "acme/constant/activate.h"
507
508
509
510namespace user
511{
512
513
514 enum enum_flag
515 {
516
517 e_flag_none,
518 e_flag_border = 1 << 0,
519 e_flag_modifier_impact = 1 << 1,
520 e_flag_tool_impact = 1 << 2,
521 e_flag_blur_background = 1 << 3,
522 e_flag_hide_all_others_on_show = 1 << 4,
523 e_flag_hidid_on_show = 1 << 5,
524 e_flag_strict_update = 1 << 6,
525 e_flag_hide_on_kill_focus = 1 << 7,
526 e_flag_background_bypass = 1 << 8,
527
528 };
529
530 enum enum_interaction : ::i64
531 {
532
533 e_interaction_none = 0,
534 e_interaction_system_context_menu = 1 << 0,
535 e_interaction_wfi_up_down_loading2 = 1 << 1,
536 e_interaction_wfi_up_tool_window2 = 1 << 2,
537
538
539 };
540
541
542
543 enum enum_zorder
544 {
545
546 e_zorder_none = 0,
547 e_zorder_front = 1,
548 e_zorder_back = 2,
549 e_zorder_any = e_zorder_front | e_zorder_back,
550
551 };
552
553
554
555
556
557} // namespace user
558
559
560
561
562//
563// tool_item.h
564// acme
565//
566// Created by Camilo Sasuke Thomas Borregaard Soerensen on 03/Oct/22 20:28
567// Copyright (c) 2022 Camilo Sasuke Thomas Borregaard Soerensen. All rights reserved.
568//
569#pragma once
570
571
572enum enum_tool_item_state : ::i64
573{
574
575 e_tool_item_state_none,
576 e_tool_item_state_checked = 1 << 0,
577 e_tool_item_state_pressed = 1 << 1,
578 e_tool_item_state_enabled = 1 << 2,
579 e_tool_item_state_hidden = 1 << 3,
580 e_tool_item_state_indeterminate = 1 << 4,
581 e_tool_item_state_wrap = 1 << 5,
582 e_tool_item_state_ellipses = 1 << 6,
583 e_tool_item_state_marked = 1 << 7,
584 e_tool_item_state_hover = 1 << 8,
585
586};
587
588
589enum enum_tool_item_style : ::i64
590{
591
592 e_tool_item_style_none = e_toolbar_style_none,
593 e_tool_item_style_separator = e_toolbar_style_separator,
594 e_tool_item_style_checkbox = e_toolbar_style_check,
595 e_tool_item_style_group = e_toolbar_style_group,
596 e_tool_item_style_check_group = e_tool_item_style_group | e_tool_item_style_checkbox,
597 e_tool_item_style_dropdown = e_toolbar_style_dropdown,
598 e_tool_item_style_autosize = e_toolbar_style_autosize,
599 e_tool_item_style_noprefix = e_toolbar_style_noprefix,
600 e_tool_item_style_custom_control = 1_uintmax,
601 //#define TBBS_AUTOSIZE make_int(TBSTYLE_AUTOSIZE, 0) // autocalc button width
602 //#define TBBS_NOPREFIX make_int(TBSTYLE_NOPREFIX, 0) // no accel prefix for this button
603 e_tool_item_style_checked = make_int(0, e_tool_item_state_checked),
604 e_tool_item_style_pressed = make_int(0, e_tool_item_state_pressed),
605 e_tool_item_style_disabled = make_int(0, e_tool_item_state_enabled),
606 e_tool_item_style_indeterminate = make_int(0, e_tool_item_state_indeterminate),
607 e_tool_item_style_hidden = make_int(0, e_tool_item_state_hidden),
608 e_tool_item_style_wrapped = make_int(0, e_tool_item_state_wrap),
609 e_tool_item_style_ellipses = make_int(0, e_tool_item_state_ellipses),
610 e_tool_item_style_marked = make_int(0, e_tool_item_state_marked),
611};
612
613
Created by camilo on 2026-05-28 12:34 <3ThomasBorregaardSørensen!! Mummi!! Bilbo!!
Definition _.h:67