|
1 /* |
|
2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Scroller event class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #include <alf/alfscrollerevent.h> |
|
21 |
|
22 // ======== MEMBER FUNCTIONS ======== |
|
23 |
|
24 // --------------------------------------------------------------------------- |
|
25 // Constructor |
|
26 // --------------------------------------------------------------------------- |
|
27 // |
|
28 EXPORT_C TAlfScrollerEvent::TAlfScrollerEvent( TCode aCode, TOrientation aOrientation, TInt aMagnitude ) |
|
29 : |
|
30 iCode(aCode), |
|
31 iOrientation(aOrientation), |
|
32 iMagnitude(aMagnitude) |
|
33 { |
|
34 } |
|
35 |
|
36 // --------------------------------------------------------------------------- |
|
37 // Constructor |
|
38 // --------------------------------------------------------------------------- |
|
39 // |
|
40 TAlfScrollerEvent::TAlfScrollerEvent() |
|
41 : |
|
42 iCode(TAlfScrollerEvent::EMoveByItem), |
|
43 iOrientation(TAlfScrollerEvent::EVertical), |
|
44 iMagnitude(0) |
|
45 { |
|
46 } |
|
47 |
|
48 // --------------------------------------------------------------------------- |
|
49 // Access the event code |
|
50 // --------------------------------------------------------------------------- |
|
51 // |
|
52 EXPORT_C TAlfScrollerEvent::TCode TAlfScrollerEvent::Code() const |
|
53 { |
|
54 return iCode; |
|
55 } |
|
56 |
|
57 // --------------------------------------------------------------------------- |
|
58 // Access the orientation |
|
59 // --------------------------------------------------------------------------- |
|
60 // |
|
61 EXPORT_C TAlfScrollerEvent::TOrientation TAlfScrollerEvent::Orientation() const |
|
62 { |
|
63 return iOrientation; |
|
64 } |
|
65 |
|
66 // --------------------------------------------------------------------------- |
|
67 // Access the magnitude |
|
68 // --------------------------------------------------------------------------- |
|
69 // |
|
70 EXPORT_C TInt TAlfScrollerEvent::Magnitude() const |
|
71 { |
|
72 return iMagnitude; |
|
73 } |
|
74 |
|
75 |