Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

CAUGuiLayeredPane Class Reference

Panes that can dynamically change. More...

#include <CAUGuiPane.h>

Inheritance diagram for CAUGuiLayeredPane:

CAUGuiPane CAUGuiCtrl CAUGuiItem List of all members.

Public Member Functions

 CAUGuiLayeredPane (CAUGuiMan *, eRect *, CAUGuiGraphic *)
 constructor

virtual ~CAUGuiLayeredPane ()
 destructor

virtual bool isControlRef (ControlRef theControl)
 traversing its "foreign controls" and nested children

virtual CAUGuiCtrlgetChild (ControlRef theControl)
 getting the requested Control object

virtual void draw (CGContextRef context, UInt32 portHeight)
 receives draws from CAUGuiControlHandler

virtual void mouseDown (Point *P, bool, bool)
 receives Mouse clicks from CAUGuiControlHandler

virtual void mouseTrack (Point *P, bool, bool)
 receives MouseTracking from CAUGuiControlHandler

virtual void mouseUp (Point *P, bool, bool)
 receives Mouse ups from CAUGuiControlHandler

virtual void idle ()
 the idle timer...

virtual void clip (bool drawing)
 draw a clipping region (either to prepare drawing or to not being overdrawn)

virtual void setLayer (int l)
 setting the current layer

virtual void showGroup (int l, bool visible)
 showing/hiding a group

virtual void addCtrl (CAUGuiCtrl *theCtrl, int theLayer)
 adding a Control to a specified layer

virtual void addCtrlToGroup (CAUGuiCtrl *theCtrl, int theGroup)
 adding a Control to a specified group

virtual void addCtrl (CAUGuiCtrl *theCtrl)
 adding a always-seen control

virtual void setOffset (SInt32 x, SInt32 y)
 this is used toconvert from relative coordinate space to window coordinate space while embedding the control

virtual void addBackground (CAUGuiGraphic *theBG, int theLayer)
 adding an optional background image to a layer

virtual void placeGroupLabel (CAUGuiGraphic *label, int group, int x, int y)
 adding a CAUGuiGraphic to a group at a specified coordinate


Protected Attributes

CAUGuiGraphiclayerBackGround [CAUGUI_PANE_MAX_LAYERS]
CAUGuiCtrlLayered [CAUGUI_PANE_MAX_LAYERS]
CAUGuiCtrlGrouped [CAUGUI_PANE_MAX_GROUPS]
CAUGuiLabelGroupLabels [CAUGUI_PANE_MAX_GROUPS]
int GroupState [CAUGUI_PANE_MAX_GROUPS]
int currentLayer

Detailed Description

Panes that can dynamically change.

First of all, Layeredpanes work exactly like a CAUGuiPane, but they provide means to dynamically change the GUI

Then, you can also embed controls upon layers. These layers can be switched.

All controls that are added the Pane-way (no layer specified) are available in all layers.

Controls added to a Layer are available (visible) only when that layer is active

Layers can have their own (optional) Background Graphics


Furthermore, there is a second mechanism that allows for altering the displayed content during runtime: Groups

Groups work much like layers but don't have their own background. Instead, each group can be switched active (visible) or not, independently from the current layer chosen. Multiple Groups can be visible at once

Groups utilize objects of class CAUGuiLabel to display graphics conditionally, for instance when naming of parameters change under certain circumstances. For convenience, you don't have to create CAUGuiLabels. You just pass the CAUGuiGraphic and the Pane automatically generates a label from it.


The common way to handle switching of Layers and Groups is to install callback functions to CAUGuiButton, CAUGuiSelector or CAUGuiDisplay

Definition at line 99 of file CAUGuiPane.h.


Constructor & Destructor Documentation

CAUGuiLayeredPane::CAUGuiLayeredPane CAUGuiMan ,
eRect ,
CAUGuiGraphic
 

constructor

Definition at line 113 of file CAUGuiPane.cpp.

References CAUGUI_PANE_MAX_GROUPS, CAUGUI_PANE_MAX_LAYERS, currentLayer, Grouped, GroupLabels, GroupState, kCAUGui_LayeredPane, layerBackGround, Layered, and CAUGuiItem::setType().

CAUGuiLayeredPane::~CAUGuiLayeredPane  )  [virtual]
 

destructor

Definition at line 142 of file CAUGuiPane.cpp.

