This is a pretty major View in the KlassModeler. These objects are responsible for presenting a code object in a tree.

what happens is a new tree node is created and then one of these is attached to it. It inherits from wxTreeItemData so that it will be tied to the tree node by wx. Then it can create sub nodes for children etc etc.


virtual ~TreeView( )

virtual void Attach( const wxTreeItemId& NodeId) =0

virtual std::string GetStringRepresentation( ) =0

virtual ObjectPtr GetObject( ) =0

virtual std::string GetEditableLabel( ) =0

When the user clicks on the label they will be able to edit it directly. This gets the text that will show up in the edit box.

virtual bool OnLabelChanged( const std::string& NewLabel) =0

Called when the user is done entering text into the tree label. Children will need to parse this and set their data accordingly.

returns false if it fails and should be reversed

virtual bool AcceptDrop( TreeView* pDroppedView, const wxTreeItemId& ReferenceId)

virtual void ShowContextMenu( const wxPoint& Position)

virtual void HandleContextMenuEvent( wxTreeItemId SourceID, wxCommandEvent& Event)

virtual bool CanContain( TreeView* pView) const

virtual bool CanBeContainedByClass( ClassObjectPtr pClass) const

It's tricky to figure out where we can drop things in the tree since the "things" are treated as TreeViews. This function lets a derived class figure out whether or not it can be a child of the passed in class.

virtual bool CanBeContainedByMethod( ) const

Just like CanBeContainedByClass.

virtual void DeleteChild( TreeView* pChild)

virtual void ViewDocColours( bool Enable)

Call this one to assign colours to thing in the tree based on how out of date they are with their docs.

virtual void ShowInfo( )


TreeView( ClassTree* pTree)

ClassTree* GetTree( ) const


ClassTree* m_pTree

The tree that this object is attached to