ClassTreeView
This is a big one, it is the representation of a class in a tree. It has to be somewhat tricky as this class can either be the root of the ClassTree, or it can be a member class.
public:
enum MenuIDs
~ClassTreeView( )
void Attach( const wxTreeItemId& NodeId)
std::string GetStringRepresentation( )
ObjectPtr GetObject( )
void SetNodeText( const std::string& NewText)
bool AcceptDrop( TreeView* pDroppedView, const wxTreeItemId& ReferenceId)
void ShowContextMenu( const wxPoint& Position)
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)
bool CanContain( TreeView* pView) const
bool CanBeContainedByClass( ClassObjectPtr pClass) const
For this object it's a bit tricky. In general a class can be contained by a class. HOWEVER it's possible that a user is dragging this class inside itself. So this function has to make sure that doesn't return true.
void DeleteChild( TreeView* pChild)
protected:
private:
ClassTreeView( ClassTree* pTree, ClassObjectPtr pClass)
ClassObject::AccessType GetAccessTypeForItem( const wxTreeItemId& Item) const
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.
void ColourCodeChildren( const wxTreeItemId& ParentID, bool Enabled)
Helper function for OutdatedDocColoutCode
void BuildObjectList( const ObjectPtrList& Objects, const wxTreeItemId& ParentID)
std::string GetEditableLabel( )
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.
bool OnLabelChanged( const std::string& NewLabel)
Called when the user is done entering text into the tree label. Children will need to parse this and set their data accordingly.
void ShowInfo( )
void OnCreateVariable( ClassObject::AccessType Access)
void OnCreateMethod( ClassObject::AccessType Access)
void OnCreateOther( ClassObject::AccessType Access)
void OnCreateClass( ClassObject::AccessType Access)
void OnDeleteClass( )
wxTreeItemId GetAccessNode( ClassObject::AccessType& Access)
friends
ClassObjectPtr m_pClass
wxTreeItemId m_PublicNode
Parent node for public members
wxTreeItemId m_PrivateNode
Parent node for private members
wxTreeItemId m_ProtectedNode
Parent node for protected members