Cafu Engine
JointInspector.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_JOINT_INSPECTOR_HPP_INCLUDED
8 #define CAFU_MODELEDITOR_JOINT_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 JointInspectorT : public wxPropertyGridManager, public ObserverT
21  {
22  public:
23 
24  JointInspectorT(ChildFrameT* Parent, const wxSize& Size);
25  ~JointInspectorT();
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_JointChanged(SubjectT* Subject, unsigned int JointNr);
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
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: JointInspector.cpp:44
Definition: ChildFrame.hpp:35
Definition: JointInspector.hpp:20
This class represents a child frame.
Definition: ChildFrame.hpp:55
void Notify_JointChanged(SubjectT *Subject, unsigned int JointNr)
Notifies the observer that a joint has changed.
Definition: JointInspector.cpp:53
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: JointInspector.cpp:61
Definition: ObserverPattern.hpp:28
Definition: ModelDocument.hpp:30