diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/_scroll_8h-source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/_scroll_8h-source.html Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,85 @@ + + +TB10.1 Example Applications: examples/Graphics/WS/Scroll/Scroll.h Source File + + + + +

examples/Graphics/WS/Scroll/Scroll.h

00001 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+00002 // All rights reserved.
+00003 // This component and the accompanying materials are made available
+00004 // under the terms of "Eclipse Public License v1.0"
+00005 // which accompanies this distribution, and is available
+00006 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
+00007 //
+00008 // Initial Contributors:
+00009 // Nokia Corporation - initial contribution.
+00010 //
+00011 // Contributors:
+00012 //
+00013 // Description:
+00014 // WSSCROL1.H
+00015 //
+00016 
+00017 
+00018 #if !defined(__WSSCROL1_H__)
+00019 #define __WSSCROL1_H__
+00020 
+00021 #include "Base.h"
+00022 
+00024 //                                              Derived window classes
+00026 // CNumberedWindow displays a number in its center and supports drag and drop
+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;        // Number displayed in window
+00039         TPoint  iOldPos;        // Position is required for drag and drop
+00040         TPoint  iOffset;        // Used for scrolling
+00041         TRect   iRepeatRect;    // Boundary for pointer repeat events
+00042         EScrollDir      iScrollDir;     // Scroll direction for pointer repeat events
+00043         };
+00044 
+00045 // CMainWindow is a plain window that just acts as a container for the
+00046 // other windows
+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 //                                              Derived client class
+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
+

Generated on Thu Jan 21 10:32:58 2010 for TB10.1 Example Applications by  + +doxygen 1.5.3
+ +