class CCL::TreeViewModel::ListViewAdapter
Translates contents of TreeViewModel root folder for presenting in a ListView.
class ListViewAdapter: public CCL::Object, public CCL::IItemModel { public: // fields IItemModel; // construction ListViewAdapter (TreeViewModel& treeModel); // methods const ObjectArray& getFlatItems (); ItemIndex makeTreeIndex (ItemIndexRef index); ItemIndex makeListIndex (const ListViewItem* item); void CCL_API viewAttached (IItemView* itemView); void CCL_API viewDetached (IItemView* itemView); int CCL_API countFlatItems (); tbool CCL_API getRootItem (ItemIndex& index); tbool CCL_API isItemFolder (ItemIndexRef index); tbool CCL_API canExpandItem (ItemIndexRef index); tbool CCL_API canAutoExpandItem (ItemIndexRef index); tbool CCL_API getSubItems (IUnknownList& items, ItemIndexRef index); IItemSelection*CCL_API getSelection (); tbool CCL_API getItemTitle (String& title, ItemIndexRef index); tbool CCL_API getUniqueItemName (MutableCString& name, ItemIndexRef index); IImage*CCL_API getItemIcon (ItemIndexRef index); IImage*CCL_API getItemThumbnail (ItemIndexRef index); tbool CCL_API getItemTooltip (String& tooltip, ItemIndexRef index, int column); tbool CCL_API canSelectItem (ItemIndexRef index); tbool CCL_API onItemFocused (ItemIndexRef index); tbool CCL_API openItem (ItemIndexRef index, int column, const EditInfo& info); tbool CCL_API canRemoveItem (ItemIndexRef index); tbool CCL_API removeItem (ItemIndexRef index); tbool CCL_API canInsertData ( ItemIndexRef index, int column, const IUnknownList& data, IDragSession* session, IView* targetView = nullptr ); tbool CCL_API insertData ( ItemIndexRef index, int column, const IUnknownList& data, IDragSession* session ); tbool CCL_API editCell (ItemIndexRef index, int column, const EditInfo& info); tbool CCL_API drawCell (ItemIndexRef index, int column, const DrawInfo& info); tbool CCL_API drawItem (ItemIndexRef index, const DrawInfo& info); tbool CCL_API drawIconOverlay (ItemIndexRef index, const DrawInfo& info); StringID CCL_API getItemBackground (ItemIndexRef index); tbool CCL_API measureCellContent ( Rect& size, ItemIndexRef index, int column, const StyleInfo& info ); tbool CCL_API createColumnHeaders (IColumnHeaderList& list); tbool CCL_API getSortColumnID (MutableCString& columnID, tbool& upwards); IUnknown*CCL_API createDragSessionData (ItemIndexRef index); tbool CCL_API appendItemMenu ( IContextMenu& menu, ItemIndexRef item, const IItemSelection& selection ); tbool CCL_API interpretCommand ( const CommandMsg& msg, ItemIndexRef item, const IItemSelection& selection ); ITouchHandler*CCL_API createTouchHandler ( ItemIndexRef index, int column, const EditInfo& info ); tbool CCL_API getItemAccessibilityInfo ( AccessibilityInfo& info, ItemIndexRef index, int column ) const; void CCL_API notify (ISubject* subject, MessageRef msg); };
Inherited Members
public: // typedefs typedef CStringRef MemberID; // structs struct AccessibilityInfo; struct DrawInfo; struct EditInfo; struct StyleInfo; // 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 void CCL_API viewDetached (IItemView* itemView) = 0; virtual int CCL_API countFlatItems () = 0; virtual tbool CCL_API getRootItem (ItemIndex& index) = 0; virtual tbool CCL_API isItemFolder (ItemIndexRef index) = 0; virtual tbool CCL_API canExpandItem (ItemIndexRef index) = 0; virtual tbool CCL_API canAutoExpandItem (ItemIndexRef index) = 0; virtual tbool CCL_API getSubItems (IUnknownList& items, ItemIndexRef index) = 0; virtual IItemSelection*CCL_API getSelection () = 0; virtual tbool CCL_API getItemTitle (String& title, ItemIndexRef index) = 0; virtual tbool CCL_API getUniqueItemName ( MutableCString& name, ItemIndexRef index ) = 0; virtual IImage*CCL_API getItemIcon (ItemIndexRef index) = 0; virtual IImage*CCL_API getItemThumbnail (ItemIndexRef index) = 0; virtual tbool CCL_API getItemTooltip ( String& tooltip, ItemIndexRef index, int column ) = 0; virtual tbool CCL_API canSelectItem (ItemIndexRef index) = 0; virtual tbool CCL_API getItemAccessibilityInfo ( AccessibilityInfo& info, ItemIndexRef index, int column ) const = 0; virtual tbool CCL_API onItemFocused (ItemIndexRef index) = 0; virtual tbool CCL_API openItem ( ItemIndexRef index, int column, const EditInfo& info ) = 0; virtual tbool CCL_API canRemoveItem (ItemIndexRef index) = 0; virtual tbool CCL_API removeItem (ItemIndexRef index) = 0; virtual tbool CCL_API canInsertData ( ItemIndexRef index, int column, const IUnknownList& data, IDragSession* session, IView* targetView = nullptr ) = 0; virtual tbool CCL_API insertData ( ItemIndexRef index, int column, const IUnknownList& data, IDragSession* session ) = 0; virtual tbool CCL_API editCell ( ItemIndexRef index, int column, const EditInfo& info ) = 0; virtual tbool CCL_API drawCell ( ItemIndexRef index, int column, const DrawInfo& info ) = 0; virtual tbool CCL_API drawIconOverlay (ItemIndexRef index, const DrawInfo& info) = 0; virtual StringID CCL_API getItemBackground (ItemIndexRef index) = 0; virtual tbool CCL_API measureCellContent ( Rect& size, ItemIndexRef index, int column, const StyleInfo& info ) = 0; virtual tbool CCL_API drawItem (ItemIndexRef index, const DrawInfo& info) = 0; virtual tbool CCL_API createColumnHeaders (IColumnHeaderList& list) = 0; virtual tbool CCL_API getSortColumnID (MutableCString& columnID, tbool& upwards) = 0; virtual IUnknown*CCL_API createDragSessionData (ItemIndexRef index) = 0; virtual tbool CCL_API appendItemMenu ( IContextMenu& menu, ItemIndexRef item, const IItemSelection& selection ) = 0; virtual tbool CCL_API interpretCommand ( const CommandMsg& msg, ItemIndexRef item, const IItemSelection& selection ) = 0; virtual ITouchHandler*CCL_API createTouchHandler ( ItemIndexRef index, int column, const EditInfo& info ) = 0;