00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #if !defined(__WSSCROL1_H__)
00019 #define __WSSCROL1_H__
00020
00021 #include "Base.h"
00022
00024
00026
00027 class CNumberedWindow : public CWindow
00028 {
00029 public:
00030 enum EScrollDir {Up, Down};
00031 CNumberedWindow (CWsClient* aClient, TInt aNum);
00032 ~CNumberedWindow ();
00033 void Draw (const TRect& aRect);
00034 void HandlePointerEvent (TPointerEvent& aPointerEvent);
00035 void HandlePointerMoveBufferReady () {}
00036 private:
00037 static TInt iCount;
00038 TInt iNumber;
00039 TPoint iOldPos;
00040 TPoint iOffset;
00041 TRect iRepeatRect;
00042 EScrollDir iScrollDir;
00043 };
00044
00045
00046
00047 class CMainWindow : public CWindow
00048 {
00049 public:
00050 CMainWindow (CWsClient* aClient);
00051 ~CMainWindow ();
00052 void Draw (const TRect& aRect);
00053 void HandlePointerEvent (TPointerEvent& aPointerEvent);
00054 };
00055
00057
00059
00060 class CExampleWsClient : public CWsClient
00061 {
00062 public:
00063 static CExampleWsClient* NewL(const TRect& aRect);
00064 private:
00065 CExampleWsClient (const TRect& aRect);
00066 void ConstructMainWindowL();
00067 ~CExampleWsClient ();
00068 void RunL ();
00069 void HandleKeyEventL (TKeyEvent& aKeyEvent);
00070 private:
00071 CMainWindow* iMainWindow;
00072 CNumberedWindow* iWindow1;
00073 const TRect& iRect;
00074 };
00075
00076
00077 #endif