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

CP_QT_MovieView Class Reference

CP_View subclass to display a QuickTime Movie.

Inheritance diagram for CP_QT_MovieView:

CP_View CP_View_Imp CP_M_SubViewHandler CP_M_Persist CP_M_CommandHandler CP_M_DragSource CP_M_DragTarget CP_Object CP_SigSlot::CP_SlotObject CP_NoCopy List of all members.

Drag Target

virtual void OnDragEnter (CP_DragDrop &inDragDrop, bool inDragHasLeftSender)
virtual void OnDragLeave (CP_DragDrop &inDragDrop)
virtual void OnDragTrack (CP_DragDrop &inDragDrop)
static CP_M_DragTargetFindDragTarget (OSWindow inOSWindow, CP_Point &inMouseLocation, CP_DragDrop &inDragDrop)

Public Member Functions

virtual LRESULT HandleWinProcMessage (HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
void InitFromOSControl (CP_View *inSuperview, OSControl inOSControl)
virtual void SetForeBackColors ()
virtual LRESULT HandleWinHelperProcMessage (HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
void DrawViewHierachy ()
void SetLocationAndSubs (const CP_Point &inLocation)
CP_ViewBackgroundGetViewBackground ()
void SetViewBackground (CP_ViewBackground *inViewBackground)
virtual CP_RGBColor GetBackColor ()
virtual void HandleMouseDown (CP_Event_Base &inEvent)
virtual void HandleMouseUp (CP_Event_Base &inEvent)
void SetID (FourCharCode inIdentifier)
FourCharCode GetID ()
void RegisterSignal (const CP_SignalHolder &inSignal)
CP_DataValueSignalFindSignal (const CP_String &inSignalName)
UInt32 GetNumberSignals ()
CP_String GetNthSignalName (UInt32 inSignalIndex)
void RegisterSlot (const CP_SlotHolder &inSlot)
CP_DataValueSlot FindSlot (const CP_String &inSlotName)
UInt32 GetNumberSlots ()
CP_String GetNthSlotName (UInt32 inSlotIndex)
template<class R, class P1, class P2>
CP_CommandHandlerSignalConnect (CPLAT::CP_CommandNo cmd, void(R::*handler)(P1, P2), SInt32 mode)
template<class R, class P1, class P2>
void Connect (CP_Object *control, const CPLAT::CP_String &signalName, void(R::*handler)(P1, P2))
void disconnect_all ()
void signal_connect (CP_Signal *inSender)
void signal_disconnect (CP_Signal *inSender)
void ClearFlavors ()
virtual void OnDragEnter (LPDATAOBJECT pIDataSource, DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect)
virtual void OnDragLeave ()
void SetTargetWindow (OSWindow inWindow)
virtual void OnDragOver (DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect)
virtual void OnDrop (LPDATAOBJECT pIDataSource, DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect)
CP_Point GetDropPoint ()
Constructor / Destructor
 CP_QT_MovieView ()
 Constructor.
 CP_QT_MovieView (CP_View *inSuperview, const CP_Point &inUpperLeft, const CP_Size &inContentSize)
virtual ~CP_QT_MovieView () throw ()
 Destructor.
Appearance
virtual void Show ()
virtual void Hide ()
virtual void Activate ()
virtual void Deactivate ()
virtual void Enable ()
virtual void Disable ()
Drawing
virtual CP_Canvas SetupForDrawing ()
Events
virtual void InitEventHandler (CP_EventHandler &inEventHandler)
void HandleControlHitEvent (CP_Event_Base &inEvent)
Movie
Movie GetMovie ()
MovieController GetMovieController ()
Setters
void SetMovie (Movie inMovie, bool inSizeWindowToFit, SInt16 inScrollBarVerAdjustment=0)
Skins
void SetIsSkinned (bool inIsSkinned)
Timer
void StartIdleTimer ()
void StopIdleTimer ()
bool GetIdleOnInactiveWindow ()
void SetIdleOnInactiveWindow (bool inIdle)

Static Public Member Functions

static void Connect (CP_Object *sender, const CP_String &signalName, CP_Object *receiver, const CP_String &slotName, const bool reciprocal=false)
static void Connect (CP_Object *sender, CP_Object *receiver, const bool reciprocal=false, const CP_String &signalName=kCP_Signal_ValueChanged, const CP_String &slotName=kCP_Slot_SetValue)
Persistance
static CP_M_PersistPersistCreator ()

Protected Member Functions

virtual void FinishInitFromOSControl (OSControl)
virtual bool OnCanAcceptDrag (UInt32 inItem, CP_DragDrop &inDragDrop)=0
virtual bool PtInDropArea (CP_Point &inGlobalPoint)
virtual void HandleControlColor (CP_Event_Base &inEvent)
virtual bool OnCanAcceptDragWin (LPDATAOBJECT pIDataSource, DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect)
Drawing
virtual void OnDraw (CP_Canvas &inCanvas, CP_Region &inUpdateArea)
Frame
virtual void OnBoundsChanged (const CP_Rect &inPreviousBounds, const CP_Rect &inNewBounds)
Persistance
virtual void OnInitPersist (CP_View *inSuperview, CP_DataValueList &inDataValueList)
Timer
virtual void HandleIdleTime ()

Protected Attributes

CP_TimedTaskfIdleTimer
Movie fMovie
MovieController fMovieController
bool fIdleOnInactiveWindow
bool fIsSkinned
bool fIsContainer
OSWindow fToolTipWindow
GtkWidget * fContentAreaContainer
CP_Point fPrintLocation
CP_Size fPrintSize
bool fIsFocused
CP_DataValueSignal fFocusChangedSignal
CP_View_Imp_BasefViewImpBase
CP_EventHandler fDummyEventHandler
UInt32 fCommandID
CP_SmartPtr< CP_FrameAdapterfFrameAdapter
UInt32 fFlags
CP_ViewBackgroundfViewBackground
CP_DataValueSignal fBoundsChangedSignal
CP_DataValueSignal fShowSignal
CP_DataValueSignal fHideSignal
CP_DataValueSignal fActivateSignal
CP_DataValueSignal fDeactivateSignal
CP_DataValueSignal fEnableSignal
CP_DataValueSignal fDisableSignal
CP_DataValueSlot fShowSlot
CP_DataValueSlot fHideSlot
CP_DataValueSlot fActivateSlot
CP_DataValueSlot fDeactivateSlot
CP_DataValueSlot fEnableSlot
CP_DataValueSlot fDisableSlot
CP_Signals_ArrayfSignals
CP_Slots_ArrayfSlots
FourCharCode fObjectID
CP_Commands_ArrayfCommands
CP_MenuSelectionSignalfMennuSelectionSignal
sender_set fSenders
CP_IDropSourcefIDropSource
CP_IDataObjectfIDataObject
FORMATETC * fDataFormats
DWORD fNumberFormats
CP_EnumeratorfEnumerator
CP_DataStream fData
CP_WindowfWindow
bool fDropAreaIsHilited
bool fCanAcceptCurrentDrag
OSWindow fTargetWindow
CDropTargetfDropTarget
CP_Point fDropPoint
CP_SubViews_ListfSubViews

Static Protected Attributes

static FourCharCode fObjectIDCount = 0
static CP_DragTarget_ListfsDragTargetList = NULL
static CP_M_DragTargetfsCurrentDragTarget = NULL
static bool fsDragHasLeftSender = false

Private Member Functions

Timer
void TimerTask (CP_DataValueHolder &inDataValue, OSStatus &inOSStatus)

Constructor & Destructor Documentation

CP_QT_MovieView::CP_QT_MovieView  ) 
 

Constructor.

Exceptions:
none 

CP_QT_MovieView::CP_QT_MovieView CP_View inSuperview,
const CP_Point inUpperLeft,
const CP_Size inContentSize
 

Constructor.

Parameters:
inSuperview The subview handler that contains this pane.
inUpperLeft Upper left corner of pane in releation to its superview.
inContentSize Content size of the pane.
Exceptions:
none 

CP_QT_MovieView::~CP_QT_MovieView  )  throw () [virtual]
 

