Smolgui
Immediate gui library based on SFML
Loading...
Searching...
No Matches
sgui::WidgetOptions Struct Reference

Store widget options : tooltip, position, description. More...

#include <Options.h>

Public Member Functions

 WidgetOptions ()=default
 WidgetOptions (const std::string &des, const Tooltip &t={}, const sf::Vector2f &d={})
 Full constructor, but with options if only description is required.
 WidgetOptions (const Tooltip &inf)
 When only a tooltip is needed.
 WidgetOptions (const sf::Vector2f disp)
 When only the relative displacement is needed.
 WidgetOptions (const WidgetAspect &a)
 To control widget appearance.

Public Attributes

bool horizontal = false
 Is widget horizontal or vertical ?
sf::Vector2f size = { 6.f, 1.f }
 For slider and progress bar.
sf::Vector2f displacement = {}
 To override automatic position.
std::string description = ""
 Widget description.
Tooltip tooltip = {}
 Tooltip specification.
WidgetAspect aspect = {}
 To control widget aspect.

Detailed Description

Store widget options : tooltip, position, description.

Constructor & Destructor Documentation

◆ WidgetOptions() [1/5]

sgui::WidgetOptions::WidgetOptions ( )
default

◆ WidgetOptions() [2/5]

sgui::WidgetOptions::WidgetOptions ( const std::string & des,
const Tooltip & t = {},
const sf::Vector2f & d = {} )
inline

Full constructor, but with options if only description is required.

◆ WidgetOptions() [3/5]

sgui::WidgetOptions::WidgetOptions ( const Tooltip & inf)
inline

When only a tooltip is needed.

◆ WidgetOptions() [4/5]

sgui::WidgetOptions::WidgetOptions ( const sf::Vector2f disp)
inline

When only the relative displacement is needed.

◆ WidgetOptions() [5/5]

sgui::WidgetOptions::WidgetOptions ( const WidgetAspect & a)
inline

To control widget appearance.

Member Data Documentation

◆ aspect

WidgetAspect sgui::WidgetOptions::aspect = {}

To control widget aspect.

◆ description

std::string sgui::WidgetOptions::description = ""

Widget description.

◆ displacement

sf::Vector2f sgui::WidgetOptions::displacement = {}

To override automatic position.

◆ horizontal

bool sgui::WidgetOptions::horizontal = false

Is widget horizontal or vertical ?

◆ size

sf::Vector2f sgui::WidgetOptions::size = { 6.f, 1.f }

For slider and progress bar.

◆ tooltip

Tooltip sgui::WidgetOptions::tooltip = {}

Tooltip specification.


The documentation for this struct was generated from the following file:
  • /github/workspace/src/sgui/Widgets/Options.h