Drag'n'drop : moved "setAcceptDragOperation" functions at window level
[blender.git] / intern / ghost / intern / GHOST_Window.h
index 86447a8623c533fe50c04f0e7022f56c7d00206f..1b5681dc41cafa71fbf08c97ca7c79b1d2e85a02 100644 (file)
@@ -183,6 +183,17 @@ public:
         */
        virtual GHOST_TSuccess getCursorGrabBounds(GHOST_Rect& bounds);
 
+       /**
+        * Tells if the ongoing drag'n'drop object can be accepted upon mouse drop
+        */
+       virtual void setAcceptDragOperation(bool canAccept);
+       
+       /**
+        * Returns acceptance of the dropped object
+        * Usually called by the "object dropped" event handling function
+        */
+       virtual bool canAcceptDragOperation() const;
+       
        /**
         * Sets the window "modified" status, indicating unsaved changes
         * @param isUnsavedChanges Unsaved changes or not
@@ -294,6 +305,9 @@ protected:
        /** The current shape of the cursor */
        GHOST_TStandardCursor m_cursorShape;
     
+       /** The acceptance of the "drop candidate" of the current drag'n'drop operation */
+       bool m_canAcceptDragOperation;
+       
        /** Modified state : are there unsaved changes */
        bool m_isUnsavedChanges;