Destructor.

Exceptions:
none 


Member Function Documentation

void CP_QT_MovieView::Show  )  [virtual]
 

Show this view.

Exceptions:
none 
Returns:
void

Reimplemented from CP_View.

void CP_QT_MovieView::Hide  )  [virtual]
 

Hide this view.

Exceptions:
none 
Returns:
void

Reimplemented from CP_View.

void CP_QT_MovieView::Activate  )  [virtual]
 

Activate this view.

Exceptions:
none 
Returns:
void

Reimplemented from CP_View.

void CP_QT_MovieView::Deactivate  )  [virtual]
 

Deactivate this view.

Exceptions:
none 
Returns:
void

Reimplemented from CP_View.

void CP_QT_MovieView::Enable  )  [virtual]
 

Enable this view.

Exceptions:
none 
Returns:
void

Reimplemented from CP_View.

void CP_QT_MovieView::Disable  )  [virtual]
 

Disable this view.

Exceptions:
none 
Returns:
void

Reimplemented from CP_View.

CP_Canvas CP_QT_MovieView::SetupForDrawing  )  [virtual]
 

Used when the user needs to draw into a view at times other than the normal drawing times. This will setup the view for drawing into, and return a canvas object suitable for use.

Exceptions:
none 
Returns:
CP_Canvas CP_Canvas object to use to draw into.