References CAUGUI_PANE_MAX_GROUPS, CAUGUI_PANE_MAX_LAYERS, Grouped, GroupLabels, layerBackGround, and Layered.


Member Function Documentation

void CAUGuiLayeredPane::addBackground CAUGuiGraphic theBG,
int  theLayer
[virtual]
 

adding an optional background image to a layer

Definition at line 484 of file CAUGuiPane.cpp.

References CAUGUI_PANE_MAX_LAYERS, and layerBackGround.

virtual void CAUGuiLayeredPane::addCtrl CAUGuiCtrl theCtrl  )  [inline, virtual]
 

adding a always-seen control

Reimplemented from CAUGuiCtrl.

Definition at line 134 of file CAUGuiPane.h.

References CAUGuiCtrl::addCtrl().

void CAUGuiLayeredPane::addCtrl CAUGuiCtrl theCtrl,
int  theLayer
[virtual]
 

adding a Control to a specified layer

Definition at line 423 of file CAUGuiPane.cpp.

References CAUGuiMan::addCtrl(), CAUGuiItem::append(), CAUGUI_PANE_MAX_LAYERS, currentLayer, Layered, eRect::x, and eRect::y.

void CAUGuiLayeredPane::addCtrlToGroup CAUGuiCtrl theCtrl,
int  theGroup
[virtual]
 

adding a Control to a specified group

Definition at line 444 of file CAUGuiPane.cpp.

References CAUGuiMan::addCtrl(), CAUGuiItem::append(), CAUGUI_PANE_MAX_GROUPS, Grouped, eRect::x, and eRect::y.

void CAUGuiLayeredPane::clip bool  drawing  )  [virtual]
 

draw a clipping region (either to prepare drawing or to not being overdrawn)

Reimplemented from CAUGuiCtrl.

Definition at line 277 of file CAUGuiPane.cpp.

References CAUGUI_PANE_MAX_GROUPS, CAUGuiCtrl::clip(), currentLayer, CAUGuiCtrl::getBounds(), CAUGuiItem::getNext(), CAUGuiCtrl::getOpaque(), Grouped, GroupState, Layered, and eRect::to().

void CAUGuiLayeredPane::draw CGContextRef  context,
UInt32  portHeight
[virtual]
 

receives draws from CAUGuiControlHandler

Reimplemented from CAUGuiPane.

Definition at line 236 of file CAUGuiPane.cpp.

References CAUGUI_PANE_MAX_GROUPS, currentLayer, CAUGuiLabel::draw(), CAUGuiCtrl::getBounds(), CAUGuiGraphic::getImage(), CAUGuiItem::getNext(), GroupLabels, GroupState, layerBackGround, and eRect::set().

CAUGuiCtrl * CAUGuiLayeredPane::getChild ControlRef  theControl  )  [virtual]
 

getting the requested Control object

Reimplemented from CAUGuiPane.

Definition at line 163 of file CAUGuiPane.cpp.

References CAUGUI_PANE_MAX_GROUPS, currentLayer, CAUGuiPane::getChild(), CAUGuiCtrl::getChild(), CAUGuiItem::getNext(), Grouped, GroupState, CAUGuiCtrl::isControlRef(), and Layered.

void CAUGuiLayeredPane::idle  )  [virtual]
 

the idle timer...

Reimplemented from CAUGuiCtrl.

Definition at line 326 of file CAUGuiPane.cpp.

References CAUGUI_PANE_MAX_GROUPS, currentLayer, Grouped, GroupState, CAUGuiCtrl::idle(), and Layered.

bool CAUGuiLayeredPane::isControlRef ControlRef  theControl  )  [virtual]
 

traversing its "foreign controls" and nested children

Reimplemented from CAUGuiPane.

Definition at line 199 of file CAUGuiPane.cpp.

References CAUGUI_PANE_MAX_GROUPS, currentLayer, CAUGuiItem::getNext(), Grouped, GroupState, CAUGuiPane::isControlRef(), CAUGuiCtrl::isControlRef(), and Layered.

virtual void CAUGuiLayeredPane::mouseDown Point *  P,
bool  ,
bool 
[inline, virtual]
 

receives Mouse clicks from CAUGuiControlHandler

Parameters:
P the point where the mouse is, relative to control bounds
with_option is option key pressed?
with_shift is shift key pressed?
(Currently the status of modifiers is only tested on first click and then maintained over the whole interaction)

