All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
MultiWidgets::LimitScaleOperator Class Reference

Limits the size of a widget, based on given pixel-values. More...

#include <MultiWidgets/LimitScaleOperator.hpp>

Inheritance diagram for MultiWidgets::LimitScaleOperator:
MultiWidgets::Operator Stylish::Styleable Valuable::Node Valuable::Attribute Patterns::NotCopyable Valuable::Serializable MultiWidgets::LimitScaleByParentOperator

Public Types

enum  Mode { COMPARE_DIAGONAL = 0, COMPARE_SCALE, COMPARE_MINIMUM_SIDE }
 Comparison mode for the operator. More...
 

Valuable Attributes

LimitScaleOperator::Mode compare-mode = mode
 Determines how the size of associated widget is calculated. More...
 
float grow-speed = growSpd
 Grow speed determines how fast the scale of the widget is corrected when growing its size. More...
 
float max-size-multiplier = maxSizeMultiplier
 With the help of this the effective maximum size is calculated. More...
 
float maximum-value = maxValue
 Maximum value for the associated widget. More...
 
float minimum-value = minValue
 Minimum value for the associated widget. More...
 
LimitScaleOperator::Mode parent-compare-mode = COMPARE_MINIMUM_SIDE
 Determines how to calculate the parent size. More...
 
int parent-depth = 0
 If value is greater than zero, we use size of the parent for limiting the scale of associated widget. More...
 
float parent-size-multiplier = 1.60000002F
 The multiplier for maximum size relative to parent. More...
 
float shrink-speed = shrinkSpd
 Shrink speed determines how fast the scale of the widget is corrected when shrinking it. More...
 
bool strict-maximum = true
 If strict maximum is set, the size is not allowed to grow over maximum even if the widget is being interacted with. More...
 
