00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #if !defined(__WSWINORD_H__)
00019 #define __WSWINORD_H__
00020
00021
00022 class CWsRedrawer;
00023 class CWindow;
00024
00025
00027
00029
00030 class CWsClient : public CActive
00031 {
00032 public:
00033 void ConstructL();
00034
00035 ~CWsClient();
00036
00037 virtual void ConstructMainWindowL();
00038
00039 void Exit();
00040
00041 void IssueRequest();
00042 void DoCancel();
00043 virtual void RunL() = 0;
00044 virtual void HandleKeyEventL (TKeyEvent& aKeyEvent) = 0;
00045 protected:
00046
00047 CWsClient();
00048 CWsScreenDevice* iScreen;
00049 CWsRedrawer* iRedrawer;
00050 RWsSession iWs;
00051 TWsEvent iWsEvent;
00052 private:
00053 RWindowGroup iGroup;
00054 CWindowGc* iGc;
00055 friend class CWsRedrawer;
00056 friend class CWindow;
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 CWindow(CWsClient* aClient);
00089 void ConstructL (const TRect& aRect, const TRgb& aColor, CWindow* aParent=0);
00090 ~CWindow();
00091
00092 RWindow& Window();
00093 CWindowGc* SystemGc();
00094 CWsScreenDevice* Screen();
00095 CFont* Font();
00096
00097 virtual void Draw(const TRect& aRect) = 0;
00098 virtual void HandlePointerEvent (TPointerEvent& aPointerEvent) = 0;
00099 protected:
00100 RWindow iWindow;
00101 TRect iRect;
00102 private:
00103 CWsClient* iClient;
00104 CFont* iFont;
00105 };
00106
00107
00108 #endif