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;
109 Rect get_geometry()
const;
112 Rect get_viewport()
const;
115 Rect get_content_box()
const;
118 int get_width()
const;
121 int get_height()
const;
124 Size get_size()
const;
127 Rect get_window_geometry()
const;
130 std::string get_tag_name()
const;
133 std::string get_id()
const;
136 bool get_class(
const std::string &name)
const;
139 bool get_pseudo_class(
const std::string &name)
const;
142 std::vector<std::string> get_classes()
const;
145 std::vector<std::string> get_pseudo_classes()
const;
151 bool has_focus()
const;
154 bool get_allow_resize()
const;
157 bool get_clip_children()
const;
169 FocusPolicy get_focus_policy()
const;
172 std::string get_component_group_name()
const;
175 bool is_selected_in_group()
const;
178 bool get_blocks_default_action()
const;
205 std::vector<GUIComponent*> get_child_components()
const;
230 std::vector<GUIComponent*> get_child_component_group(
const std::string &group_name)
const;
239 bool has_child_components()
const;
271 GUITopLevelWindow *get_top_level_window()
const;
279 Canvas get_canvas()
const;
285 bool is_enabled()
const;
288 bool is_visible()
const;
291 bool is_active()
const;
299 virtual float get_preferred_content_width();
304 virtual float get_preferred_content_height(
float width);
307 Point window_to_component_coords(
const Point &window_point)
const;
310 Rect window_to_component_coords(
const Rect &window_rect)
const;
313 Point component_to_window_coords(
const Point &component_point)
const;
316 Rect component_to_window_coords(
const Rect &component_rect)
const;
319 Point screen_to_component_coords(
const Point &screen_point)
const;
322 Point component_to_screen_coords(
const Point &component_point)
const;
337 bool is_double_click_enabled()
const;
340 bool get_constant_repaint()
const;
343 Font get_font()
const;
346 Rect get_render_text_box(
Canvas &canvas,
const std::string &str)
const;
349 Size get_render_text_size(
Canvas &canvas,
const std::string &str)
const;
352 Rect get_render_text_span_box(
Canvas &canvas,
const std::string &str,
const Rect &content_rect)
const;
355 Rect get_content_shrink_box()
const;
358 std::string get_property(
const std::string &property,
const std::string &default_value)
const;
361 int get_property_int(
const std::string &property,
const std::string &default_value)
const;
441 void render(
Canvas &canvas,
const Rect &clip_rect,
bool include_children =
true);
451 void paint(
const Rect &clip_rect);
459 void exit_with_code(
int exit_code);
462 void set_geometry(
Rect geometry);
465 void reset_geometry();
468 void set_window_geometry(
Rect geometry,
bool client_area =
false);
471 void set_tag_name(
const std::string &name);
476 bool set_class(
const std::string &name,
bool enable);
479 void set_id(
const std::string &name);
484 bool set_pseudo_class(
const std::string &name,
bool enable);
487 void update_layout();
490 void set_enabled(
bool enable =
true);
493 void set_clip_children(
bool clip =
true,
const Rect &clip_rect=
Rect(0,0,0,0));
499 void set_visible(
bool visible =
true,
bool activate_root_win=
true);
504 void set_focus(
bool enable =
true);
507 void capture_mouse(
bool capture);
510 void capture_proximity(
bool capture);
513 void set_focus_policy(FocusPolicy policy);
516 void set_double_click_enabled(
bool enable);
521 void set_component_group_name(
const std::string &str);
524 void set_selected_in_component_group(
bool selected);
527 void create_components(
const DomDocument &gui_xml);
532 void create_components(
const std::string &fullname);
537 void create_components(
IODevice &file);
543 void create_components(
const std::string &filename,
const FileSystem &fs);
546 void request_repaint();
551 void request_repaint(
Rect rect);
554 void set_cliprect(
Canvas &canvas,
const Rect &rect);
557 void reset_cliprect(
Canvas &canvas);
560 void push_cliprect(
Canvas &canvas,
const Rect &rect);
563 void pop_cliprect(
Canvas &canvas);
566 void delete_child_components();
575 void set_cursor(
const Cursor &cursor);
586 void focus_previous();
590 void set_default(
bool value);
594 void set_cancel(
bool value);
597 void set_blocks_default_action(
bool block);
600 void set_constant_repaint(
bool enable);
602 Rect render_text_span(
Canvas &canvas,
const std::string &text,
const Rect &content_rect);
603 Rect render_text(
Canvas &canvas,
const std::string &text);
604 Rect render_text(
Canvas &canvas,
const std::string &text,
int xpos,
int baseline);
616 std::unique_ptr<GUIComponent_Impl>
impl;
Definition: css_computed_values.h:58
DisplayWindowDescription GUITopLevelDescription
Definition: gui_component.h:68
StandardCursor
Standard Cursor.
Definition: display_window.h:67
2D Graphics Canvas
Definition: canvas.h:70
Definition: gui_component.h:164
I/O Device interface.
Definition: iodevice.h:51
Definition: gui_component.h:72
Mouse cursor class.
Definition: cursor.h:48
Layout management base class.
Definition: gui_layout.h:47
float baseline
Definition: gui_component.h:75
std::unique_ptr< GUIComponent_Impl > impl
Definition: gui_component.h:616
GUI base component class.
Definition: gui_component.h:80
DOM Document class.
Definition: dom_document.h:65
float bottom
Definition: gui_component.h:76
2D (left,top,right,bottom) rectangle structure - Integer
Definition: rect.h:453
Callback_v2.
Definition: callback_v2.h:156
Definition: gui_component.h:162
Virtual File System (VFS).
Definition: file_system.h:48
Resource manager.
Definition: resource_manager.h:45
FocusPolicy
Focus policies.
Definition: gui_component.h:160
Definition: gui_component.h:163
Callback_v1.
Definition: callback_v1.h:156
GUI manager.
Definition: gui_manager.h:64
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:74
Callback_v0.
Definition: callback_v0.h:152