Reimplemented from CP_View_Imp.

void CP_QT_MovieView::InitEventHandler CP_EventHandler inEventHandler  )  [virtual]
 

Reimplemented from CP_View_Imp.

void CP_QT_MovieView::HandleControlHitEvent CP_Event_Base inEvent  ) 
 

Movie CP_QT_MovieView::GetMovie  ) 
 

MovieController CP_QT_MovieView::GetMovieController  ) 
 

CP_M_Persist * CP_QT_MovieView::PersistCreator  )  [static]
 

CP_M_Persist function to create an instance of this button. Called from our CP_PersistManager class to create persistant object from a stream.

Exceptions:
none 
Returns:
CP_M_Persist * Returns a pointer to a new CP_QT_MovieView object.

Reimplemented from CP_View.

void CP_QT_MovieView::SetMovie Movie  inMovie,
bool  inSizeWindowToFit,
SInt16  inScrollBarVerAdjustment = 0
 

void CP_QT_MovieView::SetIsSkinned bool  inIsSkinned  ) 
 

void CP_QT_MovieView::StartIdleTimer  ) 
 

void CP_QT_MovieView::StopIdleTimer  ) 
 

bool CP_QT_MovieView::GetIdleOnInactiveWindow  ) 
 

void CP_QT_MovieView::SetIdleOnInactiveWindow bool  inIdle  ) 
 

void CP_QT_MovieView::OnDraw CP_Canvas inCanvas,
CP_Region inUpdateArea
[protected, virtual]
 

Called when the view needs to update the visual appearance of itself. In this demo we use the CP_Graphics class to display the line "Hello World from CPLAT" in the default font for a view.

Parameters:
inCanvas The CP_Canvas to draw into.
inUpdateArea The area that needs to be drawn.
Exceptions:
none 
Returns:
void

Reimplemented from CP_View_Imp.

void CP_QT_MovieView::OnBoundsChanged const CP_Rect inPreviousBounds,
const CP_Rect inNewBounds
[protected, virtual]
 

Reimplemented from CP_View_Imp.

void CP_QT_MovieView::OnInitPersist CP_View inSuperview,
CP_DataValueList inDataValueList
[protected, virtual]
 

Called from the persistance classes once an object has been created, and now needs to be initialized. This method is used to initialize the data members of the class from the passed in CP_DataValueList which contains fields to initialize a data member.

Once the data members have been initialized, a platforms implementation is created through the CreatePlatformImp() method.

Parameters:
inSubViewHandler The superview that contains this push button.
inDataValueList List of the values for setting the data members of this class to.
Exceptions:
none 
Returns:
void

Reimplemented from CP_View.

void CP_QT_MovieView::HandleIdleTime  )  [protected, virtual]
 

void CP_QT_MovieView::TimerTask CP_DataValueHolder inDataValue,
OSStatus inOSStatus
[private]
 

LRESULT CP_QT_MovieView::HandleWinProcMessage HWND  inHwnd,
UINT  inMsg,
WPARAM  inWParam,
LPARAM  inLParam
[virtual]
 

Handle any Windows specific message for this pane. This is the routine that is called from the windows pane handler. You need override the protected OnHandleWinProcMessage method to handle the specific messages you need to in your class.

This method will catch any exceptions thrown in your methods to prevent propagating into the Windows callback.

Parameters:
hwnd the HWND that the message applies to.
iMsg the incoming message to handle.
wParam the wParam for the message.
lParam the lParam for the message.
Exceptions:
none 
Returns:
LRESULT Returns the result of the operation.

bool CP_View::IsFocused  )  [inherited]
 

void CP_View::SetFocused bool  inFocused  )  [inherited]
 

bool CP_View::CanLoseFocus  )  [virtual, inherited]
 

bool CP_View::FocusCanChange  )  [inherited]
 

void CP_View::LosingFocus  )  [inherited]
 

void CP_View::HandleActivationEvent  )  [inherited]
 

void CP_View::HandleDeactivationEvent  )  [inherited]
 

void CP_View::HandleBoundsChanged const CP_Rect inPreviousBounds,
const CP_Rect inNewBounds
[virtual, inherited]
 

Called when the bounds of this view has changed.

Parameters:
inPreviousBounds The previous bounds of this view.
inNewBounds The new bounds to make this view.
Exceptions:
none 
Returns:
void

