unity.scopes.ValueSliderLabels

Labels used by a ValueSliderFilter. More...

#include <unity/scopes/ValueSliderLabels.h>

Public Member Functions

 ValueSliderLabels (std::string const &min_label, std::string const &max_label)
 Create a ValueSliderLabels instance with labels for minimum and maximum values only. More...
 
 ValueSliderLabels (std::string const &min_label, std::string const &max_label, ValueLabelPairList const &extra_labels)
 Create a ValueSliderLabels instance with labels for minimum and maximum, as well as extra labels. More...
 
std::string min_label () const
 Get the label for the minimum value of the filter. More...
 
std::string max_label () const
 Get the label for the maximum value of the filter. More...
 
ValueLabelPairList extra_labels () const
 Get the labels for intermediate values of the filter.
 
Copy and assignment

Copy and assignment (move and non-move versions) have the usual value semantics.

 ValueSliderLabels (ValueSliderLabels const &other)
 
 ValueSliderLabels (ValueSliderLabels &&)
 
ValueSliderLabelsoperator= (ValueSliderLabels const &other)
 
ValueSliderLabelsoperator= (ValueSliderLabels &&)
 
 ~ValueSliderLabels ()
 

Detailed Description

Labels used by a ValueSliderFilter.

The ValueSliderLabels class holds labels for a ValueSliderFilter. Labels for the minimum and maximum values must be provided. In addition, an arbitrary number of extra labels can be defined; these labels mark intermediate values between the minimum and maximum value.

Constructor & Destructor Documentation

unity::scopes::ValueSliderLabels::ValueSliderLabels ( std::string const &  min_label,
std::string const &  max_label 
)

Create a ValueSliderLabels instance with labels for minimum and maximum values only.

Exceptions
unity::InvalidArgumentExceptionfor invalid (empty or duplicated) labels.
unity::scopes::ValueSliderLabels::ValueSliderLabels ( std::string const &  min_label,
std::string const &  max_label,
ValueLabelPairList const &  extra_labels 
)

Create a ValueSliderLabels instance with labels for minimum and maximum, as well as extra labels.

Note that any extra labels act only as a guidance for the user (i.e. they do not limit the available choices). The Unity shell is free to omit some or all of the labels depending on the available screen space.

Parameters
min_labelThe label for minimum value of the associated ValueSliderFilter filter.
max_labelThe label for maximum value of the associated ValueSliderFilter filter.
extra_labelsAdditional labels for values between minimum and maximum values.
Exceptions
unity::InvalidArgumentExceptionon invalid labels (empty or duplicate labels, non-increasing values).

Member Function Documentation

std::string unity::scopes::ValueSliderLabels::max_label ( ) const

Get the label for the maximum value of the filter.

Returns
The label for the maximum value
std::string unity::scopes::ValueSliderLabels::min_label ( ) const

Get the label for the minimum value of the filter.

Returns
The label for the minimum value