xtd 1.0.0
Loading...
Searching...
No Matches
xtd::forms::style_sheets::control Class Reference
Inheritance diagram for xtd::forms::style_sheets::control:
xtd::forms::style_sheets::ibox_model xtd::forms::style_sheets::itext_model xtd::forms::style_sheets::iimage_model xtd::iequatable< control > xtd::object xtd::interface xtd::interface xtd::interface xtd::interface xtd::extensions::equality_operators< control, iequatable< control > >

Definition

The control selector allows you to specify the box and color of a control.

control()=default
Initializes a new instance of the xtd::forms::style_sheets::control class.
The box model allows you to specify the margin, borders, padding, background color,...
Definition ibox_model.hpp:45
The text model allows you to specify the alignment, color, decoration, transformation,...
Definition itext_model.hpp:40
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:23
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:45
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
Inheritance
xtd::objectxtd::forms::style_sheets::ibox_modelxtd::forms::style_sheets::control
Implements
xtd::forms::style_sheets::ibox_model, xtd::forms::style_sheets::itext_model, xtd::iequatable <>
Header
#include <xtd/forms/style_sheets/control>
Namespace
xtd::forms::style_sheets
Library
xtd.forms
Remarks
You need to know how the box model works.
For more information, see Box Model.

Public Constructors

 control ()=default
 Initializes a new instance of the xtd::forms::style_sheets::control class.

Public Properties

auto auto_ellipsis () const noexcept -> bool override
 Gets a value indicating whether the ellipsis character (...) appears at the right edge of the control, denoting that the control text extends beyond the specified length of the control.
auto auto_ellipsis (bool value) noexcept -> control &
 Sets a value indicating whether the ellipsis character (...) appears at the right edge of the control, denoting that the control text extends beyond the specified length of the control.
auto background_color () const noexcept -> const xtd::drawing::color &override
 Gets the background color is used to add background effects to the box.
auto background_color (const xtd::drawing::color &value) noexcept -> control &
 Sets the background color is used to add background effects to the box.
auto background_image () const noexcept -> const xtd::forms::style_sheets::background_image &override
 Gets the background image is used to add background effects to the box.
auto background_image (const xtd::forms::style_sheets::background_image &value) noexcept -> control &
 Sets the background image is used to add background effects to the box.
auto border_color () const noexcept -> const xtd::forms::style_sheets::border_color &override
 Gets the color is used to set the color of the borders.
auto border_color (const xtd::forms::style_sheets::border_color &value) noexcept -> control &
 Sets the color is used to set the color of the borders.
auto border_radius () const noexcept -> xtd::forms::style_sheets::border_radius override
 Gets the radius is used to add rounded borders to an element.
auto border_radius (const xtd::forms::style_sheets::border_radius &value) noexcept -> control &
 Sets the radius is used to add rounded borders to an element.
auto border_style () const noexcept -> xtd::forms::style_sheets::border_style override
 Gets the style specifies what kind of borders to display.
auto border_style (xtd::forms::style_sheets::border_style value) noexcept -> control &
 Sets the style specifies what kind of borders to display.
auto border_width () const noexcept -> xtd::forms::style_sheets::border_width override
 Gets the width specifies the width of the borders.
auto border_width (xtd::forms::style_sheets::border_width value) noexcept -> control &
 Sets the width specifies the width of the border.
auto color () const noexcept -> const xtd::drawing::color &override
 Gets the color is used to add foreground effects to the text.
auto color (const xtd::drawing::color &value) noexcept -> control &
 Sets the color is used to add foreground effects to the text.
auto decoration () const noexcept -> xtd::forms::style_sheets::text_decoration override
 Gets the decoration of the text.
auto decoration (xtd::forms::style_sheets::text_decoration value) noexcept -> control &
 Sets the decoration of the text.
auto font () const noexcept -> const xtd::drawing::font &override
 Gets the font of the text.
auto font (const xtd::drawing::font &value) noexcept -> control &
 Sets the font of the text.
auto height () const noexcept -> std::optional< xtd::forms::style_sheets::length > override
 Gets the height of the box.
auto height (const std::optional< xtd::forms::style_sheets::length > &value) noexcept -> control &
 Sets the height of the box.
auto image_alignment () const noexcept -> xtd::forms::content_alignment override
 Gets the alignment of the image.
