My Project
GUIPainter.h
1 #pragma once
2 #include "GUIBase.h"
3 
4 namespace ParaEngine
5 {
6  class CGUIContainer;
7  //struct GUIPainterElement {
8  // list<POINT3D> m_points;
9  // float m_fSize;
10  // int m_nBrushType;
11  // int m_nType;
12  // GUITextureElement* m_texture;
13  //};
14  //struct GUIPainterElementContainer{
15  //public:
16  // void BeginElement(int nType,int nBrushType,float fSize,GUITextureElement *texture);
17  // void StepElement(POINT3D point);
18  // void EndElement(bool bCancel);
19  // list<GUIPainterElement>::iterator begin(){return m_items.begin();};
20  // list<GUIPainterElement>::iterator end(){return m_items.end();}
21  //protected:
22  // list<GUIPainterElement> m_items;
23  // GUIPainterElement* m_pCurrent;
24  //};
26  {
27  public:
28  enum DrawType{POINTS,FREELINE,LINE};
29  enum DrawState{NONE,BEGIN,STEP};
30  CGUIPainter();
31  ~CGUIPainter(){};
32  // void Show();
33  // void Hide();
34  // void SaveBMP(const char* filename);
35  // int GetState();
36 
37  // /**
38  // * these three functions are for a drawing process
39  // */
40  // //used by script interface
41  // void BeginDraw();
42  // void EndDraw(bool bCancel=false);
43  // void Step(POINT3D point);
44 
45  // //the following function are for drawing different elements
46  // void DrawLine(POINT3D point1,POINT3D point2);
47  // void DrawPoint(POINT3D point);
48 
49  // void SetDrawType(int drawtype){m_nDrawType=drawtype;EndDraw(false);}
50  // int GetDrawType(){return m_nDrawType;}
51  // void SetBrush(CGUIBrush *brush);
52  // const CGUIBrush* GetBrush(){return &m_brush;};
53  // void ClearScreen(GUIState* pGUIState);
54  // HRESULT Redraw(GUIState* pGUIState);
55 
56  //virtual void UpdateRects(){};
57  //virtual void InitObject(const char * strObjectName, const char * alignment, int x, int y, int width, int height);
58  //virtual bool MsgProc(CGUIEvent *event/* =NULL */);
59  virtual HRESULT Render(GUIState* pGUIState ,float fElapsedTime);
60 
61  virtual HRESULT InitDeviceObjects(){return S_OK;};
62  virtual HRESULT RestoreDeviceObjects(); // device dependent
63  virtual HRESULT InvalidateDeviceObjects(){return S_OK;};
64  virtual HRESULT DeleteDeviceObjects(){return S_OK;};
65  virtual const IType* GetType()const{return m_type;}
66 
67  protected:
68  static const IType* m_type;
69  //this function is just for debug
70  HRESULT TestGDI();
71 #ifdef USE_DIRECTX_RENDERER
72  LPDIRECT3DTEXTURE9 m_pTexture;
73 #endif
74  };
75 }
IType is for type information and validating It contains type information of an object.
Definition: Type.h:75
different physics engine has different winding order.
Definition: EventBinding.h:32
Definition: GUIPainter.h:25
m_objResource->m_objArtwork->DrawingRects[0]: client rectangle; m_objResource->m_objArtwork->DrawingR...
Definition: GUIContainer.h:19
It&#39;s used as parameter to Render method of each GUI object.
Definition: GUIState.h:16
virtual HRESULT Render(GUIState *pGUIState, float fElapsedTime)
these three functions are for a drawing process