#include <custcont.h>
Class Description
- See also:
- Class
ReferenceTarget,
List of Super Class IDs.
- Description:
- Drag and drop functionality has been expanded to include all
map and material buttons--including those in the non-standard
materials, plus most cases of bitmap buttons. As a result, whenever
you see a button representing a material or map you can drag the
button over a like button to display the Swap/Copy/Cancel dialog.
Likewise, you can drag any materials or maps from the modeless
version of the Materials/Maps Browser.
The drag-and-drop functions distinguish between material maps and
bitmaps. A bitmap is an image file, such as a .tga, or .jpg. A map
is an image used by the Materials Editor. It might consist of an
image file, but could just as easily be a parametric image, such as
Checkers or Noise, or it could be a map tree consisting of several
different types of maps or bitmaps. Users can drag any map slot or
button to any other map slot or button--including the sample slots.
Users can drag the Bitmap button in the
Bitmap Parameters rollout
to the Bitmap button in the Image
area of the Displace modifier, and vice-versa.
Users can drag from:
Sample slots
Browser lists (text or iconic)
The sample-sphere preview window in the Browser.
Material map buttons,
including:
The buttons in the Maps rollout
The shortcut map buttons
Any map buttons at any level
Submaterial buttons, such as those found in the Multi/Subobject
material
Projector light map button
Environment background map button
Fog Color and Opacity
maps buttons
Users can drag to:
Objects in the viewports
The Type button in the Materials Editor from the Browser.
All of the items in the FROM list, with this exception: You can
only drag to the Browser when it displays the material
library.
All methods of this class are virtual. For developers of plug-in
textures and materials see Class TexDADMgr, Class MtlDADMgr. These classes provide
implementations of these methods and the objects can simply be
used.
Public Member Functions
|
virtual
SClass_ID |
GetDragType
(HWND hwnd, POINT p)=0 |
virtual
BOOL |
IsNew
(HWND hwnd, POINT p, SClass_ID
type) |
virtual
BOOL |
OkToDrop
(ReferenceTarget *dropThis, HWND
hfrom, HWND hto, POINT p, SClass_ID
type, BOOL isNew=FALSE)=0 |
virtual
HCURSOR |
DropCursor
(ReferenceTarget *dropThis, HWND
hfrom, HWND hto, POINT p, SClass_ID
type, BOOL isNew=FALSE) |
virtual
int |
SlotOwner
() |
virtual
ReferenceTarget * |
GetInstance
(HWND hwnd, POINT p, SClass_ID
type)=0 |
virtual
ReferenceTarget * |
GetDestinationInstance
(HWND hwnd, POINT p, SClass_ID
type) |
virtual
void |
Drop
(ReferenceTarget *dropThis, HWND
hwnd, POINT p, SClass_ID
type, DADMgr
*srcMgr=NULL, BOOL bSrcClone=FALSE)=0 |
virtual
void |
SameWinDragAndDrop
(HWND h1, POINT p1, POINT p2) |
virtual
BOOL |
LetMeHandleLocalDAD
() |
virtual
void |
LocalDragAndDrop
(HWND h1, HWND h2, POINT p1, POINT p2) |
virtual
BOOL |
AutoTooltip
() |
virtual
BOOL |
CopyOnly
(HWND hwnd, POINT p, SClass_ID
type) |
virtual
BOOL |
AlwaysSendButtonMsgsOnDrop
() |
virtual
INT_PTR |
Execute
(int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR
arg3=0) |
virtual
BOOL |
OkToDropInstance
(ReferenceTarget *dropThis, HWND
hfrom, HWND hto, POINT p, SClass_ID
type) |
Member Function Documentation
virtual SClass_ID
GetDragType |
( |
HWND |
hwnd, |
|
|
POINT |
p |
|
) |
|
[pure virtual] |
virtual BOOL IsNew |
( |
HWND |
hwnd, |
|
|
POINT |
p, |
|
|
SClass_ID |
type |
|
) |
|
[inline, virtual] |
- Parameters:
- HWND hwnd
The source window handle.
POINT p
The point to drag from.
SClass_ID type
The super class ID to create.
- Default Implementation:
- { return FALSE; }
virtual BOOL OkToDrop |
( |
ReferenceTarget * |
dropThis, |
|
|
HWND |
hfrom, |
|
|
HWND |
hto, |
|
|
POINT |
p, |
|
|
SClass_ID |
type, |
|
|
BOOL |
isNew =
FALSE |
|
) |
|
[pure virtual] |
- Parameters:
-
ReferenceTarget *dropThis
A pointer to the item to check.
HWND hfrom
The window handle of the source.
HWND hto
The window handle of the destination.
POINT p
The point to check.
SClass_ID type
The super class ID of dropThis.
BOOL isNew = FALSE
TRUE if the item is a new instance; otherwise FALSE.
- Returns:
- TRUE if the specified item can be dropped; otherwise
FALSE.
Implemented in TexDADMgr,
MtlDADMgr,
and
mrShaderButtonHandler.
virtual HCURSOR DropCursor |
( |
ReferenceTarget * |
dropThis, |
|
|
HWND |
hfrom, |
|
|
HWND |
hto, |
|
|
POINT |
p, |
|
|
SClass_ID |
type, |
|
|
BOOL |
isNew =
FALSE |
|
) |
|
[inline, virtual] |
- Parameters:
-
ReferenceTarget *dropThis
The pointer to the item to check.
HWND hfrom
The window handle of the source.
HWND hto
The window handle of the destination.
POINT p
The point to check.
SClass_ID type
The super class ID of dropThis.
BOOL isNew = FALSE
TRUE if the item is a new instance; otherwise FALSE.
- Default Implementation:
- { return NULL;}
virtual int SlotOwner |
( |
|
) |
[inline, virtual] |
- Returns:
- One of the following values:
OWNER_MEDIT_SAMPLE
From a materials editor sample slot.
OWNER_NODE
From a node in the scene.
OWNER_MTL_TEX
From a button in a material or texture.
OWNER_SCENE
From a button in a light, modifier, atmospheric effect, etc.
OWNER_BROWSE_NEW
From the browser in the new category.
OWNER_BROWSE_LIB
From the browser in the library category.
OWNER_BROWSE_MEDIT
From the browser in the materials editor category.
OWNER_BROWSE_SCENE
From the browser in the scene category.
OWNER_MATERIAL_EXPLORER
From the material explorer.
- Default Implementation:
- { return OWNER_MTL_TEX; }
Reimplemented in TexDADMgr,
MtlDADMgr,
and
mrShaderButtonHandler.
- Parameters:
- HWND hwnd
The source window where the mouse down occurred.
POINT p
The point to drag from (position within hwnd).
SClass_ID type
The super class ID of the item to create.
Implemented in TexDADMgr,
MtlDADMgr,
and
mrShaderButtonHandler.
- Parameters:
- HWND hwnd
The destination window where the mouse up occurred.
POINT p
The point to drop to (position within hwnd).
SClass_ID type
The super class ID of the item.
- Default Implementation:
- { return GetInstance(hwnd, p, type); }
- Parameters:
-
ReferenceTarget *dropThis
A pointer to the item to drop.
HWND hwnd
The destination window handle (where the mouse was released).
POINT p
The destination point (within hwnd).
SClass_ID type
The type of object being dropped -- the super class ID of
dropThis.
DADMgr* srcMgr
The source DADMgr
pointer. NULL by default.
BOOL bSrcClone
TRUE if the dropThis is a clone of the drag source object,
FALSE otherwise. FALSE by default
Implemented in TexDADMgr,
MtlDADMgr,
and
mrShaderButtonHandler.
virtual void SameWinDragAndDrop |
( |
HWND |
h1, |
|
|
POINT |
p1, |
|
|
POINT |
p2 |
|
) |
|
[inline, virtual] |
- Parameters:
- HWND h1
The source/target window handle.
POINT p1
The source point.
POINT p2
The target point.
- Default Implementation:
- {}
virtual BOOL LetMeHandleLocalDAD |
( |
|
) |
[inline, virtual] |
virtual void LocalDragAndDrop |
( |
HWND |
h1, |
|
|
HWND |
h2, |
|
|
POINT |
p1, |
|
|
POINT |
p2 |
|
) |
|
[inline, virtual] |
- Parameters:
- HWND h1
The window handle.
HWND h2
The window handle.
POINT p1
The drag source point.
POINT p2
The drop destination point.
- Default Implementation:
- {}
Reimplemented in TexDADMgr,
and MtlDADMgr.
virtual BOOL AutoTooltip |
( |
|
) |
[inline, virtual] |
virtual BOOL CopyOnly |
( |
HWND |
hwnd, |
|
|
POINT |
p, |
|
|
SClass_ID |
type |
|
) |
|
[inline, virtual] |
- Parameters:
- HWND hwnd
The source window handle.
POINT p
The source point (within hwnd).
SClass_ID type
The type of object being dragged.
- Default Implementation:
- { return FALSE; }
virtual BOOL AlwaysSendButtonMsgsOnDrop |
( |
|
) |
[inline, virtual] |
- Default Implementation:
- { return FALSE; }
virtual INT_PTR Execute |
( |
int |
cmd, |
|
|
ULONG_PTR |
arg1 = 0 , |
|
|
ULONG_PTR |
arg2 = 0 , |
|
|
ULONG_PTR |
arg3 = 0 |
|
) |
|
[inline, virtual] |
- Parameters:
- int cmd
The command to execute.
ULONG arg1=0
Optional argument 1 (defined uniquely for each cmd).
ULONG arg2=0
Optional argument 2.
ULONG arg3=0
Optional argument 3.
- Returns:
- An integer return value (defined uniquely for each
cmd).
- Default Implementation:
- { return 0; }
virtual BOOL OkToDropInstance |
( |
ReferenceTarget * |
dropThis, |
|
|
HWND |
hfrom, |
|
|
HWND |
hto, |
|
|
POINT |
p, |
|
|
SClass_ID |
type |
|
) |
|
[inline, virtual] |
- Parameters:
-
ReferenceTarget *dropThis
The pointer to the item to check.
HWND hfrom
The window handle of the source.
HWND hto
The window handle of the destination.
POINT p
The point to check.
SClass_ID type
The super class ID of dropThis.
- Default Implementation:
- { return TRUE; }