#include <dragtrgt.h>
Inheritance diagram for DragTarget:
Public Member Functions | |
virtual BOOL | IsAKernelObject (void) |
Virtual method to determine if a given DragTarget is of the Kernel or Winoil 'gender'. | |
BOOL | WantsAllEvents (void) |
To determine if a given dragtarget wants events to be passed to it if the mouse pointer is outside the target area - This is only necessary for targets which supply a target window area. It is also not necessary for some events (e.g. INITIALISE, DEINITIALISE) which are always delivered, regardless of the pointer position. | |
Protected Member Functions | |
DragTarget () | |
To ERROR3 if you are dumb enough to call the default constructor. | |
~DragTarget () | |
Destructor Ensures that this drag target is no longer registered with any drag manager. i.e. if you want to remove a target during a drag, just destruct it. | |
virtual BOOL | ProcessEvent (DragEventType Event, DragInformation *pDragInfo, OilCoord *pMousePos, KeyPress *pKeyPress) |
Kernel-style ProcessEvent interface The KernelDragTarget overrides this method to handle kernel events. Non- kernel targets do not override this method, and thus give errors if called incorrectly. | |
virtual BOOL | ProcessEvent (DragEventType Event, DragInformation *pDragInfo, wxPoint *pMousePos, KeyPress *pKeyPress) |
Winoil-style ProcessEvent interface The OilDragTarget overrides this method to handle winoil events. Non- winoil targets do not override this method, and thus give errors if called incorrectly. | |
virtual void | GetTargetAreaInfo (DialogOp **ReturnedDialog, CGadgetID *ReturnedGadget) |
Winoil method for determining target-area information. | |
virtual void | GetTargetAreaInfo (wxWindow **ReturnedHWnd, wxRect *ReturnedTargetRect) |
Winoil method for determining target-area information. | |
virtual UINT32 | GetCursorID () |
Base Method to set cursor over this target. | |
virtual BOOL | GetStatusLineText (String_256 *TheText) |
Protected Attributes | |
BOOL | IWantAllEvents |
Friends | |
class | DragManagerOp |
This class would be properly abstract (pure virtual methods) execept that IMPLEMENT_DYNAMIC screws that all up for us.
Definition at line 194 of file dragtrgt.h.
|
To ERROR3 if you are dumb enough to call the default constructor.
Definition at line 135 of file dragtrgt.cpp. 00136 { 00137 IWantAllEvents = FALSE; // By default, targets only want events while the pointer 00138 // is over their target area 00139 }
|
|
Destructor Ensures that this drag target is no longer registered with any drag manager. i.e. if you want to remove a target during a drag, just destruct it.
Definition at line 158 of file dragtrgt.cpp. 00159 { 00160 // Just ensure that this target is not still registered with the manager 00161 DragManagerOp *Mgr = DragManagerOp::GetCurrentManager(); 00162 if (Mgr != NULL) 00163 Mgr->DeregisterTarget(this); 00164 }
|
|
Base Method to set cursor over this target.
Reimplemented in ColEditorDragTarget, SGScrollDragTarget, SGListDragTarget, ViewDragTarget, EditButtonDragTarget, ColourLineDragTarget, and ViewDragTarget. Definition at line 333 of file dragtrgt.cpp. 00334 { 00335 return _R(IDC_CANDROP); 00336 }
|
|
Reimplemented in ColEditorDragTarget, SGScrollDragTarget, SGListDragTarget, ViewDragTarget, EditButtonDragTarget, ColourLineDragTarget, and ViewDragTarget. Definition at line 351 of file dragtrgt.cpp. 00352 { 00353 ERROR2IF(TheText==NULL,FALSE,"NULL string in GetStatusLineText()"); 00354 * TheText = String_256(_R(IDS_DROPSTATUSLINETEXT)); 00355 return TRUE; 00356 }
|
|
Winoil method for determining target-area information.
Documentation: Docs.doc Reimplemented in OilDragTarget. Definition at line 284 of file dragtrgt.cpp. 00285 { 00286 *ReturnedHWnd = NULL; 00287 *ReturnedTargetRect = wxRect(0,0,0,0); 00288 ERROR3("DragTarget::GetTargetAreaInfo (WINOIL) -" 00289 " this is an illegal call on a KERNEL target!"); 00290 }
|
|
Winoil method for determining target-area information.
Documentation: Docs.doc Reimplemented in KernelDragTarget. Definition at line 313 of file dragtrgt.cpp. 00314 { 00315 *ReturnedDialog = NULL; 00316 *ReturnedGadget = 0; 00317 ERROR3("DragTarget::GetTargetAreaInfo (KERNEL) -" 00318 " this is an illegal call on a WINOIL target!"); 00319 }
|
|
Virtual method to determine if a given DragTarget is of the Kernel or Winoil 'gender'.
This method gives an ERROR3 - you should not derive from/use DragTarget! Documentation: Docs.doc Reimplemented in KernelDragTarget, and OilDragTarget. Definition at line 188 of file dragtrgt.cpp. 00189 { 00190 ERROR3("Somebody is using 'abstract' base class DragTarget!!!"); 00191 return(TRUE); 00192 }
|
|
Winoil-style ProcessEvent interface The OilDragTarget overrides this method to handle winoil events. Non- winoil targets do not override this method, and thus give errors if called incorrectly.
Reimplemented in ViewDragTarget, EditButtonDragTarget, ColourLineDragTarget, OilDragTarget, and ViewDragTarget. Definition at line 222 of file dragtrgt.cpp. 00224 { 00225 ERROR3("Illegal call to DragTarget::ProcessEvent - I'm not a WINOIL Target!"); 00226 return(FALSE); // We do not claim the event 00227 }
|
|
Kernel-style ProcessEvent interface The KernelDragTarget overrides this method to handle kernel events. Non- kernel targets do not override this method, and thus give errors if called incorrectly.
Reimplemented in ColEditorDragTarget, SGNameDragTarget, SGBitmapDragTarget, SGColourDragTarget, SGScrollDragTarget, SGListDragTarget, SGClipartDragTarget, SGFillsDragTarget, SGNameDragTarget, KernelDragTarget, SGFontsDragTarget, and SGLineDragTarget. Definition at line 256 of file dragtrgt.cpp. 00258 { 00259 ERROR3("Illegal call to DragTarget::ProcessEvent - I'm not a KERNEL Target!"); 00260 return(FALSE); // We do not claim the event 00261 }
|
|
To determine if a given dragtarget wants events to be passed to it if the mouse pointer is outside the target area - This is only necessary for targets which supply a target window area. It is also not necessary for some events (e.g. INITIALISE, DEINITIALISE) which are always delivered, regardless of the pointer position.
If an event is claimed by another target, it will NOT be passed on to other targets, even if this method returns TRUE. Definition at line 266 of file dragtrgt.h. 00267 { 00268 return(IWantAllEvents); 00269 }
|
|
Reimplemented in ColEditorDragTarget, SGBitmapDragTarget, SGColourDragTarget, SGScrollDragTarget, SGListDragTarget, SGClipartDragTarget, SGFillsDragTarget, ViewDragTarget, EditButtonDragTarget, ColourLineDragTarget, KernelDragTarget, OilDragTarget, SGFontsDragTarget, and SGLineDragTarget. Definition at line 196 of file dragtrgt.h. |
|
Definition at line 235 of file dragtrgt.h. |