Vuo  2.0.0
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
VuoUiThemeSliderRounded Class Reference

Description

A theme for slider widgets, with the rounded style.

Definition at line 49 of file VuoUiThemeSliderRounded.cc.

Public Member Functions

 VuoUiThemeSliderRounded (VuoFont _labelFont, VuoColor _labelColor, VuoColor _labelColorHovered, VuoReal _handleWidth, VuoReal _handleHeight, VuoReal _handleBorderThickness, VuoReal _handleCornerRoundness, VuoColor _handleColor, VuoColor _handleColorHovered, VuoColor _handleColorPressed, VuoColor _handleBorderColor, VuoColor _handleBorderColorHovered, VuoColor _handleBorderColorPressed, VuoReal _trackDepth, VuoReal _trackBorderThickness, VuoReal _trackCornerRoundness, VuoColor _activeTrackColor, VuoColor _activeTrackColorHovered, VuoColor _activeTrackBorderColor, VuoColor _activeTrackBorderColorHovered, VuoColor _inactiveTrackColor, VuoColor _inactiveTrackColorHovered, VuoColor _inactiveTrackBorderColor, VuoColor _inactiveTrackBorderColorHovered, VuoReal _marginBetweenTrackAndLabel)
 Creates a theme for slider widgets, with the rounded style. More...
 
json_objectgetJson ()
 Encodes the theme as a JSON object. More...
 
char * getSummary ()
 Returns a compact string representation of the theme. More...
 
bool operator== (const VuoSerializable &that)
 Returns true if both themes are of the same subtype, and their values are equal. More...
 
bool operator< (const VuoSerializable &that)
 Returns true if this theme sorts before that theme. More...
 
VuoLayer makeRoundedRectangleTrack (VuoText name, VuoColor background, VuoColor active, VuoPoint2d center, VuoReal rotation, VuoReal width, VuoReal height, VuoReal sharpness, VuoReal roundness, VuoOrientation orientation, VuoReal value)
 Create a rounded rectangle layer with a progress bar. More...
 
VuoLayer render (VuoRenderedLayers renderedLayers, VuoText label, VuoReal trackLength, VuoReal normalizedProgress, VuoPoint2d position, VuoAnchor anchor, VuoOrientation orientation, bool isHovered, bool isPressed)
 Creates a layer tree representing a slider track with the specified theme and parameters. More...
 
bool isPointInsideSliderHandle (VuoRenderedLayers renderedLayers, VuoReal trackLength, VuoReal normalizedProgress, VuoPoint2d position, VuoAnchor anchor, VuoOrientation orientation, VuoPoint2d pointToTest)
 Returns true if pointToTest is inside the drag handle. More...
 
VuoReal minimumTrackLength ()
 Returns the minimum length, in local Vuo Coordinates, that the track can be. More...
 
VuoReal handleMovementLength (VuoReal trackLength)
 Returns the length, in local Vuo Coordinates, that the drag handle can move. More...
 
- Public Member Functions inherited from VuoSerializable
std::string getType () const
 Returns this instance's specialized type. More...
 
 VuoSerializable ()
 Registers an instance of a VuoSerializable subclass with VuoHeap. More...
 
virtual ~VuoSerializable ()
 Does nothing. More...
 

Static Public Member Functions

static VuoSerializablemakeFromJson (json_object *js)
 Creates a rounded slider theme from JSON. More...
 
- 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. More...
 
static void destroy (void *t)
 Deletes an instance of a VuoSerializable subclass. More...
 
static VuoSerializablemakeFromJson (json_object *js)
 Creates an instance of a VuoSerializable subclass from JSON. More...
 

Static Public Attributes

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

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ VuoUiThemeSliderRounded()

