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: flow layout policy implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef ALFFLOWLAYOUTPOLICYIMPL_H |
|
20 #define ALFFLOWLAYOUTPOLICYIMPL_H |
|
21 |
|
22 #include <osn/osndefines.h> |
|
23 #include <alf/ialfflowlayoutpolicy.h> |
|
24 |
|
25 using std::auto_ptr; |
|
26 |
|
27 class CAlfFlowLayout; |
|
28 |
|
29 using namespace Alf; |
|
30 |
|
31 namespace Alf |
|
32 { |
|
33 class AlfFlowLayoutManager; |
|
34 |
|
35 /** |
|
36 * flow layout policy implementation |
|
37 * |
|
38 * @lib alfwidgetmodel.lib |
|
39 * @since S60 ?S60_version |
|
40 */ |
|
41 class AlfFlowLayoutPolicyImpl : public IAlfFlowLayoutPolicy |
|
42 { |
|
43 public: |
|
44 /** |
|
45 * layout policy constructor |
|
46 * |
|
47 * @param aFlowLayoutManager flow layout manager instance |
|
48 */ |
|
49 AlfFlowLayoutPolicyImpl(AlfFlowLayoutManager& aFlowLayoutManager); |
|
50 |
|
51 /** |
|
52 * destructor |
|
53 */ |
|
54 ~AlfFlowLayoutPolicyImpl(); |
|
55 |
|
56 public: |
|
57 //from IAlfFlowLayoutPolicy |
|
58 |
|
59 /** |
|
60 * Sets the direction of the flow. |
|
61 * |
|
62 * @param aDirection Flow direction. |
|
63 */ |
|
64 virtual void setFlowDirection(enum flowDirection aDirection); |
|
65 |
|
66 /** |
|
67 * returns the flow direction |
|
68 * |
|
69 * @param aDirection Flow direction. |
|
70 */ |
|
71 virtual enum flowDirection flowDirection() const; |
|
72 |
|
73 /** |
|
74 * Sets the mode of the flow. The mode flags determine how the flow layout |
|
75 * behaves. |
|
76 * |
|
77 * @param aMode Mode flags (OR'd together). |
|
78 * |
|
79 * @see IAlfFlowLayoutPolicy::flowModeFlags |
|
80 */ |
|
81 virtual void setMode(int aMode); |
|
82 |
|
83 /** |
|
84 * Returns the mode flags of the flow. |
|
85 * |
|
86 * @see IAlfFlowLayoutPolicy::flowModeFlags |
|
87 * |
|
88 * @return Returns the current mode flags. |
|
89 */ |
|
90 virtual int mode() const; |
|
91 |
|
92 public: |
|
93 // from base class IAlfInterfaceBase |
|
94 |
|
95 /** |
|
96 * Interface getter. |
|
97 * @see IAlfInterfaceBase::MakeInterface |
|
98 * |
|
99 * @since S60 ?S60_version |
|
100 * @param aType The type id of the queried interface. |
|
101 * @return The queried interface, or NULL if the interface is not |
|
102 * supported or available. |
|
103 */ |
|
104 virtual IAlfInterfaceBase* makeInterface( const IfId& aType ); |
|
105 |
|
106 private: |
|
107 /** |
|
108 * returns the native flowlayout used by the implementation. |
|
109 */ |
|
110 CAlfFlowLayout& layout() const; |
|
111 private: |
|
112 |
|
113 AlfFlowLayoutManager &mFlowLayoutManager; |
|
114 enum IAlfFlowLayoutPolicy::flowDirection mDirection; |
|
115 |
|
116 }; |
|
117 |
|
118 } // namespace Alf |
|
119 |
|
120 #endif // ALFFLOWLAYOUTPOLICYIMPL_H |
|