|
1 /* |
|
2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Anchor layout definition. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_ALFLCTANCHORLAYOUT_H |
|
21 #define C_ALFLCTANCHORLAYOUT_H |
|
22 |
|
23 #include <alf/alfanchorlayout.h> |
|
24 |
|
25 class TAknLayoutHierarchyComponentHandle; |
|
26 |
|
27 /** |
|
28 * LCT Anchor layout |
|
29 * |
|
30 * This is a specialised anchor layout, which is aware of the |
|
31 * avkon LCT layout system. It provides additional APIs |
|
32 * that allow anchors to be set by referring to LCT layout |
|
33 * components from the Layout Specifcations. |
|
34 * |
|
35 * @lib alfclient.lib |
|
36 * @since S60 v3.2 |
|
37 */ |
|
38 class CAlfLCTAnchorLayout : public CAlfAnchorLayout |
|
39 { |
|
40 |
|
41 public: |
|
42 |
|
43 /** |
|
44 * Two-phased constructor, which attach new object into the control. |
|
45 * @param aOwnerControl Control that owns this new obejct. |
|
46 * @param aParentLayout If given, the new object is set as child. |
|
47 */ |
|
48 IMPORT_C static CAlfLCTAnchorLayout* AddNewL(CAlfControl& aOwnerControl, |
|
49 CAlfLayout* aParentLayout = 0); |
|
50 |
|
51 /** |
|
52 * Constructor. |
|
53 */ |
|
54 IMPORT_C CAlfLCTAnchorLayout(); |
|
55 |
|
56 /** |
|
57 * Second-phase constructor. |
|
58 */ |
|
59 IMPORT_C void ConstructL(CAlfControl& aOwner); |
|
60 |
|
61 /** |
|
62 * Destructor. |
|
63 */ |
|
64 IMPORT_C ~CAlfLCTAnchorLayout(); |
|
65 |
|
66 /** |
|
67 * Defines both anchors for a child.. An anchor is a point within the layout control |
|
68 * that a child control's corner may be attached to. The use of anchors |
|
69 * allows for the neat layout of visuals within the layout control. |
|
70 * |
|
71 * @param aOrdinal Ordinal of the child that this anchor applies to. |
|
72 * @param aComponentHandle reference to the layout data that corresponds to |
|
73 * the visual that is anchored at this ordinal position. |
|
74 * @ param aOffset timed point, note that the position of the timed point will be ignored. |
|
75 */ |
|
76 IMPORT_C void SetAnchors( |
|
77 TInt aOrdinal, |
|
78 TAknLayoutHierarchyComponentHandle& aComponentHandle, |
|
79 const TAlfTimedPoint& aOffset); |
|
80 |
|
81 /** |
|
82 * From CAlfVisual |
|
83 * @see CAlfVisual |
|
84 */ |
|
85 IMPORT_C void RemoveAndDestroyAllD(); |
|
86 IMPORT_C void UpdateChildrenLayout(TInt aTransitionTime = 0); |
|
87 IMPORT_C CAlfVisual* FindTag(const TDesC8& aTag); |
|
88 /** |
|
89 * From CAlfLayout |
|
90 * @see CAlfLayout |
|
91 */ |
|
92 IMPORT_C TAlfXYMetric BaseUnit() const; |
|
93 |
|
94 |
|
95 protected: |
|
96 /** |
|
97 * From CAlfVisual |
|
98 * @see CAlfVisual |
|
99 */ |
|
100 IMPORT_C void DoRemoveAndDestroyAllD(); |
|
101 IMPORT_C void PropertyOwnerExtension(const TUid& aExtensionUid, TAny** aExtensionParams); |
|
102 |
|
103 |
|
104 private: |
|
105 |
|
106 struct TLCTAnchorLayoutPrivateData; |
|
107 TLCTAnchorLayoutPrivateData* iLCTAnchorLayoutData; |
|
108 }; |
|
109 |
|
110 |
|
111 |
|
112 #endif // C_ALFLCTANCHORLAYOUT_H |