00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #if !defined(__VECTORSPRITES_H__)
00018 #define __VECTORSPRITES_H__
00019
00020
00021 class CWsRedrawer;
00022 class CWindow;
00023
00025
00027
00028 class CWsClient : public CActive
00029 {
00030 public:
00031 void ConstructL();
00032
00033 ~CWsClient();
00034
00035 virtual void ConstructMainWindowL();
00036
00037 void Exit();
00038
00039 void IssueRequest();
00040 void DoCancel();
00041 virtual void RunL() = 0;
00042 virtual void HandleKeyEventL (TKeyEvent& aKeyEvent) = 0;
00043 protected:
00044
00045 CWsClient();
00046 CWsScreenDevice* iScreen;
00047 CWsRedrawer* iRedrawer;
00048 RWsSession iWs;
00049 TWsEvent iWsEvent;
00050 private:
00051 RWindowGroup iGroup;
00052 CWindowGc* iGc;
00053 friend class CWsRedrawer;
00054 friend class CWindow;
00055 friend class CSprite;
00056 friend class CPointerCursor;
00057 };
00058
00059
00060
00062
00064
00065 class CWsRedrawer : public CActive
00066 {
00067 public:
00068
00069 CWsRedrawer();
00070 void ConstructL(CWsClient* aClient);
00071 ~CWsRedrawer();
00072
00073 void IssueRequest();
00074 void DoCancel();
00075 void RunL();
00076 protected:
00077 CWsClient* iClient;
00078 };
00079
00080
00082
00084
00085 class CWindow : public CBase
00086 {
00087 public:
00088 enum {KPointerMoveBufferSize=32};
00089 CWindow(CWsClient* aClient);
00090 void ConstructL (const TRect& aRect, const TRgb& aColor, CWindow* aParent=0);
00091 ~CWindow();
00092
00093 RWindow& Window();
00094 CWindowGc* SystemGc();
00095 CWsScreenDevice* Screen();
00096 CFont* Font();
00097
00098 virtual void Draw(const TRect& aRect) = 0;
00099 virtual void HandlePointerEvent (TPointerEvent& aPointerEvent) = 0;
00100 protected:
00101 RWindow iWindow;
00102 TRect iRect;
00103 private:
00104 CWsClient* iClient;
00105 CFont* iFont;
00106 };
00107
00108
00109 #endif