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

CP_Event_Imp Class Reference

CarbonEvents implementation of the CP_Event class. More...

Inheritance diagram for CP_Event_Imp:

CP_Event_Base CP_Event< CLASS, KIND > CP_Event< CP_E_CP_Event, CP_E_CP_Event_SaveDocument > CP_Event< kCP_EventClassAction, kCP_Event_UndoAction > CP_Event< kEventClassCommand, kEventCommandProcess > CP_Event< kEventClassCommand, kEventCommandUpdateStatus > CP_Event< kEventClassControl, kCP_Event_Draw > CP_Event< kEventClassControl, kEventControlClick > CP_Event< kEventClassControl, kEventControlContextualMenuClick > CP_Event< kEventClassControl, kEventControlGetFocusPart > CP_Event< kEventClassControl, kEventControlGetPartRegion > CP_Event< kEventClassControl, kEventControlHitTest > CP_Event< kEventClassControl, kEventControlInitialize > CP_Event< kEventClassControl, kEventControlSetFocusPart > CP_Event< kEventClassControl, kEventControlTrack > CP_Event< kEventClassControl, kEventControlValueFieldChanged > CP_Event< kEventClassKeyboard, kEventRawKeyDown > CP_Event< kEventClassKeyboard, kEventRawKeyRepeat > CP_Event< kEventClassKeyboard, kEventRawKeyUp > CP_Event< kEventClassMouse, kEventMouseDown > CP_Event< kEventClassMouse, kEventMouseMoved > CP_Event< kEventClassMouse, kEventMouseUp > CP_Event< kEventClassTextInput, kEventTextInputUnicodeForKeyEvent > CP_Event< kEventClassWindow, kEventWindowActivated > CP_Event< kEventClassWindow, kEventWindowBoundsChanged > CP_Event< kEventClassWindow, kEventWindowClose > CP_Event< kEventClassWindow, kEventWindowClosed > CP_Event< kEventClassWindow, kEventWindowContextualMenuSelect > CP_Event< kEventClassWindow, kEventWindowDeactivated > CP_Event< kEventClassWindow, kEventWindowDragCompleted > CP_Event< kEventClassWindow, kEventWindowDrawContent > CP_Event< kEventClassWindow, kEventWindowGetMaximumSize > CP_Event< kEventClassWindow, kEventWindowGetMinimumSize > CP_Event< kEventClassWindow, kEventWindowUpdate > List of all members.

Public Member Functions

Constructor / Destructor
 CP_Event_Imp ()
 Constructor.
 CP_Event_Imp (UInt32 inClassID, UInt32 inKind)
 CP_Event_Imp (EventRef inEvent, EventHandlerCallRef inHandlerCallRef)
virtual ~CP_Event_Imp ()

Private Attributes

EventRef fEventRef
EventHandlerCallRef fHandlerCallRef

Detailed Description

This class implements the features of the CP_Event class using MacOS Carbon Events.

In addition to just wrapping around the sepecific event, there are many accessors and setters for getting and setting the parameters of the Carbon Event.


Constructor & Destructor Documentation

CPLAT_Begin_Namespace_CPLAT CP_Event_Imp::CP_Event_Imp  ) 
 

Constructor.

Exceptions:
none 

CP_Event_Imp::CP_Event_Imp UInt32  inClassID,
UInt32  inKind
 

Constructor.

Parameters:
inClassID ID of the event class.
inKind Event kind.
Exceptions:
none 

CP_Event_Imp::CP_Event_Imp EventRef  inEvent,
EventHandlerCallRef  inHandlerCallRef
 

Constructor.

Parameters:
inEvent The Carbon EventRef for the event.
inHandlerCallRef The Carbon EventHandlerCallRef for the event.
Exceptions:
none 

CP_Event_Imp::~CP_Event_Imp  )  [virtual]
 

Destructor.


Member Function Documentation

CP_Event_Imp::operator EventRef &  ) 
 

operator EventRef for returning the EventRef for this event.

Returns:
EventRef Returns a reference to the EventRef for this event.

EventRef CP_Event_Imp::GetEventRef  ) 
 

Returns the EventRef for this event.

Returns:
EventRef Returns a reference to the EventRef for this event.

CP_Event_Imp::operator EventHandlerCallRef &  ) 
 

operator EventHanlerCallRef for returning the EventHandlerCallRef for this event.

Returns:
EventHandlerCallRef Returns a reference to the EventHandlerCallRef for this event.

EventHandlerCallRef CP_Event_Imp::GetEventHandlerCallRef  ) 
 

Returns the EventHandlerCallRef for this event.

Returns:
EventHandlerCallRef Returns a reference to the EventHandlerCallRef for this event.

void CP_Event_Imp::StoreExceptionInfo EventRef  inEvent,
const std::exception &  inEx
throw () [static]
 

Not yet implemented.

Parameters:
inEvent Not yet implemented.
inHandlerCallRef Not yet implemented.
Exceptions:
none 

void CP_Event_Imp::RethrowException EventRef  inEvent,
OSStatus  inStatus
[static]
 

Not yet implemented.

Parameters:
inEvent Not yet implemented.
inStatus Not yet implemented.
Exceptions:
none 

UInt32 CP_Event_Imp::GetClass  )  const [virtual]
 

Return the event class for this CarbonEvent.

Exceptions:
none 
Returns:
UInt32 const The event class for this event.

UInt32 CP_Event_Imp::GetKind  )  const [virtual]
 

Return the event kind for this CarbonEvent.

Exceptions:
none 
Returns:
UInt32 const The event kind for this event.

OSStatus CP_Event_Imp::GetParameter EventParamName  inName,
EventParamType  inType,
UInt32  inBufferSize,
void *  outData
 

Generic method to return a parameter from this CarbonEvent. There are many template version that can be used to retrieve specific types, and are prefererred over calling this directly.

This will return a CP_paramErr if the passed in buffer is NULL.

Parameters:
inName Name of the parameter to get.
inType Type of the parameter to get.
inBufferSize Size of the buffer to hold the returned result in.
outData Buffer to hold the returned result in.
Exceptions:
none 
Returns:
OSStatus Result code from the CarbonEvent Manager.

OSStatus CP_Event_Imp::GetParameter EventParamName  inName,
HICommand *  outValue
 

Method to return an HICommand parameter

Parameters:
inName Name of the parameter to get.
outValue Buffer to hold the returned HICommand
Exceptions:
none 
Returns:
OSStatus Result code from the CarbonEvent Manager.

void CP_Event_Imp::Retain  ) 
 

Retain this event. Calls on the CarbonEvent Manager to perform the retain.

Exceptions:
none 
Returns:
void

void CP_Event_Imp::Release  ) 
 

Release this event. Calls on the CarbonEvent Manager to perform the release.

Exceptions:
none 
Returns:
void

void CP_Event_Imp::Send EventTargetRef  inTarget,
OptionBits  inOptionBits = 0
 

Sends the event to the passed in target reference.

Parameters:
inTarget Event target to send the event to.
inOptionBits Options to be sent for the event.
Exceptions:
none 
Returns:
void

OSStatus CP_Event_Imp::Send EventTargetRef  inTarget,
const std::nothrow_t &  ,
OptionBits  inOptionBits = 0
throw ()
 

Sends the event to the passed in target reference.

Parameters:
inTarget Event target to send the event to.
nothrow 
inOptionBits Options to be sent for the event.
Exceptions:
none 
Returns:
void

void CP_Event_Imp::Set EventRef  inEvent,
EventHandlerCallRef  inHandlerCallRef
 

Sets the event reference information for this event, and then calls Retain().

Parameters:
inEvent MacOS CarbonEvent EventRef for this event.
inHandlerCallRef MacOS CarbonEvent EventHandlerCallRef for this event.
Exceptions:
none 
Returns:
void

template<class T>
OSStatus CP_Event_Imp::GetParameter EventParamName  inName,
EventParamType  inType,
T *  outValue
 

Template method for getting a parameter out of the CarbonEvent. This method is used by the specific parametter getters to return a specific type of parameter from this event.

Parameters:
inName EventParamName of the parameter to return.
inType EventParamType of the parameter to return.
Returns:
OSStatus CarbonEvent Manager result of the operation.

void CP_Event_Imp::CopyImpFields const CP_Event_Imp inEventImp  )  [protected]
 

Copyies the CP_Event_Imp fields for this class.

Parameters:
inEventImp The CP_Event_Imp fields to copy.
Exceptions:
none 
Returns:
void


Member Data Documentation

EventRef CP_Event_Imp::fEventRef [private]
 

EventHandlerCallRef CP_Event_Imp::fHandlerCallRef [private]
 

CarbonEvent Manager EventRef for this event.


The documentation for this class was generated from the following files:
Generated on Tue Sep 20 20:21:45 2005 for CPLAT_MacOS by  doxygen 1.4.0