xtd 0.2.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::equality_operators< type_t, equatable_t >

Definition

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

The control selector allows you to specify the box and color of a control.
Definition control.h:35
The box model allows you to specify the margin, borders, padding, background color,...
Definition ibox_model.h:45
The text model allows you to specify the alignment, color, decoration, transformation,...
Definition itext_model.h:40
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.h:22
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:42
#define forms_export_
Define shared library export.
Definition forms_export.h: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

bool auto_ellipsis () const noexcept 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.
 
controlauto_ellipsis (bool value) 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.
 
const xtd::drawing::colorbackground_color () const noexcept override
 Gets the background color is used to add background effects to the box.
 
controlbackground_color (const xtd::drawing::color &value) noexcept
 Sets the background color is used to add background effects to the box.
 
const xtd::forms::style_sheets::background_imagebackground_image () const noexcept override
 Gets the background image is used to add background effects to the box.
 
controlbackground_image (const xtd::forms::style_sheets::background_image &value) noexcept
 Sets the background image is used to add background effects to the box.
 
const xtd::forms::style_sheets::border_colorborder_color () const noexcept override
 Gets the color is used to set the color of the borders.
 
controlborder_color (const xtd::forms::style_sheets::border_color &value) noexcept
 Sets the color is used to set the color of the borders.
 
xtd::forms::style_sheets::border_radius border_radius () const noexcept override
 Gets the radius is used to add rounded borders to an element.
 
controlborder_radius (const xtd::forms::style_sheets::border_radius &value) noexcept
 Sets the radius is used to add rounded borders to an element.
 
xtd::forms::style_sheets::border_style border_style () const noexcept override
 Gets the style specifies what kind of borders to display.
 
controlborder_style (xtd::forms::style_sheets::border_style value) noexcept
 Sets the style specifies what kind of borders to display.
 
xtd::forms::style_sheets::border_width border_width () const noexcept override
 Gets the width specifies the width of the borders.
 
controlborder_width (xtd::forms::style_sheets::border_width value) noexcept
 Sets the width specifies the width of the border.
 
const xtd::drawing::colorcolor () const noexcept override
 Gets the color is used to add foreground effects to the text.
 
controlcolor (const xtd::drawing::color &value) noexcept
 Sets the color is used to add foreground effects to the text.
 
xtd::forms::style_sheets::text_decoration decoration () const noexcept override
 Gets the decoration of the text.
 
controldecoration (xtd::forms::style_sheets::text_decoration value) noexcept
 Sets the decoration of the text.
 
const xtd::drawing::fontfont () const noexcept override
 Gets the font of the text.
 
controlfont (const xtd::drawing::font &value) noexcept
 Sets the font of the text.
 
std::optional< xtd::forms::style_sheets::lengthheight () const noexcept override
 Gets the height of the box.
 
controlheight (const std::optional< xtd::forms::style_sheets::length > &value) noexcept
 Sets the height of the box.
 
xtd::forms::content_alignment image_alignment () const noexcept override
 Gets the alignment of the image.
 
controlimage_alignment (xtd::forms::content_alignment value) noexcept
 Sets the alignment of the image.
 
const xtd::forms::style_sheets::marginmargin () const noexcept override
 Gets the area outside the border.
 
controlmargin (const xtd::forms::style_sheets::margin &value) noexcept
 Sets the area outside the border.
 
const xtd::forms::style_sheets::outline_coloroutline_color () const noexcept override
 Gets the color is used to set the color of the outlines.
 
controloutline_color (const xtd::forms::style_sheets::outline_color &value) noexcept
 Sets the color is used to set the color of the outlines.
 
xtd::forms::style_sheets::outline_offset outline_offset () const noexcept override
 Gets the ofset specifies the width of the outlines.
 
controloutline_offset (xtd::forms::style_sheets::outline_offset value) noexcept
 Sets the width specifies the offset of the outlines.
 
xtd::forms::style_sheets::outline_radius outline_radius () const noexcept override
 Gets the radius is used to add rounded outline to an element.
 
controloutline_radius (xtd::forms::style_sheets::outline_radius value) noexcept
 Sets the radius is used to add rounded outlines to an element.
 
xtd::forms::style_sheets::outline_style outline_style () const noexcept override
 Gets the style specifies what kind of outlines to display.
 
controloutline_style (xtd::forms::style_sheets::outline_style value) noexcept
 Sets the style specifies what kind of outlines to display.
 
xtd::forms::style_sheets::outline_width outline_width () const noexcept override
 Gets the width specifies the width of the outlines.
 
controloutline_width (xtd::forms::style_sheets::outline_width value) noexcept
 Sets the width specifies the width of the outlines.
 
const xtd::forms::style_sheets::paddingpadding () const noexcept override
 Gets the area area around the content.
 
controlpadding (const xtd::forms::style_sheets::padding &value) noexcept
 Sets the area area around the content.
 
xtd::forms::style_sheets::shadows shadows () const noexcept override
 Gets an xtd::forms::style_sheets::shadow array used to draw shadows under the text.
 
controlshadows (const xtd::forms::style_sheets::shadows &value) noexcept
 Sets an xtd::forms::style_sheets::shadow array used to draw shadows under the text.
 
xtd::forms::content_alignment text_alignment () const noexcept override
 Gets the alignment of the text.
 
controltext_alignment (xtd::forms::content_alignment value) noexcept
 Sets the alignment of the text.
 
xtd::forms::style_sheets::text_transformation transformation () const noexcept override
 Gets the transformation of the text.
 
controltransformation (xtd::forms::style_sheets::text_transformation value) noexcept
 Sets the transformation of the text.
 
std::optional< xtd::forms::style_sheets::lengthwidth () const noexcept override
 Gets the width of the box.
 
controlwidth (std::optional< xtd::forms::style_sheets::length > value) noexcept
 Sets the width of the box.
 
xtd::forms::style_sheets::white_space white_space () const noexcept override
 Gets how white-space inside an element is handled.
 
controlwhite_space (xtd::forms::style_sheets::white_space value) noexcept
 Sets how white-space inside an element is handled.
 

Public Methods

bool equals (const control &other) const noexcept override
 
xtd::drawing::color get_solid_background_color () const noexcept
 Gets solid background color.
 
xtd::drawing::rectangle get_border_rectangle (const xtd::drawing::rectangle &bounds) const noexcept override
 Gets the border rectangle from the specified rectangle.
 
xtd::drawing::rectangle get_fill_rectangle (const xtd::drawing::rectangle &bounds) const noexcept override
 Gets the fill rectangle from the specified rectangle.
 
xtd::drawing::rectangle get_outline_rectangle (const xtd::drawing::rectangle &bounds) const noexcept override
 Gets the outline rectangle from the specified rectangle.
 
xtd::drawing::rectangle get_content_rectangle (const xtd::drawing::rectangle &bounds) const noexcept override
 Gets the content rectangle from the specified rectangle.
 
xtd::drawing::string_format make_string_format () const noexcept override
 Makes string format.
 
virtual bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object.
 
template<typename object_a_t , typename object_b_t >
static bool equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are considered equal.
 

Public Static Methods

static control create_control ()
 A factory to create control.
 

Additional Inherited Members

- Public Member Functions inherited from xtd::forms::style_sheets::ibox_model
- Public Member Functions inherited from xtd::forms::style_sheets::itext_model
- Public Member Functions inherited from xtd::forms::style_sheets::iimage_model
- Public Member Functions inherited from xtd::iequatable< control >
virtual bool equals (const control &) const noexcept=0
 Indicates whether the current object is equal to another object of the same type.
 
- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object.
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type.
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance.
 
template<typename object_t >
xtd::uptr< object_t > memberwise_clone () const
 Creates a shallow copy of the current object.
 
virtual xtd::string to_string () const noexcept
 Returns a xtd::string that represents the current object.
 
- Static Public Member Functions inherited from xtd::object
template<typename object_a_t , typename object_b_t >
static bool equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are considered equal.
 
template<typename object_a_t , typename object_b_t >
static bool reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 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]

bool xtd::forms::style_sheets::control::auto_ellipsis ( ) const
overridevirtualnoexcept

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]

control & xtd::forms::style_sheets::control::auto_ellipsis ( bool  value)
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]

const xtd::drawing::color & xtd::forms::style_sheets::control::background_color ( ) const
overridevirtualnoexcept

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]

control & xtd::forms::style_sheets::control::background_color ( const xtd::drawing::color value)
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]

const xtd::forms::style_sheets::background_image & xtd::forms::style_sheets::control::background_image ( ) const
overridevirtualnoexcept

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]

control & xtd::forms::style_sheets::control::background_image ( const xtd::forms::style_sheets::background_image value)
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]

const xtd::forms::style_sheets::border_color & xtd::forms::style_sheets::control::border_color ( ) const
overridevirtualnoexcept

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]

control & xtd::forms::style_sheets::control::border_color ( const xtd::forms::style_sheets::border_color value)
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]

xtd::forms::style_sheets::border_radius xtd::forms::style_sheets::control::border_radius ( ) const
overridevirtualnoexcept

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]

control & xtd::forms::style_sheets::control::border_radius ( const xtd::forms::style_sheets::border_radius value)
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]

xtd::forms::style_sheets::border_style xtd::forms::style_sheets::control::border_style ( ) const
overridevirtualnoexcept

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.

◆ border_style() [2/2]

control & xtd::forms::style_sheets::control::border_style ( xtd::forms::style_sheets::border_style  value)
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]

xtd::forms::style_sheets::border_width xtd::forms::style_sheets::control::border_width ( ) const
overridevirtualnoexcept

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]

control & xtd::forms::style_sheets::control::border_width ( xtd::forms::style_sheets::border_width  value)
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]

const xtd::drawing::color & xtd::forms::style_sheets::control::color ( ) const
overridevirtualnoexcept

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.

◆ color() [2/2]

control & xtd::forms::style_sheets::control::color ( const xtd::drawing::color value)
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]

xtd::forms::style_sheets::text_decoration xtd::forms::style_sheets::control::decoration ( ) const
overridevirtualnoexcept

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]

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

Sets the decoration of the text.

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

◆ font() [1/2]

const xtd::drawing::font & xtd::forms::style_sheets::control::font ( ) const
overridevirtualnoexcept

Gets the font of the text.

Returns
The font of the text.

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

◆ font() [2/2]

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

Sets the font of the text.

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

◆ height() [1/2]

std::optional< xtd::forms::style_sheets::length > xtd::forms::style_sheets::control::height ( ) const
overridevirtualnoexcept

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.

◆ height() [2/2]

control & xtd::forms::style_sheets::control::height ( const std::optional< xtd::forms::style_sheets::length > &  value)
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]

xtd::forms::content_alignment xtd::forms::style_sheets::control::image_alignment ( ) const
overridevirtualnoexcept

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]

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

Sets the alignment of the image.

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

◆ margin() [1/2]

const xtd::forms::style_sheets::margin & xtd::forms::style_sheets::control::margin ( ) const
overridevirtualnoexcept

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]

control & xtd::forms::style_sheets::control::margin ( const xtd::forms::style_sheets::margin value)
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]

const xtd::forms::style_sheets::outline_color & xtd::forms::style_sheets::control::outline_color ( ) const
overridevirtualnoexcept

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]

control & xtd::forms::style_sheets::control::outline_color ( const xtd::forms::style_sheets::outline_color value)
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]

xtd::forms::style_sheets::outline_offset xtd::forms::style_sheets::control::outline_offset ( ) const
overridevirtualnoexcept

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]

control & xtd::forms::style_sheets::control::outline_offset ( xtd::forms::style_sheets::outline_offset  value)
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]

xtd::forms::style_sheets::outline_radius xtd::forms::style_sheets::control::outline_radius ( ) const
overridevirtualnoexcept

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]

control & xtd::forms::style_sheets::control::outline_radius ( xtd::forms::style_sheets::outline_radius  value)
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]

xtd::forms::style_sheets::outline_style xtd::forms::style_sheets::control::outline_style ( ) const
overridevirtualnoexcept

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]

control & xtd::forms::style_sheets::control::outline_style ( xtd::forms::style_sheets::outline_style  value)
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]

xtd::forms::style_sheets::outline_width xtd::forms::style_sheets::control::outline_width ( ) const
overridevirtualnoexcept

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]

control & xtd::forms::style_sheets::control::outline_width ( xtd::forms::style_sheets::outline_width  value)
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]

const xtd::forms::style_sheets::padding & xtd::forms::style_sheets::control::padding ( ) const
overridevirtualnoexcept

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]

control & xtd::forms::style_sheets::control::padding ( const xtd::forms::style_sheets::padding value)
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]

xtd::forms::style_sheets::shadows xtd::forms::style_sheets::control::shadows ( ) const
overridevirtualnoexcept

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]

control & xtd::forms::style_sheets::control::shadows ( const xtd::forms::style_sheets::shadows value)
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]

xtd::forms::content_alignment xtd::forms::style_sheets::control::text_alignment ( ) const
overridevirtualnoexcept

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]

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

Sets the alignment of the text.

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

◆ transformation() [1/2]

xtd::forms::style_sheets::text_transformation xtd::forms::style_sheets::control::transformation ( ) const
overridevirtualnoexcept

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]

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

Sets the transformation of the text.

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

◆ width() [1/2]

std::optional< xtd::forms::style_sheets::length > xtd::forms::style_sheets::control::width ( ) const
overridevirtualnoexcept

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.

◆ width() [2/2]

control & xtd::forms::style_sheets::control::width ( std::optional< xtd::forms::style_sheets::length value)
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]

xtd::forms::style_sheets::white_space xtd::forms::style_sheets::control::white_space ( ) const
overridevirtualnoexcept

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]

control & xtd::forms::style_sheets::control::white_space ( xtd::forms::style_sheets::white_space  value)
noexcept

Sets how white-space inside an element is handled.

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

◆ get_solid_background_color()

xtd::drawing::color xtd::forms::style_sheets::control::get_solid_background_color ( ) const
noexcept

Gets solid background color.

Returns
The solid background color.

◆ get_border_rectangle()

xtd::drawing::rectangle xtd::forms::style_sheets::control::get_border_rectangle ( const xtd::drawing::rectangle bounds) const
overridevirtualnoexcept

Gets the border rectangle from the specified rectangle.

Returns
The border rectangle.

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

◆ get_fill_rectangle()

xtd::drawing::rectangle xtd::forms::style_sheets::control::get_fill_rectangle ( const xtd::drawing::rectangle bounds) const
overridevirtualnoexcept

Gets the fill rectangle from the specified rectangle.

Returns
The fill rectangle.

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

◆ get_outline_rectangle()

xtd::drawing::rectangle xtd::forms::style_sheets::control::get_outline_rectangle ( const xtd::drawing::rectangle bounds) const
overridevirtualnoexcept

Gets the outline rectangle from the specified rectangle.

Returns
The outline rectangle.

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

◆ get_content_rectangle()

xtd::drawing::rectangle xtd::forms::style_sheets::control::get_content_rectangle ( const xtd::drawing::rectangle bounds) const
overridevirtualnoexcept

Gets the content rectangle from the specified rectangle.

Returns
The content rectangle.

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

◆ make_string_format()

xtd::drawing::string_format xtd::forms::style_sheets::control::make_string_format ( ) const
overridevirtualnoexcept

Makes string format.

Returns
The string format.

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

◆ create_control()

static control xtd::forms::style_sheets::control::create_control ( )
inlinestatic

A factory to create control.

Returns
New control created.

◆ equals() [1/2]

virtual bool xtd::object::equals ( const object obj) const
virtualnoexcept

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.
Examples
The following code example compares the current instance with another object.
#include <xtd/console>
using namespace xtd;
auto main() -> int {
auto object1 = new_ptr<object>();
auto object2 = new_ptr<object>();
auto object3 = object2;
console::write_line(object1->equals(*object3));
console::write_line(*object1 == *object3);
object3 = object1;
console::write_line(object1->equals(*object3));
console::write_line(*object1 == *object3);
}
// This code produces the following output :
//
// false
// false
// true
// true
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10

Reimplemented from xtd::object.

◆ equals() [2/2]

template<typename object_a_t , typename object_b_t >
static bool xtd::object::equals ( const object_a_t &  object_a,
const object_b_t &  object_b 
)
inlinestaticnoexcept

Determines whether the specified object instances are considered equal.

Parameters
object_aThe first object to compare.
object_bThe second object to compare.
Returns
true if object_a is the same instance as object_b or if both are null references or if object_a(object_b) returns true. otherwise, false.
Examples
The following code example compares different objects.
#include <xtd/console>
using namespace xtd;
auto main() -> int {
string s1 = "Tom";
string s2 = "Carol";
console::write_line("object::equals(\"{0}\", \"{1}\") => {2}", s1, s2, object::equals(s1, s2));
s1 = "Tom";
s2 = "Tom";
console::write_line("object::equals(\"{0}\", \"{1}\") => {2}", s1, s2, object::equals(s1, s2));
s1 = "";
s2 = "Tom";
console::write_line("object::equals(\"{0}\", \"{1}\") => {2}", s1, s2, object::equals(s1, s2));
s1 = "Carol";
s2 = "";
console::write_line("object::equals(\"{0}\", \"{1}\") => {2}", s1, s2, object::equals(s1, s2));
s1 = "";
s2 = "";
console::write_line("object::equals(\"{0}\", \"{1}\") => {2}", s1, s2, object::equals(s1, s2));
}
// This code produces the following output :
//
// object::equals("Tom", "Carol") => false
// object::equals("Tom", "Tom") => true
// object::equals("", "Tom") => false
// object::equals("Carol", "") => false
// object::equals("", "") => true
virtual bool equals(const object &obj) const noexcept
Determines whether the specified object is equal to the current object.

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