GalleryColourDragInfo Class Reference

#include <sgcolour.h>

Inheritance diagram for GalleryColourDragInfo:

ColourDragInformation DragInformation CCObject SimpleCCObject List of all members.

Public Member Functions

 GalleryColourDragInfo ()
 Default constructor - do not call this constructor.
 GalleryColourDragInfo (Document *pDocument, SGDisplayColour *pSourceItem, SGMouseInfo *pMouseInfo, SGMiscInfo *pMiscInfo, BOOL IsAdjust=FALSE)
 Constructor - use this one for "document colours" - ones that already live in a document. The Display item's colour MUST reference an IndexedColour.
 GalleryColourDragInfo (SGDisplayColour *pSourceItem, SGMouseInfo *pMouseInfo, SGMiscInfo *pMiscInfo, BOOL IsAdjust=FALSE)
 Constructor - use this for drags of "library colours" (ones with no parent document).
virtual void OnClick (INT32 Flags, POINT Point)
 This is called if a drag was attempted but never started because it was a click all along. It calls back the SourceItem SGDisplayColour, to get it to handle the click.
SGDisplayColourGetDraggedColour (void)

Protected Attributes

SGDisplayColourSourceItem
SGMouseInfo MouseInfo
SGMiscInfo MiscInfo

Detailed Description

Definition at line 135 of file sgcolour.h.


Constructor & Destructor Documentation

GalleryColourDragInfo::GalleryColourDragInfo  ) 
 

Default constructor - do not call this constructor.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/2/95

Definition at line 418 of file sgcolour.cpp.

00419 {
00420     ERROR3("Default GalleryColourDragInfo constructor called"); 
00421 }

GalleryColourDragInfo::GalleryColourDragInfo Document pDocument,
SGDisplayColour pSourceItem,
SGMouseInfo pMouseInfo,
SGMiscInfo pMiscInfo,
BOOL  IsAdjust = FALSE
 

Constructor - use this one for "document colours" - ones that already live in a document. The Display item's colour MUST reference an IndexedColour.

Parameters:
pDocument - The document in which the colour lives [INPUTS] pSourceItem - The gallery item from which the drag originated pMouseInfo - The mouse info which made the item start the drag pMiscInfo - The MiscInfo which accompanied the mouse event IsAdjust - TRUE if this is an adjust drag

Definition at line 444 of file sgcolour.cpp.

00447                       : ColourDragInformation(pSourceItem->GetDisplayedColour()->FindParentIndexedColour(),
00448                                                 IsAdjust, pDocument)
00449 {
00450     ERROR3IF(pSourceItem == NULL || pMouseInfo == NULL || pMiscInfo == NULL,
00451                 "GalleryColourDragInfo constructor: Illegal NULL param");
00452 
00453     SourceItem  = pSourceItem;  // Copy the source item pointer
00454 
00455     MouseInfo   = *pMouseInfo;  // Duplicate the structures (they may cease to exist
00456     MiscInfo    = *pMiscInfo;   // soon after the drag is started)
00457 }

GalleryColourDragInfo::GalleryColourDragInfo SGDisplayColour pSourceItem,
SGMouseInfo pMouseInfo,
SGMiscInfo pMiscInfo,
BOOL  IsAdjust = FALSE
 

Constructor - use this for drags of "library colours" (ones with no parent document).

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/2/95
Parameters:
pSourceItem - The gallery item from which the drag originated [INPUTS] pMouseInfo - The mouse info which made the item start the drag pMiscInfo - The MiscInfo which accompanied the mouse event IsAdjust - TRUE if this is an adjust drag

Definition at line 480 of file sgcolour.cpp.

00483                       : ColourDragInformation(pSourceItem->GetDisplayedColour(), IsAdjust,
00484                                                 NULL, pSourceItem->IsASpotColour())
00485 {
00486     ERROR3IF(pSourceItem == NULL || pMouseInfo == NULL || pMiscInfo == NULL,
00487                 "GalleryColourDragInfo constructor: Illegal NULL param");
00488 
00489     // Fill in the base class' name member, which we passed NULL for in the construction above
00490     String_256 Bob;
00491     pSourceItem->GetNameText(&Bob);
00492     Bob.Left(&ColourName, 63);
00493 
00494     SourceItem  = pSourceItem;  // Copy the source item pointer
00495 
00496     MouseInfo   = *pMouseInfo;  // Duplicate the structures (they may cease to exist
00497     MiscInfo    = *pMiscInfo;   // soon after the drag is started)
00498 }


Member Function Documentation

SGDisplayColour* GalleryColourDragInfo::GetDraggedColour void   )  [inline]
 

Definition at line 154 of file sgcolour.h.

00154 { return(SourceItem); }

void GalleryColourDragInfo::OnClick INT32  Flags,
POINT  Point
[virtual]
 

This is called if a drag was attempted but never started because it was a click all along. It calls back the SourceItem SGDisplayColour, to get it to handle the click.

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/1/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 519 of file sgcolour.cpp.

00520 {
00521     if (SourceItem != NULL)
00522         SourceItem->DragWasReallyAClick(&MouseInfo, &MiscInfo);
00523 }


Member Data Documentation

SGMiscInfo GalleryColourDragInfo::MiscInfo [protected]
 

Definition at line 160 of file sgcolour.h.

SGMouseInfo GalleryColourDragInfo::MouseInfo [protected]
 

Definition at line 159 of file sgcolour.h.

SGDisplayColour* GalleryColourDragInfo::SourceItem [protected]
 

Definition at line 158 of file sgcolour.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:54:41 2007 for Camelot by  doxygen 1.4.4