auto image_alignment (xtd::forms::content_alignment value) noexcept -> control &
 Sets the alignment of the image.
auto margin () const noexcept -> const xtd::forms::style_sheets::margin &override
 Gets the area outside the border.
auto margin (const xtd::forms::style_sheets::margin &value) noexcept -> control &
 Sets the area outside the border.
auto outline_color () const noexcept -> const xtd::forms::style_sheets::outline_color &override
 Gets the color is used to set the color of the outlines.
auto outline_color (const xtd::forms::style_sheets::outline_color &value) noexcept -> control &
 Sets the color is used to set the color of the outlines.
auto outline_offset () const noexcept -> xtd::forms::style_sheets::outline_offset override
 Gets the ofset specifies the width of the outlines.
auto outline_offset (xtd::forms::style_sheets::outline_offset value) noexcept -> control &
 Sets the width specifies the offset of the outlines.
auto outline_radius () const noexcept -> xtd::forms::style_sheets::outline_radius override
 Gets the radius is used to add rounded outline to an element.
auto outline_radius (xtd::forms::style_sheets::outline_radius value) noexcept -> control &
 Sets the radius is used to add rounded outlines to an element.
auto outline_style () const noexcept -> xtd::forms::style_sheets::outline_style override
 Gets the style specifies what kind of outlines to display.
auto outline_style (xtd::forms::style_sheets::outline_style value) noexcept -> control &
 Sets the style specifies what kind of outlines to display.
auto outline_width () const noexcept -> xtd::forms::style_sheets::outline_width override
 Gets the width specifies the width of the outlines.
auto outline_width (xtd::forms::style_sheets::outline_width value) noexcept -> control &
 Sets the width specifies the width of the outlines.
auto padding () const noexcept -> const xtd::forms::style_sheets::padding &override
 Gets the area area around the content.
auto padding (const xtd::forms::style_sheets::padding &value) noexcept -> control &
 Sets the area area around the content.
auto shadows () const noexcept -> xtd::forms::style_sheets::shadows override
 Gets an xtd::forms::style_sheets::shadow array used to draw shadows under the text.
auto shadows (const xtd::forms::style_sheets::shadows &value) noexcept -> control &
 Sets an xtd::forms::style_sheets::shadow array used to draw shadows under the text.
auto text_alignment () const noexcept -> xtd::forms::content_alignment override
 Gets the alignment of the text.
auto text_alignment (xtd::forms::content_alignment value) noexcept -> control &
 Sets the alignment of the text.
auto transformation () const noexcept -> xtd::forms::style_sheets::text_transformation override
 Gets the transformation of the text.
auto transformation (xtd::forms::style_sheets::text_transformation value) noexcept -> control &
 Sets the transformation of the text.
auto width () const noexcept -> std::optional< xtd::forms::style_sheets::length > override
 Gets the width of the box.
auto width (std::optional< xtd::forms::style_sheets::length > value) noexcept -> control &
 Sets the width of the box.
auto white_space () const noexcept -> xtd::forms::style_sheets::white_space override
 Gets how white-space inside an element is handled.
auto white_space (xtd::forms::style_sheets::white_space value) noexcept -> control &
 Sets how white-space inside an element is handled.

Public Methods

auto equals (const xtd::object &obj) const noexcept -> bool override
 Determines whether the specified object is equal to the current object.
auto equals (const control &other) const noexcept -> bool override
 Determines whether the specified object is equal to the current object.
auto get_hash_code () const noexcept -> xtd::usize override
 Serves as a hash function for a particular type.
auto get_solid_background_color () const noexcept -> xtd::drawing::color
 Gets solid background color.
auto get_border_rectangle (const xtd::drawing::rectangle &bounds) const noexcept -> xtd::drawing::rectangle override
 Gets the border rectangle from the specified rectangle.
auto get_fill_rectangle (const xtd::drawing::rectangle &bounds) const noexcept -> xtd::drawing::rectangle override
 Gets the fill rectangle from the specified rectangle.
auto get_outline_rectangle (const xtd::drawing::rectangle &bounds) const noexcept -> xtd::drawing::rectangle override
 Gets the outline rectangle from the specified rectangle.
auto get_content_rectangle (const xtd::drawing::rectangle &bounds) const noexcept -> xtd::drawing::rectangle override
 Gets the content rectangle from the specified rectangle.
auto make_string_format () const noexcept -> xtd::drawing::string_format override
 Makes string format.

Public Static Methods

static auto create_control () -> control
 A factory to create control.

Additional Inherited Members

virtual auto equals (const control &) const noexcept -> bool=0
 Indicates whether the current object is equal to another object of the same type.
 object ()=default
 Create a new instance of the ultimate base class object.
virtual auto get_type () const noexcept -> type_object
 Gets the type of the current instance.
template<typename object_t>
auto memberwise_clone () const -> xtd::unique_ptr_object< object_t >
 Creates a shallow copy of the current object.
virtual auto to_string () const -> xtd::string
 Returns a xtd::string that represents the current object.
template<typename object_a_t, typename object_b_t>
static auto equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool
 Determines whether the specified object instances are considered equal.
template<typename object_a_t, typename object_b_t>
static auto reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool
 Determines whether the specified object instances are the same instance.

Constructor & Destructor Documentation

◆ control()

xtd::forms::style_sheets::control::control ( )
default

Initializes a new instance of the xtd::forms::style_sheets::control class.

Remarks
You need to know how the box model works.
For more information, see Box Model.

Member Function Documentation

◆ auto_ellipsis() [1/2]

auto xtd::forms::style_sheets::control::auto_ellipsis ( ) const -> bool
nodiscardoverridevirtualnoexcept

Gets a value indicating whether the ellipsis character (...) appears at the right edge of the control, denoting that the control text extends beyond the specified length of the control.

Returns
true if the additional control text is to be indicated by an ellipsis; otherwise, false.

Implements xtd::forms::style_sheets::itext_model.

◆ auto_ellipsis() [2/2]

auto xtd::forms::style_sheets::control::auto_ellipsis ( bool value) -> control &
noexcept

Sets a value indicating whether the ellipsis character (...) appears at the right edge of the control, denoting that the control text extends beyond the specified length of the control.

Parameters
valuetrue if the additional control text is to be indicated by an ellipsis; otherwise, false.
Returns
This current instance.

◆ background_color() [1/2]

auto xtd::forms::style_sheets::control::background_color ( ) const -> const xtd::drawing::color &override
nodiscardoverridevirtualnoexcept

Gets the background color is used to add background effects to the box.

Returns
The background color is used to add background effects to the box.
Remarks
For more information, see Box Model.

Implements xtd::forms::style_sheets::ibox_model.

◆ background_color() [2/2]

auto xtd::forms::style_sheets::control::background_color ( const xtd::drawing::color & value) -> control &
noexcept

Sets the background color is used to add background effects to the box.

Parameters
valueThe background color is used to add background effects to the box.
Returns
This current instance.
Remarks
For more information, see Box Model.

◆ background_image() [1/2]

auto xtd::forms::style_sheets::control::background_image ( ) const -> const xtd::forms::style_sheets::background_image &override
nodiscardoverridevirtualnoexcept

Gets the background image is used to add background effects to the box.

Returns
The background image is used to add background effects to the box.
Remarks
For more information, see Box Model.

Implements xtd::forms::style_sheets::ibox_model.

◆ background_image() [2/2]

auto xtd::forms::style_sheets::control::background_image ( const xtd::forms::style_sheets::background_image & value) -> control &
noexcept

Sets the background image is used to add background effects to the box.

Parameters
valueThe background image is used to add background effects to the box.
Returns
This current instance.
Remarks
For more information, see Box Model.

◆ border_color() [1/2]

auto xtd::forms::style_sheets::control::border_color ( ) const -> const xtd::forms::style_sheets::border_color &override
nodiscardoverridevirtualnoexcept

Gets the color is used to set the color of the borders.

Returns
The color is used to set the color of the borders.
Remarks
For more information, see Box Model.

Implements xtd::forms::style_sheets::ibox_model.

◆ border_color() [2/2]

auto xtd::forms::style_sheets::control::border_color ( const xtd::forms::style_sheets::border_color & value) -> control &
noexcept

Sets the color is used to set the color of the borders.

Parameters
valueThe color is used to set the color of the borders.
Returns
This current instance.
Remarks
For more information, see Box Model.

