Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

CAUCarbonViewNib Class Reference

This class implements a GUI pane initialized from a nib file. More...

#include <AUCarbonViewNib.h>

Inheritance diagram for CAUCarbonViewNib:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 CAUCarbonViewNib (AudioUnitCarbonView inInstance)
 ~CAUCarbonViewNib ()
virtual CFStringRef GetBundleID ()=0
 Must be overriden to return the AU bundle ID.

virtual CFStringRef GetWindowNibName ()
 Name of main nib file (default = "window").

virtual CFStringRef GetWindowCompositingName ()
 Name of window for compositing window (default = "windowCompositing").

virtual CFStringRef GetWindowNoCompositingName ()
 Name of window for non compositing window (default = "window").

virtual bool HasBackgroundPict ()
 Override to return false if the GUI has no background.

virtual CFStringRef GetBackgroundFilename ()
 Name of the background file (default = "AUBackground.png").

virtual CFStringRef GetAboutFilename ()
 Name of the about file (default = "about.png").

virtual CFStringRef GetTextBackgroundFilename ()
 Name of the background image to use for text field (default = 0 = no image).

virtual CFStringRef GetFontname ()
 Name of the font to use for text field (default = 0 = default font).

virtual int GetFontsize ()
 Size of the font to use for text field (default = 12).

virtual bool PatchEraseRect ()
 Override to return false if the GUI has a background and no Apple standard control.

virtual bool HasTimer ()
 Override to return false if you don't need the "idle" method.

virtual float TimerResolution ()
 Timer resolution in ms (default = 50).

virtual void Idle ()
 virtual method called every "TimerResolution()" ms

OSStatus CreateUI (Float32, Float32)
 Create the AU GUI.

virtual void InitWindow (CFBundleRef sBundle)
 Override to implement special action before the GUI pane is constructed (like registering custom controls).

virtual void FinishWindow (CFBundleRef sBundle)
 Override to implement special action after the GUI pane is constructed.

virtual bool HandleCommand (EventRef inEvent, HICommandExtended &cmd)
 Handle application commands.

bool HandleEvent (EventRef event)
 We handle any clicks in the root user pane just like they are handled in the AUCarbonViewBase class, namely by resetting keyboard focus.

virtual CGImageRef GetBackgroundImage ()
virtual void GetPaneBounds (Rect *rect)

Protected Member Functions

virtual int SwitchPane (int paneID, int paneNumber)
virtual void BindPane (HIViewRef thePane)
 Bind all the controls embedded the pane to their associated parameters.

virtual void BuildMultiPane (HIViewRef control)
 Populate the multipane "control", according to its title and its min,max.

virtual void BuildDynamicViews (HIViewRef control)
 Build all multipanes (kAUPanelControlSignature, x) contained if the pane.

bool WindowHasCompositing ()
 Test if the carbon window has the compositing attribute.


Protected Attributes

CQDProcs mProcs
CQDProcs * mCurrentProcsPtr
CGImageRef mBackgroundImage
CFStringRef mBundleID
CFBundleRef mBundleRef
HIViewRef mRootUserPane
EventLoopTimerRef mTimer

Detailed Description

This class implements a GUI pane initialized from a nib file.

Your GUI class must inherit from CAUCarbonViewNib in order to automatically load your ".nib" file. Then a few methods have to or can be overridden to customize the standard behaviors.

There are some rules to respect when you are contructing your ".nib" window :


Constructor & Destructor Documentation

CAUCarbonViewNib::CAUCarbonViewNib AudioUnitCarbonView  inInstance  ) 
 

CAUCarbonViewNib::~CAUCarbonViewNib  ) 
 


Member Function Documentation

void CAUCarbonViewNib::BindPane HIViewRef  thePane  )  [protected, virtual]
 

Bind all the controls embedded the pane to their associated parameters.

void CAUCarbonViewNib::BuildDynamicViews HIViewRef  control  )  [protected, virtual]
 

Build all multipanes (kAUPanelControlSignature, x) contained if the pane.

void CAUCarbonViewNib::BuildMultiPane HIViewRef  control  )  [protected, virtual]
 

Populate the multipane "control", according to its title and its min,max.

OSStatus CAUCarbonViewNib::CreateUI Float32  ,
Float32 
 

Create the AU GUI.

