|
1 /* |
|
2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Layout base class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #include "glxlayout.h" |
|
22 #include <glxpanic.h> // Panic codes |
|
23 |
|
24 // ----------------------------------------------------------------------------- |
|
25 // TGlxLayout class |
|
26 // ----------------------------------------------------------------------------- |
|
27 |
|
28 // ----------------------------------------------------------------------------- |
|
29 // Constructor |
|
30 // ----------------------------------------------------------------------------- |
|
31 EXPORT_C TGlxLayout::TGlxLayout() |
|
32 : iNextLayout( NULL ) // no CBase so clear value |
|
33 { |
|
34 } |
|
35 |
|
36 // ----------------------------------------------------------------------------- |
|
37 // Constructor |
|
38 // ----------------------------------------------------------------------------- |
|
39 EXPORT_C TGlxLayout::~TGlxLayout() |
|
40 { |
|
41 } |
|
42 |
|
43 // ----------------------------------------------------------------------------- |
|
44 // SetNext |
|
45 // ----------------------------------------------------------------------------- |
|
46 EXPORT_C void TGlxLayout::SetNext( MGlxLayout* aLayout ) |
|
47 { |
|
48 iNextLayout = aLayout; |
|
49 } |
|
50 |
|
51 // ----------------------------------------------------------------------------- |
|
52 // Next |
|
53 // ----------------------------------------------------------------------------- |
|
54 EXPORT_C MGlxLayout* TGlxLayout::Next() const |
|
55 { |
|
56 return iNextLayout; |
|
57 } |
|
58 |
|
59 // ----------------------------------------------------------------------------- |
|
60 // SetLayoutValues |
|
61 // ----------------------------------------------------------------------------- |
|
62 EXPORT_C void TGlxLayout::SetLayoutValues( TGlxLayoutInfo& aInfo ) |
|
63 { |
|
64 // first set our own values |
|
65 DoSetLayoutValues( aInfo ); |
|
66 |
|
67 // do we have a successor |
|
68 if( iNextLayout ) |
|
69 { |
|
70 // tell it to set values |
|
71 iNextLayout->SetLayoutValues( aInfo ); |
|
72 } |
|
73 } |
|
74 |
|
75 // ----------------------------------------------------------------------------- |
|
76 // DoMapValue |
|
77 // ----------------------------------------------------------------------------- |
|
78 EXPORT_C void TGlxLayout::DoSetLayoutValues( TGlxLayoutInfo& /*aInfo*/ ) |
|
79 { |
|
80 // by default do nothing |
|
81 } |
|
82 |
|
83 // ----------------------------------------------------------------------------- |
|
84 // CGlxLayout class |
|
85 // ----------------------------------------------------------------------------- |
|
86 |
|
87 // ----------------------------------------------------------------------------- |
|
88 // Constructor |
|
89 // ----------------------------------------------------------------------------- |
|
90 EXPORT_C CGlxLayout::CGlxLayout() |
|
91 { |
|
92 } |
|
93 |
|
94 // ----------------------------------------------------------------------------- |
|
95 // Constructor |
|
96 // ----------------------------------------------------------------------------- |
|
97 EXPORT_C CGlxLayout::~CGlxLayout() |
|
98 { |
|
99 } |
|
100 |
|
101 // ----------------------------------------------------------------------------- |
|
102 // SetNext |
|
103 // ----------------------------------------------------------------------------- |
|
104 EXPORT_C void CGlxLayout::SetNext( MGlxLayout* aLayout ) |
|
105 { |
|
106 iLayoutImpl.SetNext( aLayout ); |
|
107 } |
|
108 |
|
109 // ----------------------------------------------------------------------------- |
|
110 // Next |
|
111 // ----------------------------------------------------------------------------- |
|
112 EXPORT_C MGlxLayout* CGlxLayout::Next() const |
|
113 { |
|
114 return iLayoutImpl.Next(); |
|
115 } |
|
116 |
|
117 // ----------------------------------------------------------------------------- |
|
118 // SetLayoutValues |
|
119 // ----------------------------------------------------------------------------- |
|
120 EXPORT_C void CGlxLayout::SetLayoutValues( TGlxLayoutInfo& aInfo ) |
|
121 { |
|
122 // first call our own method |
|
123 DoSetLayoutValues( aInfo ); |
|
124 // then the rest |
|
125 iLayoutImpl.SetLayoutValues( aInfo ); |
|
126 } |
|
127 |
|
128 // ----------------------------------------------------------------------------- |
|
129 // DoMapValue |
|
130 // ----------------------------------------------------------------------------- |
|
131 EXPORT_C void CGlxLayout::DoSetLayoutValues( TGlxLayoutInfo& /*aInfo*/ ) |
|
132 { |
|
133 // by default do nothing |
|
134 } |
|
135 |