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

CAUGuiPane Class Reference

CAUGuiPane represents a Container into which Controls can be embedded. More...

#include <CAUGuiPane.h>

Inheritance diagram for CAUGuiPane:

CAUGuiCtrl CAUGuiItem CAUGuiLayeredPane List of all members.

Public Member Functions

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

virtual ~CAUGuiPane ()
 destructor

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

virtual CAUGuiCtrlgetChild (ControlRef theControl)
 getting the requested Control object

virtual bool providesForeignControls ()
 true, 2 1x1 pixel CarbonControls

virtual void initForeignControls (ControlDefSpec &ControlSpec)
 setting them up

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


Protected Attributes

CAUGuiGraphicBackGround
ControlRef upperLeft
ControlRef lowerRight

Detailed Description

CAUGuiPane represents a Container into which Controls can be embedded.

The basic function of a Pane is to provide a background image.

Nesting Controls happens in Pane-relative coordinate space to make GUI layout more comfortable.

Technically it is a hack, because they embed two 1x1 pixel sized CarbonControls in mCarbonPane. Since AUCarbonView doesn't provide means to embed Controls in other Controls than mCarbonPane and I didn't want to alter Apple's base classes (or derive/overwrite any of them), I use this hack and it works good so far. So, Control objects nested in Panes are not physically nested on the CarbonControl side of things.

Definition at line 34 of file CAUGuiPane.h.


Constructor & Destructor Documentation

CAUGuiPane::CAUGuiPane CAUGuiMan ,
eRect ,
CAUGuiGraphic
 

constructor

Definition at line 12 of file CAUGuiPane.cpp.

References kCAUGui_Pane, lowerRight, CAUGuiCtrl::setTolerance(), CAUGuiItem::setType(), and upperLeft.

CAUGuiPane::~CAUGuiPane  )  [virtual]
 

destructor

Definition at line 33 of file CAUGuiPane.cpp.


Member Function Documentation

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

receives draws from CAUGuiControlHandler

Reimplemented from CAUGuiCtrl.

Reimplemented in CAUGuiLayeredPane.

Definition at line 97 of file CAUGuiPane.cpp.

References CAUGuiCtrl::getBounds(), and CAUGuiGraphic::getImage().

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

getting the requested Control object

Reimplemented from CAUGuiCtrl.

Reimplemented in CAUGuiLayeredPane.

Definition at line 50 of file CAUGuiPane.cpp.

References CAUGuiCtrl::getChild(), lowerRight, and upperLeft.

Referenced by CAUGuiLayeredPane::getChild().

void CAUGuiPane::initForeignControls ControlDefSpec &  ControlSpec  )  [virtual]
 

setting them up

Reimplemented from CAUGuiCtrl.

Definition at line 59 of file CAUGuiPane.cpp.

References CAUGuiMan::getAUCarbonViewBase(), CAUGuiCtrl::getBounds(), CAUGuiCtrl::getCAUGuiMan(), lowerRight, CAUGuiCtrl::setOpaque(), and upperLeft.

bool CAUGuiPane::isControlRef ControlRef  theControl  )  [virtual]
 

traversing its "foreign controls" and nested children

Reimplemented from CAUGuiCtrl.

Reimplemented in CAUGuiLayeredPane.

Definition at line 40 of file CAUGuiPane.cpp.

References CAUGuiCtrl::isControlRef(), lowerRight, and upperLeft.

Referenced by CAUGuiLayeredPane::isControlRef().

virtual void CAUGuiPane::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 CAUGuiCtrl.

Reimplemented in CAUGuiLayeredPane.

Definition at line 57 of file CAUGuiPane.h.

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

receives MouseTracking from CAUGuiControlHandler

Reimplemented from CAUGuiCtrl.

Reimplemented in CAUGuiLayeredPane.

Definition at line 58 of file CAUGuiPane.h.

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

receives Mouse ups from CAUGuiControlHandler

Reimplemented from CAUGuiCtrl.

Reimplemented in CAUGuiLayeredPane.

Definition at line 59 of file CAUGuiPane.h.

virtual bool CAUGuiPane::providesForeignControls  )  [inline, virtual]
 

true, 2 1x1 pixel CarbonControls

Reimplemented from CAUGuiCtrl.

Definition at line 51 of file CAUGuiPane.h.


Member Data Documentation

CAUGuiGraphic* CAUGuiPane::BackGround [protected]
 

Definition at line 63 of file CAUGuiPane.h.

ControlRef CAUGuiPane::lowerRight [protected]
 

Definition at line 65 of file CAUGuiPane.h.

Referenced by CAUGuiPane(), getChild(), initForeignControls(), and isControlRef().

ControlRef CAUGuiPane::upperLeft [protected]
 

Definition at line 64 of file CAUGuiPane.h.

Referenced by CAUGuiPane(), getChild(), initForeignControls(), and isControlRef().


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