xtd 0.2.0
group_box.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "border_style.hpp"
6#include "control.hpp"
7#include "flat_style.hpp"
8
10namespace xtd {
12 namespace forms {
38 struct data;
39
40 public:
42
47
49
53 virtual forms::auto_size_mode auto_size_mode() const noexcept;
58
61
64 virtual xtd::forms::flat_style flat_style() const noexcept;
69
71
75 static group_box create();
79 static group_box create(const drawing::point& location);
84 static group_box create(const drawing::point& location, const drawing::size& size);
90 static group_box create(const drawing::point& location, const drawing::size& size, const xtd::string& name);
94 static group_box create(const xtd::string& text);
99 static group_box create(const xtd::string& text, const drawing::point& location);
105 static group_box create(const xtd::string& text, const drawing::point& location, const drawing::size& size);
112 static group_box create(const xtd::string& text, const drawing::point& location, const drawing::size& size, const xtd::string& name);
122 static group_box create(const control& parent, const drawing::point& location);
128 static group_box create(const control& parent, const drawing::point& location, const drawing::size& size);
135 static group_box create(const control& parent, const drawing::point& location, const drawing::size& size, const xtd::string& name);
141 static group_box create(const control& parent, const xtd::string& text);
147 static group_box create(const control& parent, const xtd::string& text, const drawing::point& location);
154 static group_box create(const control& parent, const xtd::string& text, const drawing::point& location, const drawing::size& size);
162 static group_box create(const control& parent, const xtd::string& text, const drawing::point& location, const drawing::size& size, const xtd::string& name);
164
165 protected:
167
169 forms::create_params create_params() const noexcept override;
171
173
179 xtd::uptr<xtd::object> clone() const override;
180
181 drawing::size measure_control() const noexcept override;
182 void on_font_changed(const xtd::event_args& e) override;
183 void on_resize(const xtd::event_args& e) override;
184 void on_text_changed(const xtd::event_args& e) override;
186
187 private:
188 xtd::sptr<data> data_;
189 };
190 }
191}
Contains xtd::forms::border_style 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
virtual drawing::point location() const noexcept
Gets the coordinates of the upper-left corner of the control relative to the upper-left corner of its...
virtual const xtd::string & name() const noexcept
Gets the name of the control.
control()
Initializes a new instance of the xtd::forms::control class with default settings.
virtual const xtd::string & text() const noexcept
Gets the text associated with this control.
virtual drawing::size size() const noexcept
Gets the height and width of the control.
virtual std::optional< control_ref > parent() const noexcept
Gets the parent container of the control.
void on_font_changed(const xtd::event_args &e) override
Raises the xtd::forms::control::font_changed event.
drawing::size measure_control() const noexcept override
Measure this control.
forms::create_params create_params() const noexcept override
Gets the required creation parameters when the control handle is created.
virtual forms::auto_size_mode auto_size_mode() const noexcept
Gets how the group_box behaves when its auto_size property is enabled.
static group_box create()
A factory to create an xtd::forms::group_box.
virtual xtd::forms::flat_style flat_style() const noexcept
Gets the flat style appearance of the xtd::forms::group_box control.
void on_resize(const xtd::event_args &e) override
Raises the xtd::forms::control::region event.
control & control_appearance(forms::control_appearance value) override
Sets control appearance.
xtd::uptr< xtd::object > clone() const override
Creates a new object that is a copy of the current instance.
group_box()
Initializes a new instance of the group_box class.
void on_text_changed(const xtd::event_args &e) override
Raises the xtd::forms::control::text_changed event.
Contains xtd::forms::control control.
Contains xtd::forms::flat_style enum class.
#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
xtd::unique_ptr_object< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.hpp:25
auto_size_mode
Specifies how a control will behave when its auto_size property is enabled.
Definition auto_size_mode.hpp:22
@ e
The E key.
Definition keys.hpp:207
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:10
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 const_pointer data() const noexcept
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:201