Public Member Functions | Static Public Member Functions | Protected Attributes

CarbonViewWrapperComponent Class Reference

Creates a floating carbon window that can be used to hold a carbon UI. More...

Inherits Component, ComponentMovementWatcher, and Timer.

List of all members.

Public Member Functions

 CarbonViewWrapperComponent ()
virtual ~CarbonViewWrapperComponent ()
virtual HIViewRef attachView (WindowRef windowRef, HIViewRef rootView)=0
virtual void removeView (HIViewRef embeddedView)=0
virtual void mouseDown (int, int)
virtual void paint ()
virtual bool getEmbeddedViewSize (int &w, int &h)
void createWindow ()
void deleteWindow ()
void setOurSizeToEmbeddedViewSize ()
void setEmbeddedWindowToOurSize ()
void componentMovedOrResized (bool, bool)
 This callback happens when the component that is being watched is moved relative to its top-level peer window, or when it is resized.
void componentPeerChanged ()
 This callback happens when the component's top-level peer is changed.
void componentVisibilityChanged ()
 This callback happens when the component's visibility state changes, possibly due to one of its parents being made visible or invisible.
void timerCallback ()
 The user-defined callback routine that actually gets called periodically.
OSStatus carbonEventHandler (EventHandlerCallRef, EventRef event)

Static Public Member Functions

static void recursiveHIViewRepaint (HIViewRef view)
static pascal OSStatus carbonEventCallback (EventHandlerCallRef nextHandlerRef, EventRef event, void *userData)

Protected Attributes

WindowRef wrapperWindow
NSWindow * carbonWindow
HIViewRef embeddedView
bool recursiveResize
Time creationTime
EventHandlerRef eventHandlerRef

Detailed Description

Creates a floating carbon window that can be used to hold a carbon UI.

This is a handy class that's designed to be inlined where needed, e.g. in the audio plugin hosting code.


Constructor & Destructor Documentation

CarbonViewWrapperComponent::CarbonViewWrapperComponent (  )
virtual CarbonViewWrapperComponent::~CarbonViewWrapperComponent (  ) [virtual]

References embeddedView, and jassert.


Member Function Documentation

virtual HIViewRef CarbonViewWrapperComponent::attachView ( WindowRef  windowRef,
HIViewRef  rootView 
) [pure virtual]

Referenced by createWindow().

virtual void CarbonViewWrapperComponent::removeView ( HIViewRef  embeddedView ) [pure virtual]

Referenced by deleteWindow().

virtual void CarbonViewWrapperComponent::mouseDown ( int  ,
int   
) [virtual]
virtual void CarbonViewWrapperComponent::paint (  ) [virtual]
virtual bool CarbonViewWrapperComponent::getEmbeddedViewSize ( int &  w,
int &  h 
) [virtual]
void CarbonViewWrapperComponent::createWindow (  )
void CarbonViewWrapperComponent::deleteWindow (  )
void CarbonViewWrapperComponent::setOurSizeToEmbeddedViewSize (  )
void CarbonViewWrapperComponent::setEmbeddedWindowToOurSize (  )
void CarbonViewWrapperComponent::componentMovedOrResized ( bool  wasMoved,
bool  wasResized 
) [virtual]

This callback happens when the component that is being watched is moved relative to its top-level peer window, or when it is resized.

Implements ComponentMovementWatcher.

References setEmbeddedWindowToOurSize().

void CarbonViewWrapperComponent::componentPeerChanged (  ) [virtual]

This callback happens when the component's top-level peer is changed.

Implements ComponentMovementWatcher.

References createWindow(), and deleteWindow().

void CarbonViewWrapperComponent::componentVisibilityChanged (  ) [virtual]

This callback happens when the component's visibility state changes, possibly due to one of its parents being made visible or invisible.

Implements ComponentMovementWatcher.

References createWindow(), deleteWindow(), Component::isShowing(), and setEmbeddedWindowToOurSize().

static void CarbonViewWrapperComponent::recursiveHIViewRepaint ( HIViewRef  view ) [static]

Referenced by timerCallback().

void CarbonViewWrapperComponent::timerCallback (  ) [virtual]

The user-defined callback routine that actually gets called periodically.

It's perfectly ok to call startTimer() or stopTimer() from within this callback to change the subsequent intervals.

Implements Timer.

References creationTime, Time::getCurrentTime(), recursiveHIViewRepaint(), setOurSizeToEmbeddedViewSize(), and wrapperWindow.

OSStatus CarbonViewWrapperComponent::carbonEventHandler ( EventHandlerCallRef  ,
EventRef  event 
)
static pascal OSStatus CarbonViewWrapperComponent::carbonEventCallback ( EventHandlerCallRef  nextHandlerRef,
EventRef  event,
void *  userData 
) [static]

Referenced by createWindow().


Member Data Documentation

Referenced by carbonEventHandler(), and createWindow().

Referenced by createWindow(), and timerCallback().

EventHandlerRef CarbonViewWrapperComponent::eventHandlerRef [protected]

Referenced by createWindow(), and deleteWindow().


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines