Cafu Engine
ChannelInspector.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_CHANNEL_INSPECTOR_HPP_INCLUDED
8 #define CAFU_MODELEDITOR_CHANNEL_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 ChannelInspectorT : public wxPropertyGridManager, public ObserverT
21  {
22  public:
23 
24  ChannelInspectorT(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_Joint Added / Deleted();
30  void Notify_ChannelChanged(SubjectT* Subject, unsigned int ChannelNr);
31  void Notify_SubjectDies(SubjectT* dyingSubject);
32 
33 
34  private:
35 
36  void RefreshPropGrid();
37  void OnPropertyGridChanging(wxPropertyGridEvent& Event);
38 
39  DECLARE_EVENT_TABLE()
40 
41  ModelDocumentT* m_ModelDoc;
42  ChildFrameT* m_Parent;
43  bool m_IsRecursiveSelfNotify;
44  };
45 }
46 
47 #endif
Definition: ChildFrame.hpp:35
void Notify_ChannelChanged(SubjectT *Subject, unsigned int ChannelNr)
Notifies the observer that an animation channel has changed.
Definition: ChannelInspector.cpp:54
This class represents a child frame.
Definition: ChildFrame.hpp:55
Definition: ChannelInspector.hpp:20
void Notify_SubjectDies(SubjectT *dyingSubject)
This method is called whenever a subject is about the be destroyed (and become unavailable).
Definition: ChannelInspector.cpp:62
Definition: ObserverPattern.hpp:104
This file provides the classes for the Observer pattern as described in the book by the GoF...
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: ChannelInspector.cpp:45
Definition: ObserverPattern.hpp:28
Definition: ModelDocument.hpp:30