Vuo 2.4.4
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
VuoUiThemeButtonRounded Class Reference

Description

A theme for button widgets, with the rounded style.

Definition at line 39 of file VuoUiThemeButtonRounded.cc.

Public Member Functions

 VuoUiThemeButtonRounded (VuoReal _minimumWidth, VuoReal _minimumHeight, VuoFont _labelFont, VuoAnchor _labelPosition, VuoPoint2d _labelPadding, VuoColor _labelColor, VuoColor _labelColorHovered, VuoColor _labelColorPressed, VuoColor _backgroundColor, VuoColor _backgroundColorHovered, VuoColor _backgroundColorPressed, VuoColor _borderColor, VuoColor _borderColorHovered, VuoColor _borderColorPressed, VuoReal _borderThickness, VuoReal _cornerRoundness)
 Creates a theme for button widgets, with the rounded style.
 
json_object * getJson ()
 Encodes the theme as a JSON object.
 
char * getSummary ()
 Returns a compact string representation of the theme.
 
bool operator== (const VuoSerializable &that)
 Returns true if both themes are of the same subtype, and their values are equal.
 
bool operator< (const VuoSerializable &that)
 Returns true if this theme sorts before that theme.
 
VuoLayer render (VuoRenderedLayers renderedLayers, VuoText label, VuoPoint2d position, VuoAnchor anchor, bool isHovered, bool isPressed)
 Creates a layer group representing a button with the specified theme and parameters.
 
- Public Member Functions inherited from VuoSerializable
std::string getType () const
 Returns this instance's specialized type.
 
 VuoSerializable ()
 Registers an instance of a VuoSerializable subclass with VuoHeap.
 
virtual ~VuoSerializable ()
 Does nothing.
 

Static Public Member Functions

static VuoSerializablemakeFromJson (json_object *js)
 Creates a rounded button theme from JSON.
 
- Static Public Member Functions inherited from VuoSerializable
static bool registerSubclass (std::string type, Constructor makeFromJson)
 Informs this base class of the presence of a subclass, so it can be instantiated from JSON.
 
static void destroy (void *t)
 Deletes an instance of a VuoSerializable subclass.
 
static VuoSerializablemakeFromJson (json_object *js)
 Creates an instance of a VuoSerializable subclass from JSON.
 

Static Public Attributes

static std::string type
 The subtype's class name.
 
- Static Public Attributes inherited from VuoSerializable
static std::string type = ""
 The subtype's class name.
 

Additional Inherited Members

- Public Types inherited from VuoSerializable
typedef VuoSerializable *(* Constructor) (json_object *)
 A makeFromJson method.
 

Constructor & Destructor Documentation

◆ VuoUiThemeButtonRounded()

VuoUiThemeButtonRounded::VuoUiThemeButtonRounded ( VuoReal  _minimumWidth,
VuoReal  _minimumHeight,
VuoFont  _labelFont,
VuoAnchor  _labelPosition,
VuoPoint2d  _labelPadding,
VuoColor  _labelColor,
VuoColor  _labelColorHovered,
VuoColor  _labelColorPressed,
VuoColor  _backgroundColor,
VuoColor  _backgroundColorHovered,
VuoColor  _backgroundColorPressed,
VuoColor  _borderColor,
VuoColor  _borderColorHovered,
VuoColor  _borderColorPressed,
VuoReal  _borderThickness,
VuoReal  _cornerRoundness 
)
inline

Creates a theme for button widgets, with the rounded style.

Definition at line 88 of file VuoUiThemeButtonRounded.cc.

◆ ~VuoUiThemeButtonRounded()

VuoUiThemeButtonRounded::~VuoUiThemeButtonRounded ( )
inline

Definition at line 123 of file VuoUiThemeButtonRounded.cc.

Member Function Documentation

◆ getJson()

json_object * VuoUiThemeButtonRounded::getJson ( )
inlinevirtual

Encodes the theme as a JSON object.

Reimplemented from VuoSerializable.

Definition at line 131 of file VuoUiThemeButtonRounded.cc.

◆ getSummary()

char * VuoUiThemeButtonRounded::getSummary ( )
inlinevirtual

Returns a compact string representation of the theme.

Implements VuoSerializable.

Definition at line 156 of file VuoUiThemeButtonRounded.cc.

◆ makeFromJson()

static VuoSerializable * VuoUiThemeButtonRounded::makeFromJson ( json_object *  js)
inlinestatic

Creates a rounded button theme from JSON.

Definition at line 65 of file VuoUiThemeButtonRounded.cc.

◆ operator<()

bool VuoUiThemeButtonRounded::operator< ( const VuoSerializable that)
inlinevirtual

Returns true if this theme sorts before that theme.

Implements VuoSerializable.

Definition at line 188 of file VuoUiThemeButtonRounded.cc.

◆ operator==()

bool VuoUiThemeButtonRounded::operator== ( const VuoSerializable that)
inlinevirtual

Returns true if both themes are of the same subtype, and their values are equal.

Implements VuoSerializable.

Definition at line 164 of file VuoUiThemeButtonRounded.cc.

◆ render()

VuoLayer VuoUiThemeButtonRounded::render ( VuoRenderedLayers  renderedLayers,
VuoText  label,
VuoPoint2d  position,
VuoAnchor  anchor,
bool  isHovered,
bool  isPressed 
)
inlinevirtual

Creates a layer group representing a button with the specified theme and parameters.

  • borderLayer — the outermost edge
  • backgroundLayer — inset from borderLayer; color changes when hovered or pressed
  • textLayer (optional) — label

Implements VuoUiThemeButton.

Definition at line 217 of file VuoUiThemeButtonRounded.cc.

Member Data Documentation

◆ type

std::string VuoUiThemeButtonRounded::type
static

The subtype's class name.

Definition at line 60 of file VuoUiThemeButtonRounded.cc.


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