xtd 1.0.0
Loading...
Searching...
No Matches
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 [[nodiscard]] virtual auto auto_size_mode() const noexcept -> xtd::forms::auto_size_mode;
58
61
64 [[nodiscard]] virtual auto flat_style() const noexcept -> xtd::forms::flat_style;
67 virtual auto flat_style(xtd::forms::flat_style value) -> xtd::forms::group_box&;
69
71
75 [[nodiscard]] static auto create() -> group_box;
79 [[nodiscard]] static auto create(const xtd::drawing::point& location) -> group_box;
84 [[nodiscard]] static auto create(const xtd::drawing::point& location, const xtd::drawing::size& size) -> group_box;
90 [[nodiscard]] static auto create(const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> group_box;
94 [[nodiscard]] static auto create(const xtd::string& text) -> group_box;
99 [[nodiscard]] static auto create(const xtd::string& text, const xtd::drawing::point& location) -> group_box;
105 [[nodiscard]] static auto create(const xtd::string& text, const xtd::drawing::point& location, const xtd::drawing::size& size) -> group_box;
112 [[nodiscard]] static auto create(const xtd::string& text, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> group_box;
117 [[nodiscard]] static auto create(const xtd::forms::control& parent) -> group_box;
122 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location) -> group_box;
128 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location, const xtd::drawing::size& size) -> group_box;
135 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> group_box;
141 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::string& text) -> group_box;
147 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::string& text, const xtd::drawing::point& location) -> group_box;
154 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::string& text, const xtd::drawing::point& location, const xtd::drawing::size& size) -> group_box;
162 [[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) -> group_box;
164
165 protected:
167
169 [[nodiscard]] auto create_params() const noexcept -> xtd::forms::create_params override;
170 [[nodiscard]] auto measure_control() const noexcept -> xtd::drawing::size override;
171 auto on_font_changed(const xtd::event_args& e) -> void override;
172 auto on_resize(const xtd::event_args& e) -> void override;
173 auto on_text_changed(const xtd::event_args& e) -> void override;
175
176 private:
177 xtd::sptr<data> data_;
178 };
179 }
180}
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
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.
control()
Initializes a new instance of the xtd::forms::control class with default settings.
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...
auto control_appearance(forms::control_appearance value) -> xtd::forms::control &override
Sets control appearance.
auto measure_control() const noexcept -> xtd::drawing::size override
Measure this control.
auto create_params() const noexcept -> xtd::forms::create_params override
Gets the required creation parameters when the control handle is created.
auto on_font_changed(const xtd::event_args &e) -> void override
Raises the xtd::forms::control::font_changed event.
static auto create() -> group_box
A factory to create an xtd::forms::group_box.
auto on_resize(const xtd::event_args &e) -> void override
Raises the xtd::forms::control::region event.
group_box()
Initializes a new instance of the group_box class.
virtual auto auto_size_mode() const noexcept -> xtd::forms::auto_size_mode
Gets how the group_box behaves when its auto_size property is enabled.
virtual auto flat_style() const noexcept -> xtd::forms::flat_style
Gets the flat style appearance of the xtd::forms::group_box control.
auto on_text_changed(const xtd::event_args &e) -> void 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
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 auto data() const noexcept -> const_pointer
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:197