- Valuable Attributes inherited from MultiWidgets::Operator
bool done = false
 Is the operator done (i.e. More...
 
- Valuable Attributes inherited from Stylish::Styleable
QString css-class = ""
 Get the CSS classes of the Styleable as a space separated string. More...
 
QString css-id = ""
 Get the CSS id of the Styleable. More...
 
- Valuable Attributes inherited from Valuable::Node
Node::Uuid id = generateId()
 Returns the unique id. More...
 

Public Member Functions

Mode compareMode () const
 Determines how the size of associated widget is calculated. More...
 
float growSpeed () const
 Grow speed determines how fast the scale of the widget is corrected when growing its size. More...
 
bool hasStrictMaximum () const
 If strict maximum is set, the size is not allowed to grow over maximum even if the widget is being interacted with. More...
 
virtual bool isActive () const
 Returns true if operator is in the middle of correcting the scaling factor. More...
 
 LimitScaleOperator (Mode mode=COMPARE_SCALE, float minValue=0.5f, float maxValue=2.0f, float shrinkSpd=0.05f, float growSpd=10.0f, float maxSizeMultiplier=1.6f)
 Constructs a new operator. More...
 
float maximumSizeMultiplier () const
 With the help of this the effective maximum size is calculated. More...
 
float maximumValue () const
 Maximum value for the associated widget. More...
 
float minimumValue () const
 Minimum value for the associated widget. More...
 
Mode parentCompareMode () const
 Determines how to calculate the parent size. More...
 
int parentDepth () const
 If value is greater than zero, we use size of the parent for limiting the scale of associated widget. More...
 
float parentSizeMultiplier () const
 The multiplier for maximum size relative to parent. More...
 
void setCompareMode (Mode cmpMode)
 Setter for attribute compare-mode. More...
 
void setGrowSpeed (float growSpeed)
 Setter for attribute grow-speed. More...
 
void setMaximumSizeMultiplier (float multiplier)
 Setter for attribute max-size-multiplier. More...
 
void setMaximumValue (float maxValue)
 Setter for attribute maximum-value. More...
 
void setMinimumValue (float minValue)
 Setter for attribute minimum-value. More...
 
void setParentCompareMode (Mode cmpMode)
 Setter for attribute parent-compare-mode. More...
 
void setParentDepth (int depth)
 Setter for attribute parent-depth. More...
 
void setParentSizeMultiplier (float multiplier)
 Setter for attribute parent-size-multiplier. More...
 
void setShrinkSpeed (float shrinkSpeed)
 Setter for attribute shrink-speed. More...
 
void setStrictMaximum (bool enable)
 Setter for attribute strict-maximum. More...
 
float shrinkSpeed () const
 Shrink speed determines how fast the scale of the widget is corrected when shrinking it. More...
 
virtual void update (MultiWidgets::Widget &w, const MultiWidgets::FrameInfo &frameInfo)
 Perform operator logic. More...
 
- Public Member Functions inherited from MultiWidgets::Operator
virtual void added (MultiWidgets::Widget &w)
 Called when the operator is added to a widget. More...
 
virtual OperatorPtr clone () const
 Creates a copy of the operator. More...
 
virtual void input (MultiWidgets::Widget &w, MultiWidgets::GrabManager &gm, const MultiWidgets::TrackedObjects &trackedObjects, float dt)
 Perform the operator logic on input. More...
 
virtual void interactionBegin (MultiWidgets::Widget &w, MultiWidgets::GrabManager &gm)
 This function gets called when the Widget::interactionBegin is called for the widget this operator is attached to. More...
 
virtual void interactionEnd (MultiWidgets::Widget &w, MultiWidgets::GrabManager &gm)
 This function gets called when the Widget::interactionEnd is called for the widget this operator is attached to. More...
 
bool isDone () const
 Is the operator done (i.e. More...
 
 Operator ()
 Default constructor.
 
virtual void removed (MultiWidgets::Widget &w)
 Called when the operator is removed from the widget or the widget is deleted. More...
 
virtual void reset ()
 Resets the state of the operator. More...
 
virtual QByteArray type () const
 Returns the type id of the Operator. More...
 
virtual ~Operator ()
 Destructor.
 
- Public Member Functions inherited from Stylish::Styleable
void addCSSClass (const QString &s)
 Adds the Styleable to CSS class s. More...
 
void addCSSClasses (const QStringList &classes)
 Adds the Styleable to given CSS classes. More...
 
QString attributeSource (const QByteArray &name) const
 Gets CSS declaration source location based on the attribute name For example if this object has "size" attribute that is set from a CSS file, attributeSource("size") would return "filename.css:line". More...
 
const Style & childStyle () const
 Cached style that should be applied to all children of this object.
 
const Radiant::ArraySet
< QByteArray > & 
cssClasses () const
 Get the CSS classes of the Styleable in lowercase.
 
const QString & cssClassStr () const
 Get the CSS classes of the Styleable as a space separated string. More...
 
QString cssId () const
 Get the CSS id of the Styleable. More...
 
const QByteArray & cssType () const
 Get the CSS type of the Styleable.
 
bool hasCSSClass (const QByteArray &s) const
 Does the Styleable belong to given CSS class. More...
 
bool match (const SimpleSelector &ss, int *specificityOut=nullptr) const
 Checks if SimpleSelector matches this object. More...
 
bool pseudoClass (const QByteArray &name) const
 Query if the Styleable has pseudo class called name.
 
void removeCSSClass (const QString &s)
 Remove the Styleable from CSS class s. More...
 
void setCSSClasses (const QString &s)
 Set the CSS classes as a space separated list You almost always want to use addCSSClass instead of this one. More...
 
void setCSSId (const QString &s)
 Set the CSS id of the Styleable. More...
 
void setCSSType (const QByteArray &s)
 Set the CSS type of the Styleable.
 
virtual bool setProperty (Valuable::Attribute &var, const Valuable::StyleValue &value, Layer layer)
 Converts the given Stylish::Value to Valuable::Attribute.
 
void setPseudoClass (const QByteArray &name, bool state)
 Disable or enable pseudo class.
 
virtual bool setStyle (const Style &style)
 Applies a style to the object. More...
 
QString simpleSelector (bool includePseudoClasses=true) const
 Returns a CSS simple selector that matches this Styleable.
 
const Style & style () const
 Returns the style for this object.
 
 Styleable (const QByteArray &name="Styleable")
 Constructor for Styleable. More...
 
- Public Member Functions inherited from Valuable::Node
bool acceptsEvent (const QByteArray &messageId) const
 Returns true if this object accepts event 'id' in eventProcess.
 
bool addAttribute (Attribute *const attribute)
 Adds a new Attribute to the list of attribute objects. More...
 
bool addAttribute (const QByteArray &name, Attribute *const attribute)
 Adds a new Attribute to the list of attribute objects.
 
template<typename Widget >
bool addAttribute (const QByteArray &name, const Radiant::IntrusivePtr< Widget > &attribute)
 Adds a new Attribute to the list of attribute objects. More...
 
long addListener (const QByteArray &attribute, v8::Persistent< v8::Function > func, int role=Attribute::CHANGE_ROLE)
 Add a JavaScript attribute listener to attribute belonging this Node. More...
 
virtual Attributeattribute (const QByteArray &name) const
 Gets an Attribute with the given name. More...
 
template<typename T >
AttributeT< T > * attribute (const QByteArray &name) const
 Gets an Attribute with the given name. More...
 
const containerattributes () const
 
void clearValues (Layer layer)
 Clears all Attribute values of the given layer. More...
 
void debugDump ()
 Prints the contents of this Attribute to the terminal.
 
virtual bool deserialize (const ArchiveElement &element)
 De-serializes this object (and its children) from a DOM node.
 
void eventAddDeprecated (const QByteArray &deprecatedId, const QByteArray &newId)
 Register a deprecated event that is automatically converted to new event id and a warning is issued when it is used. More...
 
void eventAddIn (const QByteArray &messageId)
 Registers a new event that this class handles in eventProcess.
 
template<typename Widget >
long eventAddListener (const QByteArray &eventId, const QByteArray &messageId, Radiant::IntrusivePtr< Widget > &listener, ListenerType listenerType=DIRECT, const Radiant::BinaryData *defaultData=0)
 Add an event listener to this object. More...
 
long eventAddListener (const QByteArray &eventId, const QByteArray &messageId, Valuable::Node *listener, ListenerType listenerType=DIRECT, const Radiant::BinaryData *defaultData=0)
 Add an event listener to this object. More...
 
long eventAddListener (const QByteArray &eventId, ListenerFuncVoid func, ListenerType listenerType=DIRECT)
 Add an event listener to this object. More...
 
long eventAddListener (const QByteArray &eventId, Node *dstNode, ListenerFuncVoid func, ListenerType listenerType=DIRECT)
 
long eventAddListenerBd (const QByteArray &eventId, Node *dstNode, ListenerFuncBd func, ListenerType listenerType=DIRECT)
 
long eventAddListenerBd (const QByteArray &eventId, ListenerFuncBd func, ListenerType listenerType=DIRECT)
 Add an event listener to this object. More...
 
void eventAddOut (const QByteArray &eventId)
 Registers a new event this class can send with eventSend.
 
const QSet< QByteArray > & eventInNames () const
 Returns set of all registered IN events.
 
unsigned eventListenerCount () const
 Returns the number of event listeners.
 
const QSet< QByteArray > & eventOutNames () const
 Returns set of all registered OUT events.
 
void eventPassingEnable (bool enable)
 Control whether events are passed.
 
template<typename Widget >
int eventRemoveListener (Radiant::IntrusivePtr< Widget > &listener)
 Removes all events from this object to given listener. More...
 
template<typename Widget >
int eventRemoveListener (const QByteArray &eventId=QByteArray(), const QByteArray &messageId=QByteArray(), Radiant::IntrusivePtr< Widget > &listener=Radiant::IntrusivePtr< Widget >())
 Removes events from this object that match the parameters. More...
 
int eventRemoveListener (const QByteArray &eventId=QByteArray(), const QByteArray &messageId=QByteArray(), Valuable::Node *listener=0)
 Removes event listeners from this object. More...
 
int eventRemoveListener (Valuable::Node *listener)
 Removes all events from this object to given listener. More...
 
bool eventRemoveListener (long listenerId)
 Removes event listener with given id. More...
 
void eventSend (const QByteArray &eventId, Radiant::BinaryData &bd)
 Sends an event and bd to all listeners on this eventId.
 
void eventSend (const QByteArray &eventId)
 Sends an event to all listeners on this eventId.
 
template<typename P1 >
void eventSend (const QByteArray &eventId, const P1 &p1)
 Sends an event to all listeners on this eventId. More...
 
template<typename P1 , typename P2 >
void eventSend (const QByteArray &eventId, const P1 &p1, const P2 &p2)
 Sends an event to all listeners on this eventId. More...
 
template<typename P1 , typename P2 , typename P3 >
void eventSend (const QByteArray &eventId, const P1 &p1, const P2 &p2, const P3 &p3)
 Sends an event to all listeners on this eventId. More...
 
template<typename P1 , typename P2 , typename P3 , typename P4 >
void eventSend (const QByteArray &eventId, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4)
 Sends an event to all listeners on this eventId. More...
 
template<typename P1 , typename P2 , typename P3 , typename P4 , typename P5 >
void eventSend (const QByteArray &eventId, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5)
 Sends an event to all listeners on this eventId. More...
 
unsigned eventSourceCount () const
 Returns the number of event sources.
 
Uuid id () const
 Returns the unique id.
 
bool isBeingDestroyed () const
 Returns true if we are about to delete this object. More...
 
bool loadFromFileXML (const QString &filename)
 Reads this object (and its children) from an XML file.
 
bool loadFromMemoryXML (const QByteArray &buffer)
 Reads this object (and its children) from a memory buffer.
 
 Node (Node *host, const QByteArray &name="", bool transit=false)
 Constructs a new Node and adds it under the given host. More...
 
 Node (Node &&node)
 Moves a node, including all its attributes, events etc. More...
 
Nodeoperator= (Node &&node)
 Moves a node, replacing this. More...
 
virtual bool readElement (const ArchiveElement &element)
 Handles a serialization element that lacks automatic handlers. More...
 
void removeAttribute (Attribute *const attribute)
 Removes an Attribute from the list of attribute objects.
 
bool saveToFileXML (const QString &filename, unsigned int opts=SerializationOptions::DEFAULTS) const
 Saves this object (and its children) to an XML file.
 
bool saveToMemoryXML (QByteArray &buffer, unsigned int opts=SerializationOptions::DEFAULTS) const
 Saves this object (and its children) to binary data buffer.
 
virtual ArchiveElement serialize (Archive &doc) const
 Serializes this object (and its children) to a DOM node.
 
virtual void setAsDefaults ()
 Sets the current USER attribute value as the default value and clears the USER value. More...
 
void setId (Uuid newId)
 Sets the unique id. More...
 
template<class T >
bool setValue (const QByteArray &name, const T &v)
 Uses a query string to find a Attribute, and sets a new value to that if found. More...
 
bool setValue (const QByteArray &name, v8::Handle< v8::Value > v)
 Set attribute value from JavaScript. More...
 
- Public Member Functions inherited from Valuable::Attribute
long addListener (ListenerFunc func, int role=CHANGE_ROLE)
 Adds a listener that is invoked whenever the value is changed. More...
 
long addListener (Node *listener, ListenerFunc func, int role=CHANGE_ROLE)
 Adds a listener that is invoked whenever the value is changed. More...
 
long addListener (v8::Persistent< v8::Function > func, int role=CHANGE_ROLE)
 Adds a JavaScript listener that is invoked whenever the value is changed. More...
 
virtual float asFloat (bool *const ok=0, Layer layer=LAYER_CURRENT) const
 Converts the value object in a floating point number. More...
 
virtual int asInt (bool *const ok=0, Layer layer=LAYER_CURRENT) const
 Converts the value object in an integer. More...
 
virtual QString asString (bool *const ok=0, Layer layer=LAYER_CURRENT) const
 Converts the value object to a string. More...
 
 Attribute (const Attribute &o)
 Create a copy of the given Attribute WITHOUT the link to host, listeners, or the attribute name. More...
 
 Attribute (Node *host, const QByteArray &name, bool transit=false)
 Constructs a new value object and attaches it to its host. More...
 
virtual void clearValue (Layer layer)
 Unsets the value from a specific layer. More...
 
virtual void emitChange ()
 Invokes the change valueChanged function of all listeners.
 
virtual void eventProcess (const QByteArray &id, Radiant::BinaryData &data)
 Process a message. More...
 
void eventProcessFloat (const char *id, float v)
 Utility function for sending a float message to the object.
 
void eventProcessInt (const char *id, int v)
 Utility function for sending an int message to the object.
 
void eventProcessString (const char *id, const QString &str)
 Utility function for sending string message to the object.
 
void eventProcessString (const char *id, const char *str)
 Utility function for sending string message to the object.
 
void eventProcessVector2 (const char *id, Nimble::Vector2)
 Utility function for sending a Nimble::Vector2f message to the object.
 
void eventProcessVector3 (const char *id, Nimble::Vector3)
 Utility function for sending a Vector3 message to the object.
 
void eventProcessVector4 (const char *id, Nimble::Vector4)
 Utility function for sending a Vector4 message to the object.
 
virtual bool handleShorthand (const Valuable::StyleValue &value, Radiant::ArrayMap< Valuable::Attribute *, Valuable::StyleValue > &expanded)
 If attribute supports shorthand properties, this should be used to parse those. More...
 
Nodehost () const
 The host object of the value object (is any). More...
 
virtual bool isChanged () const
 
virtual bool isValueDefinedOnLayer (Layer layer) const
 Check if the given layer defines a value. More...
 
bool layerForSerialization (SerializationOptions flags, Layer &layer) const
 
const QByteArray & name () const
 Returns the name of the object.
 
const Attributeoperator= (const Attribute &)
 Create a copy of the given Attribute WITHOUT the link to host, listeners, or the attribute name. More...
 
AttributeownerShorthand () const
 
QByteArray path () const
 Returns the path (separated by '/'s) from the root.
 
void removeHost ()
 Sets the host pointer to zero and removes this object from the host. More...
 
bool removeListener (Node *listener, int role=ALL_ROLES)
 Removes a listener from the listener list. More...
 
bool removeListener (long id)
 Removes a listener from the listener list. More...
 
void removeListeners (int role=ALL_ROLES)
 Removes listeners from the listener list.
 
virtual bool set (float v, Layer layer=USER, ValueUnit unit=VU_UNKNOWN)
 Sets the value of the object.
 
virtual bool set (int v, Layer layer=USER, ValueUnit unit=VU_UNKNOWN)
 Sets the value of the object.
 
virtual bool set (const QString &v, Layer layer=USER, ValueUnit unit=VU_UNKNOWN)
 Sets the value of the object.
 
virtual bool set (const Nimble::Vector2f &v, Layer layer=USER, QList< ValueUnit > units=QList< ValueUnit >())
 Sets the value of the object.
 
virtual bool set (const Nimble::Vector3f &v, Layer layer=USER, QList< ValueUnit > units=QList< ValueUnit >())
 Sets the value of the object.
 
virtual bool set (const Nimble::Vector4f &v, Layer layer=USER, QList< ValueUnit > units=QList< ValueUnit >())
 Sets the value of the object.
 
virtual bool set (const StyleValue &value, Layer layer=USER)
 Sets the value of the object.
 
void setName (const QByteArray &s)
 Sets the name of the object.
 
void setOwnerShorthand (Attribute *owner)
 
- Public Member Functions inherited from Valuable::Serializable
virtual bool deserializeXML (const DOMElement &element)
 Deserializes (reads) this object from an XML element. More...
 
bool isSerializable () const
 
void setSerializable (bool v)
 

Additional Inherited Members

- Node Events inherited from Stylish::Styleable
[OUT] pseudo-class-changed (QString name, bool state)
 Pseudo class name was added (state == true) or removed (state == false)
 
- Static Public Member Functions inherited from MultiWidgets::Operator
static OperatorPtr create (const Valuable::ArchiveElement &element)
 Creates an operator by deserializing it from the archive.
 
- Protected Member Functions inherited from MultiWidgets::Operator
void setDone (bool done=true)
 Mark the Operator as done. More...
 
- Protected Attributes inherited from Stylish::Styleable
Style m_childStyle
 Cached style that should be applied to all children of this object.
 
Valuable::AttributeString m_cssClass
 CSS class of the object as a space separated list.
 
Valuable::AttributeString m_cssId
 CSS id of the object.
 
QByteArray m_cssType
 CSS type of the object.
 
Style m_style
 Currently applied style.
 

Detailed Description

Limits the size of a widget, based on given pixel-values.

This operator is used to prevent the user from making the widget too large or small. In fact it will allow the user to make the widget temporarily very large, but it will then shrink/enlarge the widget back to desired size.

There are three modes of operation:

When COMPARE_DIAGONAL is used, then the operator uses the diagonal of the widget as basic information. Thus you are basically limiting the maximum and minimum diagonal length of the widget.

When COMPARE_SCALE is used, then the operator uses the scale of the widget as basic information. Thus you are not limiting the actual visible size of the widget (which is determined by scale size), but only the scaling of the widget.

When COMPARE_MINIMUM_SIDE is used, the minimum of length and width is used.

The operator supports limiting the size by a maximum and minimum value (default) or by limiting the maximum size relative to an ancestor of the widget. This can be set with LimitScaleOperator::setParentDepth. The parent size calculation mode can be changed with LimitScaleOperator::setParentCompareMode

Member Enumeration Documentation

Comparison mode for the operator.

Enumerator
COMPARE_DIAGONAL 

"diagonal", Use the widget diagonal as the value to compare against

COMPARE_SCALE 

"scale", Use the widget scale as the value to compare against

COMPARE_MINIMUM_SIDE 

"minimum-side", Compare against shortest side

Constructor & Destructor Documentation

MultiWidgets::LimitScaleOperator::LimitScaleOperator ( Mode  mode = COMPARE_SCALE,
float  minValue = 0.5f,
float  maxValue = 2.0f,
float  shrinkSpd = 0.05f,
float  growSpd = 10.0f,
float  maxSizeMultiplier = 1.6f 
)
explicit

Constructs a new operator.

Parameters
modeoperation mode
minValueminimum value for the size, see LimitScaleOperator::Mode
maxValuemaximum value for the size
shrinkSpdspeed at which the widget will shrink
growSpdspeed at which the widget will grow
maxSizeMultipliermultiplies the maxValue to give absolute maximum size that is never exceeded

Member Function Documentation

LimitScaleOperator::Mode MultiWidgets::LimitScaleOperator::compareMode ( ) const

Determines how the size of associated widget is calculated.

See Also
setCompareMode
Returns
Current value of the compare-mode attribute
float MultiWidgets::LimitScaleOperator::growSpeed ( ) const

Grow speed determines how fast the scale of the widget is corrected when growing its size.

See Also
setGrowSpeed
Returns
Current value of the grow-speed attribute
bool MultiWidgets::LimitScaleOperator::hasStrictMaximum ( ) const

If strict maximum is set, the size is not allowed to grow over maximum even if the widget is being interacted with.

See Also
setStrictMaximum
Returns
Current value of the strict-maximum attribute
virtual bool MultiWidgets::LimitScaleOperator::isActive ( ) const
virtual

Returns true if operator is in the middle of correcting the scaling factor.

Returns
Is operator doing something for the associated widget at the moment

Reimplemented from MultiWidgets::Operator.

float MultiWidgets::LimitScaleOperator::maximumSizeMultiplier ( ) const

With the help of this the effective maximum size is calculated.

This value is used to multiply parent size or max-value depending on the value of parent-depth.

See Also
setMaximumSizeMultiplier
Returns
Current value of the max-size-multiplier attribute
float MultiWidgets::LimitScaleOperator::maximumValue ( ) const

Maximum value for the associated widget.

If parent-depth <= 0, this value is used in the calculation of the maximum size for the widget. Then the actual maximum size is (maximum-value * max-size-multiplier).

See Also
setMaximumValue
Returns
Current value of the maximum-value attribute
float MultiWidgets::LimitScaleOperator::minimumValue ( ) const

Minimum value for the associated widget.

Widget is grown to match this value if size is below this.

See Also
setMinimumValue
Returns
Current value of the minimum-value attribute
LimitScaleOperator::Mode MultiWidgets::LimitScaleOperator::parentCompareMode ( ) const

Determines how to calculate the parent size.

Only used if "parent-depth" is strictly positive.

See Also
setParentCompareMode
Returns
Current value of the parent-compare-mode attribute
int MultiWidgets::LimitScaleOperator::parentDepth ( ) const

If value is greater than zero, we use size of the parent for limiting the scale of associated widget.

If parent-depth equals n the comparisons are made against the size of the n-th parent of the widget. If value is lesser or equal to zero maximum-value is used in the calculations limiting the scale of the widget.

See Also
setParentDepth
Returns
Current value of the parent-depth attribute
float MultiWidgets::LimitScaleOperator::parentSizeMultiplier ( ) const

The multiplier for maximum size relative to parent.

Effective maximum size is (parent-size-multiplier * max-size-multiplier * parent-size). Only used if parent-depth > 0

See Also
setParentCompareMode
Returns
Current value of the parent-size-multiplier attribute
void MultiWidgets::LimitScaleOperator::setCompareMode ( Mode  cmpMode)

Setter for attribute compare-mode.

See Also
compareMode
Parameters
cmpModenew attribute value
void MultiWidgets::LimitScaleOperator::setGrowSpeed ( float  growSpeed)

Setter for attribute grow-speed.

See Also
growSpeed
Parameters
growSpeednew attribute value
void MultiWidgets::LimitScaleOperator::setMaximumSizeMultiplier ( float  multiplier)

Setter for attribute max-size-multiplier.

See Also
maximumSizeMultiplier
Parameters
multipliernew attribute value
void MultiWidgets::LimitScaleOperator::setMaximumValue ( float  maxValue)

Setter for attribute maximum-value.

See Also
maximumValue
Parameters
maxValuenew attribute value
void MultiWidgets::LimitScaleOperator::setMinimumValue ( float  minValue)

Setter for attribute minimum-value.

See Also
minimumValue
Parameters
minValuenew attribute value
void MultiWidgets::LimitScaleOperator::setParentCompareMode ( Mode  cmpMode)

Setter for attribute parent-compare-mode.

See Also
ParentCompareMode
Parameters
cmpModenew attribute value
void MultiWidgets::LimitScaleOperator::setParentDepth ( int  depth)

Setter for attribute parent-depth.

See Also
parentDepth
Parameters
depthnew attribute value
void MultiWidgets::LimitScaleOperator::setParentSizeMultiplier ( float  multiplier)

Setter for attribute parent-size-multiplier.

See Also
parentSizeMultiplier
Parameters
multipliernew attribute value
void MultiWidgets::LimitScaleOperator::setShrinkSpeed ( float  shrinkSpeed)

Setter for attribute shrink-speed.

See Also
shrinkSpeed
Parameters
shrinkSpeednew attribute value
void MultiWidgets::LimitScaleOperator::setStrictMaximum ( bool  enable)

Setter for attribute strict-maximum.

See Also
hasStrictMaximum
Parameters
enablenew attribute value
float MultiWidgets::LimitScaleOperator::shrinkSpeed ( ) const

Shrink speed determines how fast the scale of the widget is corrected when shrinking it.

See Also
setShrinkSpeed
Returns
Current value of the shrink-speed attribute
virtual void MultiWidgets::LimitScaleOperator::update ( MultiWidgets::Widget w,
const MultiWidgets::FrameInfo frameInfo 
)
virtual

Perform operator logic.

This function gets called from when the widget is updated

Parameters
wThe widget that is the target of the operator
frameInfoframe information

Reimplemented from MultiWidgets::Operator.