class CCL::DragHandler
Overview
Has a SpriteBuilder that can be used to create a sprite for visual feedback. More…
#include <draghandler.h> class DragHandler: public CCL::Object, public CCL::AbstractDragHandler { public: // fields childOffset; IDragHandler; // construction DragHandler (UserControl& control); // methods DECLARE_CLASS (DragHandler, Object); IView* getView () const; SpriteBuilder& getSpriteBuilder (); void buildSprite (int options = 0); void replaceSpriteItemText (int index, StringRef text); const UnknownList& getData () const; virtual void addDataItems (const IUnknownList& items, IUnknown* context); virtual bool prepare ( const IUnknownList& items, IDragSession* session = nullptr ); virtual void postProcessData (); PROPERTY_AUTO_POINTER (IDragHandler, childDragHandler, ChildDragHandler); virtual ChildOffset bool getHelp (IHelpInfoBuilder& helpInfo); virtual tbool CCL_API dragEnter (const DragEvent& event); virtual tbool CCL_API dragOver (const DragEvent& event); virtual tbool CCL_API dragLeave (const DragEvent& event); virtual tbool CCL_API drop (const DragEvent& event); virtual tbool CCL_API afterDrop (const DragEvent& event); };
Inherited Members
public: // typedefs typedef CStringRef MemberID; // fields spriteOffset; // methods virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0; virtual unsigned int CCL_API retain () = 0; virtual unsigned int CCL_API release () = 0; Unknown& operator = (const Unknown&); unsigned int getRetainCount () const; virtual Object*CCL_API revealObject (const void* moduleAddress) = 0; virtual void CCL_API addObserver (IObserver* observer) = 0; virtual void CCL_API removeObserver (IObserver* observer) = 0; virtual void CCL_API signal (MessageRef msg) = 0; virtual void CCL_API deferSignal (IMessage* msg) = 0; static ISubject void addObserver (IUnknown* unknown, IObserver* observer); static void removeObserver (IUnknown* unknown, IObserver* observer); virtual void CCL_API notify (ISubject* subject, MessageRef msg) = 0; static IObserver void notify ( IUnknown* unknown, ISubject* subject, MessageRef msg ); virtual const ITypeInfo&CCL_API getTypeInfo () const = 0; virtual tbool CCL_API getProperty (Variant& var, MemberID propertyId) const = 0; virtual tbool CCL_API setProperty (MemberID propertyId, const Variant& var) = 0; virtual tbool CCL_API getPropertyNames (IPropertyCollector& collector) const = 0; virtual tbool CCL_API invokeMethod (Variant& returnValue, MessageRef msg) = 0; DECLARE_BASE_CLASS (Object); virtual void CCL_API removeObserver (IObserver* observer); virtual void CCL_API signal (MessageRef msg); virtual void CCL_API deferSignal (IMessage* msg); virtual void deferChanged (); virtual void CCL_API notify (ISubject* subject, MessageRef msg); virtual bool equals (const Object& obj) const; virtual int compare (const Object& obj) const; virtual bool load (const Storage& storage); virtual bool save (const Storage& storage) const; virtual bool save (const OutputStorage& storage) const; virtual bool toString (String& string, int flags = 0) const; virtual int getHashCode (int size) const; IUnknown* asUnknown (); static void addGarbageCollected (Object* obj, bool globalScope = true); static void deferDestruction (Object* obj); static const void* getModuleAddress (); virtual tbool CCL_API dragEnter (const DragEvent& event) = 0; virtual tbool CCL_API dragOver (const DragEvent& event) = 0; virtual tbool CCL_API dragLeave (const DragEvent& event) = 0; virtual tbool CCL_API drop (const DragEvent& event) = 0; virtual tbool CCL_API afterDrop (const DragEvent& event) = 0; virtual tbool CCL_API hasVisualFeedback () const = 0; virtual tbool CCL_API isNullHandler () const = 0; virtual tbool CCL_API wantsAutoScroll () const = 0; PROPERTY_POINTER (ISprite, sprite, Sprite); SpriteOffset void moveSprite (PointRef where); void moveSprite (RectRef rect); virtual void moveSprite (const DragEvent& event); void hideSprite (); void deleteSprite (); virtual tbool CCL_API dragEnter (const DragEvent& event); virtual tbool CCL_API dragOver (const DragEvent& event); virtual tbool CCL_API dragLeave (const DragEvent& event); virtual tbool CCL_API drop (const DragEvent& event); virtual tbool CCL_API afterDrop (const DragEvent& event); virtual tbool CCL_API hasVisualFeedback () const; virtual tbool CCL_API isNullHandler () const; virtual tbool CCL_API wantsAutoScroll () const;
Detailed Documentation
Has a SpriteBuilder that can be used to create a sprite for visual feedback.
Has a list of objects that might be created for feedback in “dragEnter” and reused in “drop”.
Methods
virtual bool prepare ( const IUnknownList& items, IDragSession* session = nullptr )
adds items, builds sprite; returns true if objects were added
virtual void postProcessData ()
called when data get’s passed to an IDataTarget; a chance to finalize things that you don’t want in the prepare phase (e.g. creating files)