◆ border_radius() [1/2]

auto xtd::forms::style_sheets::control::border_radius ( ) const -> xtd::forms::style_sheets::border_radius
nodiscardoverridevirtualnoexcept

Gets the radius is used to add rounded borders to an element.

Returns
The radius is used to add rounded borders to an element.
Remarks
For more information, see Box Model.

Implements xtd::forms::style_sheets::ibox_model.

◆ border_radius() [2/2]

auto xtd::forms::style_sheets::control::border_radius ( const xtd::forms::style_sheets::border_radius & value) -> control &
noexcept

Sets the radius is used to add rounded borders to an element.

Parameters
valueThe radius is used to add rounded borders to an element.
Returns
This current instance.
Remarks
For more information, see Box Model.

◆ border_style() [1/2]

auto xtd::forms::style_sheets::control::border_style ( ) const -> xtd::forms::style_sheets::border_style
nodiscardoverridevirtualnoexcept

Gets the style specifies what kind of borders to display.

Returns
The style specifies what kind of borders to display.
Remarks
For more information, see Box Model.

Implements xtd::forms::style_sheets::ibox_model.

Examples
demo.cpp, and painting.cpp.

◆ border_style() [2/2]

auto xtd::forms::style_sheets::control::border_style ( xtd::forms::style_sheets::border_style value) -> control &
noexcept

Sets the style specifies what kind of borders to display.

Parameters
valueThe style specifies what kind of borders to display.
Returns
This current instance.
Remarks
For more information, see Box Model.

◆ border_width() [1/2]

auto xtd::forms::style_sheets::control::border_width ( ) const -> xtd::forms::style_sheets::border_width
nodiscardoverridevirtualnoexcept

Gets the width specifies the width of the borders.

Returns
The width specifies the width of the borders.
Remarks
For more information, see Box Model.

Implements xtd::forms::style_sheets::ibox_model.

◆ border_width() [2/2]

auto xtd::forms::style_sheets::control::border_width ( xtd::forms::style_sheets::border_width value) -> control &
noexcept

Sets the width specifies the width of the border.

Parameters
valueThe width specifies the width of the borders.
Returns
This current instance.
Remarks
For more information, see Box Model.

◆ color() [1/2]

auto xtd::forms::style_sheets::control::color ( ) const -> const xtd::drawing::color &override
nodiscardoverridevirtualnoexcept

Gets the color is used to add foreground effects to the text.

Returns
The color is used to add foreground effects to the text.

Implements xtd::forms::style_sheets::itext_model.

Examples
line.cpp.

◆ color() [2/2]

auto xtd::forms::style_sheets::control::color ( const xtd::drawing::color & value) -> control &
noexcept

Sets the color is used to add foreground effects to the text.

Parameters
valueThe color is used to add foreground effects to the text.

◆ decoration() [1/2]

auto xtd::forms::style_sheets::control::decoration ( ) const -> xtd::forms::style_sheets::text_decoration
nodiscardoverridevirtualnoexcept

Gets the decoration of the text.

Returns
One of xtd::forms::style_sheets::text_decoration values.

Implements xtd::forms::style_sheets::itext_model.

◆ decoration() [2/2]

auto xtd::forms::style_sheets::control::decoration ( xtd::forms::style_sheets::text_decoration value) -> control &
noexcept

Sets the decoration of the text.

Parameters
valueOne of xtd::forms::style_sheets::text_decoration values.
Returns
This current instance.

◆ font() [1/2]

auto xtd::forms::style_sheets::control::font ( ) const -> const xtd::drawing::font &override
nodiscardoverridevirtualnoexcept

Gets the font of the text.

Returns
The font of the text.

Implements xtd::forms::style_sheets::itext_model.

Examples
forms_timer.cpp, and hello_world_emoticons.cpp.

◆ font() [2/2]

auto xtd::forms::style_sheets::control::font ( const xtd::drawing::font & value) -> control &
noexcept

Sets the font of the text.

Returns
This current instance.
Parameters
valueThe font of the text.

◆ height() [1/2]

auto xtd::forms::style_sheets::control::height ( ) const -> std::optional< xtd::forms::style_sheets::length >
nodiscardoverridevirtualnoexcept

Gets the height of the box.

Returns
The height of the box.
Remarks
You need to know how the box model works.
For more information, see Box Model.

