struct CCL::ITreeItem

Overview

Tree item interface. More…

#include <itreeview.h>

struct ITreeItem: public CCL::IUnknown
{
    // enums

    enum NavigateFlags;
    enum States;

    // methods

    virtual IUnknown*CCL_API getData () const = 0;
    virtual tbool CCL_API getContent (IUnknownList& list) const = 0;
    virtual IUnknownIterator*CCL_API getContent () const = 0;
    virtual void CCL_API createSubItems () = 0;
    virtual int CCL_API getState () const = 0;
    virtual ITreeItem*CCL_API getParentItem () const = 0;
    virtual tbool CCL_API isEmpty () const = 0;
    virtual ITreeItem*CCL_API findChild (IUnknown* data) const = 0;
    virtual ITreeItem*CCL_API findItem (IUnknown* data, tbool onlyExpanded = true) const = 0;

    virtual ITreeItem*CCL_API findItem (
        const IRecognizer* recognizer,
        tbool onlyExpanded = true
    ) const = 0;

    virtual ITreeItem*CCL_API findItem (
        StringID path,
        tbool createItems,
        tbool acceptAncestor = false
    ) = 0;

    virtual tbool CCL_API makePath (
        MutableCString& path,
        ITreeItem* relativeTo = nullptr
    ) = 0;

    virtual ITreeItem*CCL_API navigate (int rows, int flags) = 0;
    virtual void CCL_API addSubItem (IUnknown* data, int index = -1) = 0;
    virtual void CCL_API removeAll () = 0;
    virtual void CCL_API remove () = 0;
    virtual IViewStateHandler*CCL_API createExpandState () = 0;
    virtual IViewStateHandler*CCL_API storeExpandState () = 0;
    virtual tbool CCL_API restoreExpandState (IViewStateHandler* state) = 0;
};

Inherited Members

public:
    // 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;

Detailed Documentation

Tree item interface.

Methods

virtual IUnknown*CCL_API getData () const = 0

Get associated data.

virtual tbool CCL_API getContent (IUnknownList& list) const = 0

Get data of existing subitems.

virtual IUnknownIterator*CCL_API getContent () const = 0

Get data of existing subitems.

virtual void CCL_API createSubItems () = 0

Ensure that subItems were created.

virtual int CCL_API getState () const = 0

Get state flags.

virtual ITreeItem*CCL_API getParentItem () const = 0

Get parent item.

virtual tbool CCL_API isEmpty () const = 0

Check if the item is empty (has no no childs).

virtual ITreeItem*CCL_API findChild (IUnknown* data) const = 0

Find a direct child of this with the given data.

virtual ITreeItem*CCL_API findItem (IUnknown* data, tbool onlyExpanded = true) const = 0

Find a subitem (including this) with the given data.

virtual ITreeItem*CCL_API findItem (
    const IRecognizer* recognizer,
    tbool onlyExpanded = true
) const = 0

Find a subitem (including this) using a recognizer.

virtual ITreeItem*CCL_API findItem (
    StringID path,
    tbool createItems,
    tbool acceptAncestor = false
) = 0

Find a subitem by path.

virtual tbool CCL_API makePath (
    MutableCString& path,
    ITreeItem* relativeTo = nullptr
) = 0

Create a path to the item, optionally starting from item relativeTo.

virtual ITreeItem*CCL_API navigate (int rows, int flags) = 0

Get a next / previous item specicified by rows.

virtual void CCL_API addSubItem (IUnknown* data, int index = -1) = 0

Add a new subitem.

virtual void CCL_API removeAll () = 0

Remove all subitems and collapse this.

virtual void CCL_API remove () = 0

Remove the item from it’s parent.

virtual IViewStateHandler*CCL_API createExpandState () = 0

Create an empty expansion state.

virtual IViewStateHandler*CCL_API storeExpandState () = 0

Store expansion states starting with this item.

virtual tbool CCL_API restoreExpandState (IViewStateHandler* state) = 0

Restore expansion states starting with this item.