xtd 1.0.0
Loading...
Searching...
No Matches
check_box.hpp
Go to the documentation of this file.
1
4#pragma once
6#include "appearance.hpp"
7#include "button_base.hpp"
8#include "check_state.hpp"
9
11namespace xtd {
13 namespace forms {
46 struct data;
47
48 public:
50
59
61
69 [[nodiscard]] virtual auto appearance() const noexcept -> xtd::forms::appearance;
73 virtual auto appearance(xtd::forms::appearance value) -> check_box&;
74
81 [[nodiscard]] virtual auto auto_check() const noexcept -> bool;
85 virtual auto auto_check(bool value) -> check_box&;
86
89 [[nodiscard]] virtual auto check_align() const noexcept -> xtd::forms::content_alignment;
92 virtual auto check_align(xtd::forms::content_alignment value) -> check_box&;
93
100 [[nodiscard]] virtual auto checked() const noexcept -> bool;
104 virtual auto checked(bool value) -> check_box&;
105
118 [[nodiscard]] virtual auto check_state() const noexcept -> xtd::forms::check_state;
130 virtual auto check_state(xtd::forms::check_state value) -> check_box&;
131
138 [[nodiscard]] virtual auto three_state() const noexcept -> bool;
142 virtual auto three_state(bool value) -> check_box&;
144
146
150 [[nodiscard]] static auto create() -> check_box;
154 [[nodiscard]] static auto create(const xtd::drawing::point& location) -> check_box;
159 [[nodiscard]] static auto create(const xtd::drawing::point& location, const xtd::drawing::size& size) -> check_box;
165 [[nodiscard]] static auto create(const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> check_box;
169 [[nodiscard]] static auto create(const xtd::string& text) -> check_box;
174 [[nodiscard]] static auto create(const xtd::string& text, const xtd::drawing::point& location) -> check_box;
180 [[nodiscard]] static auto create(const xtd::string& text, const xtd::drawing::point& location, const xtd::drawing::size& size) -> check_box;
187 [[nodiscard]] static auto create(const xtd::string& text, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> check_box;
192 [[nodiscard]] static auto create(const xtd::string& text, xtd::forms::check_state check_state) -> check_box;
200 [[nodiscard]] static auto create(const xtd::string& text, xtd::forms::check_state check_state, const xtd::drawing::point& location) -> check_box;
206 [[nodiscard]] static auto create(const xtd::string& text, xtd::forms::check_state check_state, const xtd::drawing::point& location, const xtd::drawing::size& size) -> check_box;
214 [[nodiscard]] static auto create(const xtd::string& text, xtd::forms::check_state check_state, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> check_box;
219 [[nodiscard]] static auto create(const xtd::string& text, bool three_state) -> check_box;
225 [[nodiscard]] static auto create(const xtd::string& text, bool three_state, xtd::forms::check_state check_state) -> check_box;
232 [[nodiscard]] static auto create(const xtd::string& text, bool three_state, xtd::forms::check_state check_state, const xtd::drawing::point& location) -> check_box;
240 [[nodiscard]] static auto create(const xtd::string& text, bool three_state, xtd::forms::check_state check_state, const xtd::drawing::point& location, const xtd::drawing::size& size) -> check_box;
249 [[nodiscard]] static auto create(const xtd::string& text, bool three_state, xtd::forms::check_state check_state, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> check_box;
253 [[nodiscard]] static auto create(const xtd::forms::control& parent) -> check_box;
258 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location) -> check_box;
264 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location, const xtd::drawing::size& size) -> check_box;
271 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> check_box;
276 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::string& text) -> check_box;
282 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::string& text, const xtd::drawing::point& location) -> check_box;
289 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::string& text, const xtd::drawing::point& location, const xtd::drawing::size& size) -> check_box;
297 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::string& text, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> check_box;
303 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::string& text, xtd::forms::check_state check_state) -> check_box;
310 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::string& text, xtd::forms::check_state check_state, const xtd::drawing::point& location) -> check_box;
318 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::string& text, xtd::forms::check_state check_state, const xtd::drawing::point& location, const xtd::drawing::size& size) -> check_box;
327 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::string& text, xtd::forms::check_state check_state, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> check_box;
333 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::string& text, bool three_state) -> check_box;
340 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::string& text, bool three_state, xtd::forms::check_state check_state) -> check_box;
348 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::string& text, bool three_state, xtd::forms::check_state check_state, const xtd::drawing::point& location) -> check_box;
357 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::string& text, bool three_state, xtd::forms::check_state check_state, const xtd::drawing::point& location, const xtd::drawing::size& size) -> check_box;
367 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::string& text, bool three_state, xtd::forms::check_state check_state, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> check_box;
369
371
376
380
385
386 protected:
388
392 [[nodiscard]] auto create_params() const noexcept -> xtd::forms::create_params override;
395 [[nodiscard]] auto state() const noexcept -> xtd::forms::visual_styles::check_box_state;
397
399
404 [[nodiscard]] auto measure_control() const noexcept -> xtd::drawing::size override;
405
410 virtual auto on_appearance_changed(const xtd::event_args& e) -> void;
411
416 virtual auto on_checked_changed(const xtd::event_args& e) -> void;
417
422 virtual auto on_check_state_changed(const xtd::event_args& e) -> void;
423
424 auto on_enabled_changed(const xtd::event_args& e) -> void override;
425 auto on_handle_created(const xtd::event_args& e) -> void override;
426 auto on_mouse_down(const xtd::forms::mouse_event_args& e) -> void override;
427 auto on_mouse_enter(const xtd::event_args& e) -> void override;
428 auto on_mouse_leave(const xtd::event_args& e) -> void override;
429 auto on_mouse_up(const xtd::forms::mouse_event_args& e) -> void override;
430 auto on_paint(xtd::forms::paint_event_args& e) -> void override;
431 auto wnd_proc(xtd::forms::message& message) -> void override;
433
434 private:
435 auto wm_mouse_double_click(xtd::forms::message& message) -> void;
436 auto wm_mouse_down(xtd::forms::message& message) -> void;
437 auto wm_mouse_up(xtd::forms:: message& message) -> void;
438
439 xtd::sptr<data> data_;
440 };
441 }
442}
Contains xtd::forms::appearance enum class.
Contains xtd::forms::button_base class.
Contains xtd::forms::visual_styles::check_box_state enum class.
Contains xtd::forms::check_state enum class.
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:23
Implements the basic functionality common to button controls.
Definition button_base.hpp:37
event< check_box, xtd::event_handler > appearance_changed
Occurs when the value of the appearance property changes.
Definition check_box.hpp:375
auto create_params() const noexcept -> xtd::forms::create_params override
Gets the required creation parameters when the control handle is created.
auto wnd_proc(xtd::forms::message &message) -> void override
Processes Windows messages.
auto on_handle_created(const xtd::event_args &e) -> void override
Raises the xtd::forms::control::handle_created event.
virtual auto on_appearance_changed(const xtd::event_args &e) -> void
Raises the check_box::appearance_changed event.
auto on_mouse_up(const xtd::forms::mouse_event_args &e) -> void override
Raises the xtd::forms::control::mouse_up event.
auto on_mouse_enter(const xtd::event_args &e) -> void override
Raises the xtd::forms::control::mouse_enter event.
auto on_mouse_down(const xtd::forms::mouse_event_args &e) -> void override
Raises the xtd::forms::control::mouse_down event.
auto measure_control() const noexcept -> xtd::drawing::size override
Measure this control.
auto state() const noexcept -> xtd::forms::visual_styles::check_box_state
Gets state.
virtual auto three_state() const noexcept -> bool
Gets a value indicating whether the check_box will allow three check states rather than two.
auto on_mouse_leave(const xtd::event_args &e) -> void override
Raises the xtd::forms::control::mouse_leave event.
auto on_paint(xtd::forms::paint_event_args &e) -> void override
Raises the xtd::forms::control::paint event.
event< check_box, xtd::event_handler > check_state_changed
Occurs when the value of the check_state property changes.
Definition check_box.hpp:383
virtual auto on_checked_changed(const xtd::event_args &e) -> void
Raises the check_box::checked_changed event.
virtual auto auto_check() const noexcept -> bool
Gets a value indicating whether the checked or check_state values and the check_box's appearance are ...
static auto create() -> check_box
A factory to create an xtd::forms::check_box.
virtual auto appearance() const noexcept -> xtd::forms::appearance
Gets the value that determines the appearance of a check_box control.
virtual auto on_check_state_changed(const xtd::event_args &e) -> void
Raises the check_box::check_state_changed event.
virtual auto checked() const noexcept -> bool
Gets a value indicating whether the check_box is in the checked state.
auto on_enabled_changed(const xtd::event_args &e) -> void override
Raises the xtd::forms::control::enabled_changed event.
check_box()
Initializes a new instance of the CheckBox class.
event< check_box, xtd::event_handler > checked_changed
Occurs when the value of the checked property changes.
Definition check_box.hpp:379
virtual auto check_state() const noexcept -> xtd::forms::check_state
Gets the state of the check_box.
virtual auto check_align() const noexcept -> xtd::forms::content_alignment
Gets the horizontal and vertical alignment of the check mark on a check_box control.
Defines the base class for controls, which are components with visual representation.
Definition control.hpp:81
virtual auto size() const noexcept -> xtd::drawing::size
Gets the height and width of the control.
virtual auto parent() const noexcept -> std::optional< xtd::forms::control_ref >
Gets the parent container of the control.
virtual auto text() const noexcept -> const xtd::string &
Gets the text associated with this control.
virtual auto name() const noexcept -> const xtd::string &
Gets the name of the control.
virtual auto location() const noexcept -> xtd::drawing::point
Gets the coordinates of the upper-left corner of the control relative to the upper-left corner of its...
Provides data for the xtd::forms::control::mouse_up, xtd::forms::control::mouse_down,...
Definition mouse_event_args.hpp:34
Provides data for the xtd::forms::control::paint event.
Definition paint_event_args.hpp:26
generic_event_handler< const xtd::event_args & > event_handler
Represents the method that will handle an event that has no event data.
Definition event_handler.hpp:24
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
xtd::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
content_alignment
Specifies alignment of content on the drawing surface.
Definition content_alignment.hpp:21
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:10
The xtd::forms::visual_styles namespace contains classes for rendering controls and other windows use...
Definition check_box_state.hpp:12
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition texts.hpp:219
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
constexpr auto data() const noexcept -> const_pointer
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:197
Implements a Windows message.
Definition message.hpp:33