Cafu Engine
GuiFixtureInspector.hpp
1 /*
2 Cafu Engine, http://www.cafu.de/
3 Copyright (c) Carsten Fuchs and other contributors.
4 This project is licensed under the terms of the MIT license.
5 */
6 
7 #ifndef CAFU_MODELEDITOR_GUI_FIXTURE_INSPECTOR_HPP_INCLUDED
8 #define CAFU_MODELEDITOR_GUI_FIXTURE_INSPECTOR_HPP_INCLUDED
9 
10 #include "ObserverPattern.hpp"
11 #include "wx/wx.h"
12 #include "wx/propgrid/manager.h"
13 
14 
15 namespace ModelEditor
16 {
17  class ChildFrameT;
18  class ModelDocumentT;
19 
20  class GuiFixInspectorT : public wxPropertyGridManager, public ObserverT
21  {
22  public:
23 
24  GuiFixInspectorT(ChildFrameT* Parent, const wxSize& Size);
26 
27  // ObserverT implementation.
28  void Notify_SelectionChanged(SubjectT* Subject, ModelElementTypeT Type, const ArrayT<unsigned int>& OldSel, const ArrayT<unsigned int>& NewSel);
29  void Notify_GuiFixtureChanged(SubjectT* Subject, unsigned int GuiFixtureNr);
30  void Notify_SubjectDies(SubjectT* dyingSubject);
31 
32 
33  private:
34 
35  void RefreshPropGrid();
36  void OnPropertyGridChanging(wxPropertyGridEvent& Event);
37 
38  DECLARE_EVENT_TABLE()
39 
40  ModelDocumentT* m_ModelDoc;
41  ChildFrameT* m_Parent;
42  bool m_IsRecursiveSelfNotify;
43  };
44 }
45 
46 #endif
Definition: ChildFrame.hpp:35
Definition: GuiFixtureInspector.hpp:20
This class represents a child frame.
Definition: ChildFrame.hpp:55
void Notify_SelectionChanged(SubjectT *Subject, ModelElementTypeT Type, const ArrayT< unsigned int > &OldSel, const ArrayT< unsigned int > &NewSel)
This method is called whenever the selection of a model changed.
Definition: GuiFixtureInspector.cpp:43
Definition: ObserverPattern.hpp:104
This file provides the classes for the Observer pattern as described in the book by the GoF...
void Notify_SubjectDies(SubjectT *dyingSubject)
This method is called whenever a subject is about the be destroyed (and become unavailable).
Definition: GuiFixtureInspector.cpp:60
void Notify_GuiFixtureChanged(SubjectT *Subject, unsigned int GuiFixtureNr)
Notifies the observer that a GUI fixture has changed.
Definition: GuiFixtureInspector.cpp:52
Definition: ObserverPattern.hpp:28
Definition: ModelDocument.hpp:30