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