A TweakBarHandler to control a BasicViewHandler. More...
#include <TweakViewHandler.h>
Classes | |
class | Position |
A BasicViewHandler::Position together with a name and a shortcut key. More... | |
Public Member Functions | |
TweakViewHandler (ptr< BasicViewHandler > viewHandler, const vector< Position > &views, bool animate, bool active) | |
Creates a new TweakViewHandler. | |
virtual | ~TweakViewHandler () |
Deletes this TweakViewHandler. | |
Protected Member Functions | |
TweakViewHandler () | |
Creates an uninitialized TweakViewHandler. | |
virtual void | init (ptr< BasicViewHandler > viewHandler, const vector< Position > &views, bool animate, bool active) |
Initializes this TweakViewHandler. | |
virtual void | updateBar (TwBar *bar) |
Adds controls to the given tweak bar. | |
Private Attributes | |
ptr< BasicViewHandler > | viewHandler |
The BasicViewHandler to be controlled by this TweakViewHandler. | |
vector< Position > | views |
A list of predefined positions with names and shortcut keys. | |
bool | animate |
True to go smoothly to target positions, false to move instantly to them. |
A TweakBarHandler to control a BasicViewHandler.
This class provides tweak bar buttons corresponding to predefined positions, and allows the users to go instantly or smoothly to one of these predefined positions. Another button prints the current position.
proland::TweakViewHandler::TweakViewHandler | ( | ptr< BasicViewHandler > | viewHandler, | |
const vector< Position > & | views, | |||
bool | animate, | |||
bool | active | |||
) |
Creates a new TweakViewHandler.
viewHandler | the BasicViewHandler to be controlled by this TweakViewHandler. | |
views | a list of predefined positions with names and shortcut keys. | |
animate | true to go smoothly to target positions, false to move instantly to them. | |
active | true if this TweakBarHandler must be initialy active. |
virtual proland::TweakViewHandler::~TweakViewHandler | ( | ) | [virtual] |
Deletes this TweakViewHandler.
proland::TweakViewHandler::TweakViewHandler | ( | ) | [protected] |
Creates an uninitialized TweakViewHandler.
virtual void proland::TweakViewHandler::init | ( | ptr< BasicViewHandler > | viewHandler, | |
const vector< Position > & | views, | |||
bool | animate, | |||
bool | active | |||
) | [protected, virtual] |
Initializes this TweakViewHandler.
See TweakViewHandler.
virtual void proland::TweakViewHandler::updateBar | ( | TwBar * | bar | ) | [protected, virtual] |
Adds controls to the given tweak bar.
Implements proland::TweakBarHandler.
bool proland::TweakViewHandler::animate [private] |
True to go smoothly to target positions, false to move instantly to them.
ptr<BasicViewHandler> proland::TweakViewHandler::viewHandler [private] |
The BasicViewHandler to be controlled by this TweakViewHandler.
vector<Position> proland::TweakViewHandler::views [private] |
A list of predefined positions with names and shortcut keys.