xtd 1.0.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.hpp:45
#define interface_
This keyword is use to represent an interface.
Definition interface.hpp: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 auto background_color () const noexcept -> const xtd::drawing::color &=0
 Gets the background color is used to add background effects to the box.
virtual auto background_image () const noexcept -> const xtd::forms::style_sheets::background_image &=0
 Gets the background image is used to add background effects to the box.
virtual auto border_color () const noexcept -> const xtd::forms::style_sheets::border_color &=0
 Gets the color is used to set the color of the borders.
virtual auto border_radius () const noexcept -> xtd::forms::style_sheets::border_radius=0
 Gets the radius is used to add rounded borders to an element.
virtual auto border_style () const noexcept -> xtd::forms::style_sheets::border_style=0
 Gets the style specifies what kind of borders to display.
virtual auto border_width () const noexcept -> xtd::forms::style_sheets::border_width=0
 Gets the width specifies the width of the borders.
virtual auto height () const noexcept -> std::optional< xtd::forms::style_sheets::length >=0
 Gets the height of the box.
virtual auto margin () const noexcept -> const xtd::forms::style_sheets::margin &=0
 Gets the area outside the border.
virtual auto outline_color () const noexcept -> const xtd::forms::style_sheets::outline_color &=0
 Gets the color is used to set the color of the outlines.
virtual auto outline_offset () const noexcept -> xtd::forms::style_sheets::outline_offset=0
 Gets the ofset specifies the width of the outlines.
virtual auto outline_radius () const noexcept -> xtd::forms::style_sheets::outline_radius=0
 Gets the radius is used to add rounded outline to an element.
virtual auto outline_style () const noexcept -> xtd::forms::style_sheets::outline_style=0
 Gets the style specifies what kind of outlines to display.
virtual auto outline_width () const noexcept -> xtd::forms::style_sheets::outline_width=0
 Gets the width specifies the width of the outlines.
virtual auto padding () const noexcept -> const xtd::forms::style_sheets::padding &=0
 Gets the area area around the content.
virtual auto width () const noexcept -> std::optional< xtd::forms::style_sheets::length >=0
 Gets the width of the box.

Public Methods

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

Member Function Documentation

◆ background_color()

virtual auto xtd::forms::style_sheets::ibox_model::background_color ( ) const -> const xtd::drawing::color &
nodiscardpure 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 auto xtd::forms::style_sheets::ibox_model::background_image ( ) const -> const xtd::forms::style_sheets::background_image &
nodiscardpure 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 auto xtd::forms::style_sheets::ibox_model::border_color ( ) const -> const xtd::forms::style_sheets::border_color &
nodiscardpure 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 auto xtd::forms::style_sheets::ibox_model::border_radius ( ) const -> xtd::forms::style_sheets::border_radius
nodiscardpure 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 auto xtd::forms::style_sheets::ibox_model::border_style ( ) const -> xtd::forms::style_sheets::border_style
nodiscardpure 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 auto xtd::forms::style_sheets::ibox_model::border_width ( ) const -> xtd::forms::style_sheets::border_width
nodiscardpure 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 auto xtd::forms::style_sheets::ibox_model::height ( ) const -> std::optional< xtd::forms::style_sheets::length >
nodiscardpure 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 auto xtd::forms::style_sheets::ibox_model::margin ( ) const -> const xtd::forms::style_sheets::margin &
nodiscardpure 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 auto xtd::forms::style_sheets::ibox_model::outline_color ( ) const -> const xtd::forms::style_sheets::outline_color &
nodiscardpure 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 auto xtd::forms::style_sheets::ibox_model::outline_offset ( ) const -> xtd::forms::style_sheets::outline_offset
nodiscardpure 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 auto xtd::forms::style_sheets::ibox_model::outline_radius ( ) const -> xtd::forms::style_sheets::outline_radius
nodiscardpure 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 auto xtd::forms::style_sheets::ibox_model::outline_style ( ) const -> xtd::forms::style_sheets::outline_style
nodiscardpure 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 auto xtd::forms::style_sheets::ibox_model::outline_width ( ) const -> xtd::forms::style_sheets::outline_width
nodiscardpure 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 auto xtd::forms::style_sheets::ibox_model::padding ( ) const -> const xtd::forms::style_sheets::padding &
nodiscardpure 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 auto xtd::forms::style_sheets::ibox_model::width ( ) const -> std::optional< xtd::forms::style_sheets::length >
nodiscardpure 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 auto xtd::forms::style_sheets::ibox_model::get_border_rectangle ( const xtd::drawing::rectangle & bounds) const -> xtd::drawing::rectangle
nodiscardpure 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 auto xtd::forms::style_sheets::ibox_model::get_fill_rectangle ( const xtd::drawing::rectangle & bounds) const -> xtd::drawing::rectangle
nodiscardpure 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 auto xtd::forms::style_sheets::ibox_model::get_outline_rectangle ( const xtd::drawing::rectangle & bounds) const -> xtd::drawing::rectangle
nodiscardpure 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 auto xtd::forms::style_sheets::ibox_model::get_content_rectangle ( const xtd::drawing::rectangle & bounds) const -> xtd::drawing::rectangle
nodiscardpure 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: