7 #ifndef CAFU_MAPEDITOR_DIALOG_ENTITY_HIERARCHY_HPP_INCLUDED
8 #define CAFU_MAPEDITOR_DIALOG_ENTITY_HIERARCHY_HPP_INCLUDED
13 #include "wx/dataview.h"
14 #include "wx/treectrl.h"
48 void AddChildren(
const wxTreeItemId& Item,
bool Recursive);
59 void UpdateAllLabels();
62 void UpdateAllGroupColors();
66 bool m_IsRecursiveSelfNotify;
69 void OnKeyDown (wxKeyEvent& KE);
70 void OnTreeLeftClick (wxMouseEvent& ME);
71 void OnSelectionChanging (wxTreeEvent& TE);
72 void OnSelectionChanged (wxTreeEvent& TE);
73 void OnBeginLabelEdit (wxTreeEvent& TE);
74 void OnEndLabelEdit (wxTreeEvent& TE);
75 void OnGetTooltip (wxTreeEvent& TE);
76 void OnTreeItemRightClick(wxTreeEvent& TE);
77 void OnBeginDrag (wxTreeEvent& TE);
78 void OnEndDrag (wxTreeEvent& TE);
90 COLUMN_ENTITY_NAME = 0,
91 COLUMN_NUM_PRIMITIVES,
101 unsigned int GetColumnCount()
const override;
102 wxString GetColumnType(
unsigned int col)
const override;
104 void GetValue(wxVariant& Variant,
const wxDataViewItem& Item,
unsigned int col)
const override;
105 bool SetValue(
const wxVariant& Variant,
const wxDataViewItem& Item,
unsigned int col)
override;
107 wxDataViewItem GetParent(
const wxDataViewItem& Item)
const override;
108 bool IsContainer(
const wxDataViewItem& Item)
const override;
109 bool HasContainerColumns(
const wxDataViewItem& Item)
const override;
110 unsigned int GetChildren(
const wxDataViewItem& Item, wxDataViewItemArray& Children)
const override;
139 bool m_IsRecursiveSelfNotify;
142 void OnSelectionChanged(wxDataViewEvent& Event);
143 void OnEndItemEdit(wxDataViewEvent& Event);
144 void OnTreeItemContextMenu(wxDataViewEvent& Event);
145 void OnBeginDrag(wxDataViewEvent& Event);
146 void OnCheckDrag(wxDataViewEvent& Event);
147 void OnEndDrag(wxDataViewEvent& Event);
149 DECLARE_EVENT_TABLE()
165 ID_TREECTRL = wxID_HIGHEST + 1,
179 DECLARE_EVENT_TABLE()
MapElemModDetailE
Definition: ObserverPattern.hpp:37
void NotifySubjectChanged_Selection(SubjectT *Subject, const ArrayT< MapElementT * > &OldSelection, const ArrayT< MapElementT * > &NewSelection) override
Notifies the observer that the selection in the current subject has been changed. ...
Definition: DialogEntityHierarchy.cpp:1079
void Notify_EntChanged(SubjectT *Subject, const ArrayT< IntrusivePtrT< MapEditor::CompMapEntityT > > &Entities, EntityModDetailE Detail) override
Definition: DialogEntityHierarchy.cpp:1168
Definition: DialogEntityHierarchy.hpp:84
This class represents a CaWE "map" document.
Definition: MapDocument.hpp:45
void NotifySubjectChanged_Groups(SubjectT *Subject) override
Notifies the observer that the groups in the current subject have been changed (new group added...
Definition: DialogEntityHierarchy.cpp:242
void Notify_VarChanged(SubjectT *Subject, const cf::TypeSys::VarBaseT &Var) override
Notifies the observer that a variable has changed.
Definition: DialogEntityHierarchy.cpp:1182
void NotifySubjectDies(SubjectT *dyingSubject) override
This method is called whenever a subject is about the be destroyed (and become unavailable).
Definition: DialogEntityHierarchy.cpp:1203
Definition: DialogEntityHierarchy.hpp:153
void NotifySubjectChanged_Created(SubjectT *Subject, const ArrayT< IntrusivePtrT< cf::GameSys::EntityT > > &Entities) override
Notifies the observer that one or more entities have been created.
Definition: DialogEntityHierarchy.cpp:248
Definition: DialogEntityHierarchy.hpp:23
void NotifySubjectDies(SubjectT *dyingSubject) override
This method is called whenever a subject is about the be destroyed (and become unavailable).
Definition: DialogEntityHierarchy.cpp:328
EntityModDetailE
Definition: ObserverPattern.hpp:47
This class represents a child frame.
Definition: ChildFrame.hpp:55
Definition: ObserverPattern.hpp:64
void RefreshTree()
Redraws the whole tree.
Definition: DialogEntityHierarchy.cpp:338
void NotifySubjectChanged_Modified(SubjectT *Subject, const ArrayT< MapElementT * > &MapElements, MapElemModDetailE Detail) override
Definition: DialogEntityHierarchy.cpp:280
Definition: ObserverPattern.hpp:158
void NotifySubjectChanged_Modified(SubjectT *Subject, const ArrayT< MapElementT * > &MapElements, MapElemModDetailE Detail) override
Definition: DialogEntityHierarchy.cpp:1153
void Notify_VarChanged(SubjectT *Subject, const cf::TypeSys::VarBaseT &Var) override
Notifies the observer that a variable has changed.
Definition: DialogEntityHierarchy.cpp:301
This is the common base class for the VarT classes.
Definition: Variables.hpp:113
Definition: DialogEntityHierarchy.hpp:116
void NotifySubjectChanged_Deleted(SubjectT *Subject, const ArrayT< IntrusivePtrT< cf::GameSys::EntityT > > &Entities) override
Notifies the observer that one or more entities have been deleted.
Definition: DialogEntityHierarchy.cpp:1130
void Notify_EntChanged(SubjectT *Subject, const ArrayT< IntrusivePtrT< MapEditor::CompMapEntityT > > &Entities, EntityModDetailE Detail) override
Definition: DialogEntityHierarchy.cpp:291
This file provides the classes for the Observer pattern as described in the book by the GoF...
void NotifySubjectChanged_Deleted(SubjectT *Subject, const ArrayT< IntrusivePtrT< cf::GameSys::EntityT > > &Entities) override
Notifies the observer that one or more entities have been deleted.
Definition: DialogEntityHierarchy.cpp:264
void NotifySubjectChanged_Selection(SubjectT *Subject, const ArrayT< MapElementT * > &OldSelection, const ArrayT< MapElementT * > &NewSelection) override
Notifies the observer that the selection in the current subject has been changed. ...
Definition: DialogEntityHierarchy.cpp:211
void NotifySubjectChanged_Created(SubjectT *Subject, const ArrayT< IntrusivePtrT< cf::GameSys::EntityT > > &Entities) override
Notifies the observer that one or more entities have been created.
Definition: DialogEntityHierarchy.cpp:1110