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]
Collaboration diagram for CAUCarbonViewNib:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CAUCarbonViewNib (AudioUnitCarbonView inInstance)
virtual ~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 int GetTextJustification ()
 Texts justification (default = left).
virtual void GetTextColor (RGBColor *foreColor)
 Texts color (default = black).
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
virtual bool SupportEditMode () const
 Override to return true if you want to be able to use the online GUI editor.
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.
virtual bool HandleGestureEventForView (EventRef event, HIViewRef view)
 Handle gestures.
virtual bool HandleEventForView (EventRef event, HIViewRef view)
 Override if you want to do special processing on some events.
virtual bool HandleEventForContextualMenu (EventRef event, HIViewRef view)
 Override if you want to do special processing on some events.
virtual bool HandleEvent (EventRef event)
virtual CGImageRef GetBackgroundImage ()
virtual void GetPaneBounds (Rect *rect)
virtual HIViewRef GetRootPane () const
virtual void PropertyHasChanged (AudioUnitPropertyID inPropertyID, AudioUnitScope inScope, AudioUnitElement inElement)
CFBundleRef GetBundleRef ()
void InitXML ()
void SaveXML ()
void updateXMLForControl (HIViewRef control)
void updateControlFromXML (HIViewRef control)

Protected Member Functions

virtual HIViewRef BuildViewFromOid (AUGUI::oid_t oid)
virtual bool BuildFromXML ()
virtual int SwitchPane (int paneID, int paneNumber)
virtual void BindPane (HIViewRef thePane, AUGUI::oid_t oid)
 Bind all the controls embedded in the pane to their associated parameters.
virtual void BuildMultiPane (HIViewRef control, AUGUI::oid_t parent)
 Populate the multipane "control", according to its title and its min,max.
virtual void BuildDynamicViews (HIViewRef control, AUGUI::oid_t parent)
 Build all multipanes (kAUPanelControlSignature, x) contained in the pane.
virtual void BindView (HIViewRef control, AUGUI::oid_t oid)
 Bind the control to its parameter.
virtual void RegisterPropertyChanges (AudioUnitPropertyID inPropertyID)
virtual void UnRegisterPropertyChanges (AudioUnitPropertyID inPropertyID)
virtual void UnRegisterAllPropertiesChanges ()
virtual bool HandleEventPlayMode (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 void DisplayOverlay (CFStringRef pictName)
 Display the pict has an overlay on the current GUI.
void SetEditMode (bool mode)
bool EditMode () const
bool GetDictionaryForOid (CACFDictionary &element, AUGUI::oid_t)
bool AddDictionaryForOid (CACFDictionary &element, AUGUI::oid_t oid)
void AddUnknownControls (HIViewRef view, AUGUI::oid_t fromOid)
void AddControlEventHandler (HIViewRef from)

Static Protected Member Functions

static void PropertyChangedProc (void *inUserData, AudioUnit inComponentInstance, AudioUnitPropertyID inPropertyID, AudioUnitScope inScope, AudioUnitElement inElement)

Protected Attributes

CQDProcs mProcs
CQDProcs * mCurrentProcsPtr
CGImageRef mBackgroundImage
CFStringRef mBundleID
CFBundleRef mBundleRef
HIViewRef mRootUserPane
int mPaneID
bool mEditMode
CAUCarbonViewEditormEditor
CACFDictionary mXml
EventLoopTimerRef mTimer
std::set< AudioUnitPropertyID > mPropertiesRegistered
std::map< HIViewRef, AUGUI::oid_tmOids
std::map< AUGUI::oid_t, HIViewRef > mViews

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  )  [virtual]
 


Member Function Documentation

void CAUCarbonViewNib::AddControlEventHandler HIViewRef  from  )  [protected]
 

bool CAUCarbonViewNib::AddDictionaryForOid CACFDictionary &  element,
AUGUI::oid_t  oid
[protected]
 

void CAUCarbonViewNib::AddUnknownControls HIViewRef  view,
AUGUI::oid_t  fromOid
[protected]
 

void CAUCarbonViewNib::BindPane HIViewRef  thePane,
AUGUI::oid_t  oid
[protected, virtual]
 

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

void CAUCarbonViewNib::BindView HIViewRef  control,
AUGUI::oid_t  oid
[protected, virtual]
 

Bind the control to its parameter.

void CAUCarbonViewNib::BuildDynamicViews HIViewRef  control,
AUGUI::oid_t  parent
[protected, virtual]
 

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

bool CAUCarbonViewNib::BuildFromXML  )  [protected, virtual]
 

void CAUCarbonViewNib::BuildMultiPane HIViewRef  control,
AUGUI::oid_t  parent
[protected, virtual]
 

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

