3ds Max C++ API Reference
|
Manager class for Drag and Drop The Drag and Drop system is managed through a Core FP interface (DND_MGR_INTERFACE), defined by this class. More...
#include <idraganddrop.h>
Public Member Functions | |
virtual void | EnableDandD (BOOL flag)=0 |
Globally enables or disables the drag and drop interface. | |
virtual BOOL | IsEnabled ()=0 |
returns TRUE if the global drag and drop interface is enabled, otherwise FALSE. | |
virtual BOOL | EnableDandD (HWND hwnd, BOOL flag, DragAndDropHandler *handler=NULL)=0 |
Enables drag and drop for a given window (and its children). | |
virtual BOOL | DropPackage (HWND hwnd, POINT &point, URLTab &package)=0 |
This method allows the simulation of a package of files into a window at a given point. | |
virtual BOOL | DownloadPackage (URLTab &package, const MCHAR *directory, HWND hwnd=NULL, bool showProgress=false)=0 |
Used to download a package of URLs to the specified directory. | |
virtual const MCHAR * | GetDownloadDirectory ()=0 |
Returns the fully-specified path to the directory in which package drops are downloaded. | |
virtual int | NumHandlers (HWND hwnd)=0 |
Gets the number of handlers associated with the given window. | |
virtual DragAndDropHandler * | GetHandler (HWND hwnd, int i)=0 |
Returns a pointer to a specified drag and drop hander of a specified window. | |
virtual bool | DownloadUrlToDisk (HWND hwnd, const MCHAR *url, const MCHAR *fileName, DWORD dlgflags=0)=0 |
Downloads the file referenced by the URL to disk. | |
virtual INode * | ImportContextNode ()=0 |
Returns a pointer to the import context node. | |
![]() | |
CoreExport | FPInterfaceDesc () |
CoreExport | FPInterfaceDesc (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, ULONG flag,...) |
CoreExport | ~FPInterfaceDesc () |
virtual void | Init () |
LifetimeType | LifetimeControl () |
virtual BaseInterface * | GetInterface (Interface_ID id) |
CoreExport void | LoadDescriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *pCD, ULONG flag,...) |
CoreExport void | AppendFunction (int id,...) |
Add a new function to this interface descriptor. | |
CoreExport void | AppendProperty (int id,...) |
Add a new property to this interface descriptor. | |
CoreExport void | AppendEnum (int id,...) |
Add a new enum to this interface descriptor. | |
CoreExport void | SetClassDesc (ClassDesc *i_cd) |
CoreExport va_list | check_fn (va_list ap, int id) |
CoreExport va_list | scan_fn (va_list ap, int id, int index) |
CoreExport va_list | check_prop (va_list ap, int id) |
CoreExport va_list | scan_prop (va_list ap, int id, int index) |
CoreExport va_list | check_enum (va_list ap, EnumID id) |
CoreExport va_list | scan_enum (va_list ap, EnumID id, int index) |
FPInterfaceDesc * | GetDesc () |
Interface_ID | GetID () |
CoreExport FPFunctionDef * | GetFnDef (FunctionID fid) |
ActionTable * | GetActionTable () |
CoreExport void | EnableActions (BOOL onOff) |
virtual CoreExport HINSTANCE | HInstance () |
virtual CoreExport const MCHAR * | GetRsrcString (StringResID id) |
![]() | |
virtual BaseInterface * | GetInterface (Interface_ID id) |
virtual FPInterfaceDesc * | GetDesc ()=0 |
virtual CoreExport FPStatus | Invoke (FunctionID fid, TimeValue t=0, FPParams *params=NULL) |
virtual FPStatus | Invoke (FunctionID fid, FPParams *params) |
virtual CoreExport FPStatus | Invoke (FunctionID fid, TimeValue t, FPValue &result, FPParams *params=NULL) |
virtual FPStatus | Invoke (FunctionID fid, FPValue &result, FPParams *params=NULL) |
virtual CoreExport FunctionID | FindFn (const MCHAR *name) |
virtual CoreExport BOOL | IsEnabled (FunctionID actionID) |
virtual CoreExport BOOL | IsChecked (FunctionID actionID) |
virtual CoreExport BOOL | IsVisible (FunctionID actionID) |
virtual CoreExport FunctionID | GetIsEnabled (FunctionID actionID) |
virtual CoreExport FunctionID | GetIsChecked (FunctionID actionID) |
virtual CoreExport FunctionID | GetIsVisible (FunctionID actionID) |
virtual ActionTable * | GetActionTable () |
virtual void | EnableActions (BOOL onOff) |
![]() | |
virtual UtilExport | ~BaseInterface () |
Destructor. | |
UtilExport BaseInterface * | GetInterface (Interface_ID id) override |
virtual UtilExport Interface_ID | GetID () |
virtual LifetimeType | LifetimeControl () |
virtual bool | RegisterNotifyCallback (InterfaceNotifyCallback *incb) |
virtual void | UnRegisterNotifyCallback (InterfaceNotifyCallback *incb) |
virtual BaseInterface * | AcquireInterface () |
virtual void | ReleaseInterface () |
virtual void | DeleteInterface () |
virtual BaseInterface * | CloneInterface (void *remapDir=nullptr) |
![]() | |
virtual UtilExport | ~InterfaceServer () |
Destructor. | |
virtual UtilExport BaseInterface * | GetInterface (Interface_ID id) |
template<class InterfaceType > | |
InterfaceType * | GetTypedInterface () |
Additional Inherited Members | |
![]() | |
enum | LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled } |
![]() | |
static UtilExport void * | operator new (size_t size) |
Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e) |
Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new (size_t size, const char *filename, int line) |
New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, int block_type, const char *filename, int line) |
New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e, const char *filename, int line) |
New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new (size_t size, unsigned long flags) |
New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e, unsigned long flags) |
New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new[] (size_t size) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e) |
New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new[] (size_t size, const char *filename, int line) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new[] (size_t size, int block_type, const char *filename, int line) |
New operator used to allocate arrays of objects. | |
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line) |
New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new[] (size_t size, unsigned long flags) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e, unsigned long flags) |
New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. | |
static UtilExport void | operator delete (void *ptr) |
Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e) |
Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete (void *ptr, const char *filename, int line) |
Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete (void *ptr, int block_type, const char *filename, int line) |
Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line) |
Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete (void *ptr, unsigned long flags) |
Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags) |
Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete[] (void *ptr) |
Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e) |
Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete[] (void *ptr, const char *filename, int line) |
Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete[] (void *ptr, int block_type, const char *filename, int line) |
Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line) |
Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete[] (void *ptr, unsigned long flags) |
Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags) |
Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, void *placement_ptr) |
Placement new operator. | |
static UtilExport void | operator delete (void *ptr, void *placement_ptr) |
Placement delete operator. | |
static UtilExport void * | aligned_malloc (size_t size, size_t alignment) |
Allocates memory on a specified alignment boundary. | |
static UtilExport void * | aligned_realloc (void *ptr, size_t size, size_t alignment) |
Reallocates memory on a specified alignment boundary. | |
static UtilExport void | aligned_free (void *ptr) |
Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. | |
![]() | |
Interface_ID | ID |
MSTR | internal_name |
StringResID | description |
ClassDesc * | cd |
USHORT | flags |
Tab< FPFunctionDef * > | functions |
Tab< FPPropDef * > | props |
Tab< FPEnum * > | enumerations |
MSPluginClass * | pc |
Rollout * | rollout |
ActionTable * | action_table |
![]() | |
static CoreExport FPInterfaceDesc | nullInterface |
![]() | |
CoreExport void | load_descriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, USHORT flag, va_list ap) |
![]() | |
virtual FPStatus | _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p) |
Manager class for Drag and Drop The Drag and Drop system is managed through a Core FP interface (DND_MGR_INTERFACE), defined by this class.
It provides control over the drag and drop system, manages handler registration and exposes some useful utility methods for downloading URL's, simulating drops, etc.
The DragAndDropMgr supports multiple DragAndDropHandler's registered against a single HWND window. This allows new components and 3rd-party developers to incrementally add handlers for new dropTypes to common windows such as viewports, that the default handlers don't know how to handle.
The IDragAndDropMgr::EnableDandD(HWND hwnd, BOOL flag, DragAndDropHandler* handler) method can be called multiple times on the same window with different handler instances. The drag and drop manager keeps track of all the DragAndDropHandlers on each window and will call their drag and drop event methods as needed, in order of registration, until one of them returns S_OK. For example, on a viewport, the DefaultDragAndDropHandler is registered by default. The event methods (such as DragEnter, DragOver, Drop, etc.) return E_FAIL if the dropping IDataObject or DropType is not recognized by them. Then, if a new component registers its own handler to deal with some new droptype, the default handler will fail to recognize the new droptype and so the new handler will be called to process the new drop type.
Note that this means DragAndDropHandler event methods must correctly return S_OK or E_FAIL depending on whether they handle the IDataObject or DropType currently dropping, so that the appropriate handler is found and called by the DnDMgr.
|
pure virtual |
Globally enables or disables the drag and drop interface.
flag | - TRUE to enable, FALSE to disable. |
|
pure virtual |
returns TRUE if the global drag and drop interface is enabled, otherwise FALSE.
|
pure virtual |
Enables drag and drop for a given window (and its children).
If no custom DragAndDropHandler is supplied, a default one is used that will accept dropped scene files for opening and scripts for running. When the application is shutting down, it is prohibited to enable or disable a handler. Therefore after a NOTIFY_SYSTEM_SHUTDOWN broadcast this method will always return FALSE.
hwnd | - A handle to the window you wish to enable or disable drag and drop for. |
flag | - TRUE to enable, FALSE to disable. |
handler | - A pointer to a custom drag and drop handler, or NULL to accept a default one. |
|
pure virtual |
This method allows the simulation of a package of files into a window at a given point.
A package of files, specified as a list of URL strings is the common form of DropType data from iDrop sources and files dragged from the Windows desktop. The entire package is downloaded, as needed, but only the first file in the list is actually dropped into 3ds Max. The other files in the package are presumed to be support files, such as texmaps or xref sources, for the main drop file.
After the drop, the URL strings in the URLTab are converted to fully-specified path names to local file copies, if any had to be downloaded from the web.
hwnd | - A handle to the window. If this is set to NULL, the default 3ds Max window is used. |
point | - The point at which to drop. |
package | - A reference to the local copies of the URL strings. |
|
pure virtual |
Used to download a package of URLs to the specified directory.
If the hwnd argument is supplied, any progress or other messages are centered over that window.
package | - A reference to the local copies of the URL strings. |
directory | - The directory path string to download to. |
hwnd | - A handle to the window. If this is set to NULL, the default window is used. |
showProgress | - The download progress dialog can be displayed by passing true. |
|
pure virtual |
Returns the fully-specified path to the directory in which package drops are downloaded.
|
pure virtual |
Gets the number of handlers associated with the given window.
hwnd | - A handle to the window. |
|
pure virtual |
Returns a pointer to a specified drag and drop hander of a specified window.
hwnd | - A handle to the window. |
i | - The I-th handler. |
|
pure virtual |
Downloads the file referenced by the URL to disk.
hwnd | - A handle to the window. |
url | - The URL string of the file to download. |
fileName | - The filename string of the URL to store on disk. |
dlgflags | - Additional controls to the download behavior. Currently only one flag is supported, DOWNLOADDLG_NOPLACE, which hides an option in the progress dialog that allows the user to place (move) a dropped object immediately after being dropped. |
|
pure virtual |
Returns a pointer to the import context node.