Cafu Engine
AnimInspector.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_ANIM_INSPECTOR_HPP_INCLUDED
8 #define CAFU_MODELEDITOR_ANIM_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 AnimInspectorT : public wxPropertyGridManager, public ObserverT
21  {
22  public:
23 
24  AnimInspectorT(ChildFrameT* Parent, const wxSize& Size);
25  ~AnimInspectorT();
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_AnimChanged(SubjectT* Subject, unsigned int AnimNr);
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
void Notify_AnimChanged(SubjectT *Subject, unsigned int AnimNr)
Notifies the observer that an animation sequence has changed.
Definition: AnimInspector.cpp:55
This class represents a child frame.
Definition: ChildFrame.hpp:55
Definition: ObserverPattern.hpp:104
Definition: AnimInspector.hpp:20
This file provides the classes for the Observer pattern as described in the book by the GoF...
Definition: ObserverPattern.hpp:28
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: AnimInspector.cpp:46
Definition: ModelDocument.hpp:30
void Notify_SubjectDies(SubjectT *dyingSubject)
This method is called whenever a subject is about the be destroyed (and become unavailable).
Definition: AnimInspector.cpp:63