Reimplemented from CAUGuiPane.

Definition at line 113 of file CAUGuiPane.h.

virtual void CAUGuiLayeredPane::mouseTrack Point *  P,
bool  ,
bool 
[inline, virtual]
 

receives MouseTracking from CAUGuiControlHandler

Reimplemented from CAUGuiPane.

Definition at line 114 of file CAUGuiPane.h.

virtual void CAUGuiLayeredPane::mouseUp Point *  P,
bool  ,
bool 
[inline, virtual]
 

receives Mouse ups from CAUGuiControlHandler

Reimplemented from CAUGuiPane.

Definition at line 115 of file CAUGuiPane.h.

void CAUGuiLayeredPane::placeGroupLabel CAUGuiGraphic label,
int  group,
int  x,
int  y
[virtual]
 

adding a CAUGuiGraphic to a group at a specified coordinate

Definition at line 494 of file CAUGuiPane.cpp.

References CAUGuiItem::append(), GroupLabels, and CAUGuiCtrl::where.

void CAUGuiLayeredPane::setLayer int  l  )  [virtual]
 

setting the current layer

Definition at line 345 of file CAUGuiPane.cpp.

References CAUGUI_PANE_MAX_LAYERS, currentLayer, CAUGuiItem::getNext(), Layered, and CAUGuiCtrl::setVisible().

void CAUGuiLayeredPane::setOffset SInt32  x,
SInt32  y
[virtual]
 

this is used toconvert from relative coordinate space to window coordinate space while embedding the control

Reimplemented from CAUGuiCtrl.

Definition at line 465 of file CAUGuiPane.cpp.

References CAUGUI_PANE_MAX_LAYERS, CAUGuiItem::getNext(), Layered, and CAUGuiCtrl::setOffset().

void CAUGuiLayeredPane::showGroup int  l,
bool  visible
[virtual]
 

showing/hiding a group

Definition at line 379 of file CAUGuiPane.cpp.

References CAUGuiItem::getNext(), Grouped, GroupState, and CAUGuiCtrl::setVisible().


Member Data Documentation

int CAUGuiLayeredPane::currentLayer [protected]
 

Definition at line 150 of file CAUGuiPane.h.

Referenced by addCtrl(), CAUGuiLayeredPane(), clip(), draw(), getChild(), idle(), isControlRef(), and setLayer().

CAUGuiCtrl* CAUGuiLayeredPane::Grouped[ CAUGUI_PANE_MAX_GROUPS ] [protected]
 

Definition at line 147 of file CAUGuiPane.h.

Referenced by addCtrlToGroup(), CAUGuiLayeredPane(), clip(), getChild(), idle(), isControlRef(), showGroup(), and ~CAUGuiLayeredPane().

CAUGuiLabel* CAUGuiLayeredPane::GroupLabels[ CAUGUI_PANE_MAX_GROUPS ] [protected]
 

Definition at line 148 of file CAUGuiPane.h.

Referenced by CAUGuiLayeredPane(), draw(), placeGroupLabel(), and ~CAUGuiLayeredPane().

int CAUGuiLayeredPane::GroupState[ CAUGUI_PANE_MAX_GROUPS ] [protected]
 

Definition at line 149 of file CAUGuiPane.h.

Referenced by CAUGuiLayeredPane(), clip(), draw(), getChild(), idle(), isControlRef(), and showGroup().

CAUGuiGraphic* CAUGuiLayeredPane::layerBackGround[ CAUGUI_PANE_MAX_LAYERS ] [protected]
 

Definition at line 145 of file CAUGuiPane.h.

Referenced by addBackground(), CAUGuiLayeredPane(), draw(), and ~CAUGuiLayeredPane().

CAUGuiCtrl* CAUGuiLayeredPane::Layered[ CAUGUI_PANE_MAX_LAYERS ] [protected]
 

Definition at line 146 of file CAUGuiPane.h.

Referenced by addCtrl(), CAUGuiLayeredPane(), clip(), getChild(), idle(), isControlRef(), setLayer(), setOffset(), and ~CAUGuiLayeredPane().


The documentation for this class was generated from the following files:
(c) 2002 - 2003 by Urs Heckmann www.u-he.com
Generated on Thu May 6 15:13:15 2004 for CAUGui by doxygen 1.3.6