xtd 0.2.0
Loading...
Searching...
No Matches
radio_button.h
Go to the documentation of this file.
1
4#pragma once
6#include "appearance.h"
7#include "button_base.h"
8
10namespace xtd {
12 namespace forms {
39 struct data;
40
41 public:
43
49
51
56 virtual forms::appearance appearance() const noexcept;
62
67 virtual bool auto_check() const noexcept;
73 virtual radio_button& auto_check(bool auto_check);
74
77 virtual bool checked() const noexcept;
81 virtual radio_button& checked(bool checked);
82
85 virtual content_alignment check_align() const noexcept;
89 virtual radio_button& check_align(content_alignment check_align);
91
93
96 void perform_click();
97
101 xtd::ustring to_string() const noexcept override;
103
105
109 static radio_button create();
113 static radio_button create(const drawing::point& location);
118 static radio_button create(const drawing::point& location, const drawing::size& size);
124 static radio_button create(const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
128 static radio_button create(const xtd::ustring& text);
133 static radio_button create(const xtd::ustring& text, const drawing::point& location);
139 static radio_button create(const xtd::ustring& text, const drawing::point& location, const drawing::size& size);
146 static radio_button create(const xtd::ustring& text, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
151 static radio_button create(const xtd::ustring& text, bool checked);
157 static radio_button create(const xtd::ustring& text, bool checked, const drawing::point& location);
164 static radio_button create(const xtd::ustring& text, bool checked, const drawing::point& location, const drawing::size& size);
172 static radio_button create(const xtd::ustring& text, bool checked, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
176 static radio_button create(const control& parent);
181 static radio_button create(const control& parent, const drawing::point& location);
187 static radio_button create(const control& parent, const drawing::point& location, const drawing::size& size);
194 static radio_button create(const control& parent, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
199 static radio_button create(const control& parent, const xtd::ustring& text);
205 static radio_button create(const control& parent, const xtd::ustring& text, const drawing::point& location);
212 static radio_button create(const control& parent, const xtd::ustring& text, const drawing::point& location, const drawing::size& size);
220 static radio_button create(const control& parent, const xtd::ustring& text, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
226 static radio_button create(const control& parent, const xtd::ustring& text, bool checked);
233 static radio_button create(const control& parent, const xtd::ustring& text, bool checked, const drawing::point& location);
241 static radio_button create(const control& parent, const xtd::ustring& text, bool checked, const drawing::point& location, const drawing::size& size);
250 static radio_button create(const control& parent, const xtd::ustring& text, bool checked, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
252
254
258 event<radio_button, event_handler> appearance_changed;
259
264
265 protected:
267
273 std::unique_ptr<xtd::object> clone() const override;
274
277 forms::create_params create_params() const noexcept override;
278
281 xtd::forms::visual_styles::radio_button_state state() const noexcept;
283
285
290 drawing::size measure_control() const noexcept override;
291
298 virtual void on_appearance_changed(const event_args& e);
299
306 virtual void on_checked_changed(const event_args& e);
307
308 void on_enabled_changed(const event_args& e) override;
309 void on_got_focus(const event_args& e) override;
310
313 void on_handle_created(const event_args& e) override;
314
315 void on_lost_focus(const event_args& e) override;
316 void on_mouse_down(const mouse_event_args& e) override;
317 void on_mouse_enter(const event_args& e) override;
318 void on_mouse_leave(const event_args& e) override;
319 void on_mouse_move(const mouse_event_args& e) override;
320 void on_mouse_up(const mouse_event_args& e) override;
321 void on_paint(paint_event_args& e) override;
322 void wnd_proc(message& message) override;
324
326 void wm_mouse_double_click(message& message);
327 void wm_mouse_down(const message& message);
328 void wm_mouse_up(const message& message);
330
331 private:
332 std::shared_ptr<data> data_;
333 };
334 }
335}
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.h:18
Represents an event.
Definition event.h:21
Implements the basic functionality common to button controls.
Definition button_base.h:35
Defines the base class for controls, which are components with visual representation.
Definition control.h:79
Encapsulates the information needed when creating a control.
Definition create_params.h:27
Implements a Windows message.
Definition message.h:26
Provides data for the xtd::forms::control::mouse_up, xtd::forms::control::mouse_down,...
Definition mouse_event_args.h:32
Provides data for the xtd::forms::control::paint event.
Definition paint_event_args.h:28
Enables the user to select a single option from a group of choices when paired with other xtd::forms:...
Definition radio_button.h:38
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.
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:47
generic_event_handler<> event_handler
Represents the method that will handle an event that has no event data.
Definition event_handler.h:32
#define forms_export_
Define shared library export.
Definition forms_export.h:13
size_t size
Represents a size of any object in bytes.
Definition types.h:197
content_alignment
Specifies alignment of content on the drawing surface.
Definition content_alignment.h:19
appearance
Specifies the appearance of a control.
Definition appearance.h:20
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::forms::visual_styles::radio_button_state enum class.