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( ) =0When 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) =0Called 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)
- wxTreeItemId SourceID: the source of this event. Could be different from this view (if the user clicked on public for example)
virtual bool CanContain( TreeView* pView) const
virtual bool CanBeContainedByClass( ClassObjectPtr pClass) constIt'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( ) constJust 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_pTreeThe tree that this object is attached to