proland::TweakBarManager Class Reference
[twbar]

Provides a modular tweak bar made of several TweakBarHandler. More...

#include <TweakBarManager.h>

List of all members.

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< BarDatabars
 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.

Detailed Description

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.

Authors:
Eric Bruneton, Antoine Begault

Constructor & Destructor Documentation

proland::TweakBarManager::TweakBarManager ( vector< BarData bars,
bool  minimized = true 
)

Creates a new TweakBarManager.

Parameters:
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.


Member Function Documentation

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.

Parameters:
an EventHandler.

Member Data Documentation

The TweakBarHandler managed by this TweakBarManager.

True if the tweak bar has been initialized.

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.

The tweak bar managed by this TweakBarManager.

True if the tweak bar must be updated.


Generated on Sat May 12 09:41:39 2012 for proland by  doxygen 1.6.1