class CCL::Browsable::DirectoryNode
Overview
#include <filesystemnodes.h> class DirectoryNode: public CCL::Browsable::FileNode, public CCL::IDataTarget, public CCL::ISearchProvider { public: // fields BrowserNode* parent = nullptr; BrowserNode IUrlFilter* urlFilter = nullptr); // methods DECLARE_CLASS (DirectoryNode, FileNode); PROPERTY_POINTER (IUrlFilter, urlFilter, UrlFilter); virtual bool isHiddenFile (UrlRef path) const; virtual bool getTargetLocation (Url& path) const; virtual bool shouldCopyByDefault (UrlRef sourcePath) const; virtual bool isFolder () const; virtual bool hasSubNodes () const; virtual bool getSubNodes ( Container& children, NodeFlags flags = NodeFlags::kAll ); virtual StringID getCustomBackground () const; virtual tresult CCL_API appendContextMenu ( IContextMenu& contextMenu, Container* selectedNodes ); virtual bool interpretCommand ( const CommandMsg& msg, const Container* selectedNodes ); virtual ISearchProvider* getSearchProvider (); virtual tbool CCL_API canInsertData ( const IUnknownList& data, IDragSession* session = nullptr, IView* targetView = nullptr, int insertIndex = -1 ); virtual tbool CCL_API insertData ( const IUnknownList& data, IDragSession* session = nullptr, int insertIndex = -1 ); virtual CLASS_INTERFACE2 (IDataTarget, ISearchProvider, FileNode) protected BrowserNode* createNode (Url* forPath) const; virtual IFileIterator* createIterator (int mode) const; bool hasFileNodes () const; virtual StringRef getTitle () const; virtual UrlRef getStartPoint () const; virtual IImage* getSearchIcon () const; virtual ISearcher* createSearcher (ISearchDescription& description); virtual IUrlFilter* getSearchResultFilter () const; virtual IUnknown* customizeSearchResult ( CustomizeArgs& args, IUnknown* resultItem ); };
Inherited Members
public: // typedefs typedef CStringRef MemberID; // enums enum FileCommands; // structs struct NodeFlags; struct CustomizeArgs; // 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); virtual tbool CCL_API canInsertData ( const IUnknownList& data, IDragSession* session = nullptr, IView* targetView = nullptr, int insertIndex = -1 ) = 0; virtual tbool CCL_API insertData ( const IUnknownList& data, IDragSession* session = nullptr, int insertIndex = -1 ) = 0; virtual StringRef getTitle () const = 0; virtual UrlRef getStartPoint () const = 0; virtual IImage* getSearchIcon () const = 0; virtual ISearcher* createSearcher (ISearchDescription& description) = 0; virtual IUrlFilter* getSearchResultFilter () const = 0; virtual IUnknown* customizeSearchResult ( CustomizeArgs& args, IUnknown* resultItem ) = 0;
Detailed Documentation
Methods
virtual bool getTargetLocation (Url& path) const
Get local target path for drag operations, defaults to directory itself.
virtual bool shouldCopyByDefault (UrlRef sourcePath) const
Tells if the default drag & drop action on this folder should be copy instead of move (default: true on another volume).
virtual StringID getCustomBackground () const
Get an optional background color id.
It is looked up in the visual style of the view.
virtual tbool CCL_API canInsertData ( const IUnknownList& data, IDragSession* session = nullptr, IView* targetView = nullptr, int insertIndex = -1 )
Check if data can be inserted.
virtual tbool CCL_API insertData ( const IUnknownList& data, IDragSession* session = nullptr, int insertIndex = -1 )
Insert data.
bool hasFileNodes () const
checks if this delivers any subNodes (truthful version of hasSubNodes)