void CAUCarbonViewNib::FinishWindow CFBundleRef  sBundle  )  [virtual]
 

Override to implement special action after the GUI pane is constructed.

Reimplemented in CAUGuiDemoAUView.

virtual CFStringRef CAUCarbonViewNib::GetAboutFilename  )  [inline, virtual]
 

Name of the about file (default = "about.png").

virtual CFStringRef CAUCarbonViewNib::GetBackgroundFilename  )  [inline, virtual]
 

Name of the background file (default = "AUBackground.png").

virtual CGImageRef CAUCarbonViewNib::GetBackgroundImage  )  [inline, virtual]
 

virtual CFStringRef CAUCarbonViewNib::GetBundleID  )  [pure virtual]
 

Must be overriden to return the AU bundle ID.

Implemented in CAUGuiDemoAUView.

virtual CFStringRef CAUCarbonViewNib::GetFontname  )  [inline, virtual]
 

Name of the font to use for text field (default = 0 = default font).

virtual int CAUCarbonViewNib::GetFontsize  )  [inline, virtual]
 

Size of the font to use for text field (default = 12).

void CAUCarbonViewNib::GetPaneBounds Rect *  rect  )  [virtual]
 

virtual CFStringRef CAUCarbonViewNib::GetTextBackgroundFilename  )  [inline, virtual]
 

Name of the background image to use for text field (default = 0 = no image).

virtual CFStringRef CAUCarbonViewNib::GetWindowCompositingName  )  [inline, virtual]
 

Name of window for compositing window (default = "windowCompositing").

virtual CFStringRef CAUCarbonViewNib::GetWindowNibName  )  [inline, virtual]
 

Name of main nib file (default = "window").

virtual CFStringRef CAUCarbonViewNib::GetWindowNoCompositingName  )  [inline, virtual]
 

Name of window for non compositing window (default = "window").

virtual bool CAUCarbonViewNib::HandleCommand EventRef  inEvent,
HICommandExtended &  cmd
[inline, virtual]
 

Handle application commands.

bool CAUCarbonViewNib::HandleEvent EventRef  event  ) 
 

We handle any clicks in the root user pane just like they are handled in the AUCarbonViewBase class, namely by resetting keyboard focus.

This is done because our user pane completely covers up the actual root pane, mCarbonPane, which AUCarbonViewBase is watching for clicks on.

virtual bool CAUCarbonViewNib::HasBackgroundPict  )  [inline, virtual]
 

Override to return false if the GUI has no background.

virtual bool CAUCarbonViewNib::HasTimer  )  [inline, virtual]
 

Override to return false if you don't need the "idle" method.

virtual void CAUCarbonViewNib::Idle  )  [inline, virtual]
 

virtual method called every "TimerResolution()" ms

Reimplemented in CAUGuiDemoAUView.

void CAUCarbonViewNib::InitWindow CFBundleRef  sBundle  )  [virtual]
 

Override to implement special action before the GUI pane is constructed (like registering custom controls).

Reimplemented in CAUGuiDemoAUView.

virtual bool CAUCarbonViewNib::PatchEraseRect  )  [inline, virtual]
 

Override to return false if the GUI has a background and no Apple standard control.

Reimplemented in CAUGuiDemoAUView.

int CAUCarbonViewNib::SwitchPane int  paneID,
int  paneNumber
[protected, virtual]
 

virtual float CAUCarbonViewNib::TimerResolution  )  [inline, virtual]
 

Timer resolution in ms (default = 50).

bool CAUCarbonViewNib::WindowHasCompositing  )  [protected]
 

Test if the carbon window has the compositing attribute.


Member Data Documentation

CGImageRef CAUCarbonViewNib::mBackgroundImage [protected]
 

CFStringRef CAUCarbonViewNib::mBundleID [protected]
 

CFBundleRef CAUCarbonViewNib::mBundleRef [protected]
 

CQDProcs* CAUCarbonViewNib::mCurrentProcsPtr [protected]
 

CQDProcs CAUCarbonViewNib::mProcs [protected]
 

HIViewRef CAUCarbonViewNib::mRootUserPane [protected]
 

EventLoopTimerRef CAUCarbonViewNib::mTimer [protected]
 


The documentation for this class was generated from the following files:




Generated on Sun May 23 19:32:04 2004 for AUGUI Framework by doxygen1.3.7

hosted on SourceForge.net Logo