My Project
GUICanvas.h
1 #pragma once
2 
3 #include "GUIBase.h"
4 namespace ParaEngine
5 {
6  class CGUIContainer;
7  class C3DCanvas;
8  class CGUICanvas:public CGUIBase
9  {
10  public:
11  CGUICanvas();
12  virtual ~CGUICanvas();
13 
14  virtual void Reset();
15  virtual HRESULT Render(GUIState* pGUIState,float fElapsedTime );
16  void InitObject(const char * strObjectName, const char * alignment, int x, int y, int width, int height);
17  void UpdateRects();
18  virtual bool MsgProc(MSG *event);
19 
20  //zoom the 3d object
21  void Zoom(double zoom);
22 
23  //rotate the 3d object, in radius
24  void Rotate(double xrotate,double yrotate);
25 
26  //move the 3d object
27  void Pan(double x, double y);
28 
29  void SetCanvasIndex(int index);
30  int GetCanvasIndex()const{return m_nCanvasIndex;}
31 
32  virtual IObject* Clone()const;
33  virtual void Clone(IObject* pobj)const;
34  virtual const IType* GetType()const{return m_type;}
39  static void StaticInit();
40 
41  protected:
42  enum{
43  CanvasNone,
44  CanvasZoom,
45  CanvasRotate,
46  CanvasPan
47  }CanvasState;
48  static const IType* m_type;
49  int m_eState;
50  int m_nCanvasIndex;
51  double m_fRotateSpeed;
52  double m_fPanSpeed;
53  };
54 }
IType is for type information and validating It contains type information of an object.
Definition: Type.h:75
Definition: EventBinding.h:22
virtual IObject * Clone() const
Clone the object's contains and return a pointer to the newly created object.
different physics engine has different winding order.
Definition: EventBinding.h:32
virtual void Reset()
Resets the objects states.
base object for all 2D GUI objects (1) 2D GUI object are not tested against view frustum, instead it is controlled by visibility tag automatically or through user input.
Definition: GUIBase.h:54
base class for object, such as CBaseObject, IAttributeObject, GUI object.
Definition: PERef.h:287
virtual bool MsgProc(MSG *event)
the procedure that handles all the events.
static void StaticInit()
Initialize the event mapping for the default CGUIButton class All its inheritances should have a Stat...
It's used as parameter to Render method of each GUI object.
Definition: GUIState.h:16
Definition: GUICanvas.h:8