5 #include "../forms_export.h" 32 #include <xtd/drawing/color> 33 #include <xtd/drawing/font> 34 #include <xtd/drawing/point> 35 #include <xtd/drawing/rectangle> 36 #include <xtd/drawing/size> 37 #include <xtd/forms/window_messages> 39 #include <xtd/async_result> 40 #include <xtd/optional> 41 #include <xtd/iequatable> 42 #include <xtd/isynchronize_invoke> 57 class horizontal_layout_panel;
59 class vertical_layout_panel;
83 enum class state :
int64 {
89 creating_handle = 0b10000,
91 parent_recreating = 0b1000000,
93 client_size_setted = 0b10000000,
95 top_level = 0b1000000000,
96 visible = 0b10000000000,
97 enabled = 0b100000000000,
99 tab_stop = 0b10000000000000,
100 allow_drop = 0b100000000000000,
101 drop_target = 0b1000000000000000,
103 layout_deferred = 0b10000000000000000,
104 docked = 0b100000000000000000,
106 double_click_fired = 0b1000000000000000000,
107 double_buffered = 0b10000000000000000000,
109 mouse_enter_pending = 0b100000000000000000000,
110 tracking_mouse_event = 0b1000000000000000000000,
111 mouse_pressed = 0b10000000000000000000000,
114 is_accessible = 0b1000000000000000000000000,
115 no_zorder = 0b10000000000000000000000000,
116 size_locked_by_os = 0b10000000000000000000000000,
117 causes_validation = 0b100000000000000000000000000,
118 own_ctl_brush = 0b1000000000000000000000000000,
119 exception_while_painting = 0b10000000000000000000000000000,
120 layout_sis_dirty = 0b100000000000000000000000000000,
121 checked_host = 0b1000000000000000000000000000000,
122 hosted_in_dialog = 0b10000000000000000000000000000000,
123 validation_cancelled = 0b100000000000000000000000000000000,
124 mirrored = 0b1000000000000000000000000000000000,
130 explicit async_result_invoke(
std::any async_state);
131 std::any async_state()
const noexcept
override;
133 bool completed_synchronously()
const noexcept
override;
134 bool is_completed()
const noexcept
override;
136 std::shared_ptr<data> data_;
177 using base::operator [];
182 std::optional<value_type> operator [](
const xtd::ustring& name)
const;
187 std::optional<value_type> operator [](
const xtd::ustring& name);
259 virtual drawing::point auto_scroll_point() const noexcept;
275 virtual drawing::color back_color() const noexcept;
283 virtual
control& back_color(const drawing::color& color);
285 virtual
control& back_color(std::nullptr_t);
291 virtual const
xtd::drawing::image& background_image() const noexcept;
296 virtual
control& background_image(const
xtd::drawing::image& background_image);
320 virtual drawing::rectangle bounds() const noexcept;
325 virtual
control& bounds(const drawing::rectangle& bounds);
330 virtual
bool can_focus() const noexcept;
343 virtual
bool can_select() const noexcept;
347 bool can_raise_events() const noexcept override;
353 static
bool check_for_illegal_cross_thread_calls() noexcept;
358 static
void check_for_illegal_cross_thread_calls(
bool value);
364 virtual const drawing::rectangle& client_rectangle() const noexcept;
369 virtual const drawing::
size& client_size() const noexcept;
374 virtual
control& client_size(const drawing::
size& client_size);
378 virtual
xtd::
ustring company_name() const noexcept;
423 virtual
bool created() const noexcept;
433 virtual
control& cursor(std::nullptr_t);
438 virtual drawing::rectangle display_rectangle() const noexcept;
462 virtual
bool double_buffered() const noexcept;
466 virtual
control& double_buffered(
bool double_buffered);
470 virtual
bool enabled() const noexcept;
474 virtual
control& enabled(
bool enabled);
478 virtual
bool focused() const noexcept;
482 virtual drawing::font font() const noexcept;
486 virtual
control& font(const drawing::font& font);
488 virtual
control& font(std::nullptr_t);
493 virtual drawing::color fore_color() const noexcept;
497 virtual
control& fore_color(const drawing::color& color);
499 virtual
control& fore_color(std::nullptr_t);
505 intptr handle() const override;
517 bool invoke_required() const noexcept override;
522 bool is_handle_created() const noexcept;
534 virtual drawing::point
location() const noexcept;
553 virtual const drawing::
size& maximum_client_size() const noexcept;
566 virtual const drawing::size& maximum_size() const noexcept;
572 virtual
control& maximum_size(const drawing::size& size);
579 virtual const drawing::size& minimum_client_size() const noexcept;
585 virtual
control& minimum_client_size(const drawing::size& size);
592 virtual const drawing::size& minimum_size() const noexcept;
598 virtual
control& minimum_size(const drawing::size& size);
602 static
forms::
keys modifier_keys() noexcept;
612 static
xtd::drawing::point mouse_position() noexcept;
617 intptr native_handle() const noexcept;
621 virtual const
xtd::
ustring& name() const noexcept;
637 virtual std::optional<
control_ref> parent() const noexcept;
645 virtual
control& parent(std::nullptr_t);
649 virtual
xtd::
ustring product_name() const noexcept;
653 bool recreating_handle() const noexcept;
659 virtual const
xtd::drawing::region& region() const noexcept;
665 virtual
control& region(const
xtd::drawing::region& value);
673 virtual drawing::size size() const noexcept;
677 virtual
control& size(const drawing::size& size);
682 virtual style_sheets::style_sheet style_sheet() const noexcept;
686 virtual
control& style_sheet(const style_sheets::style_sheet& value);
696 virtual
control& style_sheet(std::nullptr_t);
702 virtual
bool tab_stop() const noexcept;
708 virtual
control& tab_stop(
bool value);
714 virtual std::any tag() const noexcept;
720 virtual
control& tag(std::any tag);
733 intptr toolkit_handle() const noexcept;
745 virtual std::optional<
control_ref> top_level_control() const noexcept;
749 virtual
bool visible() const noexcept;
753 virtual
control& visible(
bool visible);
777 xtd::
async_result begin_invoke(delegate<
void(std::vector<std::any>)> method, const std::vector<std::any>& args) override;
781 virtual
void bring_to_front();
783 int32 compare_to(const
control& value) const noexcept override;
803 template<
typename control_t>
817 template<
typename control_t>
832 template<
typename control_t>
848 template<
typename control_t>
862 void create_control();
874 virtual void destroy_control();
880 bool equals(
const control& value)
const noexcept
override;
891 static std::optional<control_ref> from_child_handle(
intptr handle);
896 static std::optional<control_ref> from_handle(
intptr handle);
904 std::optional<xtd::drawing::color> get_back_color()
const noexcept;
909 std::optional<xtd::drawing::font> get_font()
const noexcept;
914 std::optional<xtd::drawing::color> get_fore_color()
const noexcept;
921 size_t get_child_index(
intptr child)
const;
926 size_t get_child_index(
intptr child,
bool& throw_exception)
const;
934 virtual void invalidate()
const;
939 virtual void invalidate(
bool invalidate_children)
const;
950 virtual void invalidate(
const drawing::rectangle& rect,
bool invalidate_children)
const;
961 virtual void invalidate(
const drawing::region& region,
bool invalidate_children)
const;
966 std::optional<object_ref> invoke(delegate<
void()> method)
override;
970 std::optional<object_ref> invoke(delegate<
void(std::vector<std::any>)> method,
const std::vector<std::any>& args)
override;
974 std::optional<object_ref> invoke(delegate<
void(std::vector<std::any>)> method,
std::any arg)
override;
978 void perform_layout();
999 virtual void refresh()
const;
1005 void resume_layout();
1013 void resume_layout(
bool perform_layout);
1044 virtual void show();
1051 void suspend_layout();
1063 virtual void update()
const;
1523 virtual drawing::color default_back_color() const noexcept;
1527 virtual
forms::
cursor default_cursor() const noexcept;
1531 virtual drawing::font default_font() const noexcept;
1535 virtual drawing::color default_fore_color() const noexcept;
1539 virtual drawing::size default_size() const noexcept;
1549 virtual
void create_handle();
1554 virtual
void destroy_handle();
1558 virtual
void def_wnd_proc(message& message);
1568 virtual drawing::size measure_control() const noexcept;
1572 drawing::size measure_text() const noexcept;
1576 virtual
void on_auto_size_changed(const
event_args&
e);
1580 virtual
void on_back_color_changed(const
event_args& e);
1584 virtual
void on_background_image_changed(const
event_args& e);
1588 virtual
void on_background_image_layout_changed(const
event_args& e);
1592 virtual
void on_control_appearance_changed(const
event_args& e);
1600 virtual
void on_client_size_changed(const
event_args& e);
1612 virtual
void on_create_control();
1616 virtual
void on_cursor_changed(const
event_args& e);
1620 virtual
void on_destroy_control();
1624 virtual
void on_dock_changed(const
event_args& e);
1628 virtual
void on_double_click(const
event_args& e);
1632 virtual
void on_enabled_changed(const
event_args& e);
1636 virtual
void on_fore_color_changed(const
event_args& e);
1640 virtual
void on_font_changed(const
event_args& e);
1644 virtual
void on_got_focus(const
event_args& e);
1648 virtual
void on_handle_created(const
event_args& e);
1652 virtual
void on_handle_destroyed(const
event_args& e);
1676 virtual
void on_location_changed(const
event_args& e);
1680 virtual
void on_lost_focus(const
event_args& e);
1696 virtual
void on_mouse_enter(const
event_args& e);
1704 virtual
void on_mouse_leave(const
event_args& e);
1733 virtual
void on_parent_back_color_changed(const
event_args& e);
1737 virtual
void on_parent_cursor_changed(const
event_args& e);
1741 virtual
void on_parent_changed(const
event_args& e);
1745 virtual
void on_parent_enabled_changed(const
event_args& e);
1749 virtual
void on_parent_fore_color_changed(const
event_args& e);
1753 virtual
void on_parent_font_changed(const
event_args& e);
1761 virtual
void on_region_changed(const
event_args& e);
1765 virtual
void on_size_changed(const
event_args& e);
1769 virtual
void on_style_sheet_changed(const
event_args& e);
1773 virtual
void on_tab_stop_changed(const
event_args& e);
1777 virtual
void on_text_changed(const
event_args& e);
1781 virtual
void on_visible_changed(const
event_args& e);
1783 void post_recreate_handle() noexcept;
1787 virtual
void recreate_handle();
1804 void set_can_focus(
bool value);
1809 virtual
void set_text(const
xtd::
ustring& text);
1818 virtual
void set_client_size_core(
int32 width,
int32 height);
1826 void set_parent(
intptr handle);
1840 virtual
void wnd_proc(message&
m);
1844 bool get_state(
control::state flag) const noexcept;
1845 void set_state(
control::state flag,
bool value);
1850 void on_controls_item_added(
size_t,
control_ref item);
1851 void on_controls_item_removed(
size_t,
control_ref item);
1852 void on_parent_size_changed(
object& sender, const
event_args& e);
1853 void do_layout_children_with_dock_style();
1854 void do_layout_with_auto_size_mode();
1855 void do_layout_with_anchor_styles();
1857 void reflect_message(
intptr handle, message& message);
1859 void wm_app_idle(message& message);
1860 void wm_child_activate(message& message);
1861 void wm_command(message& message);
1862 void wm_command_control(message& message);
1863 void wm_ctlcolor(message& message);
1864 void wm_ctlcolor_control(message& message);
1865 void wm_create(message& message);
1866 void wm_destroy(message& message);
1867 void wm_key_char(message& message);
1868 void wm_kill_focus(message& message);
1869 void wm_menu_command(message& message);
1870 void wm_mouse_down(message& message);
1871 void wm_mouse_double_click(message& message);
1872 void wm_mouse_enter(message& message);
1873 void wm_mouse_leave(message& message);
1874 void wm_mouse_up(message& message);
1875 void wm_mouse_move(message& message);
1876 void wm_move(message& message);
1877 void wm_mouse_wheel(message& message);
1878 void wm_notify(message& message);
1879 void wm_notify_control(message& message);
1880 void wm_paint(message& message);
1881 void wm_erase_background(message& message);
1882 void wm_help(message& message);
1883 void wm_scroll(message& message);
1884 void wm_scroll_control(message& message);
1885 void wm_set_focus(message& message);
1886 void wm_set_text(message& message);
1887 void wm_show(message& message);
1888 void wm_size(message& message);
1889 void wm_sizing(message& message);
1890 void wm_style_sheet_changed(message& message);
1892 static
bool check_for_illegal_cross_thread_calls_;
1898 std::shared_ptr<data> data_;
Contains xtd::forms::cursors factory.
intmax_t intptr
Represent a pointer or a handle.
Definition: types.h:151
Represents the status of an asynchronous operation.
Definition: iasync_result.h:22
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition: event_args.h:18
Contains xtd::forms::key_event_handler event handler.
Contains xtd::forms::layout::arranged_element_collection collection.
Defines a generalized comparison method that a value type or class implements to create a type-specif...
Definition: icomparable.h:17
Provides a way to synchronously or asynchronously execute a delegate.
Definition: isynchronize_invoke.h:26
Contains xtd::forms::style_sheets::style_sheet class.
virtual std::optional< object_ref > invoke(delegate< void()> value)=0
Synchronously executes the delegate on the thread that created this object and marshals the call to t...
Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional ...
Definition: point.h:54
Contains xtd::forms::paint_event_handler event handler.
Stores an ordered pair of integers, which specify a height and width.
Definition: size.h:31
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
xtd::forms::style_sheets::lengths margin
Margins are used to create space around elements, outside of any defined borders. ...
Definition: margin.h:24
std::shared_ptr< xtd::iasync_result > async_result
Represents the status of an asynchronous operation.
Definition: async_result.h:16
Contains xtd::forms::anchor_styles enum class.
Contains xtd::forms::message class.
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
Describes the interior of a graphics shape composed of rectangles and paths. This class cannot be inh...
Definition: region.h:32
std::string to_string(const date_time &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition: date_time.h:1063
Contains xtd::forms::control_appearance enum class.
Contains xtd::forms::control_styles enum class.
Contains xtd::forms::iwin32_window interface.
Contains xtd::forms::control_ref typedef.
Contains xtd::forms::padding class.
Contains xtd::forms::key_press_event_handler event handler.
Contains xtd::forms::image_layout enum class.
Represents an event.
Definition: event.h:21
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition: iequatable.h:18
Contains xtd::forms::help_event_handler event handler.
Contains xtd::forms::control_event_handler event handler.
Stores a set of four integers that represent the location and size of a rectangle.
Definition: rectangle.h:44
Contains xtd::forms::visual_styles::control_state enum class.
Indicates that all styles except allow_binary_specifier, allow_octal_specifier and allow_hex_specifie...
Contains xtd::forms::const_control_ref typedef.
int_least32_t int32
Represents a 32-bit signed integer.
Definition: types.h:129
Contains xtd::forms::mouse_event_handler event handler.
Contains xtd::forms::dock_style enum class.
Contains xtd::forms::auto_size_mode enum class.
static const ustring empty_string
Represents the empty string.
Definition: ustring.h:53
Contains xtd::forms::component class.
Defines an object used to draw lines and curves. This class cannot be inherited.
Definition: graphics.h:70
Contains xtd::forms::bounds_specified enum class.
int_least64_t int64
Represents a 64-bit signed integer.
Definition: types.h:140
Contains xtd::forms::create_params class.
size_t size
Represents a size of any object in bytes.
Definition: types.h:195
Encapsulates operating system specific objects that wait for exclusive access to shared resources...
Definition: wait_handle.h:48