xtd 0.2.0
control.h
Go to the documentation of this file.
1 #pragma once
5 #include "ibox_model.h"
6 #include "iimage_model.h"
7 #include "itext_model.h"
8 #include <xtd/iequatable>
9 
11 namespace xtd {
13  namespace forms {
15  namespace style_sheets {
34  public:
36 
41  control() = default;
43 
45  control(const control&) = default;
46  control(control&&) = default;
47  control& operator =(const control&) = default;
49 
51 
53  bool auto_ellipsis() const noexcept override;
57  control& auto_ellipsis(bool value) noexcept;
58 
59  const xtd::drawing::color& background_color() const noexcept override;
64  control& background_color(const xtd::drawing::color& value) noexcept;
65 
66  const xtd::forms::style_sheets::background_image& background_image() const noexcept override;
72 
73  const xtd::forms::style_sheets::border_color& border_color() const noexcept override;
79 
86 
87  xtd::forms::style_sheets::border_style border_style() const noexcept override;
93 
94  xtd::forms::style_sheets::border_width border_width() const noexcept override;
100 
101  const xtd::drawing::color& color() const noexcept override;
104  control& color(const xtd::drawing::color& value) noexcept;
105 
106  xtd::forms::style_sheets::text_decoration decoration() const noexcept override;
110  control& decoration(xtd::forms::style_sheets::text_decoration value) noexcept;
111 
112  const xtd::drawing::font& font() const noexcept override;
116  control& font(const xtd::drawing::font& value) noexcept;
117 
118  std::optional<xtd::forms::style_sheets::length> height() const noexcept override;
124  control& height(const std::optional<xtd::forms::style_sheets::length>& value) noexcept;
125 
126  xtd::forms::content_alignment image_alignment() const noexcept override;
130  control& image_alignment(xtd::forms::content_alignment value) noexcept;
131 
132  const xtd::forms::style_sheets::margin& margin() const noexcept override;
139  control& margin(const xtd::forms::style_sheets::margin& value) noexcept;
140 
141  const xtd::forms::style_sheets::outline_color& outline_color() const noexcept override;
147 
154 
161 
162  xtd::forms::style_sheets::outline_style outline_style() const noexcept override;
168 
169  xtd::forms::style_sheets::outline_width outline_width() const noexcept override;
175 
176  const xtd::forms::style_sheets::padding& padding() const noexcept override;
182  control& padding(const xtd::forms::style_sheets::padding& value) noexcept;
183 
186  xtd::forms::style_sheets::shadows shadows() const noexcept override;
190  control& shadows(const xtd::forms::style_sheets::shadows& value) noexcept;
191 
192  xtd::forms::content_alignment text_alignment() const noexcept override;
196  control& text_alignment(xtd::forms::content_alignment value) noexcept;
197 
198  xtd::forms::style_sheets::text_transformation transformation() const noexcept override;
202  control& transformation(xtd::forms::style_sheets::text_transformation value) noexcept;
203 
204  std::optional<xtd::forms::style_sheets::length> width() const noexcept override;
210  control& width(std::optional<xtd::forms::style_sheets::length> value) noexcept;
211 
212  xtd::forms::style_sheets::white_space white_space() const noexcept override;
218 
220 
222  bool equals(const control& other) const noexcept override;
223 
224  static control create_control() {return control();}
225 
226  xtd::drawing::color get_solid_background_color() const noexcept;
227  xtd::drawing::rectangle get_border_rectangle(const xtd::drawing::rectangle& bounds) const noexcept override;
228  xtd::drawing::rectangle get_fill_rectangle(const xtd::drawing::rectangle& bounds) const noexcept override;
229  xtd::drawing::rectangle get_outline_rectangle(const xtd::drawing::rectangle& bounds) const noexcept override;
230  xtd::drawing::rectangle get_content_rectangle(const xtd::drawing::rectangle& bounds) const noexcept override;
231  xtd::drawing::string_format make_string_format() const noexcept override;
233 
234  private:
235  bool auto_ellipsis_ = false;
249  std::optional<xtd::forms::style_sheets::length> width_;
250  std::optional<xtd::forms::style_sheets::length> height_;
259  };
260  }
261  }
262 }
xtd::forms::style_sheets::border_style outline_style
The style specifies what kind of outlines to display.
Definition: outline_style.h:24
Represent background color output manipulator class.
Definition: background_color.h:22
Defines a particular format for text, including font face, size, and style attributes. This class cannot be inherited.
Definition: font.h:45
The image model allows you to specify the alignment of an image.
Definition: iimage_model.h:36
The xtd::forms::style_sheets::border_color is used to set the color of the borders.
Definition: border_color.h:31
std::vector< xtd::forms::style_sheets::shadow > shadows
Represents an xtd::forms::style_sheets::shadow array.
Definition: shadows.h:22
xtd::forms::style_sheets::lengths padding
Padding is used to create space around an element&#39;s content, inside of any defined borders...
Definition: padding.h:24
The control selector allows you to specify the box and color of a control.
Definition: control.h:33
The radius is used to add rounded borders to an element.
Definition: border_radius.h:31
Contains xtd::forms::style_sheets::iimage_model class.
white_space
The white_space enum class specifies how white-space inside an element is handled.
Definition: white_space.h:21
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
xtd::forms::style_sheets::lengths margin
Margins are used to create space around elements, outside of any defined borders. ...
Definition: margin.h:24
static xtd::drawing::font default_font()
Gets the default font that applications can use for dialog boxes and forms.
Contains xtd::forms::style_sheets::ibox_model class.
The image data allows you to specify the url or gradient mode.
Definition: background_image.h:40
Defines none text transformation.
Specifies that the height of the control is defined.
Represents an ARGB (alpha, red, green, blue) color.
Definition: color.h:45
static const xtd::drawing::color transparent
Gets a system-defined color that has an ARGB value of 0x00FFFFFF. This field is constant.
Definition: color.h:55
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition: iequatable.h:18
The box model allows you to specify the margin, borders, padding, background color, width and height of a box.
Definition: ibox_model.h:43
xtd::forms::style_sheets::border_color outline_color
The xtd::forms::style_sheets::outline_color is used to set the color of the outlines.
Definition: outline_color.h:24
content_alignment
Specifies alignment of content on the drawing surface.
Definition: content_alignment.h:19
The style specifies what kind of borders to display.
Definition: border_style.h:31
Specifies that the width of the control is defined.
Stores a set of four integers that represent the location and size of a rectangle.
Definition: rectangle.h:44
The operating system is other.
border_style
Specifies the border style for a control.
Definition: border_style.h:20
text_transformation
The xtd::forms::style_sheets::text_transformation enum class is used to specify uppercase and lowerca...
Definition: text_transformation.h:22
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes...
Definition: object.h:32
The xtd::forms::style_sheets::length specifies the legth and unit of many properties of the xtd::form...
Definition: length.h:75
Contains xtd::forms::style_sheets::itext_model class.
xtd::forms::style_sheets::lengths outline_offset
The width specifies the width of the borders.
Definition: outline_offset.h:24
xtd::forms::style_sheets::lengths border_width
The width specifies the width of the borders.
Definition: border_width.h:24
The length specifies the length of the borders.
Definition: lengths.h:31
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
Content is vertically aligned at the middle, and horizontally aligned at the center.
The text model allows you to specify the alignment, color, decoration, transformation, and font of a text.
Definition: itext_model.h:38
Sequences of whitespace will collapse into a single whitespace. Text will wrap when necessary...
text_decoration
The xtd::forms::style_sheets::text_decoration enum class is used to set or remove decorations from te...
Definition: text_decoration.h:23
xtd::forms::style_sheets::lengths outline_width
The width specifies the width of the outlines.
Definition: outline_width.h:24
Encapsulates text layout information (such as alignment, orientation and tab stops) display manipulat...
Definition: string_format.h:30
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:79
xtd::forms::style_sheets::border_radius outline_radius
The radius is used to add rounded outlines to an element.
Definition: outline_radius.h:24