Provides a modular tweak bar made of several TweakBarHandler. More...
#include <TweakBarManager.h>
Classes | |
struct | BarData |
A TweakBarHandler with additional options. More... | |
Public Member Functions | |
TweakBarManager (vector< BarData > bars, bool minimized=true) | |
Creates a new TweakBarManager. | |
virtual | ~TweakBarManager () |
Deletes this TweakBarManager. | |
ptr< EventHandler > | getNext () |
Returns the EventHandler to which the events not handled by this TweakBarManager must be forwarded. | |
void | setNext (ptr< EventHandler > next) |
Sets the EventHandler to which the events not handled by this TweakBarManager must be forwarded. | |
void | resetStates () |
Deactivates all the exclusive TweakBarHandler. | |
Protected Member Functions | |
TweakBarManager () | |
Creates an uninitialized TweakBarManager. | |
void | init (vector< BarData > bars, bool minimized=true) |
Initializes this TweakBarManager. | |
Private Member Functions | |
void | initBar () |
Initializes the tweak bar managed by this manager. | |
Private Attributes | |
TwBar * | selectBar |
The tweak bar managed by this TweakBarManager. | |
vector< BarData > | bars |
The TweakBarHandler managed by this TweakBarManager. | |
ptr< EventHandler > | next |
The EventHandler to which the events not handled by this TweakBarManager must be forwarded. | |
int | minimized |
True if the tweak bar must be initially minimized. | |
bool | initialized |
True if the tweak bar has been initialized. | |
bool | updated |
True if the tweak bar must be updated. |
Provides a modular tweak bar made of several TweakBarHandler.
Each TweakBarHandler provides controls to control and edit some aspects of a scene. Each TweakBarHandler can be activated or deactivated. The TweakBarHandler can be permanently active. If not, they can be mutually exclusive with other TweakBarHandler. In this case the TweakBarManager ensures that at most one such TweakBarHandler is active at the same time. A TweakBarManager is an EventHandler. The events are first sent to the tweak bar. Unhandled events are then forwarded to all active TweakBarHandler and then, if still unhandled, to an external EventHandler.
proland::TweakBarManager::TweakBarManager | ( | vector< BarData > | bars, | |
bool | minimized = true | |||
) |
Creates a new TweakBarManager.
bars | the TweakBarHandler managed by this manager. | |
minimized | true if the tweak bar must be initially minimized. |
virtual proland::TweakBarManager::~TweakBarManager | ( | ) | [virtual] |
Deletes this TweakBarManager.
proland::TweakBarManager::TweakBarManager | ( | ) | [protected] |
Creates an uninitialized TweakBarManager.
ptr<EventHandler> proland::TweakBarManager::getNext | ( | ) |
Returns the EventHandler to which the events not handled by this TweakBarManager must be forwarded.
void proland::TweakBarManager::init | ( | vector< BarData > | bars, | |
bool | minimized = true | |||
) | [protected] |
Initializes this TweakBarManager.
See TweakBarManager.
void proland::TweakBarManager::initBar | ( | ) | [private] |
Initializes the tweak bar managed by this manager.
This method clears the bar and calls TweakBarHandler::updateBar on each TweakBarHandler so that it can add its own controls to the bar.
void proland::TweakBarManager::resetStates | ( | ) |
Deactivates all the exclusive TweakBarHandler.
void proland::TweakBarManager::setNext | ( | ptr< EventHandler > | next | ) |
Sets the EventHandler to which the events not handled by this TweakBarManager must be forwarded.
an | EventHandler. |
vector<BarData> proland::TweakBarManager::bars [private] |
The TweakBarHandler managed by this TweakBarManager.
bool proland::TweakBarManager::initialized [private] |
True if the tweak bar has been initialized.
int proland::TweakBarManager::minimized [private] |
True if the tweak bar must be initially minimized.
ptr<EventHandler> proland::TweakBarManager::next [private] |
The EventHandler to which the events not handled by this TweakBarManager must be forwarded.
TwBar* proland::TweakBarManager::selectBar [private] |
The tweak bar managed by this TweakBarManager.
bool proland::TweakBarManager::updated [private] |
True if the tweak bar must be updated.