class CCL::Browsable::PresetNode
Overview
#include <presetnode.h> class PresetNode: public CCL::Browsable::FileNode { public: // fields BrowserNode* parent = nullptr; BrowserNode bool isSubPreset = false); // methods DECLARE_CLASS (PresetNode, FileNode); PROPERTY_SHARED_AUTO (IPreset, preset, Preset); IsSubPreset bool isDefaultPreset () const; bool supportsFavorites () const; virtual IImage* getIcon (); virtual StringID getCustomBackground () const; virtual IUnknown* createDragObject (); virtual bool performRemoval (NodeRemover& remover); virtual int compare (const Object& obj) const; virtual bool drawDetail ( const IItemModel::DrawInfo& info, StringID id, AlignmentRef alignment ); virtual bool onOpen (bool deferred = true); virtual tresult CCL_API appendContextMenu ( IContextMenu& contextMenu, Container* selectedNodes ); virtual bool interpretCommand ( const CommandMsg& msg, const Container* selectedNodes ); virtual bool isFolder () const; virtual bool hasSubNodes () const; virtual bool canAutoExpand () const; virtual bool getSubNodes ( Container& children, NodeFlags flags = NodeFlags::kAll ); virtual bool onRefresh (); static bool getSelectedPresets (UnknownList& presets, Browser* browser); };
Inherited Members
public: // typedefs typedef CStringRef MemberID; // enums enum FileCommands; // structs struct NodeFlags; // fields BrowserNode* parent = nullptr); BrowserNode* parent = nullptr); kShowInShellBrowser; canShowInShellBrowser kRenameFile; canShowInShellBrowser canRenameFile kCreateSubFolder; IFileNode; // 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 (); DECLARE_CLASS (ListViewItem, Object); PROPERTY_STRING (title, Title); virtual IImage* getIcon (); PROPERTY_SHARED_AUTO (IImage, thumbnail, Thumbnail); Enabled PROPERTY_BOOL (checked, Checked); virtual bool getDetail (Variant& value, StringID id) const; virtual bool drawDetail ( const IItemModel::DrawInfo& info, StringID id, AlignmentRef alignment ); virtual StringID getCustomBackground () const; virtual bool measureContent ( Rect& size, StringID id, const IItemModel::StyleInfo& info ); virtual bool getTooltip (String& tooltip, StringID id); virtual IUnknown* createDragObject (); virtual bool toString (String& string, int flags = 0) const; virtual int compare (const Object& obj) const; DECLARE_CLASS (TreeViewNode, ListViewItem); virtual bool isFolder () const; virtual bool hasSubNodes () const; virtual bool canAutoExpand () const; virtual bool getSubNodes ( Container& children, NodeFlags flags = NodeFlags::kAll ); virtual CString CCL_API getNodeType () const = 0; virtual tbool CCL_API isNodeType (StringID type) const = 0; virtual StringRef CCL_API getNodeTitle () const = 0; DECLARE_STRINGID_MEMBER (kTitleProperty); virtual tbool CCL_API checkCommandCategory (CStringRef category) const = 0; virtual tbool CCL_API interpretCommand (const CommandMsg& msg) = 0; DECLARE_CLASS (BrowserNode, TreeViewNode); virtual Browser* getBrowser () const; PROPERTY_POINTER (BrowserNode, parent, Parent) const; bool hasAncestor (BrowserNode* ancestor) const; const BrowserNode* getAncestorNode (MetaClassRef classID) const; template <class T> T* getAncestorNode () const; const BrowserNode* getAncestorNodeWithInterface (UIDRef iid) const; template <class T> T* getAncestorNodeWithInterface () const; virtual bool getUniqueName (MutableCString& name); virtual bool drawIconOverlay (const IItemModel::DrawInfo& info); virtual bool onRefresh (); virtual void onNodeRemoved (BrowserNode* node); virtual bool onOpen (bool deferred = false); virtual bool onEdit (StringID id, const IItemModel::EditInfo& info); virtual bool performRemoval (NodeRemover& remover); virtual bool interpretCommand ( const CommandMsg& msg, const Container* selectedNodes ); virtual tresult CCL_API appendContextMenu ( IContextMenu& contextMenu, Container* selectedNodes ); virtual ISearchProvider* getSearchProvider (); virtual tbool CCL_API checkCommandCategory (CStringRef category) const; virtual tbool CCL_API interpretCommand (const CommandMsg& msg); virtual int compare (const Object& obj) const; virtual CLASS_INTERFACE2 (IBrowserNode, ICommandHandler, TreeViewNode) protected CString CCL_API getNodeType () const; virtual tbool CCL_API isNodeType (StringID type) const; virtual StringRef CCL_API getNodeTitle () const; virtual tbool CCL_API getProperty (Variant& var, MemberID propertyId) const; virtual tbool CCL_API setProperty (MemberID propertyId, const Variant& var); virtual tbool CCL_API invokeMethod (Variant& returnValue, MessageRef msg); bool drawDetailString ( const IItemModel::DrawInfo& info, StringRef string, AlignmentRef alignment = Alignment () ); bool drawDetailString ( const IItemModel::DrawInfo& info, StringRef string, BrushRef textBrush, AlignmentRef alignment = Alignment () ); bool drawDetailLines ( const IItemModel::DrawInfo& info, String strings [], int count, BrushRef textBrush, AlignmentRef alignment = Alignment () ); template <class Iface> Iface* getAncestorNodeWithInterface () const; virtual UrlRef CCL_API getFilePath () const = 0; DECLARE_CLASS (FileNode, BrowserNode); const Url* getPath () const; virtual UrlRef CCL_API getFilePath () const; PROPERTY_VARIABLE (int, fileCommandMask, FileCommandMask); canShowInShellBrowser PROPERTY_FLAG ( fileCommandMask, kOpenWithExtShell, canOpenWithExternalShell ); canShowInShellBrowser canRenameFile PROPERTY_FLAG ( fileCommandMask, kDeleteFile, canDeleteFile ); virtual canShowInShellBrowser canRenameFile canCreateSubFolder IImage* getIcon (); virtual IUnknown* createDragObject (); virtual tresult CCL_API appendContextMenu ( IContextMenu& contextMenu, Container* selectedNodes ); virtual bool interpretCommand ( const CommandMsg& msg, const Container* selectedNodes ); virtual bool performRemoval (NodeRemover& remover); virtual bool onOpen (bool deferred = true);
Detailed Documentation
Methods
virtual StringID getCustomBackground () const
Get an optional background color id.
It is looked up in the visual style of the view.
virtual IUnknown* createDragObject ()
Returns “retained” this or new object owned by caller.
virtual bool drawDetail ( const IItemModel::DrawInfo& info, StringID id, AlignmentRef alignment )
Draw column with given identifier.
virtual bool onOpen (bool deferred = true)
called on double click or enter/return key
virtual bool canAutoExpand () const
can the node automatically expand on click?
virtual bool onRefresh ()
return true if subNodes must be discarded