|
1 /* |
|
2 * Copyright (c) 2006-2009 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: Definition of THuiLayoutPrivateData. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef HUILAYOUTDATA_H_ |
|
19 #define HUILAYOUTDATA_H_ |
|
20 |
|
21 // Private structure |
|
22 // |
|
23 /** |
|
24 * TScrollState contains information about the scrolling state of the |
|
25 * layout. This is only used when scrolling is enabled. Most layouts |
|
26 * don't use this. |
|
27 */ |
|
28 class TScrollState |
|
29 { |
|
30 public: |
|
31 TScrollState() : iOffset(), iVirtualSize(0, 0) {} |
|
32 THuiTimedPoint iOffset; |
|
33 |
|
34 /** Size of the layout considering the placement of children and outer |
|
35 borders. This may be larger than the size of the layout on the |
|
36 screen. Used when scrolling. */ |
|
37 TSize iVirtualSize; |
|
38 }; |
|
39 |
|
40 struct CHuiLayout::THuiLayoutPrivateData |
|
41 { |
|
42 public: |
|
43 THuiLayoutPrivateData() : |
|
44 iInnerPadding(0, 0), |
|
45 iScroll(NULL), |
|
46 iTransitionTime(0), |
|
47 iBaseUnit(THuiMetric(), THuiMetric()) // defaults to [1px, 1px] |
|
48 { |
|
49 } |
|
50 |
|
51 public: |
|
52 /** Visuals that are children of the layout. None of these is owned by |
|
53 by the layout. */ |
|
54 RPointerArray<CHuiVisual> iChildren; |
|
55 |
|
56 /** Inner horizontal padding. */ |
|
57 //TInt16 iXPadding; |
|
58 |
|
59 /** Inner vertical padding. */ |
|
60 //TInt16 iYPadding; |
|
61 |
|
62 /** Inner paddings (horizontal and vertical). */ |
|
63 THuiXYMetric iInnerPadding; |
|
64 |
|
65 /** State of scrolling. */ |
|
66 TScrollState* iScroll; |
|
67 |
|
68 /** Used to store the local transition time */ |
|
69 TInt iTransitionTime; |
|
70 |
|
71 /** Metric for the layout's base measurement unit. The positions and sizes |
|
72 of the children of this layout are interpreted as multiples of this |
|
73 base unit. */ |
|
74 THuiXYMetric iBaseUnit; |
|
75 CHuiCanvasGc *iGc; |
|
76 }; |
|
77 |
|
78 |
|
79 #endif /* HUILAYOUTDATA_H_ */ |