35 #include "../Core/Signals/callback_0.h"
36 #include "../Core/Signals/callback_1.h"
37 #include "../Core/Signals/callback_v0.h"
38 #include "../Core/Signals/callback_v1.h"
39 #include "../Core/Signals/callback_v2.h"
40 #include "../Core/Signals/callback_v3.h"
41 #include "../Core/Signals/callback_2.h"
42 #include "../Core/Signals/signal_v1.h"
43 #include "../Core/IOData/file_system.h"
44 #include "../Display/Window/display_window_description.h"
45 #include "../Display/Window/display_window.h"
46 #include "../Display/Render/graphic_context.h"
47 #include "../Display/Window/input_context.h"
48 #include "../Display/2D/canvas.h"
49 #include "gui_layout.h"
64 class GUITopLevelWindow;
65 class ResourceManager;
66 class GUIConsumedKeys;
67 class GUIComponent_Impl;
68 class CSSComputedValues;
110 Rect get_geometry()
const;
113 Rect get_viewport()
const;
116 Rect get_content_box()
const;
119 int get_width()
const;
122 int get_height()
const;
125 Size get_size()
const;
128 Rect get_window_geometry()
const;
131 std::string get_tag_name()
const;
134 std::string get_id()
const;
137 bool get_class(
const std::string &name)
const;
140 bool get_pseudo_class(
const std::string &name)
const;
143 std::vector<std::string> get_classes()
const;
146 std::vector<std::string> get_pseudo_classes()
const;
152 bool has_focus()
const;
155 bool get_allow_resize()
const;
158 bool get_clip_children()
const;
170 FocusPolicy get_focus_policy()
const;
173 std::string get_component_group_name()
const;
176 bool is_selected_in_group()
const;
179 bool get_blocks_default_action()
const;
206 std::vector<GUIComponent*> get_child_components()
const;
231 std::vector<GUIComponent*> get_child_component_group(
const std::string &group_name)
const;
240 bool has_child_components()
const;
272 GUITopLevelWindow *get_top_level_window()
const;
280 Canvas get_canvas()
const;
286 bool is_enabled()
const;
289 bool is_visible()
const;
292 bool is_active()
const;
300 virtual float get_preferred_content_width();
305 virtual float get_preferred_content_height(
float width);
308 Point window_to_component_coords(
const Point &window_point)
const;
311 Rect window_to_component_coords(
const Rect &window_rect)
const;
314 Point component_to_window_coords(
const Point &component_point)
const;
317 Rect component_to_window_coords(
const Rect &component_rect)
const;
320 Point screen_to_component_coords(
const Point &screen_point)
const;
323 Point component_to_screen_coords(
const Point &component_point)
const;
338 bool is_double_click_enabled()
const;
341 bool get_constant_repaint()
const;
344 Font get_font()
const;
347 Rect get_render_text_box(
Canvas &canvas,
const std::string &str)
const;
350 Size get_render_text_size(
Canvas &canvas,
const std::string &str)
const;
353 Rect get_render_text_span_box(
Canvas &canvas,
const std::string &str,
const Rect &content_rect)
const;
356 Rect get_content_shrink_box()
const;
359 std::string get_property(
const std::string &property,
const std::string &default_value)
const;
362 int get_property_int(
const std::string &property,
const std::string &default_value)
const;
439 void render(
Canvas &canvas,
const Rect &clip_rect,
bool include_children =
true);
449 void paint(
const Rect &clip_rect);
457 void exit_with_code(
int exit_code);
460 void set_geometry(
Rect geometry);
463 void reset_geometry();
466 void set_window_geometry(
Rect geometry,
bool client_area =
false);
469 void set_tag_name(
const std::string &name);
474 bool set_class(
const std::string &name,
bool enable);
477 void set_id(
const std::string &name);
482 void set_style(
const std::string &name);
490 bool set_pseudo_class(
const std::string &name,
bool enable);
493 void update_layout();
496 void set_enabled(
bool enable =
true);
499 void set_clip_children(
bool clip =
true,
const Rect &clip_rect=
Rect(0,0,0,0));
505 void set_visible(
bool visible =
true,
bool activate_root_win=
true);
510 void set_focus(
bool enable =
true);
513 void capture_mouse(
bool capture);
516 void capture_proximity(
bool capture);
519 void set_focus_policy(FocusPolicy policy);
522 void set_double_click_enabled(
bool enable);
527 void set_component_group_name(
const std::string &str);
530 void set_selected_in_component_group(
bool selected);
533 void create_components(
const DomDocument &gui_xml);
538 void create_components(
const std::string &fullname);
543 void create_components(
IODevice &file);
549 void create_components(
const std::string &filename,
const FileSystem &fs);
552 void request_repaint();
557 void request_repaint(
Rect rect);
560 void set_cliprect(
Canvas &canvas,
const Rect &rect);
563 void reset_cliprect(
Canvas &canvas);
566 void push_cliprect(
Canvas &canvas,
const Rect &rect);
569 void pop_cliprect(
Canvas &canvas);
572 void delete_child_components();
581 void set_cursor(
const Cursor &cursor);
592 void focus_previous();
596 void set_default(
bool value);
600 void set_cancel(
bool value);
603 void set_blocks_default_action(
bool block);
606 void set_constant_repaint(
bool enable);
608 Rect render_text_span(
Canvas &canvas,
const std::string &text,
const Rect &content_rect);
609 Rect render_text(
Canvas &canvas,
const std::string &text);
610 Rect render_text(
Canvas &canvas,
const std::string &text,
int xpos,
int baseline);
622 std::unique_ptr<GUIComponent_Impl>
impl;
Definition: css_computed_values.h:58
DisplayWindowDescription GUITopLevelDescription
Definition: gui_component.h:69
StandardCursor
Standard Cursor.
Definition: display_window.h:67
2D Graphics Canvas
Definition: canvas.h:70
Definition: gui_component.h:165
I/O Device interface.
Definition: iodevice.h:51
Definition: gui_component.h:73
Mouse cursor class.
Definition: cursor.h:48
Layout management base class.
Definition: gui_layout.h:47
float baseline
Definition: gui_component.h:76
std::unique_ptr< GUIComponent_Impl > impl
Definition: gui_component.h:622
GUI base component class.
Definition: gui_component.h:81
DOM Document class.
Definition: dom_document.h:65
float bottom
Definition: gui_component.h:77
2D (left,top,right,bottom) rectangle structure - Integer
Definition: rect.h:453
Callback_v2.
Definition: callback_v2.h:156
Definition: gui_component.h:163
Virtual File System (VFS).
Definition: file_system.h:48
Resource manager.
Definition: resource_manager.h:45
FocusPolicy
Focus policies.
Definition: gui_component.h:161
Definition: gui_component.h:164
Callback_v1.
Definition: callback_v1.h:156
GUI manager.
Definition: gui_manager.h:64
Definition: css_property_value.h:41
2D (x,y) point structure - Integer
Definition: point.h:63
InputContext.
Definition: input_context.h:45
Callback_2.
Definition: callback_2.h:156
Display window description class.
Definition: display_window_description.h:53
Font class.
Definition: font.h:52
2D (width,height) size structure - Integer
Definition: size.h:157
Signal_v0.
Definition: signal_v0.h:107
Top-level window class.
Definition: display_window.h:85
Callback_1.
Definition: callback_1.h:156
float top
Definition: gui_component.h:75
Callback_v0.
Definition: callback_v0.h:152