Wt: Wt::WBorder Class Reference

Wt 4.10.4

Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
Wt::WBorder Class Reference
Style classes

A value class that defines the CSS border style of a widget. More...

`#include <Wt/WBorder.h>`

## Public Types
typedef BorderWidth | Width
| Typedef for enum Wt::BorderWidth.
typedef BorderStyle | Style
| Typedef for enum Wt::BorderStyle.

## Public Member Functions
| WBorder ()
| Creates a border indicating no border.
| WBorder (BorderStyle style, BorderWidth=BorderWidth::Medium, WColor color=WColor())
| Creates a border with given style, thickness and color.
| WBorder (BorderStyle style, const WLength &width, WColor color=WColor())
| Creates a border with an absolute width.
bool | operator== (const WBorder &other) const
| Comparison operator.
bool | operator!= (const WBorder &other) const
| Comparison operator.
void | setWidth (BorderWidth width, const WLength &explicitWidth=WLength::Auto)
| Sets the border width.
void | setColor (WColor color)
| Sets the border color.
void | setStyle (BorderStyle style)
| Sets the border style.
BorderWidth | width () const
| Returns the border width.
WLength | explicitWidth () const
| Returns the border width when set explicitly.
WColor | color () const
| Returns the border color.
BorderStyle | style () const
| Returns the border style.
std::string | cssText () const
| Returns the CSS text for this border style.

## Detailed Description

A value class that defines the CSS border style of a widget.

## Member Function Documentation

## ◆ color()

WColor Wt::WBorder::color | ( |  | ) | const

Returns the border color.

See also
  setColor()

## ◆ explicitWidth()

WLength Wt::WBorder::explicitWidth | ( |  | ) | const

Returns the border width when set explicitly.

See also
  setWidth()

## ◆ setWidth()

void Wt::WBorder::setWidth | ( | BorderWidth | width,
|  | const WLength & | explicitWidth = WLength::Auto )

Sets the border width.

If width == Explicit, then the width specified in `explicitWidth` is used.

## ◆ style()

BorderStyle Wt::WBorder::style | ( |  | ) | const

Returns the border style.

See also
  setStyle()

## ◆ width()

BorderWidth Wt::WBorder::width | ( |  | ) | const

Returns the border width.

See also
  setWidth()