xtd 0.2.0
Loading...
Searching...
No Matches
control.h
Go to the documentation of this file.
1
4#pragma once
5#include "ibox_model.h"
6#include "iimage_model.h"
7#include "itext_model.h"
8#include <xtd/iequatable>
9
11namespace xtd {
13 namespace forms {
15 namespace style_sheets {
34 class forms_export_ control : public xtd::forms::style_sheets::ibox_model, public xtd::forms::style_sheets::itext_model, public xtd::forms::style_sheets::iimage_model, public xtd::iequatable<control>, public xtd::object {
35 public:
37
42 control() = default;
44
46 control(const control&) = default;
47 control(control&&) = default;
48 control& operator =(const control&) = default;
50
52
54 bool auto_ellipsis() const noexcept override;
58 control& auto_ellipsis(bool value) noexcept;
59
60 const xtd::drawing::color& background_color() const noexcept override;
65 control& background_color(const xtd::drawing::color& value) noexcept;
66
67 const xtd::forms::style_sheets::background_image& background_image() const noexcept override;
72 control& background_image(const xtd::forms::style_sheets::background_image& value) noexcept;
73
74 const xtd::forms::style_sheets::border_color& border_color() const noexcept override;
79 control& border_color(const xtd::forms::style_sheets::border_color& value) noexcept;
80
81 xtd::forms::style_sheets::border_radius border_radius() const noexcept override;
86 control& border_radius(const xtd::forms::style_sheets::border_radius& value) noexcept;
87
88 xtd::forms::style_sheets::border_style border_style() const noexcept override;
93 control& border_style(xtd::forms::style_sheets::border_style value) noexcept;
94
95 xtd::forms::style_sheets::border_width border_width() const noexcept override;
100 control& border_width(xtd::forms::style_sheets::border_width value) noexcept;
101
102 const xtd::drawing::color& color() const noexcept override;
105 control& color(const xtd::drawing::color& value) noexcept;
106
107 xtd::forms::style_sheets::text_decoration decoration() const noexcept override;
111 control& decoration(xtd::forms::style_sheets::text_decoration value) noexcept;
112
113 const xtd::drawing::font& font() const noexcept override;
117 control& font(const xtd::drawing::font& value) noexcept;
118
119 std::optional<xtd::forms::style_sheets::length> height() const noexcept override;
125 control& height(const std::optional<xtd::forms::style_sheets::length>& value) noexcept;
126
127 xtd::forms::content_alignment image_alignment() const noexcept override;
131 control& image_alignment(xtd::forms::content_alignment value) noexcept;
132
133 const xtd::forms::style_sheets::margin& margin() const noexcept override;
140 control& margin(const xtd::forms::style_sheets::margin& value) noexcept;
141
142 const xtd::forms::style_sheets::outline_color& outline_color() const noexcept override;
147 control& outline_color(const xtd::forms::style_sheets::outline_color& value) noexcept;
148
149 xtd::forms::style_sheets::outline_offset outline_offset() const noexcept override;
154 control& outline_offset(xtd::forms::style_sheets::outline_offset value) noexcept;
155
156 xtd::forms::style_sheets::outline_radius outline_radius() const noexcept override;
161 control& outline_radius(xtd::forms::style_sheets::outline_radius value) noexcept;
162
163 xtd::forms::style_sheets::outline_style outline_style() const noexcept override;
168 control& outline_style(xtd::forms::style_sheets::outline_style value) noexcept;
169
170 xtd::forms::style_sheets::outline_width outline_width() const noexcept override;
175 control& outline_width(xtd::forms::style_sheets::outline_width value) noexcept;
176
177 const xtd::forms::style_sheets::padding& padding() const noexcept override;
183 control& padding(const xtd::forms::style_sheets::padding& value) noexcept;
184
187 xtd::forms::style_sheets::shadows shadows() const noexcept override;
191 control& shadows(const xtd::forms::style_sheets::shadows& value) noexcept;
192
193 xtd::forms::content_alignment text_alignment() const noexcept override;
197 control& text_alignment(xtd::forms::content_alignment value) noexcept;
198
199 xtd::forms::style_sheets::text_transformation transformation() const noexcept override;
203 control& transformation(xtd::forms::style_sheets::text_transformation value) noexcept;
204
205 std::optional<xtd::forms::style_sheets::length> width() const noexcept override;
211 control& width(std::optional<xtd::forms::style_sheets::length> value) noexcept;
212
213 xtd::forms::style_sheets::white_space white_space() const noexcept override;
217 control& white_space(xtd::forms::style_sheets::white_space value) noexcept;
219
221
223 using object::equals;
224 bool equals(const control& other) const noexcept override;
225
228 xtd::drawing::color get_solid_background_color() const noexcept;
231 xtd::drawing::rectangle get_border_rectangle(const xtd::drawing::rectangle& bounds) const noexcept override;
234 xtd::drawing::rectangle get_fill_rectangle(const xtd::drawing::rectangle& bounds) const noexcept override;
237 xtd::drawing::rectangle get_outline_rectangle(const xtd::drawing::rectangle& bounds) const noexcept override;
240 xtd::drawing::rectangle get_content_rectangle(const xtd::drawing::rectangle& bounds) const noexcept override;
243 xtd::drawing::string_format make_string_format() const noexcept override;
245
247
251 static control create_control() {return control();}
253
254 private:
255 bool auto_ellipsis_ = false;
256 xtd::forms::style_sheets::margin margin_ {length(0)};
257 xtd::forms::style_sheets::border_color border_color_ {xtd::drawing::color::black};
258 xtd::forms::style_sheets::border_radius border_radius_ {length(0)};
259 xtd::forms::style_sheets::border_style border_style_ {border_type::none};
260 xtd::forms::style_sheets::border_width border_width_ {length(3)};
261 xtd::forms::style_sheets::outline_color outline_color_ {xtd::drawing::color::black};
262 xtd::forms::style_sheets::outline_offset outline_offset_ {length(0)};
263 xtd::forms::style_sheets::outline_radius outline_radius_ {length(0)};
264 xtd::forms::style_sheets::outline_style outline_style_ {border_type::none};
265 xtd::forms::style_sheets::outline_width outline_width_ {length(1)};
266 xtd::forms::style_sheets::padding padding_ {length(0)};
268 xtd::forms::style_sheets::background_image background_image_ ;
269 std::optional<xtd::forms::style_sheets::length> width_;
270 std::optional<xtd::forms::style_sheets::length> height_;
274 xtd::forms::style_sheets::text_decoration decoration_ = xtd::forms::style_sheets::text_decoration::none;
275 xtd::forms::style_sheets::shadows shadows_;
276 xtd::forms::style_sheets::text_transformation transformation_ = xtd::forms::style_sheets::text_transformation::none;
278 xtd::forms::style_sheets::white_space white_space_ = xtd::forms::style_sheets::white_space::normal;
279 };
280 }
281 }
282}
Represents an ARGB (alpha, red, green, blue) color.
Definition color.h:49
static const xtd::drawing::color transparent
Gets a system-defined color that has an ARGB value of 0x00000000. This field is constant.
Definition color.h:59
static const xtd::drawing::color black
Gets a system-defined color that has an ARGB value of 0xFF000000. This field is constant.
Definition color.h:83
Defines a particular format for text, including font face, size, and style attributes....
Definition font.h:45
static xtd::drawing::font default_font()
Gets the default font that applications can use for dialog boxes and forms.
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.h:21
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:40
#define forms_export_
Define shared library export.
Definition forms_export.h:13
@ control
The left or right CTRL modifier key.
content_alignment
Specifies alignment of content on the drawing surface.
Definition content_alignment.h:21
@ middle_center
Content is vertically aligned at the middle, and horizontally aligned at the center.
Contains xtd::forms::style_sheets::ibox_model class.
Contains xtd::forms::style_sheets::iimage_model class.
Contains xtd::forms::style_sheets::itext_model class.
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