Implements xtd::forms::style_sheets::ibox_model.

Examples
clock.cpp, dot_matrix_display.cpp, fourteen_segment_display.cpp, nine_segment_display.cpp, seven_segment_display.cpp, and sixteen_segment_display.cpp.

◆ height() [2/2]

auto xtd::forms::style_sheets::control::height ( const std::optional< xtd::forms::style_sheets::length > & value) -> control &
noexcept

Sets the height of the box.

Returns
The height of the box.
This current instance.
Remarks
You need to know how the box model works.
For more information, see Box Model.

◆ image_alignment() [1/2]

auto xtd::forms::style_sheets::control::image_alignment ( ) const -> xtd::forms::content_alignment
nodiscardoverridevirtualnoexcept

Gets the alignment of the image.

Returns
A combination of xtd::forms::content_alignment values.

Implements xtd::forms::style_sheets::iimage_model.

◆ image_alignment() [2/2]

auto xtd::forms::style_sheets::control::image_alignment ( xtd::forms::content_alignment value) -> control &
noexcept

Sets the alignment of the image.

Parameters
valueA combination of xtd::forms::content_alignment values.
Returns
This current instance.

◆ margin() [1/2]

auto xtd::forms::style_sheets::control::margin ( ) const -> const xtd::forms::style_sheets::margin &override
nodiscardoverridevirtualnoexcept

Gets the area outside the border.

Returns
The area outside the border.
Remarks
The margin is transparent.
You need to know how the box model works.
For more information, see Box Model.

Implements xtd::forms::style_sheets::ibox_model.

◆ margin() [2/2]

auto xtd::forms::style_sheets::control::margin ( const xtd::forms::style_sheets::margin & value) -> control &
noexcept

Sets the area outside the border.

Parameters
valueThe area outside the border.
Returns
This current instance.
Remarks
The margin is transparent.
You need to know how the box model works.
For more information, see Box Model.

◆ outline_color() [1/2]

auto xtd::forms::style_sheets::control::outline_color ( ) const -> const xtd::forms::style_sheets::outline_color &override
nodiscardoverridevirtualnoexcept

Gets the color is used to set the color of the outlines.

Returns
The color is used to set the color of the outlines.
Remarks
For more information, see Box Model.

Implements xtd::forms::style_sheets::ibox_model.

◆ outline_color() [2/2]

auto xtd::forms::style_sheets::control::outline_color ( const xtd::forms::style_sheets::outline_color & value) -> control &
noexcept

Sets the color is used to set the color of the outlines.

Parameters
valueThe color is used to set the color of the outlines.
Returns
This current instance.
Remarks
For more information, see Box Model.

◆ outline_offset() [1/2]

auto xtd::forms::style_sheets::control::outline_offset ( ) const -> xtd::forms::style_sheets::outline_offset
nodiscardoverridevirtualnoexcept

Gets the ofset specifies the width of the outlines.

Returns
The offset specifies the width of the outlines.
Remarks
For more information, see Box Model.

Implements xtd::forms::style_sheets::ibox_model.

◆ outline_offset() [2/2]

auto xtd::forms::style_sheets::control::outline_offset ( xtd::forms::style_sheets::outline_offset value) -> control &
noexcept

Sets the width specifies the offset of the outlines.

Parameters
valueThe width specifies the offset of the outlines.
Returns
This current instance.
Remarks
For more information, see Box Model.

◆ outline_radius() [1/2]

auto xtd::forms::style_sheets::control::outline_radius ( ) const -> xtd::forms::style_sheets::outline_radius
nodiscardoverridevirtualnoexcept

Gets the radius is used to add rounded outline to an element.

Returns
The radius is used to add rounded outline to an element.
Remarks
For more information, see Box Model.

Implements xtd::forms::style_sheets::ibox_model.

◆ outline_radius() [2/2]

auto xtd::forms::style_sheets::control::outline_radius ( xtd::forms::style_sheets::outline_radius value) -> control &
noexcept

Sets the radius is used to add rounded outlines to an element.

Parameters
valueThe radius is used to add rounded outlines to an element.
Returns
This current instance.
Remarks
For more information, see Box Model.

◆ outline_style() [1/2]

