xtd 0.2.0
Loading...
Searching...
No Matches
radio_button.hpp
Go to the documentation of this file.
1
4#pragma once
6#include "appearance.hpp"
7#include "button_base.hpp"
8
10namespace xtd {
12 namespace forms {
41 struct data;
42
43 public:
45
51
53
58 virtual forms::appearance appearance() const noexcept;
64
69 virtual bool auto_check() const noexcept;
75 virtual radio_button& auto_check(bool auto_check);
76
79 virtual bool checked() const noexcept;
83 virtual radio_button& checked(bool checked);
84
87 virtual content_alignment check_align() const noexcept;
91 virtual radio_button& check_align(content_alignment check_align);
93
95
98 void perform_click();
99
103 xtd::string to_string() const noexcept override;
105
107
111 static radio_button create();
115 static radio_button create(const drawing::point& location);
120 static radio_button create(const drawing::point& location, const drawing::size& size);
126 static radio_button create(const drawing::point& location, const drawing::size& size, const xtd::string& name);
130 static radio_button create(const xtd::string& text);
135 static radio_button create(const xtd::string& text, const drawing::point& location);
141 static radio_button create(const xtd::string& text, const drawing::point& location, const drawing::size& size);
148 static radio_button create(const xtd::string& text, const drawing::point& location, const drawing::size& size, const xtd::string& name);
153 static radio_button create(const xtd::string& text, bool checked);
159 static radio_button create(const xtd::string& text, bool checked, const drawing::point& location);
166 static radio_button create(const xtd::string& text, bool checked, const drawing::point& location, const drawing::size& size);
174 static radio_button create(const xtd::string& text, bool checked, const drawing::point& location, const drawing::size& size, const xtd::string& name);
178 static radio_button create(const control& parent);
183 static radio_button create(const control& parent, const drawing::point& location);
189 static radio_button create(const control& parent, const drawing::point& location, const drawing::size& size);
196 static radio_button create(const control& parent, const drawing::point& location, const drawing::size& size, const xtd::string& name);
201 static radio_button create(const control& parent, const xtd::string& text);
207 static radio_button create(const control& parent, const xtd::string& text, const drawing::point& location);
214 static radio_button create(const control& parent, const xtd::string& text, const drawing::point& location, const drawing::size& size);
222 static radio_button create(const control& parent, const xtd::string& text, const drawing::point& location, const drawing::size& size, const xtd::string& name);
228 static radio_button create(const control& parent, const xtd::string& text, bool checked);
235 static radio_button create(const control& parent, const xtd::string& text, bool checked, const drawing::point& location);
243 static radio_button create(const control& parent, const xtd::string& text, bool checked, const drawing::point& location, const drawing::size& size);
252 static radio_button create(const control& parent, const xtd::string& text, bool checked, const drawing::point& location, const drawing::size& size, const xtd::string& name);
254
256
260 event<radio_button, event_handler> appearance_changed;
261
266
267 protected:
269
275 xtd::uptr<xtd::object> clone() const override;
276
279 forms::create_params create_params() const noexcept override;
280
283 xtd::forms::visual_styles::radio_button_state state() const noexcept;
285
287
292 drawing::size measure_control() const noexcept override;
293
300 virtual void on_appearance_changed(const event_args& e);
301
308 virtual void on_checked_changed(const event_args& e);
309
310 void on_enabled_changed(const event_args& e) override;
311 void on_got_focus(const event_args& e) override;
312
315 void on_handle_created(const event_args& e) override;
316
317 void on_lost_focus(const event_args& e) override;
318 void on_mouse_down(const mouse_event_args& e) override;
319 void on_mouse_enter(const event_args& e) override;
320 void on_mouse_leave(const event_args& e) override;
321 void on_mouse_move(const mouse_event_args& e) override;
322 void on_mouse_up(const mouse_event_args& e) override;
323 void on_paint(paint_event_args& e) override;
324 void wnd_proc(message& message) override;
326
328 void wm_mouse_double_click(message& message);
329 void wm_mouse_down(const message& message);
330 void wm_mouse_up(const message& message);
332
333 private:
334 xtd::sptr<data> data_;
335 };
336 }
337}
Contains xtd::forms::appearance enum class.
Contains xtd::forms::button_base 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
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
Enables the user to select a single option from a group of choices when paired with other xtd::forms:...
Definition radio_button.hpp:40
virtual forms::appearance appearance() const noexcept
Gets a value determining the appearance of the radio_button.
radio_button()
Initializes a new instance of the radio_button class.
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
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
Contains xtd::forms::visual_styles::radio_button_state enum class.