author | kashif.sayed |
Fri, 26 Mar 2010 02:16:01 +0530 | |
branch | v5backport |
changeset 28 | c98d4e1e5d8e |
parent 21 | 11157e26c4a7 |
permissions | -rw-r--r-- |
21
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
1 |
/* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
2 |
* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
3 |
* All rights reserved. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
8 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
11 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
12 |
* Contributors: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
13 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
14 |
* Description: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
15 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
16 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
17 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
18 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
19 |
#ifndef AKNLAYOUT2SCALABLEDEF_H |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
20 |
#define AKNLAYOUT2SCALABLEDEF_H |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
21 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
22 |
#include <e32std.h> |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
23 |
#include <avkon.hrh> |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
24 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
25 |
#include "AknLayout2Def.h" |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
26 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
27 |
class TAknLayoutRect; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
28 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
29 |
/* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
30 |
* this is in global namespace, as it needs to be used by multiple different classes |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
31 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
32 |
enum TAknLayoutScalableComponentType |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
33 |
{ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
34 |
EAknLayoutScalableComponentTypeUnknown, |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
35 |
EAknLayoutScalableComponentTypeScreen, |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
36 |
EAknLayoutScalableComponentTypeContainer, |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
37 |
EAknLayoutScalableComponentTypePane, |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
38 |
EAknLayoutScalableComponentTypeGraphic, |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
39 |
EAknLayoutScalableComponentTypeText |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
40 |
}; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
41 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
42 |
/** |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
43 |
* Defines the valid range of a table lookup index. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
44 |
* A table index is valid if it satisfies iFirstIndex <= index <= iLastIndex |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
45 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
46 |
class TAknLayoutScalableTableLimits |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
47 |
{ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
48 |
public: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
49 |
IMPORT_C TAknLayoutScalableTableLimits(); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
50 |
IMPORT_C TAknLayoutScalableTableLimits(TInt aFirstIndex, TInt aLastIndex); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
51 |
IMPORT_C TAknLayoutTableLimits LayoutLimits() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
52 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
53 |
IMPORT_C TInt FirstIndex() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
54 |
IMPORT_C TInt LastIndex() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
55 |
IMPORT_C void SetFirstIndex(TInt aIndex); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
56 |
IMPORT_C void SetLastIndex(TInt aIndex); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
57 |
private: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
58 |
TInt iFirstIndex; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
59 |
TInt iLastIndex; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
60 |
}; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
61 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
62 |
/** |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
63 |
* Defines the valid maximum value of the parameters that can be passed into a scalable layout API |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
64 |
* An index is valid if it satisfies index < iMaxVarietys etc |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
65 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
66 |
class TAknLayoutScalableParameterLimits |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
67 |
{ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
68 |
public: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
69 |
IMPORT_C TAknLayoutScalableParameterLimits(); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
70 |
IMPORT_C TAknLayoutScalableParameterLimits( |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
71 |
TInt aFirstVariety, TInt aLastVariety, |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
72 |
TInt aFirstColumn, TInt aLastColumn, |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
73 |
TInt aFirstRow, TInt aLastRow); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
74 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
75 |
IMPORT_C TInt FirstVariety() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
76 |
IMPORT_C TInt LastVariety() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
77 |
IMPORT_C TInt FirstColumn() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
78 |
IMPORT_C TInt LastColumn() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
79 |
IMPORT_C TInt FirstRow() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
80 |
IMPORT_C TInt LastRow() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
81 |
IMPORT_C void SetFirstVariety(TInt FirstVariety); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
82 |
IMPORT_C void SetLastVariety(TInt LastVariety); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
83 |
IMPORT_C void SetFirstColumn(TInt aFirstColumn); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
84 |
IMPORT_C void SetLastColumn(TInt aLastColumn); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
85 |
IMPORT_C void SetFirstRow(TInt aFirstRow); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
86 |
IMPORT_C void SetLastRow(TInt aLastRow); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
87 |
private: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
88 |
TInt iFirstVariety; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
89 |
TInt iLastVariety; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
90 |
TInt iFirstColumn; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
91 |
TInt iLastColumn; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
92 |
TInt iFirstRow; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
93 |
TInt iLastRow; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
94 |
}; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
95 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
96 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
97 |
class TAknTextComponentLayout; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
98 |
struct TAknTextComponentLayoutAttrs; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
99 |
class TAknTextLineLayout; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
100 |
/** |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
101 |
* A window component structure from scalable layout. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
102 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
103 |
* The data members of this class have the following invariants which must be preserved in any methods |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
104 |
* of this class. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
105 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
106 |
* il + iW + ir = parentRect.Width() |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
107 |
* it + iH + ib = parentRect.Height() |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
108 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
109 |
* The data format of the data members are as follows: (AknLayoutUtils knows this) |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
110 |
* any of il,iW,ir, it,iH,ib may be one of the following |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
111 |
* 1) coordinate value |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
112 |
* 2) ELayoutEmpty |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
113 |
* 3) ELayoutP - value |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
114 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
115 |
class TAknWindowComponentLayout |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
116 |
{ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
117 |
public: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
118 |
/** |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
119 |
* contructor |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
120 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
121 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
122 |
IMPORT_C TAknWindowComponentLayout(); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
123 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
124 |
/* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
125 |
* create a layout line using the old layout API structure |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
126 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
127 |
* @return layout line |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
128 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
129 |
IMPORT_C TAknWindowLineLayout LayoutLine() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
130 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
131 |
/* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
132 |
* create a layout line using the old layout API structure |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
133 |
* such that the values are all non-empty |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
134 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
135 |
* @return layout line |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
136 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
137 |
IMPORT_C TAknWindowLineLayout LayoutLineNoEmptys() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
138 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
139 |
/* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
140 |
* Return the type of the component, as specified in the layout |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
141 |
* Note that a TAknWindowComponentLayout is data layout |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
142 |
* compatible with TAknTextComponentLayout, and the actual |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
143 |
* type can be accessed using this method before casting. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
144 |
* However, casting to the wrong type may cause unexpected results. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
145 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
146 |
* @return the type of the component |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
147 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
148 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
149 |
IMPORT_C TAknLayoutScalableComponentType LayoutComponentType() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
150 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
151 |
private: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
152 |
// note that the following get and set methods do not follow coding conventions |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
153 |
// this is to increase source compatibility with existing implementation |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
154 |
// that directly accesses the public members of the corresponding non-scalable |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
155 |
// data structures. also note that the parameter names don't follow coding conventions, |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
156 |
// this is to maintain consistency with the layout specifications. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
157 |
// also note that they are not inline so that they can be modified |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
158 |
// for dynamic layout calculation without breaking BC. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
159 |
IMPORT_C TInt16 C() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
160 |
IMPORT_C TInt16 l() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
161 |
IMPORT_C TInt16 t() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
162 |
IMPORT_C TInt16 r() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
163 |
IMPORT_C TInt16 b() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
164 |
IMPORT_C TInt16 W() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
165 |
IMPORT_C TInt16 H() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
166 |
IMPORT_C void SetC(TInt16 aC); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
167 |
IMPORT_C void Setl(TInt16 al); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
168 |
IMPORT_C void Sett(TInt16 at); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
169 |
IMPORT_C void Setr(TInt16 ar); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
170 |
IMPORT_C void Setb(TInt16 ab); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
171 |
IMPORT_C void SetW(TInt16 aW); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
172 |
IMPORT_C void SetH(TInt16 aH); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
173 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
174 |
public: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
175 |
/* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
176 |
* Compose two window lines together |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
177 |
* note that this is not commutative, line2 should lie inside line1 |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
178 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
179 |
* Compose puts two layout lines together in the following way: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
180 |
* TRect --aLine1--> TRect --aLine2--> TRect |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
181 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
182 |
* becomes |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
183 |
* TRect --------result--------------> TRect |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
184 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
185 |
* The arrow direction points towards smaller rectangles. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
186 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
187 |
* The rectangle in the middle gets hidden and is shared by aLine1 and aLine2 in such way that |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
188 |
* aLine1's child rectangle becomes parent rectangle of aLine2. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
189 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
190 |
* Compose() works pretty well with AknLayoutUtils. Here's two equivalent code pieces: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
191 |
* 1) Chain of 2 AknLayoutUtils calls |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
192 |
* TAknLayoutRect rect; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
193 |
* rect.LayoutRect(parent1, AknLayoutScalable::xxxx1().LayoutLine()); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
194 |
* TAknLayoutRect rect2; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
195 |
* rect2.LayoutRect(rect.Rect(), AknLayoutScalable::xxxx2().LayoutLine()); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
196 |
* ... use rect2.Rect().... |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
197 |
* 2) Compose + one AknLayoutUtils call |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
198 |
* TAknWindowLineLayout combined = Compose(AknLayoutScalable::xxxx1(), AknLayoutScalable::xxxx2()).LayoutLine(); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
199 |
* TAknLayoutRect rect2; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
200 |
* rect2.LayoutRect(parent1, combined); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
201 |
* ... use rect2.Rect()... |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
202 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
203 |
* The only differences between the two pieces of code is that the version (2) |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
204 |
* cannot use rect.Rect() for positioning any CCoeControl's or drawable elements. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
205 |
* Compose() hides that rectangle completely and it is no longer accessible. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
206 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
207 |
* Compose() works without the parent rectangle! In the version (1), the |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
208 |
* parent rectangle must be provided at beginning. In version (2), the parent |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
209 |
* rectangle is provided after combining two layout lines; This property of Compose() allows |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
210 |
* us to use it in adaptation layer where parent rectangle is not always known. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
211 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
212 |
* Compose() is associative. Compose(x,Compose(y,z)) == Compose(Compose(x,y),z). |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
213 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
214 |
* Mathematically, Compose() corresponds to function composition for TRect f(TRect) -type functions. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
215 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
216 |
* Compose() implementation generates values for TAknWindowComponentLayout which are not coordinates: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
217 |
* 1) any of l,t,r,b,W,H may become ELayoutEmpty |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
218 |
* 2) any of l,t,r,b,W,H may become ELayoutP - XX, where XX is some number. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
219 |
* This is why the data members of TAknWindowComponentLayout (or TAknWindowLineLayout) should not be accessed. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
220 |
* AknLayoutUtils and all related classes which access these values must handle these cases. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
221 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
222 |
* Compose() implementation preserves some invariants of TAknWindowComponentLayout |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
223 |
* l+W+r = p.W |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
224 |
* t+H+b = p.H |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
225 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
226 |
* @param aLine1 window line |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
227 |
* @param aLine2 window line |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
228 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
229 |
IMPORT_C static TAknWindowComponentLayout Compose(TAknWindowComponentLayout aLine1, TAknWindowComponentLayout aLine2); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
230 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
231 |
/* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
232 |
* compose a window line with a text line |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
233 |
* note that this is not commutative, line2 should lie inside line1 |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
234 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
235 |
* ComposeText puts two layout lines together in the following way: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
236 |
* TRect --aLine1--> TRect --aLine2--> Text |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
237 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
238 |
* becomes |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
239 |
* TRect --------result--------------> Text |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
240 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
241 |
* ComposeText() is associative. ComposeText(x,ComposeText(y,z)) = ComposeText(Compose(x,y),z). |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
242 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
243 |
* @param aLine1 window line |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
244 |
* @param aLine2 text line |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
245 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
246 |
IMPORT_C static TAknTextComponentLayout ComposeText(TAknWindowComponentLayout aLine1, TAknTextComponentLayout aLine2); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
247 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
248 |
/* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
249 |
* intersect two layout lines that share the same parent rectangle |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
250 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
251 |
* Intersect combines two layout lines in such way that |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
252 |
* a) their parent rectangles will become the same rectangle |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
253 |
* b) the child rectangle is intersection of the child rectangles of aLine and aLine2 |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
254 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
255 |
* Intersect can fail if the rectangles have no overlap. This can be detected by negative |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
256 |
* values in resulting TAknWindowComponentLayout. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
257 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
258 |
* @param aLine |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
259 |
* @param aLine2 |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
260 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
261 |
IMPORT_C static TAknWindowComponentLayout Intersect(TAknWindowComponentLayout aLine, TAknWindowComponentLayout aLine2); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
262 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
263 |
/** |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
264 |
* subtract two layout lines relative to the same parent rectangle |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
265 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
266 |
* Minus combines two layout lines in such way that |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
267 |
* a) the result is aLine with it's parent rectangle changed |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
268 |
* b) aLine and aParentDiff's parent rectangles becomes the same; and result's parent rectangle is calculated to be aParentDiff's child rectangle. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
269 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
270 |
* @param aLine the inner rect |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
271 |
* @param aParentDiff the difference between the parent and the inner rect |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
272 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
273 |
IMPORT_C static TAknWindowComponentLayout Minus(TAknWindowComponentLayout aLine, TAknWindowComponentLayout aParentDiff); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
274 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
275 |
/** |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
276 |
* Treat two layout lines as if one is a child of the other. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
277 |
* The two layouts must have the same parent. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
278 |
* They must also have the same pattern of absolute, ElayoutEmptys and Parent relative |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
279 |
* measurements, both vertically and horizontally. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
280 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
281 |
* @param aSiblingTreatedAsParent |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
282 |
* @param aSiblingTreatedAsChild |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
283 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
284 |
* @return a layout representing aSiblingTreated as child, relative to aSiblingTreatedAsParent |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
285 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
286 |
IMPORT_C static TAknWindowComponentLayout SiblingAsChild(TAknWindowComponentLayout aSiblingTreatedAsParent, TAknWindowComponentLayout aSiblingTreatedAsChild); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
287 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
288 |
/** |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
289 |
* Makes the window zero-sized, positioned in the top left corner. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
290 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
291 |
IMPORT_C void SetZeroSized(); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
292 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
293 |
/** |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
294 |
* This method splits parent rectangle to one of the 9 pieces based on aLine. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
295 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
296 |
* aValue is one of the numbers: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
297 |
* 0 1 2 |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
298 |
* 3 4 5 |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
299 |
* 6 7 8 |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
300 |
* This is highly related to "frames" in skins. This allows us to generate a skin frame definition |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
301 |
* from a single TAknWindowComponentLayout. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
302 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
303 |
IMPORT_C static TAknWindowComponentLayout Split(TAknWindowComponentLayout aLine, TInt aValue); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
304 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
305 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
306 |
/** |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
307 |
* This method calculates a grid item position in based on first cell. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
308 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
309 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
310 |
IMPORT_C static TAknWindowComponentLayout MultiLineGrid(TAknWindowComponentLayout aFirst, TInt aColumnIndex, TInt aRowIndex, TInt aGapBetweenColumns, TInt aGapBetweenRows); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
311 |
/** |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
312 |
* This method calculates a grid item position in X-dimension based on first cell. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
313 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
314 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
315 |
IMPORT_C static TAknWindowComponentLayout MultiLineX(TAknWindowComponentLayout aFirst, TInt aColumnIndex, TInt aGapBetweenColumns); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
316 |
/** |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
317 |
* This method calculates a list item position based on first item. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
318 |
* This can be used to calculate either list item positions or grid cell Y-positions. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
319 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
320 |
IMPORT_C static TAknWindowComponentLayout MultiLineY(TAknWindowComponentLayout aFirst, TInt aItemIndex, TInt aGapBetweenItems); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
321 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
322 |
public: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
323 |
struct TRangeTriplet; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
324 |
IMPORT_C static TAknWindowComponentLayout Anim(TAknWindowComponentLayout aLine, |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
325 |
TAknWindowComponentLayout aLine2, |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
326 |
const TRangeTriplet &aTriplet); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
327 |
IMPORT_C TAknWindowComponentLayout( TAknWindowLineLayout aLine ); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
328 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
329 |
IMPORT_C TAknWindowComponentLayout operator=( TAknWindowLineLayout aLine ); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
330 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
331 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
332 |
public: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
333 |
static void FormFieldHack(TAknWindowComponentLayout &aLayout) { aLayout.SetH(ELayoutEmpty); } |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
334 |
static void ListGenPaneHack(TAknWindowComponentLayout &aLayout) { aLayout.Setl(0); aLayout.Sett(0); } |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
335 |
static TAknWindowComponentLayout ListPaneHack(const TAknWindowComponentLayout &aLayout, const TAknWindowComponentLayout aListGenPane) |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
336 |
{ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
337 |
TAknWindowComponentLayout layout = aLayout; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
338 |
TAknWindowComponentLayout l3 = aListGenPane; // 0 = find pane on |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
339 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
340 |
TAknWindowComponentLayout &aLine1 = layout; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
341 |
if (aLine1.r() == ELayoutEmpty) |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
342 |
{ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
343 |
aLine1.Setr( TInt16(ELayoutP - aLine1.W() - aLine1.l())); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
344 |
} |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
345 |
if (aLine1.b() == ELayoutEmpty) |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
346 |
{ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
347 |
aLine1.Setb(TInt16(ELayoutP - aLine1.H() - aLine1.t())); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
348 |
} |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
349 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
350 |
if (aLine1.l() == ELayoutEmpty) |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
351 |
{ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
352 |
aLine1.Setl(TInt16(ELayoutP - aLine1.W() - aLine1.r())); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
353 |
} |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
354 |
if (aLine1.t() == ELayoutEmpty) |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
355 |
{ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
356 |
aLine1.Sett(TInt16(ELayoutP - aLine1.H() - aLine1.b())); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
357 |
} |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
358 |
if (aLine1.W() == ELayoutEmpty) |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
359 |
{ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
360 |
aLine1.SetW(TInt16(ELayoutP - aLine1.l() - aLine1.r())); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
361 |
} |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
362 |
if (aLine1.H() == ELayoutEmpty) |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
363 |
{ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
364 |
aLine1.SetH(TInt16(ELayoutP - aLine1.t() - aLine1.b())); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
365 |
} |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
366 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
367 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
368 |
layout.il = TInt16(layout.il + l3.il); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
369 |
layout.it = TInt16(layout.it + l3.it); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
370 |
layout.ib = ELayoutEmpty; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
371 |
layout.ir = ELayoutEmpty; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
372 |
return layout; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
373 |
} |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
374 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
375 |
// this is a method to get the arrowhead scroll indicators working. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
376 |
// aDirection is the nudge button direction, 1 = up, 2 = down. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
377 |
static void ScrollIndicatorHack( const TAknWindowComponentLayout& aWidthHeightLayout, |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
378 |
TAknWindowComponentLayout& aParent, |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
379 |
TAknWindowComponentLayout& aLayout, |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
380 |
TInt aDirection) |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
381 |
{ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
382 |
aParent.SetW( aWidthHeightLayout.W() ); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
383 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
384 |
aLayout.Setl( aParent.W() / 2 - aParent.W() / 39 ); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
385 |
if (aDirection == 0) |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
386 |
{ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
387 |
aLayout.Sett( 0 ); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
388 |
aLayout.SetH( ( aWidthHeightLayout.H() - aParent.t() ) / 2); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
389 |
} |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
390 |
else |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
391 |
{ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
392 |
aLayout.Sett( ( aWidthHeightLayout.H() - aParent.t() ) / 2 ); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
393 |
aLayout.SetH( ( aWidthHeightLayout.H() - aParent.t() ) / 2 ); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
394 |
} |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
395 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
396 |
aLayout.SetW( aParent.W() - 2 * aLayout.l() ); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
397 |
} |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
398 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
399 |
private: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
400 |
// structural information |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
401 |
TInt16 iFirstChildID; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
402 |
TInt16 iNextSiblingID; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
403 |
TInt16 iParentID; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
404 |
TInt16 iParentVariety; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
405 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
406 |
TInt16 iAttributeSetID; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
407 |
TInt16 iType; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
408 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
409 |
// the following entries are the layout data |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
410 |
TInt16 iC; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
411 |
TInt16 il; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
412 |
TInt16 it; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
413 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
414 |
TInt16 ir; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
415 |
TInt16 ib; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
416 |
TInt16 iW; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
417 |
TInt16 iH; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
418 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
419 |
// the following entries are to force this structure to be castable to TAknTextComponentLayout |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
420 |
TInt16 iReserved1; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
421 |
TInt16 iReserved2; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
422 |
TInt16 iReserved3; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
423 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
424 |
private: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
425 |
static TAknWindowComponentLayout RemoveLayoutEmptys(TAknWindowComponentLayout aLine1); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
426 |
static TAknWindowComponentLayout ExtractWindow(TAknTextComponentLayout aText); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
427 |
static TAknTextComponentLayout CombineAttrs(TAknWindowComponentLayout aLine1, const TAknTextComponentLayoutAttrs &aAttrs); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
428 |
friend class TAknTextComponentLayout; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
429 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
430 |
public: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
431 |
struct TRangeTriplet |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
432 |
{ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
433 |
TInt16 iX; // 0.0 .. 1.0, scaled by 12 bits. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
434 |
TInt16 iY; // 0.0 .. 1.0 |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
435 |
TInt16 iP; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
436 |
}; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
437 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
438 |
private: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
439 |
class TScaledInt |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
440 |
{ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
441 |
public: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
442 |
TScaledInt(TInt32 aValue) : iValue(aValue) { } |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
443 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
444 |
friend inline TScaledInt operator*(TScaledInt aValue, TScaledInt aValue2) |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
445 |
{ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
446 |
return TInt16( (aValue.Value() * aValue2.Value()) >> 12 ); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
447 |
} |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
448 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
449 |
friend TScaledInt MultiplyByScaled(TInt16 aValue, TScaledInt aValue2) |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
450 |
{ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
451 |
return TInt32( TInt32(aValue) * TInt32(aValue2.Value()) ); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
452 |
} |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
453 |
TInt16 NonScaled() { return TInt16(iValue >> 12); } |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
454 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
455 |
TInt32 Value() { return iValue; } |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
456 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
457 |
private: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
458 |
TInt32 iValue; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
459 |
}; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
460 |
static TInt16 MultiplyValue(TInt16 aValue, TScaledInt aMultiplier, TScaledInt aPMultiplier); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
461 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
462 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
463 |
struct TTriplet |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
464 |
{ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
465 |
TTriplet(const TTriplet &aValue); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
466 |
TTriplet(TInt16 aX, TInt16 aY, TInt16 aP); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
467 |
TScaledInt iX; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
468 |
TScaledInt iY; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
469 |
TScaledInt iP; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
470 |
}; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
471 |
static TAknWindowComponentLayout Multiply(TAknWindowComponentLayout aLine1, const TTriplet &aTriplet); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
472 |
static TTriplet FromRangeToTriplet(const TRangeTriplet &aRange); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
473 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
474 |
}; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
475 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
476 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
477 |
/** |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
478 |
* A text component structure from layout. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
479 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
480 |
class TAknTextComponentLayout |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
481 |
{ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
482 |
public: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
483 |
/** |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
484 |
* contructor |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
485 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
486 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
487 |
IMPORT_C TAknTextComponentLayout(); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
488 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
489 |
/* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
490 |
* create a layout line using the old layout API structure |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
491 |
* note that the B value will contain the b value and may be parent relative |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
492 |
* note also that the fontId will be encoded |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
493 |
* see AknFontSpecification and AknLayoutUtils for helper methods |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
494 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
495 |
* @return layout line |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
496 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
497 |
IMPORT_C TAknTextLineLayout LayoutLine() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
498 |
IMPORT_C static TAknMultiLineTextLayout Multiline(const RArray<TAknTextComponentLayout> &aLayouts); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
499 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
500 |
/* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
501 |
* create a layout line using the old layout API structure |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
502 |
* such that the values are all non-empty |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
503 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
504 |
* @return layout line |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
505 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
506 |
IMPORT_C TAknTextLineLayout LayoutLineNoEmptys() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
507 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
508 |
/* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
509 |
* Return the type of the component, as specified in the layout |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
510 |
* Note that a TAknWindowComponentLayout is data layout |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
511 |
* compatible with TAknTextComponentLayout, and the actual |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
512 |
* type can be accessed using this method before casting. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
513 |
* However, casting to the wrong type may cause unexpected results. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
514 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
515 |
* @return the type of the component |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
516 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
517 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
518 |
IMPORT_C TAknLayoutScalableComponentType LayoutComponentType() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
519 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
520 |
public: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
521 |
// note that the following get and set methods do not follow coding conventions |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
522 |
// this is to increase source compatibility with existing implementation |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
523 |
// that directly accesses the public members of the corresponding non-scalable |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
524 |
// data structures. also note that the parameter names don't follow coding conventions, |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
525 |
// this is to maintain consistency with the layout specifications. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
526 |
// also note that they are not inline so that they can be modified |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
527 |
// for dynamic layout calculation without breaking BC. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
528 |
IMPORT_C TInt16 C() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
529 |
IMPORT_C TInt16 l() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
530 |
IMPORT_C TInt16 t() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
531 |
IMPORT_C TInt16 r() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
532 |
IMPORT_C TInt16 b() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
533 |
IMPORT_C TInt16 W() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
534 |
IMPORT_C TInt16 H() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
535 |
IMPORT_C TInt16 J() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
536 |
IMPORT_C TInt32 Font() const; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
537 |
IMPORT_C void SetC(TInt16 aC); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
538 |
IMPORT_C void Setl(TInt16 al); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
539 |
IMPORT_C void Sett(TInt16 at); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
540 |
IMPORT_C void Setr(TInt16 ar); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
541 |
IMPORT_C void Setb(TInt16 ab); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
542 |
IMPORT_C void SetW(TInt16 aW); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
543 |
IMPORT_C void SetH(TInt16 aH); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
544 |
IMPORT_C void SetJ(TInt16 aJ); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
545 |
IMPORT_C void SetFont(TInt32 aFont); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
546 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
547 |
public: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
548 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
549 |
IMPORT_C static TAknTextComponentLayout Anim(TAknTextComponentLayout aLine, |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
550 |
TAknTextComponentLayout aLine2, |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
551 |
const TAknWindowComponentLayout::TRangeTriplet &aTriplet); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
552 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
553 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
554 |
/** |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
555 |
* This method calculates a list item position based on first item. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
556 |
* This can be used to calculate list item positions. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
557 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
558 |
IMPORT_C static TAknTextComponentLayout MultiLineY(TAknTextComponentLayout aFirst, TInt aItemIndex, TInt aGapBetweenItems); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
559 |
IMPORT_C TAknTextComponentLayout( TAknTextLineLayout aLine ); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
560 |
IMPORT_C TAknTextComponentLayout operator=(TAknTextLineLayout aLine); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
561 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
562 |
public: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
563 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
564 |
static TInt FormDataHack(TAknTextComponentLayout aLayout) |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
565 |
{ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
566 |
aLayout = RemoveLayoutEmptys(aLayout); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
567 |
return ELayoutP - aLayout.it - aLayout.iH; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
568 |
} |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
569 |
static void FormDataHack2(TAknTextComponentLayout &aLayout) |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
570 |
{ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
571 |
aLayout.ib = ELayoutEmpty; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
572 |
} |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
573 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
574 |
private: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
575 |
IMPORT_C static TAknTextComponentLayout RemoveLayoutEmptys(TAknTextComponentLayout aLayout); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
576 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
577 |
private: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
578 |
// structural information |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
579 |
TInt16 iFirstChildID; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
580 |
TInt16 iNextSiblingID; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
581 |
TInt16 iParentID; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
582 |
TInt16 iParentVariety; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
583 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
584 |
TInt16 iAttributeSetID; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
585 |
TInt16 iType; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
586 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
587 |
// the following entries are the layout data |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
588 |
TInt16 iC; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
589 |
TInt16 il; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
590 |
TInt16 it; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
591 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
592 |
TInt16 ir; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
593 |
TInt16 ib; // note that this is bottom, not baseline |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
594 |
TInt16 iW; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
595 |
TInt16 iH; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
596 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
597 |
// the following entries are specific to text components |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
598 |
TInt16 iJ; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
599 |
mutable TInt32 iFont; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
600 |
}; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
601 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
602 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
603 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
604 |
#endif |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
605 |
// End of File |