MIRA
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
IndexSelectorProperty< Transparent > Class Template Reference

A special property class that can be used to provide a mechanism for selecting an element by index from data representing a set of similar objects. More...

#include <visualization/IndexSelectorProperty.h>

Inheritance diagram for IndexSelectorProperty< Transparent >:
Inheritance graph
[legend]

Public Member Functions

 IndexSelectorProperty (boost::function< void()> callback)
 
template<typename Class >
 IndexSelectorProperty (void(Class::*f)(), Class *obj)
 
template<typename Reflector >
void reflect (Reflector &r)
 
int index ()
 
void setWrapIndex (unsigned int wrap)
 Dynamically set the first invalid index, usually according to the visualized data itself (once it is known). More...
 

Protected Member Functions

void wrapIndex ()
 
void setIndex (int index)
 

Protected Attributes

int mIndex
 
int mWrapIndex
 
boost::function< void()> mNotifyChange
 

Detailed Description

template<bool Transparent = true>
class mira::IndexSelectorProperty< Transparent >

A special property class that can be used to provide a mechanism for selecting an element by index from data representing a set of similar objects.

The property is initialized with a callback function, which is called on any property change (thus allowing instant redraw).

Template Parameters
TransparentControls the appearance in the property editor. If true, an editor spinbox appears inline. If false, this property creates an expandable node with an Index property. Subclasses adding further properties must derive from the Transparent=false specialization.

Constructor & Destructor Documentation

◆ IndexSelectorProperty() [1/2]

IndexSelectorProperty ( boost::function< void()>  callback)
inline

◆ IndexSelectorProperty() [2/2]

IndexSelectorProperty ( void(Class::*)()  f,
Class obj 
)
inline

Member Function Documentation

◆ reflect()

void reflect ( Reflector &  r)
inline

◆ index()

int index ( )
inlineinherited

◆ setWrapIndex()

void setWrapIndex ( unsigned int  wrap)
inherited

Dynamically set the first invalid index, usually according to the visualized data itself (once it is known).

Adapts the currently selected index, but does not trigger a redraw itself, so it is safe to call this from within the drawing method, then use the (wrapped) index for actual drawing.

◆ wrapIndex()

void wrapIndex ( )
protectedinherited

◆ setIndex()

void setIndex ( int  index)
protectedinherited

Member Data Documentation

◆ mIndex

int mIndex
protectedinherited

◆ mWrapIndex

int mWrapIndex
protectedinherited

◆ mNotifyChange

boost::function< void()> mNotifyChange
protectedinherited

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