Reimplemented from CP_View_Imp.

Reimplemented in CP_Scroller, and CP_Splitter.

OSControl CP_View::GetOSControl  )  [inherited]
 

Returns the underlying platforms OSControl that implements this view. This is a convenience function for GetViewImpBase()->GetOSControl().

Exceptions:
none 
Returns:
OSControl The underlying platforms OSControl that implements this view. NULL is returned if the view imp base object is not created yet, or the control hasn't been created yet.

Reimplemented in CP_PlatformControl.

void CP_View::SetHelp const CP_String inHelpString,
const CP_String inSecondaryHelpString
[virtual, inherited]
 

Sets the help string displayed for this view.

Parameters:
inHelpString The help string to be displayed.
inSecondaryHelpString A secondary help string if the underlying OS supports display of alternate strings.
Exceptions:
none 
Returns:
void

void CP_View::SetHelp SInt16  inHelpStringResID,
SInt16  inHelpStringIndex,
SInt16  inSecondaryHelpStringResID = 0,
SInt16  inSecondaryHelpStringIndex = 0
[virtual, inherited]
 

Sets the help string displayed for this view.

Parameters:
inHelpStringResID The help string resource id.
inHelpStringIndex The help string index of the resource.
inSecondarHelpStringResID The secondary help string resource id.
inSecondarHelpStringIndex The secondary help string index of the resource.
Exceptions:
none 
Returns:
void

void CP_View::Move const CP_Point inDistance  )  [virtual, inherited]
 

Moves the view by the distance specified in the passed in point parameter. All subviews of this view will also move along with the view.

Parameters:
inDistance Distance to move this view by.
Exceptions:
none 
Returns:
void

void CP_View::SetLocation const CP_Point inLocation  )  [virtual, inherited]
 

Sets the location of this view relative to its superview.

Parameters:
inLocation Location of the view, releative to its containing or superview.
Exceptions:
none 
Returns:
void

Reimplemented from CP_View_Imp.

Reimplemented in CP_Window_Imp, and CP_Window.

void CP_View::SetSize const CP_Size inSize  )  [virtual, inherited]
 

Sets the size of this view.

Parameters:
inSize The size of the view.
Exceptions:
none 
Returns:
void

Reimplemented from CP_View_Imp.

Reimplemented in CP_Window_Imp, and CP_Window.

virtual void CP_View::OnBeginPrinting CP_Printer  )  [virtual, inherited]
 

void CP_View::OnPrint CP_Canvas inCanvas,
UInt32  inPageNumber,
CP_Printer_PageFormat  pageFormat
[virtual, inherited]
 

Called when the user wants to print the contents of this view. The default is to call the OnDraw method of the view to use the same drawing for both printing and user interface. Override if you want to handle drawing differently when printing.

Parameters:
inCanvas The printing port to draw into.
inPageNumber The page number being printed.
inPageFormat Object that describes the format of the page that is printing.
Exceptions:
none 
Returns:
CP_Rect The bounds of this view when printing.

virtual void CP_View::OnEndPrinting CP_Printer  )  [virtual, inherited]
 

void CP_View::CountTiles CP_Printer inPrinter,
CP_Printer_PageFormat pageFormat,
UInt16 inOutHorTiles,
UInt16 inOutVerTiles
[virtual, inherited]
 

Count and return the number of tiles needed to print this view.

NOTE: In order to print a pane/view that is larger than the printed page, we divide our view up into tiles that our the size of each page. Subclasses need to override this if they are larger than the page size. This default is to return 1 for each of the horizontal and vertical tiles.

Parameters:
inPrinter The CP_Printer that is controlling the printing.
inPageFormat Describes the size of the page being printed.
inOutHorTiles The number of horizontal tiles is returned here.
inOutVerTiles The number of vertical tiles is returned here.
Exceptions:
none 
Returns:
void

CP_Point CP_View::GetPrintLocation  )  [inherited]
 

CP_Size CP_View::GetPrintSize  )  [inherited]
 

CP_Rect CP_View::GetLocalPrintBounds  )  [inherited]
 

Returns the bounds of this view in local coordinates when printing. The user can change the bounds of the view when printing by calling SetPrintLocation, SetPrintSize which can be different than used to draw into a window.

Exceptions:
none 
Returns:
CP_Rect The bounds of this view when printing.

void CP_View::SetPrintLocation const CP_Point inLocation  )  [inherited]
 

void CP_View::SetPrintSize const CP_Size inSize  )  [inherited]
 

void CP_View::AddSubview CP_View inView  )  [virtual, inherited]
 

Adds the passed in view to our list of views.

Parameters:
inView The view being added.
Exceptions:
none 
Returns:
void

Reimplemented from CP_View_Imp.

bool CP_View::IsVisible  )  const [virtual, inherited]
 

Returns true if this view is visible.

Exceptions:
none 
Returns:
bool const Returns true if the view is visible.

Reimplemented from CP_View_Imp.

Reimplemented in CP_Window_Imp.

bool CP_View::IsActive  )  const [virtual, inherited]
 

Returns true if this view is active.

Exceptions:
none 
Returns:
bool const Returns true if the view is active.

Reimplemented from CP_View_Imp.

Reimplemented in CP_Window_Imp.

bool CP_View::IsEnabled  )  const [virtual, inherited]
 

Returns true if this view is enhabled.

Exceptions:
none 
Returns:
bool const Returns true if the view is enabled.

Reimplemented from CP_View_Imp.

bool CP_View::IsContainer  )  const [inherited]
 

void CP_View::OnLosingFocus  )  [protected, virtual, inherited]
 

Reimplemented in CP_TextView.

void CP_View::OnFinishPersist  )  [protected, virtual, inherited]
 

This is called after the containing window and all of its subviews have been created. This gives each view a chance to perform any needed operations after the window and subviews have been created, but before the window is made visible to the user.

Exceptions:
none 
Returns:
void

Reimplemented from CP_M_Persist.

Reimplemented in CP_TabView.

void CP_View::InitFromOSControl CP_View inSuperview,
OSControl  inOSControl
[inherited]
 

Initializes this view from a superview and an existing platform OSControl.

Parameters:
inSuperview The view that will contain this view.
inOSControl The OSControl that is implementing this view.
Exceptions:
none 
Returns:
void

void CP_View::SetForeBackColors  )  [virtual, inherited]
 

Called when the view needs to setup its foreground and background colors for drawing. This is called during drawing when the OS needs to setup the correct colors for the AppearanceManager. Normally you don't need to call this yourself.

Exceptions:
none 
Returns:
void

Reimplemented in CP_BackgroundView, and CP_TabView.

virtual void CP_View::FinishInitFromOSControl OSControl   )  [protected, virtual, inherited]
 

LRESULT CP_View::HandleWinHelperProcMessage HWND  hwnd,
UINT  iMsg,
WPARAM  wParam,
LPARAM  lParam
[virtual, inherited]
 

Handle any Windows specific message for this pane. This is the routine that is called from the windows pane handler. You need override the protected OnHandleWinProcMessage method to handle the specific messages you need to in your class.

This method will catch any exceptions thrown in your methods to prevent propagating into the Windows callback.

Parameters:
hwnd the HWND that the message applies to.
iMsg the incoming message to handle.
wPa ram the wParam for the message.
lParam the lParam for the message.
Exceptions:
none 
Returns:
LRESULT Returns the result of the operation.

Reimplemented in CP_CheckGroupBox.

void CP_View::DrawViewHierachy  )  [inherited]
 

void CP_View::SetLocationAndSubs const CP_Point inLocation  )  [inherited]
 

GtkWidget* CP_View::GetContentAreaContainer  )  [inherited]
 

Reimplemented in CP_Window_Imp.

void CP_View::SetContentAreaContainer GtkWidget *  inContentAreaContainer  )  [inherited]
 

Reimplemented in CP_Window_Imp.

void CP_View_Imp::GlobalToPort CP_Point inGlobalPoint  )  [virtual, inherited]
 

Converts the passed in point from global to port coordinates.

Parameters:
inGlobalPoint The point to convert to port coordinates.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Window_Imp.

void CP_View_Imp::GlobalToLocal CP_Point inGlobalPoint  )  [virtual, inherited]
 

Converts the passed in point from global to local coordinates.

Parameters:
inGlobalPoint The point to convert to local coordinates.
Exceptions:
none 
Returns:
void

void CP_View_Imp::PortToLocal CP_Point inPortPoint  )  [inherited]
 

Converts the passed in point from port to local coordinates.

Parameters:
inGlobalPoint The point to convert to port coordinates.
Exceptions:
none 
Returns:
void

void CP_View_Imp::PortToGlobal CP_Point inPortPoint  )  [virtual, inherited]
 

Reimplemented in CP_Window_Imp.

void CP_View_Imp::PortToGlobal CP_Rect inPortRect  )  [virtual, inherited]
 

Reimplemented in CP_Window_Imp.

void CP_View_Imp::LocalToPort CP_Point inPortPoint  )  [inherited]
 

void CP_View_Imp::LocalToPort CP_Rect inPortRect  )  [inherited]
 

void CP_View_Imp::GetData UInt32  inTagName,