Inheritance diagram for CP_View_Imp:
Setters | |
void | SetCommandID (UInt32 inCommandID) |
virtual void | SetLocation (const CP_Point &inLocation) |
virtual void | SetSize (const CP_Size &inSize) |
virtual void | SetPortBounds (const CP_Rect &inBounds) |
Superview | |
virtual void | AddSubview (CP_View *inView) |
void | AdjustToSuperview (CP_View *inView) |
Testers | |
virtual bool | IsVisible () const |
virtual bool | IsActive () const |
virtual bool | IsEnabled () const |
bool | ContainsPoint (const CP_Point &inPortPoint) |
Frame | |
virtual void | HandleBoundsChanged (const CP_Rect &, const CP_Rect &) |
virtual void | OnBoundsChanged (const CP_Rect &inPreviousBounds, const CP_Rect &inNewBounds) |
Initialization | |
virtual void | OnInitPersist (CP_View *inSuperview, CP_DataValueList &inDataValueList) |
virtual void | OnFinishPersist () |
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_DragTarget * | FindDragTarget (OSWindow inOSWindow, CP_Point &inMouseLocation, CP_DragDrop &inDragDrop) |
Public Member Functions | |
CP_ViewBackground * | GetViewBackground () |
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_DataValueSignal * | FindSignal (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_CommandHandlerSignal * | Connect (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 | |
virtual | ~CP_View_Imp () throw () |
Destructor. | |
Appearance | |
virtual void | Show () |
virtual void | Hide () |
virtual void | Activate () |
virtual void | Deactivate () |
virtual void | Enable () |
virtual void | Disable () |
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) |
Protected Member Functions | |
virtual void | HandleControlColor (CP_Event_Base &inEvent) |
virtual bool | OnCanAcceptDrag (UInt32 inItem, CP_DragDrop &inDragDrop)=0 |
virtual bool | PtInDropArea (CP_Point &inGlobalPoint) |
virtual bool | OnCanAcceptDragWin (LPDATAOBJECT pIDataSource, DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect) |
Constructor / Destructor | |
CP_View_Imp () | |
Constructor. | |
CP_View_Imp (CP_View *inSuperview, const CP_Point &inUpperLeft, const CP_Size &inContentSize, bool inCreateImp=false, UInt32 inFlags=CP_E_ViewFlags_None) | |
Protected Attributes | |
CP_View_Imp_Base * | fViewImpBase |
CP_EventHandler | fDummyEventHandler |
UInt32 | fCommandID |
CP_SmartPtr< CP_FrameAdapter > | fFrameAdapter |
UInt32 | fFlags |
CP_ViewBackground * | fViewBackground |
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_Array * | fSignals |
CP_Slots_Array * | fSlots |
FourCharCode | fObjectID |
CP_Commands_Array * | fCommands |
CP_MenuSelectionSignal * | fMennuSelectionSignal |
sender_set | fSenders |
CP_IDropSource * | fIDropSource |
CP_IDataObject * | fIDataObject |
FORMATETC * | fDataFormats |
DWORD | fNumberFormats |
CP_Enumerator * | fEnumerator |
CP_DataStream | fData |
CP_Window * | fWindow |
bool | fDropAreaIsHilited |
bool | fCanAcceptCurrentDrag |
OSWindow | fTargetWindow |
CDropTarget * | fDropTarget |
CP_Point | fDropPoint |
Static Protected Attributes | |
static FourCharCode | fObjectIDCount = 0 |
static CP_DragTarget_List * | fsDragTargetList = NULL |
static CP_M_DragTarget * | fsCurrentDragTarget = NULL |
static bool | fsDragHasLeftSender = false |
Under Windows all panes are implmented in this class as Windows child windows.
|
Destructor.
|
|
Constructor.
|
|
Constructor. Create a pane with the upper left corner at inLocation, and the content size of inSize.
|
|
Show this view.
Reimplemented in CP_Window_Imp, CP_Window_Imp, CP_DrawerWindow, CP_QT_MovieView, CP_SheetWindow, CP_TabView, CP_View, CP_Window, and CP_Window_Imp. |
|
Hide this view.
Reimplemented in CP_Window_Imp, CP_Window_Imp, CP_DrawerWindow, CP_QT_MovieView, CP_SheetWindow, CP_TabView, CP_View, CP_Window, and CP_Window_Imp. |
|
Activate this view.
Reimplemented in CP_QT_MovieView, CP_TextView, and CP_View. |
|
Deactivate this view.
Reimplemented in CP_QT_MovieView, CP_TextView, and CP_View. |
|
Enable this view.
Reimplemented in CP_QT_MovieView, and CP_View. |
|
Disable this view.
Reimplemented in CP_QT_MovieView, and CP_View. |
|
Converts the passed in point from global to port coordinates.
Reimplemented in CP_Window_Imp. |
|
Converts the passed in point from global to local coordinates.
|
|
Converts the passed in point from port to local coordinates.
|
|
Reimplemented in CP_Window_Imp. |
|
Reimplemented in CP_Window_Imp. |
|
|
|
|
|
Sets some user data for this view. This is used to allow users to attach some data to a CP_View object.
Reimplemented in CP_Window_Imp. |
|
Sets some user data for this view. This is used to allow users to attach some data to a CP_View object.
Reimplemented in CP_Window_Imp. |
|
Reimplemented from CP_M_DragTarget. |
|
Return the event handler for this view implementation. This will be the OS implentation event handler.
Reimplemented in CP_Window_Imp, CP_MDIFrameWindow, and CP_Window_Imp. |
|
Return the CP_Window that contains this pane.
Reimplemented in CP_Window. |
|
Return the superview of this view.
|
|
Return the local bounds of this pane. This will always have the top left corner at location 0, 0.
Reimplemented in CP_Window_Imp, and CP_Window_Imp. |
|
Return the local bounds of this pane. This is the bounds of the pane in port coordinates.
Reimplemented in CP_Window_Imp, and CP_Window_Imp. |
|
Reimplemented in CP_Window_Imp, and CP_Scroller. |
|
Return the location of this pane. This is the panes location relative its superviews top left corner.
Reimplemented in CP_Window_Imp. |
|
Return the size of this pane.
Reimplemented in CP_Window_Imp, and CP_Window_Imp. |
|
|
|
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.
Reimplemented in CP_QT_MovieView. |
|
Call after the drawing is complete to free up system resources.
|
|
CP_View_Imp method called from the user panes callback. This calls the virtual OnDraw function which users override to do the actual drawing in their panes.
|
|
Cause the passed in area of this pane to become invalid and force the OS to create an update event to redraw that portion.
|
|
Cause the passed in area of this pane to become invalid and force the OS to create an update event to redraw that portion.
|
|
Cause the view to redraw itself on the next chance it gets. This will mark the view as dirty, and redraw itself the next time the underlying OS updates dirty views. If used in a loop, the view will not be redrawn untill the underlying OS can process an event.
Reimplemented in CP_Window_Imp. |
|
|
|
|
|
Sets the frame adapter for this view. The frame adapter determines how a view will resize and reposition itself when the superview that contains it changes bounds.
|
|
|
|
|
|
|
|
Sets the command id associated with this view. This will be the command sent out when the control is clicked on.
|
|
Reimplemented in CP_Window_Imp, CP_View, and CP_Window. |
|
Reimplemented in CP_Window_Imp, CP_View, and CP_Window. |
|
Sets the bounds of this view in port coordinates.
Reimplemented in CP_Window_Imp. |
|
|
|
|
|
|
|
|
|
|
|
|
|
Reimplemented in CP_View. |
|
|
|
|
|
|
|
Returns true if this view is visible.
Reimplemented in CP_Window_Imp, and CP_View. |
|
Returns true if this view is active.
Reimplemented in CP_View, and CP_Window_Imp. |
|
Returns true if this view is enabled.
Reimplemented in CP_View. |
|
Tests this view to see if it contains the passed in point, which is in port coordinates.
|
|
|
|
|
|
Creates the MacOS user pane control that performs all drawing and other interaction between this class and the MacOS ControlManager
|
|
|
Linux - Returns true if this view supports drag and drop. This default implementation just returns true if the CP_E_ViewFlags_SupportsDragAndDrop is set, and does not check the contents of the drag and drop. Users should override this to perform a check on the contents of the drag and drop to determine if an item is acceptable.
|
|
Initialize the event handler for events that this class will handle.
Reimplemented in CP_Window_Imp, CP_BevelButton, CP_ChasingArrows, CP_DisclosureButton, CP_DisclosureTriangle, CP_DocumentWindow, CP_DrawerWindow, CP_EditField, CP_FocusBorder, CP_LittleArrows, CP_LittleArrowsEditBuddy, CP_PlatformControl, CP_PopupButton, CP_PopupMenu, CP_ProgressBar, CP_PushButton, CP_QT_MovieView, CP_RadioGroup, CP_ScrollBar, CP_SearchField, CP_SegmentView, CP_SelectColorButton, CP_Slider, CP_Splitter, CP_TableHeaders, CP_TableView, CP_TabView, CP_TextGroupBox, CP_TextView, CP_Toolbar, CP_WindowListHeader, CP_MDIFrameWindow, CP_MenuBarWindow, and CP_Window_Imp. |
|
Reimplemented in CP_Scroller, CP_Splitter, and CP_View. |
|
Called when the bounds of this view has changed.
Reimplemented in CP_OpenGLView, and CP_QT_MovieView. |
|
Slot to disable a view. Reimplemented in CP_SelectColorButton, CP_Splitter, and CP_TableView. |
|
MacOS - Called when the user is holding the mouse down, and moving it in this view. This will track the mouse until the user has released the mouse button. The last part the mouse was over when the user has released the mouse button is returned.
Reimplemented in CP_SelectColorButton, CP_Splitter, CP_TableView, and CP_TV_DataBrowser. |
|
MacOS - Called when some action is causing this view to become focused. This default implementation returnns kControlNoPart.
Reimplemented in CP_TableView. |
|
|
|
Reimplemented in CP_TableView. |
|
MacOS - Returns the WindowRef of our containing window when the user has dragged an object over it.
|
|
MacOS - Returns the region of our target view that can accept the object that is currently over this view. The default implementation returns the the entire view bounds. Users can override if they want to only have a portion of the view act as a drop area.
Implements CP_M_DragTarget. |
|
|
|
Windows - Returns the background color of this view. The default is to return white. Other views that have a colored background will return the controls color for that view.
Reimplemented in CP_TabView, and CP_Window. |
|
Windows - Handles the Windows control color event to setup and return an HBRUSH that corresponds to the correct background color to use.
Reimplemented in CP_EditField. |
|
Linux - Called when the user has pressed the mouse down in this view. Subclasses need to override to do any useful processing.
Reimplemented in CP_BevelButton, CP_DisclosureButton, CP_DisclosureButton, CP_DisclosureButton, CP_DisclosureTriangle, CP_DisclosureTriangle, CP_IconControl, CP_IconControl, CP_PictureControl, CP_PictureControl, CP_PopupButton, CP_RoundButton, CP_RoundButton, CP_RoundButton, CP_Splitter, and CP_TextView. |
|
Linux - Called when the user has released the mouse in this view. Subclasses need to override to do any useful processing.
Reimplemented in CP_BevelButton, CP_DisclosureButton, CP_IconControl, CP_PictureControl, CP_PopupButton, and CP_RoundButton. |
|
Finish initializing our object. Calls OnInitPersist to do the actual work.
|
|
Called when we have constructed our persist objects and are now giving each one a chance to finish up. Calls OnFinishPersist to do the actual work.
|
|
Finish initializing our object. Called from InitPersist. This is the method to override to initialize your object.
Reimplemented in CP_BevelButton, CP_ChasingArrows, CP_CheckBox, CP_CheckGroupBox, CP_Clock, CP_DisclosureButton, CP_DisclosureTriangle, CP_EditField, CP_FocusBorder, CP_IconControl, CP_ImageWell, CP_LittleArrows, CP_LittleArrowsEditBuddy, CP_OpenGLView, CP_PictureControl, CP_Placard, CP_PopupArrow, CP_PopupGroupBox, CP_PopupMenu, CP_ProgressBar, CP_PushButton, CP_QT_MovieView, CP_RadioButton, CP_RadioGroup, CP_Relevance, CP_RoundButton, CP_ScrollableView, CP_ScrollBar, CP_Scroller, CP_SearchField, CP_SegmentView, CP_SelectColorButton, CP_Separator, CP_Slider, CP_Splitter, CP_StaticText, CP_TabGroup, CP_TableHeaders, CP_TableView, CP_TabView, CP_TextGroupBox, CP_TextView, CP_TV_DataBrowser, CP_TV_TextColumn, CP_View, CP_ViewBackground, CP_ViewBackground_White, CP_Window, CP_WindowHeader, and CP_WindowListHeader. |
|
Override this do the actual finishing up of initializing the persist object. This is called after all of the other objects have been created.
Reimplemented in CP_TabView, and CP_View. |
|
Sets the identifier for this object. If a specific identifier is not set with this function, then a default id is used, which is simply a running count of the number of objects created.
|
|
Returns the objects identifier.
|
|
Registers the signal / signal name contained in the passed in inSignal object.
|
|
Finds the CP_DataValueSignal object that matches the passed in inSignalName.
|
|
Returns the number of signals for this object.
|
|
Returns the signal name of the passed in signal index.
|
|
Registers the slot / slot name contained in the passed in inSlot object.
|
|
Finds the CP_Slot1 object that matches the passed in inSlotName.
|
|
Returns the number of slots for this object.
|
|
Returns the slot name of the passed in signal index.
|
|
|
|
|
|
|
|
|
|
Updates the status of a command.
|
|
Updates the status of a command based on the current state of the application.
|
|
Handles the processing of a command. If the command has been registered with this class, then its signal will be called. If the command has not been registered, then this function does nothing with the passed in command.
|
|
Signal called when a menu item is selected with no associated command. |
|
Returns the signal called when a menu item is selected and has no command associated with it.
|
|
Registers the passed in command. This places the command in a list of commands we will handle updating the status for, and when called executing the signal registered for the command.
|
|
Registers the passed in command. This places the command in a list of commands we will handle updating the status for, and when called executing the signal registered for the command.
|
|
Registers the passed in command. This places the command in a list of commands we will handle updating the status for. You are returned the signal object that you need to connect your slot to.
|
|
Registers the passed in command, returning the command status signal. If the command already exists, we will return the existing command status signal if there is one, otherwise we create a new signal, and return that signal. If there is already a signal, then return the existing signal.
|
|
Registers the passed in command, returning the command handling signal. If the command already exists, we will return the existing command handler signal if there is one, otherwise we create a new signal, and return that signal. If there is already a signal, then return the existing signal.
|
|
Returns true if the passed in command is known to this class.
|
|
Replaces a CP_Command for the passed in command number.
|
|
Unregisters a command.
|
|
Returns the CP_Command object associated with the passed in command number.
|
|
MacOS - Handles the processing of the passed in HICommand. This will translate the HICommand into a CPLAT CP_CommandNo for processing and updating the status of the command.
|
|
|
|
|
|
|
|
|
|
Tracks the drag by calling on the OS to handle the drag.
|
|
Tracks the drag by calling on the OS to handle the drag.
|
|
Return the CP_IDropSource object for the Windows OLE IDropSource interface . |
|
Return the CP_IDataObject object for the Windows OLE IDataObject interface . |
|
GetData method. Caller is asking if we can supply data in a given format and medium. Subclasses should override the OnGetData method to return the data.
|
|
GetDataHere method.
|
|
Return a FORMATETC enumerator object to enumerate over the types of formats we supply.
|
|
GetCanonicalFormatEtc method.
|
|
Caller is asking for data in a specified format.
|
|
SetData method. Calls OnSetData which you should override if needed.
|
|
DAdvise method. Calls OnDAdvise which you should override if needed.
|
|
DAdvise method. Calls OnDUnadvise which you should override if needed.
|
|
DAdvise method. Calls OnEnumDAdvise which you should override if needed.
|
|
Empty the list of data flavors currently being stored.
|
|
GetData Method. Caller is asking if we can supply data in a given format and medium. If your data is in a format other than kCP_E_ClipboardFormat_DataStream you need to override this to provide your data.
|
|
GetData Method. Caller is asking if we can supply data in a given format. If your data is in a format other than kCP_E_ClipboardFormat_DataStream you need to override this to provide your data.
|
|
OnGetDataHere method. Returns E_NOTIMPL. Subclasses need to override if they implement.
|
|
OnGetCanonicalFormatEtc method. Returns E_NOTIMPL. Subclasses need to override if they implement.
|
|
OnSetData method. Returns E_NOTIMPL. Subclasses need to override if they implement.
|
|
OnDAdvise method. Returns E_NOTIMPL. Subclasses need to override if they implement.
|
|
OnDUnadvise method. Returns E_NOTIMPL. Subclasses need to override if they implement.
|
|
OnEnumDAdvise method. Returns E_NOTIMPL. Subclasses need to override if they implement.
|
|
Adds the passed in CP_M_DragTarget to the global list of drag targets that this object maintains. This is the list of objects that get checked during a drag and drop operation to see if the object can receive the dropped object when the mouse if over the target object.
|
|
Removes a previously added CP_M_DragTarget object. This is called for you automatically when aa CP_M_DragTarget object is destroyed. However you can call this at other times, if you want to remove an object as a postential drop target for drag and drops.
|
|
Screen location where drop occurred. |
|
Called when the drag enters a new drop area. This is used to show the MacOS default drag hiliting.
|
|
Called when the drag leaves a drop area. This is used to remove the MacOS default drag hiliting.
|
|
Callback to the MacOS Drag Manager that is called during a drag and drop tracking operation.
|
|
Callback to the MacOS Drag Manager when the user has dropped an object over a drag target.
|
|
Finds and returns the CP_M_DragTarget that is in the passed in OSWindow at the passed in mouse location. The mouse location is in global coordinates. If no target was found at the passed in location, then NULL is returned.
|
|
Called when the user has entered a registered drag target object.
|
|
Called when we are entering a new drag target. |
|
Called when the user is has left the current drag target object.
|
|
Called when we leave the current target. |
|
Called when the user is tracking or moving the mouse during a drag and drop operationn.
|
|
|
|
Returns true if the passed in global point is over this drag target.
|
|
Called when the user is dragging an object around in a window. This is called from the MacOS Drag Manager callback.
|
|
Register a Windows HWND as a possible target for dropping objects onto.
|
|
Called while we are dragging over the target object. |
|
Called when the data is dropped onto the target object. Subclasses need to override this method. |
|
|
|
Return true if this object can accept the dropped data. Subclasses need to override. |
|
|
|
Object that actually implements the pane. |
|
Dummy event handler if the view imp has not been created. |
|
The command associated with this view / control. |
|
|
|
|
|
|
|
Signal sent when the bounds of this view change. |
|
Signal sent when the view is becoming visible. |
|
Signal sent when the view is becoming hidden. |
|
Signal sent when the view is becoming active. |
|
Signal sent when the view is becoming inactive. |
|
Signal sent when the view is becoming enabled. |
|
Signal sent when the view is becoming disable. |
|
Slot to show a view. |
|
Slot to hide a view. |
|
Slot to activate a view. |
|
Slot to deactivate a view. |
|
Slot to enable a view. |
|
|
|
List of registered signals for this object. |
|
List of registered slots for this object. |
|
Object identifier. |
|
|
|
List of commands managed by this class. |
|
|
|
|
|
Windows OLE IDropSource interface object. |
|
Windows OLE IDataObject interface object. |
|
Array of FORMATETC structure with desired formats. |
|
Number of FORMATETC structures. |
|
CP_Enumerator object. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Windows HWND for the target. |
|
OLE drop target interface object. |