Cafu Engine
TransformDialog.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_TRANSFORM_DIALOG_HPP_INCLUDED
8 #define CAFU_MODELEDITOR_TRANSFORM_DIALOG_HPP_INCLUDED
9 
10 #include "ObserverPattern.hpp"
11 #include "wx/wx.h"
12 
13 
14 class wxNotebook;
15 
16 
17 namespace ModelEditor
18 {
19  class ChildFrameT;
20  class ModelDocumentT;
21 
22  class TransformDialogT : public wxPanel, public ObserverT
23  {
24  public:
25 
26  TransformDialogT(ChildFrameT* Parent, const wxSize& Size);
28 
29  // ObserverT implementation.
30  void Notify_SelectionChanged(SubjectT* Subject, ModelElementTypeT Type, const ArrayT<unsigned int>& OldSel, const ArrayT<unsigned int>& NewSel);
31  void Notify_SubjectDies(SubjectT* dyingSubject);
32 
33 
34  private:
35 
36  /// IDs for the controls whose events we are interested in.
37  enum
38  {
39  ID_BUTTON_RESET=wxID_HIGHEST+1,
40  ID_BUTTON_APPLY
41  };
42 
43  void OnButton(wxCommandEvent& Event);
44 
45  ModelDocumentT* m_ModelDoc;
46  ChildFrameT* m_Parent;
47  wxNotebook* m_Notebook;
48 
49  float m_Values[3][3]; ///< Translate, rotate and scale: three values each.
50 
51  DECLARE_EVENT_TABLE()
52  };
53 }
54 
55 #endif
Definition: ChildFrame.hpp:35
This class represents a child frame.
Definition: ChildFrame.hpp:55
Definition: TransformDialog.hpp:22
Definition: ObserverPattern.hpp:104
void Notify_SubjectDies(SubjectT *dyingSubject)
This method is called whenever a subject is about the be destroyed (and become unavailable).
Definition: TransformDialog.cpp:155
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: TransformDialog.cpp:147
Definition: ObserverPattern.hpp:28
Definition: ModelDocument.hpp:30