auto xtd::forms::style_sheets::control::outline_style ( ) const -> xtd::forms::style_sheets::outline_style
nodiscardoverridevirtualnoexcept

Gets the style specifies what kind of outlines to display.

Returns
The style specifies what kind of outlines to display.
Remarks
For more information, see Box Model.

Implements xtd::forms::style_sheets::ibox_model.

◆ outline_style() [2/2]

auto xtd::forms::style_sheets::control::outline_style ( xtd::forms::style_sheets::outline_style value) -> control &
noexcept

Sets the style specifies what kind of outlines to display.

Parameters
valueThe style specifies what kind of outlines to display.
Returns
This current instance.
Remarks
For more information, see Box Model.

◆ outline_width() [1/2]

auto xtd::forms::style_sheets::control::outline_width ( ) const -> xtd::forms::style_sheets::outline_width
nodiscardoverridevirtualnoexcept

Gets the width specifies the width of the outlines.

Returns
The width specifies the width of the outlines.
Remarks
For more information, see Box Model.

Implements xtd::forms::style_sheets::ibox_model.

◆ outline_width() [2/2]

auto xtd::forms::style_sheets::control::outline_width ( xtd::forms::style_sheets::outline_width value) -> control &
noexcept

Sets the width specifies the width of the outlines.

Parameters
valueThe width specifies the width of the outlines.
Returns
This current instance.
Remarks
For more information, see Box Model.

◆ padding() [1/2]

auto xtd::forms::style_sheets::control::padding ( ) const -> const xtd::forms::style_sheets::padding &override
nodiscardoverridevirtualnoexcept

Gets the area area around the content.

Returns
The area around the content.
Remarks
The padding is transparent.
For more information, see Box Model.

Implements xtd::forms::style_sheets::ibox_model.

◆ padding() [2/2]

auto xtd::forms::style_sheets::control::padding ( const xtd::forms::style_sheets::padding & value) -> control &
noexcept

Sets the area area around the content.

Parameters
valueThe area around the content.
Returns
This current instance.
Remarks
The padding is transparent.
For more information, see Box Model.

◆ shadows() [1/2]

auto xtd::forms::style_sheets::control::shadows ( ) const -> xtd::forms::style_sheets::shadows
nodiscardoverridevirtualnoexcept

Gets an xtd::forms::style_sheets::shadow array used to draw shadows under the text.

Returns
The xtd::forms::style_sheets::shadow array used to draw shadows under the text.

Implements xtd::forms::style_sheets::itext_model.

◆ shadows() [2/2]

auto xtd::forms::style_sheets::control::shadows ( const xtd::forms::style_sheets::shadows & value) -> control &
noexcept

Sets an xtd::forms::style_sheets::shadow array used to draw shadows under the text.

Parameters
valueThe xtd::forms::style_sheets::shadow array used to draw shadows under the text.
Returns
This current instance.

◆ text_alignment() [1/2]

auto xtd::forms::style_sheets::control::text_alignment ( ) const -> xtd::forms::content_alignment
nodiscardoverridevirtualnoexcept

Gets the alignment of the text.

Returns
A combination of xtd::forms::content_alignment values.

Implements xtd::forms::style_sheets::itext_model.

◆ text_alignment() [2/2]

auto xtd::forms::style_sheets::control::text_alignment ( xtd::forms::content_alignment value) -> control &
noexcept

Sets the alignment of the text.

Parameters
valueA combination of xtd::forms::content_alignment values.
Returns
This current instance.

◆ transformation() [1/2]

auto xtd::forms::style_sheets::control::transformation ( ) const -> xtd::forms::style_sheets::text_transformation
nodiscardoverridevirtualnoexcept

Gets the transformation of the text.

Returns
One of xtd::forms::style_sheets::text_transformation values.

Implements xtd::forms::style_sheets::itext_model.

◆ transformation() [2/2]

auto xtd::forms::style_sheets::control::transformation ( xtd::forms::style_sheets::text_transformation value) -> control &
noexcept

Sets the transformation of the text.

Parameters
valueOne of xtd::forms::style_sheets::text_transformation values.
Returns
This current instance.

◆ width() [1/2]

auto xtd::forms::style_sheets::control::width ( ) const -> std::optional< xtd::forms::style_sheets::length >
nodiscardoverridevirtualnoexcept

Gets the width of the box.

