33#include <xtd/drawing/color>
34#include <xtd/drawing/font>
35#include <xtd/drawing/point>
36#include <xtd/drawing/rectangle>
37#include <xtd/drawing/size>
39#include <xtd/async_result>
40#include <xtd/optional>
41#include <xtd/iclonable>
42#include <xtd/iequatable>
43#include <xtd/isynchronize_invoke>
87 enum class state :
int64 {
93 creating_handle = 0b10000,
95 parent_recreating = 0b1000000,
97 client_size_setted = 0b10000000,
99 top_level = 0b1000000000,
104 allow_drop = 0b100000000000000,
105 drop_target = 0b1000000000000000,
107 layout_deferred = 0b10000000000000000,
108 docked = 0b100000000000000000,
110 double_click_fired = 0b1000000000000000000,
113 mouse_enter_pending = 0b100000000000000000000,
114 tracking_mouse_event = 0b1000000000000000000000,
115 mouse_pressed = 0b10000000000000000000000,
118 is_accessible = 0b1000000000000000000000000,
119 no_zorder = 0b10000000000000000000000000,
120 size_locked_by_os = 0b10000000000000000000000000,
121 causes_validation = 0b100000000000000000000000000,
122 own_ctl_brush = 0b1000000000000000000000000000,
123 exception_while_painting = 0b10000000000000000000000000000,
124 layout_sis_dirty = 0b100000000000000000000000000000,
125 checked_host = 0b1000000000000000000000000000000,
126 hosted_in_dialog = 0b10000000000000000000000000000000,
127 validation_cancelled = 0b100000000000000000000000000000000,
128 mirrored = 0b1000000000000000000000000000000000,
137 bool completed_synchronously()
const noexcept override;
138 bool is_completed()
const noexcept override;
180 using base::operator [];
198 template<
typename control_t>
199 void add(control_t& value) {
200 for (
auto it =
begin(); it !=
end(); ++it)
201 if (it->get() == value)
return;
214 template<
typename control_t,
typename ...args_t>
218 controls_.add(std::move(control_ptr));
232 template<
typename control_t,
typename ...args_t>
236 controls_.add(std::move(control_ptr));
249 template<
typename control_t,
typename ...args_t>
253 controls_.add(std::move(control_ptr));
260 template<
typename control_t>
261 void insert(
size_t index, control_t& value) {
262 for (
auto it =
begin(); it !=
end(); ++it)
263 if (it->get() == value)
return;
271 using arranged_element_collection::push_back;
272 template<
typename control_t>
273 [[deprecated(
"Replaced by xtd::forms::control::control_collection::add - Will be removed in version 0.4.0.")]]
274 void push_back(control_t& value) {add(value);}
283 for (
auto i =
xtd::size {0};
i < controls_.count(); ++
i) {
284 if (controls_[
i].get() != &item.
get())
continue;
285 controls_.remove_at(
i);
487 virtual
control& context_menu(std::nullptr_t);
710 virtual const
xtd::
string&
name() const noexcept;
850 virtual const
xtd::
string&
text() const noexcept;
938 int32 compare_to(const
control& value) const noexcept override;
963 bool equals(const
xtd::
object& obj) const noexcept override;
1217 template<typename control_t>
1219 auto result = control_t {};
1225 template<
typename control_t>
1227 auto result = control_t {};
1235 template<
typename control_t>
1237 auto result = control_t {};
1247 template<
typename control_t>
1249 auto result = control_t {};
1258 template<
typename control_t>
1260 auto result = control_t {};
1268 template<
typename control_t>
1270 auto result = control_t {};
1280 template<
typename control_t>
1282 auto result = control_t {};
1294 template<
typename control_t>
1296 auto result = control_t {};
1306 template<
typename control_t>
1308 auto result = control_t {};
1316 template<
typename control_t>
1318 auto result = control_t {};
1328 template<
typename control_t>
1330 auto result = control_t {};
1342 template<
typename control_t>
1344 auto result = control_t {};
1355 template<
typename control_t>
1357 auto result = control_t {};
1367 template<
typename control_t>
1369 auto result = control_t {};
1381 template<
typename control_t>
1383 auto result = control_t {};
1397 template<
typename control_t>
1399 auto result = control_t {};
1846 friend class application;
1847 friend class context_menu;
1848 friend class horizontal_layout_panel;
1850 friend class paint_event_args;
1851 friend class screen;
1852 friend class vertical_layout_panel;
2146 void post_recreate_handle() noexcept;
2211 bool get_state(
control::state flag) const noexcept;
2212 void set_state(
control::state flag,
bool value);
2213 bool on_context_menu_item_click(
xtd::
forms::context_menu&
menu,
intptr menu_id) const;
2217 void do_layout_children_with_dock_style();
2218 void do_layout_with_auto_size_mode();
2219 void do_layout_with_anchor_styles();
2220 static
bool is_trace_form_or_control(const
string&
name);
2221 void on_controls_item_added(
size_t,
control_ref item);
2222 void on_controls_item_removed(
size_t,
control_ref item);
2223 void on_parent_size_changed(
object& sender, const
event_args& e);
2260 static
bool check_for_illegal_cross_thread_calls_;
Contains xtd::forms::anchor_styles enum class.
Contains xtd::forms::layout::arranged_element_collection collection.
Contains xtd::forms::auto_size_mode enum class.
Contains xtd::forms::bounds_specified enum class.
Represent a polymorphic wrapper capable of holding any type.
Definition any_object.hpp:29
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:64
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Definition list.hpp:80
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.hpp:18
Represents an event.
Definition event.hpp:21
Represents the status of an asynchronous operation.
Definition iasync_result.hpp:25
Supports cloning, which creates a new instance of a class with the same value as an existing instance...
Definition iclonable.hpp:21
Defines a generalized comparison method that a value type or class implements to create a type-specif...
Definition icomparable.hpp:22
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:23
Provides a way to synchronously or asynchronously execute a delegate.
Definition isynchronize_invoke.hpp:27
type & get() const
Gets the stored reference.
Definition reference_wrapper_object.hpp:190
Encapsulates operating system specific objects that wait for exclusive access to shared resources.
Definition wait_handle.hpp:52
Contains xtd::forms::component class.
Contains xtd::forms::const_control_ref typedef.
Contains xtd::forms::control_appearance enum class.
Contains xtd::forms::control_event_handler event handler.
Contains xtd::forms::control_ref typedef.
Contains xtd::forms::visual_styles::control_state enum class.
Contains xtd::forms::control_styles enum class.
Contains xtd::forms::create_params class.
Contains xtd::forms::cursors factory.
Contains xtd::forms::dock_style enum class.
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
std::int64_t int64
Represents a 64-bit signed integer.
Definition int64.hpp:23
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
xtd::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
std::intmax_t intptr
Represent a pointer or a handle.
Definition intptr.hpp:23
xtd::unique_ptr_object< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.hpp:25
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:25
xtd::reference_wrapper_object< type_t > ref
The xtd::ref object is a reference wrapper.
Definition ref.hpp:25
std::optional< type_t > optional
Represents the optional alias on std::optional.
Definition optional.hpp:26
xtd::sptr< xtd::iasync_result > async_result
Represents the status of an asynchronous operation.
Definition async_result.hpp:19
uptr< type_t > new_uptr(args_t &&... args)
xtd::new_uptr operator. This operator creates a xtd::uptr object.
Definition new_uptr.hpp:24
xtd::ref< xtd::object > object_ref
Represents an object reference.
Definition object_ref.hpp:20
@ i
The I key.
Definition console_key.hpp:104
Contains xtd::forms::help_event_handler event handler.
Contains xtd::forms::image_layout enum class.
Contains xtd::forms::iwin32_window interface.
Contains xtd::forms::key_event_handler event handler.
Contains xtd::forms::key_press_event_handler event handler.
Contains xtd::forms::message class.
Contains xtd::forms::mouse_event_handler event handler.
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
const_iterator begin() const
Returns an iterator to the beginning.
Definition read_only_span.hpp:183
const_iterator end() const
Returns an iterator to the end.
Definition read_only_span.hpp:213
constexpr const_pointer data() const noexcept
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:201
Contains xtd::forms::padding class.
Contains xtd::forms::paint_event_handler event handler.
Contains xtd::forms::right_to_left enum class.
Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional ...
Definition point.hpp:54
Stores an ordered pair of integers, which specify a height and width.
Definition size.hpp:32
Contains xtd::forms::style_sheets::style_sheet class.