#include <camview.h>
Inheritance diagram for ViewDragTarget:
Public Member Functions | |
ViewDragTarget (wxWindow *TheWindow, wxRect *ClientArea=NULL, DragInformation *pDragInfo=NULL) | |
Constructor. | |
virtual UINT32 | GetCursorID () |
Base Method to set cursor over this target. | |
virtual BOOL | GetStatusLineText (String_256 *TheText) |
provide status line text for this target | |
virtual BOOL | GetDropInfo (PageDropInfo *) |
Get info about the current drag state of this target. | |
ViewDragTarget (wxWindow *TheWindow, CRect *ClientArea=NULL, DragInformation *pDragInfo=NULL) | |
virtual UINT32 | GetCursorID () |
Base Method to set cursor over this target. | |
virtual BOOL | GetStatusLineText (String_256 *TheText) |
virtual BOOL | GetDropInfo (PageDropInfo *) |
Protected Member Functions | |
BOOL | ProcessEvent (DragEventType Event, DragInformation *pDragInfo, wxPoint *pMousePos, KeyPress *pKeyPress) |
Event Handler for View Drag target. | |
BOOL | ProcessEvent (DragEventType Event, DragInformation *pDragInfo, wxPoint *pMousePos, KeyPress *pKeyPress) |
To process a drag-specific event. By default this method does nothing, just returning FALSE so that the event is left unclaimed, and is thus passed on to other interested drag targets. | |
Protected Attributes | |
DragInformation * | pCurrentDragInfo |
BOOL | OverOutline |
INT32 | LineRad |
DocView * | pThisDoc |
Spread * | pSpread |
DocCoord | DropPos |
ObjectDragTarget | OverTarget |
NodeRenderableInk * | OverNode |
DragInformation * | pCurrentDragInfo |
DocView * | pThisDoc |
Spread * | pSpread |
NodeRenderableInk * | OverNode |
Friends | |
class | DragManagerOp |
class | ColourDragInformation |
To remove a drag target at any time, destruct it - it automatically deregisters and cleans up.
Definition at line 500 of file camview.h.
|
Constructor.
Definition at line 5245 of file camview.cpp. 05246 : OilDragTarget(TheWindow,ClientArea) 05247 { 05248 pThisDoc = CCamView::GetDocViewFromWindow(TheWindow); 05249 OverOutline = FALSE; 05250 OverNode = NULL; 05251 05252 pCurrentDragInfo = pDragInfo; 05253 05254 DocView::GetCurrentMousePos(&pSpread, &DropPos); 05255 05256 // Find out the Magnetic Line Radius preference from its owner 05257 LineRad = NodeRenderableBounded::MagneticLineRadius; 05258 05259 // Scale it according to the ScaleFactor. 05260 if (pThisDoc!=NULL) 05261 { 05262 // Get the Scale factor and modify the magnetic radius 05263 double Scale = pThisDoc->GetViewScale().MakeDouble(); 05264 LineRad = (INT32) ((double)LineRad / Scale); 05265 } 05266 05267 }
|
|
|
|
Base Method to set cursor over this target.
Reimplemented from DragTarget. |
|
Base Method to set cursor over this target.
Reimplemented from DragTarget. Definition at line 5282 of file camview.cpp. 05283 { 05284 ERROR2IF(pCurrentDragInfo==NULL,FALSE,"No DragInfo available when getting Cursor"); 05285 05286 return pCurrentDragInfo->GetCursorID(this); 05287 }
|
|
|
|
Get info about the current drag state of this target.
Definition at line 5326 of file camview.cpp. 05327 { 05328 ERROR2IF(pDropInfo==NULL,FALSE,"NULL DropInfo pass to GetDropInfo()"); 05329 05330 pDropInfo->pDocView = pThisDoc; 05331 pDropInfo->pDoc = pThisDoc->GetDoc(); 05332 pDropInfo->pSpread = pSpread; 05333 pDropInfo->DropPos = DropPos; 05334 05335 pDropInfo->TargetHit = OverTarget; 05336 pDropInfo->pObjectHit = OverNode; 05337 05338 return TRUE; 05339 }
|
|
Reimplemented from DragTarget. |
|
provide status line text for this target
Reimplemented from DragTarget. Definition at line 5303 of file camview.cpp. 05304 { 05305 ERROR2IF(TheText==NULL,FALSE,"NULL string in GetStatusLineText()"); 05306 ERROR2IF(pCurrentDragInfo==NULL,FALSE,"No DragInfo available when getting Status Text"); 05307 05308 return pCurrentDragInfo->GetStatusLineText(TheText, this); 05309 }
|
|
To process a drag-specific event. By default this method does nothing, just returning FALSE so that the event is left unclaimed, and is thus passed on to other interested drag targets.
BE VERY CAREFUL to only override the winoil parts of this interface!
Reimplemented from OilDragTarget. |
|
Event Handler for View Drag target.
Reimplemented from OilDragTarget. Definition at line 5358 of file camview.cpp. 05361 { 05362 switch (Event) 05363 { 05364 case DRAGEVENT_INITIALISE: 05365 break; 05366 case DRAGEVENT_DEINITIALISE: 05367 break; 05368 case DRAGEVENT_ABORT: 05369 break; 05370 case DRAGEVENT_KEYPRESS: 05371 break; 05372 case DRAGEVENT_COMPLETED: 05373 { 05374 // Do another HitTest check 05375 OverNode = NULL; 05376 DocView::GetCurrentMousePos(&pSpread, &DropPos); 05377 OverTarget = pThisDoc->IsPointerOverNode(&OverNode,LineRad,FALSE,TRUE); 05378 05379 if (!OverNode) OverTarget = NO_TARGET; 05380 05381 // call doc dragfinished to do whatever is needed 05382 return pThisDoc->DM_DragFinished(pDragInfo,this); 05383 break; 05384 } 05385 case DRAGEVENT_MOUSESTOPPED: 05386 case DRAGEVENT_MOUSEMOVED: 05387 case DRAGEVENT_MOUSEIDLE: 05388 { 05389 OverNode = NULL; 05390 DocView::GetCurrentMousePos(&pSpread, &DropPos); 05391 OverTarget = pThisDoc->IsPointerOverNode(&OverNode,LineRad, TRUE, TRUE); 05392 05393 if (!OverNode) OverTarget = NO_TARGET; 05394 05395 return TRUE; 05396 break; 05397 } 05398 default: 05399 break; 05400 } 05401 return FALSE; 05402 }
|
|
|
|
Reimplemented from OilDragTarget. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|