Cafu Engine
GuiInspector.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_GUIEDITOR_GUI_INSPECTOR_HPP_INCLUDED
8 #define CAFU_GUIEDITOR_GUI_INSPECTOR_HPP_INCLUDED
9 
10 #include "ObserverPattern.hpp"
11 
12 #include "wx/wx.h"
13 #include "wx/propgrid/manager.h"
14 
15 
16 namespace GuiEditor
17 {
18  class ChildFrameT;
19  class GuiDocumentT;
20 
21  class GuiInspectorT : public wxPropertyGridManager, public ObserverT
22  {
23  public:
24 
25  GuiInspectorT(ChildFrameT* Parent, const wxSize& Size);
26 
27  // ObserverT implementation.
29  void NotifySubjectDies(SubjectT* dyingSubject);
30 
31  void RefreshPropGrid();
32 
33 
34  private:
35 
36  GuiDocumentT* m_GuiDocument;
37  ChildFrameT* m_Parent;
38  bool m_IsRecursiveSelfUpdate;
39 
40  void OnPropertyGridChanged(wxPropertyGridEvent& Event);
41 
42  DECLARE_EVENT_TABLE()
43  };
44 }
45 
46 #endif
Definition: GuiInspector.hpp:21
void NotifySubjectChanged_GuiPropertyModified(SubjectT *Subject)
Notifies the observer that a general GUI property has been modified.
Definition: GuiInspector.cpp:35
Definition: ObserverPattern.hpp:38
This class represents a child frame.
Definition: ChildFrame.hpp:55
Definition: ChildFrame.hpp:35
Definition: GuiDocument.hpp:39
Definition: ObserverPattern.hpp:95
void NotifySubjectDies(SubjectT *dyingSubject)
This method is called whenever a subject is about the be destroyed (and become unavailable).
Definition: GuiInspector.cpp:43
This file provides the classes for the Observer pattern as described in the book by the GoF...