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...
|
virtual void | EnableDandD (BOOL flag)=0 |
| Globally enables or disables the drag and drop interface. More...
|
|
virtual BOOL | IsEnabled ()=0 |
| returns TRUE if the global drag and drop interface is enabled, otherwise FALSE. More...
|
|
virtual BOOL | EnableDandD (HWND hwnd, BOOL flag, DragAndDropHandler *handler=NULL)=0 |
| Enables drag and drop for a given window (and its children). More...
|
|
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. More...
|
|
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. More...
|
|
virtual const MCHAR * | GetDownloadDirectory ()=0 |
| Returns the fully-specified path to the directory in which package drops are downloaded. More...
|
|
virtual int | NumHandlers (HWND hwnd)=0 |
| Gets the number of handlers associated with the given window. More...
|
|
virtual DragAndDropHandler * | GetHandler (HWND hwnd, int i)=0 |
| Returns a pointer to a specified drag and drop hander of a specified window. More...
|
|
virtual bool | DownloadUrlToDisk (HWND hwnd, const MCHAR *url, const MCHAR *fileName, DWORD dlgflags=0)=0 |
| Downloads the file referenced by the URL to disk. More...
|
|
virtual INode * | ImportContextNode ()=0 |
| Returns a pointer to the import context node. More...
|
|
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. More...
|
|
CoreExport void | AppendProperty (int id,...) |
| Add a new property to this interface descriptor. More...
|
|
CoreExport void | AppendEnum (int id,...) |
| Add a new enum to this interface descriptor. More...
|
|
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 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 UtilExport | ~BaseInterface () |
| Destructor. More...
|
|
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. More...
|
|
template<class InterfaceType > |
InterfaceType * | GetTypedInterface () |
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
static UtilExport void * | operator new[] (size_t size, int block_type, const char *filename, int line) |
| New operator used to allocate arrays of objects. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
static UtilExport void * | operator new (size_t size, void *placement_ptr) |
| Placement new operator. More...
|
|
static UtilExport void | operator delete (void *ptr, void *placement_ptr) |
| Placement delete operator. More...
|
|
static UtilExport void * | aligned_malloc (size_t size, size_t alignment) |
| Allocates memory on a specified alignment boundary. More...
|
|
static UtilExport void * | aligned_realloc (void *ptr, size_t size, size_t alignment) |
| Reallocates memory on a specified alignment boundary. More...
|
|
static UtilExport void | aligned_free (void *ptr) |
| Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
|
|
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.
- Note
- In Max 2011, the management of DragAndDropHandler memory lifetime was changed. In previous versions, it was up to 3rd party developers to 'unregister' (Passing in FALSE to IDragAndDropMgr::EnableDandD) their drag and drop handlers (DragAndDropHandler*), before max was shutdown. If they didn't max would crash on shutdown. Now, unitialization has been moved up before 3rd party plugins are unloaded. Now, the manager automatically 'unregisters' all DragAndDropHandler pointers during a broadcast of NOTIFY_SYSTEM_SHUTDOWN. This means that the manager calls DragAndDropHandler::Release on all DragAndDropHandler pointers registered with it. After the manager cleans up during the NOTIFY_SYSTEM_SHUTDOWN broadcast, any subsequent calls to register a drag and drop handler will return FALSE. Also any subsequent calls to 'unregister' a handler will just silently do nothing.
- See also
- Class FPStaticInterface, Class DragAndDropHandler, Class URLTab