Cafu Engine
ScenePropGrid.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_SCENE_PROPGRID_HPP_INCLUDED
8 #define CAFU_MODELEDITOR_SCENE_PROPGRID_HPP_INCLUDED
9 
10 #include "ObserverPattern.hpp"
11 #include "wx/wx.h"
12 #include "wx/propgrid/manager.h"
13 
14 
15 namespace MatSys { class TextureMapI; }
16 
17 
18 namespace ModelEditor
19 {
20  class ChildFrameT;
21 
22 
23  class ScenePropGridT : public wxPropertyGridManager, public ObserverT
24  {
25  public:
26 
27  ScenePropGridT(ChildFrameT* Parent, const wxSize& Size);
28  ~ScenePropGridT();
29 
30  void RefreshPropGrid();
31 
32  // ObserverT implementation.
33  void Notify_AnimStateChanged(SubjectT* Subject);
34  void Notify_SubjectDies(SubjectT* dyingSubject);
35 
36  wxColour m_BackgroundColor;
37  bool m_ShowOrigin;
38  bool m_ShowGrid;
39  float m_GridSpacing;
40  bool m_GroundPlane_Show;
41  float m_GroundPlane_PosZ;
42  bool m_GroundPlane_AutoZ;
43  bool m_Model_ShowMesh;
44  bool m_Model_ShowSkeleton;
45  bool m_Model_ShowTriangleNormals;
46  bool m_Model_ShowTangentSpace;
47  unsigned int m_Model_DebugMaterial; ///< 0 for "normal/none", 1 for "plain (white)", 2 for "wire-frame"
48  wxColour m_AmbientLightColor;
49  MatSys::TextureMapI* m_AmbientTexture; ///< A uniform 2x2 texture colored in the ambient light color, used as lightmap for the ground plane.
50 
51 
52  private:
53 
54  void OnPropertyGridChanged(wxPropertyGridEvent& Event);
55  void UpdateAmbientTexture();
56 
57  ChildFrameT* m_Parent;
58  bool m_IsRecursiveSelfNotify;
59  wxPGProperty* m_AnimFrameNrProp;
60  wxPGProperty* m_AnimSpeedProp;
61  wxPGProperty* m_AnimLoopProp;
62 
63  DECLARE_EVENT_TABLE()
64  };
65 }
66 
67 #endif
Definition: ChildFrame.hpp:35
This class represents a child frame.
Definition: ChildFrame.hpp:55
void Notify_AnimStateChanged(SubjectT *Subject)
Notifies the observer that the animation state has changed.
Definition: ScenePropGrid.cpp:267
unsigned int m_Model_DebugMaterial
0 for "normal/none", 1 for "plain (white)", 2 for "wire-frame"
Definition: ScenePropGrid.hpp:47
This is an interface to a texture-map.
Definition: TextureMap.hpp:23
MatSys::TextureMapI * m_AmbientTexture
A uniform 2x2 texture colored in the ambient light color, used as lightmap for the ground plane...
Definition: ScenePropGrid.hpp:49
Definition: ScenePropGrid.hpp:23
Definition: ObserverPattern.hpp:104
This file provides the classes for the Observer pattern as described in the book by the GoF...
Definition: ObserverPattern.hpp:28
void Notify_SubjectDies(SubjectT *dyingSubject)
This method is called whenever a subject is about the be destroyed (and become unavailable).
Definition: ScenePropGrid.cpp:284