HIViewRef CAUCarbonViewNib::BuildViewFromOid AUGUI::oid_t  oid  )  [protected, virtual]
 

OSStatus CAUCarbonViewNib::CreateUI Float32  ,
Float32 
 

Create the AU GUI.

void CAUCarbonViewNib::DisplayOverlay CFStringRef  pictName  )  [protected, virtual]
 

Display the pict has an overlay on the current GUI.

bool CAUCarbonViewNib::EditMode  )  const [inline, protected]
 

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.

CFBundleRef CAUCarbonViewNib::GetBundleRef  )  [inline]
 

bool CAUCarbonViewNib::GetDictionaryForOid CACFDictionary &  element,
AUGUI::oid_t 
[protected]
 

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 HIViewRef CAUCarbonViewNib::GetRootPane  )  const [inline, virtual]
 

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

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

void CAUCarbonViewNib::GetTextColor RGBColor *  foreColor  )  [virtual]
 

Texts color (default = black).

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

Texts justification (default = left).

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  )  [virtual]
 

virtual bool CAUCarbonViewNib::HandleEventForContextualMenu EventRef  event,
HIViewRef  view
[inline, virtual]
 

Override if you want to do special processing on some events.

bool CAUCarbonViewNib::HandleEventForView EventRef  event,
HIViewRef  view
[virtual]
 

Override if you want to do special processing on some events.

bool CAUCarbonViewNib::HandleEventPlayMode EventRef  event  )  [protected, virtual]
 

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.

bool CAUCarbonViewNib::HandleGestureEventForView EventRef  event,
HIViewRef  view
[virtual]
 

Handle gestures.

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.

void CAUCarbonViewNib::InitXML  ) 
 

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

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

Reimplemented in CAUGuiDemoAUView.

void CAUCarbonViewNib::PropertyChangedProc void *  inUserData,
AudioUnit  inComponentInstance,
AudioUnitPropertyID  inPropertyID,
AudioUnitScope  inScope,
AudioUnitElement  inElement
[static, protected]
 

void CAUCarbonViewNib::PropertyHasChanged AudioUnitPropertyID  inPropertyID,
AudioUnitScope  inScope,
AudioUnitElement  inElement
[virtual]
 

void CAUCarbonViewNib::RegisterPropertyChanges AudioUnitPropertyID  inPropertyID  )  [protected, virtual]
 

void CAUCarbonViewNib::SaveXML  ) 
 

void CAUCarbonViewNib::SetEditMode bool  mode  )  [protected]
 

virtual bool CAUCarbonViewNib::SupportEditMode  )  const [inline, virtual]
 

Override to return true if you want to be able to use the online GUI editor.

Reimplemented in CAUGuiDemoAUView.

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

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

Timer resolution in ms (default = 50).

void CAUCarbonViewNib::UnRegisterAllPropertiesChanges  )  [protected, virtual]
 

void CAUCarbonViewNib::UnRegisterPropertyChanges AudioUnitPropertyID  inPropertyID  )  [protected, virtual]
 

void CAUCarbonViewNib::updateControlFromXML HIViewRef  control  ) 
 

void CAUCarbonViewNib::updateXMLForControl HIViewRef  control  ) 
 


Member Data Documentation

CGImageRef CAUCarbonViewNib::mBackgroundImage [protected]
 

CFStringRef CAUCarbonViewNib::mBundleID [protected]
 

CFBundleRef CAUCarbonViewNib::mBundleRef [protected]
 

CQDProcs* CAUCarbonViewNib::mCurrentProcsPtr [protected]
 

bool CAUCarbonViewNib::mEditMode [protected]
 

CAUCarbonViewEditor* CAUCarbonViewNib::mEditor [protected]
 

std::map<HIViewRef, AUGUI::oid_t> CAUCarbonViewNib::mOids [protected]
 

int CAUCarbonViewNib::mPaneID [protected]
 

CQDProcs CAUCarbonViewNib::mProcs [protected]
 

std::set<AudioUnitPropertyID> CAUCarbonViewNib::mPropertiesRegistered [protected]
 

HIViewRef CAUCarbonViewNib::mRootUserPane [protected]
 

EventLoopTimerRef CAUCarbonViewNib::mTimer [protected]
 

std::map<AUGUI::oid_t, HIViewRef> CAUCarbonViewNib::mViews [protected]
 

CACFDictionary CAUCarbonViewNib::mXml [protected]
 


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




Generated on Sat Jul 8 13:07:03 2006 for AUGUI Framework by doxygen1.4.6

hosted on SourceForge.net Logo