xtd 0.2.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 virtual forms::appearance appearance() const noexcept;
74
81 virtual bool auto_check() const noexcept;
85 virtual check_box& auto_check(bool auto_check);
86
89 virtual content_alignment check_align() const noexcept;
92 virtual check_box& check_align(content_alignment check_align);
93
100 virtual bool checked() const noexcept;
104 virtual check_box& checked(bool checked);
105
118 virtual forms::check_state check_state() const noexcept;
131
138 virtual bool three_state() const noexcept;
142 virtual check_box& three_state(bool three_state);
144
146
150 static check_box create();
154 static check_box create(const drawing::point& location);
159 static check_box create(const drawing::point& location, const drawing::size& size);
165 static check_box create(const drawing::point& location, const drawing::size& size, const xtd::string& name);
169 static check_box create(const xtd::string& text);
174 static check_box create(const xtd::string& text, const drawing::point& location);
180 static check_box create(const xtd::string& text, const drawing::point& location, const drawing::size& size);
187 static check_box create(const xtd::string& text, const drawing::point& location, const drawing::size& size, const xtd::string& name);
192 static check_box create(const xtd::string& text, xtd::forms::check_state check_state);
200 static check_box create(const xtd::string& text, xtd::forms::check_state check_state, const drawing::point& location);
206 static check_box create(const xtd::string& text, xtd::forms::check_state check_state, const drawing::point& location, const drawing::size& size);
214 static check_box create(const xtd::string& text, xtd::forms::check_state check_state, const drawing::point& location, const drawing::size& size, const xtd::string& name);
219 static check_box create(const xtd::string& text, bool three_state);
225 static check_box create(const xtd::string& text, bool three_state, xtd::forms::check_state check_state);
232 static check_box create(const xtd::string& text, bool three_state, xtd::forms::check_state check_state, const drawing::point& location);
240 static check_box create(const xtd::string& text, bool three_state, xtd::forms::check_state check_state, const drawing::point& location, const drawing::size& size);
249 static check_box create(const xtd::string& text, bool three_state, xtd::forms::check_state check_state, const drawing::point& location, const drawing::size& size, const xtd::string& name);
253 static check_box create(const control& parent);
258 static check_box create(const control& parent, const drawing::point& location);
264 static check_box create(const control& parent, const drawing::point& location, const drawing::size& size);
271 static check_box create(const control& parent, const drawing::point& location, const drawing::size& size, const xtd::string& name);
276 static check_box create(const control& parent, const xtd::string& text);
282 static check_box create(const control& parent, const xtd::string& text, const drawing::point& location);
289 static check_box create(const control& parent, const xtd::string& text, const drawing::point& location, const drawing::size& size);
297 static check_box create(const control& parent, const xtd::string& text, const drawing::point& location, const drawing::size& size, const xtd::string& name);
303 static check_box create(const control& parent, const xtd::string& text, xtd::forms::check_state check_state);
310 static check_box create(const control& parent, const xtd::string& text, xtd::forms::check_state check_state, const drawing::point& location);
318 static check_box create(const control& parent, const xtd::string& text, xtd::forms::check_state check_state, const drawing::point& location, const drawing::size& size);
327 static check_box create(const control& parent, const xtd::string& text, xtd::forms::check_state check_state, const drawing::point& location, const drawing::size& size, const xtd::string& name);
333 static check_box create(const control& parent, const xtd::string& text, bool three_state);
340 static check_box create(const control& parent, const xtd::string& text, bool three_state, xtd::forms::check_state check_state);
348 static check_box create(const control& parent, const xtd::string& text, bool three_state, xtd::forms::check_state check_state, const drawing::point& location);
357 static check_box create(const control& parent, const xtd::string& text, bool three_state, xtd::forms::check_state check_state, const drawing::point& location, const drawing::size& size);
367 static check_box create(const control& parent, const xtd::string& text, bool three_state, xtd::forms::check_state check_state, const drawing::point& location, const drawing::size& size, const xtd::string& name);
369
371
375 event<check_box, event_handler> appearance_changed;
376
379 event<check_box, event_handler> checked_changed;
380
383 event<check_box, event_handler> check_state_changed;
385
386 protected:
388
392 forms::create_params create_params() const noexcept override;
395 xtd::forms::visual_styles::check_box_state state() const noexcept;
397
399
405 xtd::uptr<xtd::object> clone() const override;
406
410 drawing::size measure_control() const noexcept override;
411
416 virtual void on_appearance_changed(const event_args& e);
417
422 virtual void on_checked_changed(const event_args& e);
423
428 virtual void on_check_state_changed(const event_args& e);
429
430 void on_enabled_changed(const event_args& e) override;
431 void on_handle_created(const event_args& e) override;
432 void on_mouse_down(const mouse_event_args& e) override;
433 void on_mouse_enter(const event_args& e) override;
434 void on_mouse_leave(const event_args& e) override;
435 void on_mouse_up(const mouse_event_args& e) override;
436 void on_paint(paint_event_args& e) override;
437 void wnd_proc(message& message) override;
439
440 private:
441 void wm_mouse_double_click(message& message);
442 void wm_mouse_down(message& message);
443 void wm_mouse_up(message& message);
444
445 xtd::sptr<data> data_;
446 };
447 }
448}
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:21
Implements the basic functionality common to button controls.
Definition button_base.hpp:37
Represents a Windows check_box.
Definition check_box.hpp:45
virtual forms::appearance appearance() const noexcept
Gets the value that determines the appearance of a check_box control.
check_box()
Initializes a new instance of the CheckBox class.
Defines the base class for controls, which are components with visual representation.
Definition control.hpp:81
Encapsulates the information needed when creating a control.
Definition create_params.hpp:29
Implements a Windows message.
Definition message.hpp:28
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:30
generic_event_handler<> event_handler
Represents the method that will handle an event that has no event data.
Definition event_handler.hpp:32
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
std::unique_ptr< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.hpp:25
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
std::shared_ptr< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
check_state
Specifies the state of a control, such as a check box, that can be checked, unchecked,...
Definition check_state.hpp:23
content_alignment
Specifies alignment of content on the drawing surface.
Definition content_alignment.hpp:21
appearance
Specifies the appearance of a control.
Definition appearance.hpp:22
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.hpp:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10