VuoUiThemeSliderRounded::VuoUiThemeSliderRounded ( VuoFont  _labelFont,
VuoColor  _labelColor,
VuoColor  _labelColorHovered,
VuoReal  _handleWidth,
VuoReal  _handleHeight,
VuoReal  _handleBorderThickness,
VuoReal  _handleCornerRoundness,
VuoColor  _handleColor,
VuoColor  _handleColorHovered,
VuoColor  _handleColorPressed,
VuoColor  _handleBorderColor,
VuoColor  _handleBorderColorHovered,
VuoColor  _handleBorderColorPressed,
VuoReal  _trackDepth,
VuoReal  _trackBorderThickness,
VuoReal  _trackCornerRoundness,
VuoColor  _activeTrackColor,
VuoColor  _activeTrackColorHovered,
VuoColor  _activeTrackBorderColor,
VuoColor  _activeTrackBorderColorHovered,
VuoColor  _inactiveTrackColor,
VuoColor  _inactiveTrackColorHovered,
VuoColor  _inactiveTrackBorderColor,
VuoColor  _inactiveTrackBorderColorHovered,
VuoReal  _marginBetweenTrackAndLabel 
)
inline

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

Definition at line 135 of file VuoUiThemeSliderRounded.cc.

Member Function Documentation

◆ getJson()

json_object* VuoUiThemeSliderRounded::getJson ( )
inlinevirtual

Encodes the theme as a JSON object.

Reimplemented from VuoSerializable.

Definition at line 217 of file VuoUiThemeSliderRounded.cc.

◆ getSummary()

char* VuoUiThemeSliderRounded::getSummary ( )
inlinevirtual

Returns a compact string representation of the theme.

Implements VuoSerializable.

Definition at line 262 of file VuoUiThemeSliderRounded.cc.

◆ handleMovementLength()

VuoReal VuoUiThemeSliderRounded::handleMovementLength ( VuoReal  trackLength)
inlinevirtual

Returns the length, in local Vuo Coordinates, that the drag handle can move.

For the Rounded theme, the drag handle can move as far as the center point of the track's rounded corner arcs.

Implements VuoUiThemeSlider.

Definition at line 579 of file VuoUiThemeSliderRounded.cc.

◆ isPointInsideSliderHandle()

bool VuoUiThemeSliderRounded::isPointInsideSliderHandle ( VuoRenderedLayers  renderedLayers,
VuoReal  trackLength,
VuoReal  normalizedProgress,
VuoPoint2d  position,
VuoAnchor  anchor,
VuoOrientation  orientation,
VuoPoint2d  pointToTest 
)
inlinevirtual

Returns true if pointToTest is inside the drag handle.

Implements VuoUiThemeSlider.

Definition at line 542 of file VuoUiThemeSliderRounded.cc.

◆ makeFromJson()

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

Creates a rounded slider theme from JSON.

Definition at line 93 of file VuoUiThemeSliderRounded.cc.

◆ makeRoundedRectangleTrack()

VuoLayer VuoUiThemeSliderRounded::makeRoundedRectangleTrack ( VuoText  name,
VuoColor  background,
VuoColor  active,
VuoPoint2d  center,
VuoReal  rotation,
VuoReal  width,
VuoReal  height,
VuoReal  sharpness,
VuoReal  roundness,
VuoOrientation  orientation,
VuoReal  value 
)
inline

Create a rounded rectangle layer with a progress bar.

Definition at line 358 of file VuoUiThemeSliderRounded.cc.

◆ minimumTrackLength()

VuoReal VuoUiThemeSliderRounded::minimumTrackLength ( )
inlinevirtual

Returns the minimum length, in local Vuo Coordinates, that the track can be.

Implements VuoUiThemeSlider.

Definition at line 570 of file VuoUiThemeSliderRounded.cc.

◆ operator<()

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

Returns true if this theme sorts before that theme.

Implements VuoSerializable.

Definition at line 313 of file VuoUiThemeSliderRounded.cc.

◆ operator==()

bool VuoUiThemeSliderRounded::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 270 of file VuoUiThemeSliderRounded.cc.

◆ render()

VuoLayer VuoUiThemeSliderRounded::render ( VuoRenderedLayers  renderedLayers,
VuoText  label,
VuoReal  trackLength,
VuoReal  normalizedProgress,
VuoPoint2d  position,
VuoAnchor  anchor,
VuoOrientation  orientation,
bool  isHovered,
bool  isPressed 
)
inlinevirtual

Creates a layer tree representing a slider track with the specified theme and parameters.

Implements VuoUiThemeSlider.

Definition at line 393 of file VuoUiThemeSliderRounded.cc.

Member Data Documentation

◆ type

std::string VuoUiThemeSliderRounded::type
static

The subtype's class name.

Definition at line 88 of file VuoUiThemeSliderRounded.cc.


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