#include <ngdrag.h>
Inheritance diagram for SGNameDragTarget:
Public Member Functions | |
SGNameDragTarget (CGadgetID idGadget=0) | |
Initialises a drag target for an item from the Name gallery. | |
SGNameDragTarget () | |
Default constructor, required for dynamic creation. | |
SGNameDragTarget (NameGallery *pGallery, CGadgetID idGadget=0) | |
Initialises a drag target for an item from the Name gallery. | |
Protected Member Functions | |
virtual BOOL | ProcessEvent (DragEventType nEvent, DragInformation *pDragInfo, OilCoord *pMousePos, KeyPress *pKeyPress) |
Event handler for SGNameItem gallery drag events. Overrides the base class handler to enable it to sort out the node being dragged for Name drags. | |
virtual BOOL | ProcessEvent (DragEventType nEvent, DragInformation *pDragInfo, OilCoord *pMousePos, KeyPress *pKeyPress) |
Event Handler for SuperGallery listitem drag events. | |
Private Member Functions | |
CC_DECLARE_DYNAMIC (SGNameDragTarget) |
Definition at line 182 of file ngdrag.h.
|
Initialises a drag target for an item from the Name gallery.
Definition at line 495 of file ngdrag.cpp. 00496 : SGListDragTarget(NameGallery::Instance(), idGadget) 00497 { 00498 // Empty. 00499 }
|
|
Default constructor, required for dynamic creation.
Definition at line 1454 of file sgname.cpp. 01455 : SGListDragTarget(0, 0) 01456 { 01457 // Empty. 01458 }
|
|
Initialises a drag target for an item from the Name gallery.
Definition at line 1472 of file sgname.cpp. 01473 : SGListDragTarget(pGallery, idGadget) 01474 { 01475 // Empty. 01476 }
|
|
|
|
Event Handler for SuperGallery listitem drag events.
Reimplemented from SGListDragTarget. |
|
Event handler for SGNameItem gallery drag events. Overrides the base class handler to enable it to sort out the node being dragged for Name drags. BOOL SGNameDragTarget::ProcessEvent(DragEventType nEvent, DragInformation* pDragInfo, OilCoord* pMousePos, KeyPress* pKeyPress)
Reimplemented from SGListDragTarget. Definition at line 520 of file ngdrag.cpp. 00522 { 00523 ERROR3IF(!pDragInfo->IS_KIND_OF(SGNameDrag), 00524 "SGNameDragTarget::ProcessEvent: wrong kind of DragInfo"); 00525 00526 SGDisplayNode* pDraggedNode = ((SGNameDrag*) pDragInfo)->GetDraggedNameAttr(); 00527 if (pDraggedNode == 0) return FALSE; 00528 00529 switch (nEvent) 00530 { 00531 case DRAGEVENT_COMPLETED: 00532 // Drag just one item. 00533 HandleDragCompleted((NameGallery*) TargetDialog, pDraggedNode, pMousePos, TRUE); 00534 return TRUE; 00535 00536 case DRAGEVENT_MOUSEMOVED: 00537 case DRAGEVENT_MOUSESTOPPED: 00538 case DRAGEVENT_MOUSEIDLE: 00539 return DetermineCursorShape((NameGallery*) TargetDialog, pDraggedNode, pMousePos); 00540 } 00541 00542 // Not interested in any other event so don't claim it. 00543 return FALSE; 00544 }
|