Returns
The width of the box.
Remarks
You need to know how the box model works.
For more information, see Box Model.

Implements xtd::forms::style_sheets::ibox_model.

Examples
demo.cpp.

◆ width() [2/2]

auto xtd::forms::style_sheets::control::width ( std::optional< xtd::forms::style_sheets::length > value) -> control &
noexcept

Sets the width of the box.

Parameters
valueThe width of the box.
Returns
This current instance.
Remarks
You need to know how the box model works.
For more information, see Box Model.

◆ white_space() [1/2]

auto xtd::forms::style_sheets::control::white_space ( ) const -> xtd::forms::style_sheets::white_space
nodiscardoverridevirtualnoexcept

Gets how white-space inside an element is handled.

Returns
One of xtd::forms::style_sheets::white_space values.

Implements xtd::forms::style_sheets::itext_model.

◆ white_space() [2/2]

auto xtd::forms::style_sheets::control::white_space ( xtd::forms::style_sheets::white_space value) -> control &
noexcept

Sets how white-space inside an element is handled.

Parameters
valueOne of xtd::forms::style_sheets::white_space values.
Returns
This current instance.

◆ equals() [1/2]

auto xtd::forms::style_sheets::control::equals ( const xtd::object & obj) const -> bool
nodiscardoverridevirtualnoexcept

Determines whether the specified object is equal to the current object.

Parameters
objThe object to compare with the current object.
Returns
true if the specified object is equal to the current object. otherwise, false.

Reimplemented from xtd::object.

◆ equals() [2/2]

auto xtd::forms::style_sheets::control::equals ( const control & other) const -> bool
nodiscardoverridenoexcept

Determines whether the specified object is equal to the current object.

Parameters
otherThe object to compare with the current object.
Returns
true if the specified object is equal to the current object. otherwise, false.

◆ get_hash_code()

auto xtd::forms::style_sheets::control::get_hash_code ( ) const -> xtd::usize
nodiscardoverridevirtualnoexcept

Serves as a hash function for a particular type.

Returns
A hash code for the current object.

Reimplemented from xtd::object.

◆ get_solid_background_color()

auto xtd::forms::style_sheets::control::get_solid_background_color ( ) const -> xtd::drawing::color
nodiscardnoexcept

Gets solid background color.

Returns
The solid background color.

◆ get_border_rectangle()

auto xtd::forms::style_sheets::control::get_border_rectangle ( const xtd::drawing::rectangle & bounds) const -> xtd::drawing::rectangle
nodiscardoverridevirtualnoexcept

Gets the border rectangle from the specified rectangle.

Returns
The border rectangle.

Implements xtd::forms::style_sheets::ibox_model.

◆ get_fill_rectangle()

auto xtd::forms::style_sheets::control::get_fill_rectangle ( const xtd::drawing::rectangle & bounds) const -> xtd::drawing::rectangle
nodiscardoverridevirtualnoexcept

Gets the fill rectangle from the specified rectangle.

Returns
The fill rectangle.

Implements xtd::forms::style_sheets::ibox_model.

◆ get_outline_rectangle()

auto xtd::forms::style_sheets::control::get_outline_rectangle ( const xtd::drawing::rectangle & bounds) const -> xtd::drawing::rectangle
nodiscardoverridevirtualnoexcept

Gets the outline rectangle from the specified rectangle.

Returns
The outline rectangle.

Implements xtd::forms::style_sheets::ibox_model.

◆ get_content_rectangle()

auto xtd::forms::style_sheets::control::get_content_rectangle ( const xtd::drawing::rectangle & bounds) const -> xtd::drawing::rectangle
nodiscardoverridevirtualnoexcept

Gets the content rectangle from the specified rectangle.

Returns
The content rectangle.

Implements xtd::forms::style_sheets::ibox_model.

◆ make_string_format()

auto xtd::forms::style_sheets::control::make_string_format ( ) const -> xtd::drawing::string_format
nodiscardoverridevirtualnoexcept

Makes string format.

Returns
The string format.

Implements xtd::forms::style_sheets::itext_model.

◆ create_control()

auto xtd::forms::style_sheets::control::create_control ( ) -> control
inlinestaticnodiscard

A factory to create control.

Returns
New control created.

The documentation for this class was generated from the following file: