xtd 0.2.0
Loading...
Searching...
No Matches
xtd::forms::style_sheets::ibox_model Class Referenceabstract
Inheritance diagram for xtd::forms::style_sheets::ibox_model:
xtd::interface xtd::forms::style_sheets::control

Definition

The box model allows you to specify the margin, borders, padding, background color, width and height of a box.

The box model allows you to specify the margin, borders, padding, background color,...
Definition ibox_model.h:45
#define interface_
This keyword is use to represent an interface.
Definition interface.h:58
Inheritance
xtd::interfacextd::forms::style_sheets::ibox_model
Header
#include <xtd/forms/style_sheets/ibox_model>
Namespace
xtd::forms::style_sheets
Library
xtd.forms
Remarks
This class is used by xtd::forms::style_sheets::box_renderer.
For more information, see Box Model.

Public Properties

virtual const xtd::drawing::colorbackground_color () const noexcept=0
 Gets the background color is used to add background effects to the box.
 
virtual const xtd::forms::style_sheets::background_imagebackground_image () const noexcept=0
 Gets the background image is used to add background effects to the box.
 
virtual const xtd::forms::style_sheets::border_colorborder_color () const noexcept=0
 Gets the color is used to set the color of the borders.
 
virtual xtd::forms::style_sheets::border_radius border_radius () const noexcept=0
 Gets the radius is used to add rounded borders to an element.
 
virtual xtd::forms::style_sheets::border_style border_style () const noexcept=0
 Gets the style specifies what kind of borders to display.
 
virtual xtd::forms::style_sheets::border_width border_width () const noexcept=0
 Gets the width specifies the width of the borders.
 
virtual std::optional< xtd::forms::style_sheets::lengthheight () const noexcept=0
 Gets the height of the box.
 
virtual const xtd::forms::style_sheets::marginmargin () const noexcept=0
 Gets the area outside the border.
 
virtual const xtd::forms::style_sheets::outline_coloroutline_color () const noexcept=0
 Gets the color is used to set the color of the outlines.
 
virtual xtd::forms::style_sheets::outline_offset outline_offset () const noexcept=0
 Gets the ofset specifies the width of the outlines.
 
virtual xtd::forms::style_sheets::outline_radius outline_radius () const noexcept=0
 Gets the radius is used to add rounded outline to an element.
 
virtual xtd::forms::style_sheets::outline_style outline_style () const noexcept=0
 Gets the style specifies what kind of outlines to display.
 
virtual xtd::forms::style_sheets::outline_width outline_width () const noexcept=0
 Gets the width specifies the width of the outlines.
 
virtual const xtd::forms::style_sheets::paddingpadding () const noexcept=0
 Gets the area area around the content.
 
virtual std::optional< xtd::forms::style_sheets::lengthwidth () const noexcept=0
 Gets the width of the box.
 

Public Methods

virtual xtd::drawing::rectangle get_border_rectangle (const xtd::drawing::rectangle &bounds) const noexcept=0
 Gets the computed boder rectangle from specified bounds.
 
virtual xtd::drawing::rectangle get_fill_rectangle (const xtd::drawing::rectangle &bounds) const noexcept=0
 Gets the computed fill rectangle from specified bounds.
 
virtual xtd::drawing::rectangle get_outline_rectangle (const xtd::drawing::rectangle &bounds) const noexcept=0
 Gets the computed outline rectangle from specified bounds.
 
virtual xtd::drawing::rectangle get_content_rectangle (const xtd::drawing::rectangle &bounds) const noexcept=0
 Gets the computed content rectangle from specified bounds.
 

Member Function Documentation

◆ background_color()

virtual const xtd::drawing::color & xtd::forms::style_sheets::ibox_model::background_color ( ) const
pure virtualnoexcept

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.

Implemented in xtd::forms::style_sheets::control.

◆ background_image()

virtual const xtd::forms::style_sheets::background_image & xtd::forms::style_sheets::ibox_model::background_image ( ) const
pure virtualnoexcept

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.

Implemented in xtd::forms::style_sheets::control.

◆ border_color()

virtual const xtd::forms::style_sheets::border_color & xtd::forms::style_sheets::ibox_model::border_color ( ) const
pure virtualnoexcept

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.

Implemented in xtd::forms::style_sheets::control.

◆ border_radius()

virtual xtd::forms::style_sheets::border_radius xtd::forms::style_sheets::ibox_model::border_radius ( ) const
pure virtualnoexcept

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.

Implemented in xtd::forms::style_sheets::control.

◆ border_style()

virtual xtd::forms::style_sheets::border_style xtd::forms::style_sheets::ibox_model::border_style ( ) const
pure virtualnoexcept

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.

Implemented in xtd::forms::style_sheets::control.

◆ border_width()

virtual xtd::forms::style_sheets::border_width xtd::forms::style_sheets::ibox_model::border_width ( ) const
pure virtualnoexcept

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.

Implemented in xtd::forms::style_sheets::control.

◆ height()

virtual std::optional< xtd::forms::style_sheets::length > xtd::forms::style_sheets::ibox_model::height ( ) const
pure virtualnoexcept

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.

Implemented in xtd::forms::style_sheets::control.

◆ margin()

virtual const xtd::forms::style_sheets::margin & xtd::forms::style_sheets::ibox_model::margin ( ) const
pure virtualnoexcept

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.

Implemented in xtd::forms::style_sheets::control.

◆ outline_color()

virtual const xtd::forms::style_sheets::outline_color & xtd::forms::style_sheets::ibox_model::outline_color ( ) const
pure virtualnoexcept

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.

Implemented in xtd::forms::style_sheets::control.

◆ outline_offset()

virtual xtd::forms::style_sheets::outline_offset xtd::forms::style_sheets::ibox_model::outline_offset ( ) const
pure virtualnoexcept

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.

Implemented in xtd::forms::style_sheets::control.

◆ outline_radius()

virtual xtd::forms::style_sheets::outline_radius xtd::forms::style_sheets::ibox_model::outline_radius ( ) const
pure virtualnoexcept

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.

Implemented in xtd::forms::style_sheets::control.

◆ outline_style()

virtual xtd::forms::style_sheets::outline_style xtd::forms::style_sheets::ibox_model::outline_style ( ) const
pure virtualnoexcept

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.

Implemented in xtd::forms::style_sheets::control.

◆ outline_width()

virtual xtd::forms::style_sheets::outline_width xtd::forms::style_sheets::ibox_model::outline_width ( ) const
pure virtualnoexcept

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.

Implemented in xtd::forms::style_sheets::control.

◆ padding()

virtual const xtd::forms::style_sheets::padding & xtd::forms::style_sheets::ibox_model::padding ( ) const
pure virtualnoexcept

Gets the area area around the content.

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

Implemented in xtd::forms::style_sheets::control.

◆ width()

virtual std::optional< xtd::forms::style_sheets::length > xtd::forms::style_sheets::ibox_model::width ( ) const
pure virtualnoexcept

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.

Implemented in xtd::forms::style_sheets::control.

◆ get_border_rectangle()

virtual xtd::drawing::rectangle xtd::forms::style_sheets::ibox_model::get_border_rectangle ( const xtd::drawing::rectangle bounds) const
pure virtualnoexcept

Gets the computed boder rectangle from specified bounds.

Parameters
boundsThe bounds use to compute the borfder rectangle with this box instance.
Returns
The computed boder rectangle from specified bounds.
Remarks
The border rectangle is euqual to bounds rectangle minus margin.

Implemented in xtd::forms::style_sheets::control.

◆ get_fill_rectangle()

virtual xtd::drawing::rectangle xtd::forms::style_sheets::ibox_model::get_fill_rectangle ( const xtd::drawing::rectangle bounds) const
pure virtualnoexcept

Gets the computed fill rectangle from specified bounds.

Parameters
boundsThe bounds use to compute the fill rectangle with this box instance.
Returns
The computed boder rectangle from specified bounds.
Remarks
The fill rectangle is euqual to border rectangle minus border width.
The fill rectangle is euqual to content rectangle plus padding.

Implemented in xtd::forms::style_sheets::control.

◆ get_outline_rectangle()

virtual xtd::drawing::rectangle xtd::forms::style_sheets::ibox_model::get_outline_rectangle ( const xtd::drawing::rectangle bounds) const
pure virtualnoexcept

Gets the computed outline rectangle from specified bounds.

Parameters
boundsThe bounds use to compute the outline rectangle with this box instance.
Returns
The computed boder rectangle from specified bounds.
Remarks
The outline rectangle is euqual to bounds rectangle minus margin + 1 + outline offset.

Implemented in xtd::forms::style_sheets::control.

◆ get_content_rectangle()

virtual xtd::drawing::rectangle xtd::forms::style_sheets::ibox_model::get_content_rectangle ( const xtd::drawing::rectangle bounds) const
pure virtualnoexcept

Gets the computed content rectangle from specified bounds.

Parameters
boundsThe bounds use to compute the content rectangle with this box instance.
Returns
The content boder rectangle from specified bounds.
Remarks
The content rectangle is euqual to fill rectangle minus padding.
The content rectangle is euqual to border rectangle minux border width minus padding.

Implemented in xtd::forms::style_sheets::control.


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