|
1 /* |
|
2 * Copyright (c) 2003 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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CMIDSPACER_H |
|
20 #define CMIDSPACER_H |
|
21 |
|
22 #include <lcdui.h> |
|
23 // CMIDControlItem inheritance in class declaration |
|
24 #include "CMIDControlItem.h" |
|
25 |
|
26 |
|
27 NONSHARABLE_CLASS(CMIDSpacer) : public CMIDControlItem, public MMIDSpacer |
|
28 { |
|
29 public: |
|
30 |
|
31 /** |
|
32 * Double ctor |
|
33 * @param aMinimumSize Min size |
|
34 * @param aUIManager UI manager |
|
35 * @return CMIDSpacer instance |
|
36 * |
|
37 * @since s60 |
|
38 */ |
|
39 static CMIDSpacer* NewL(const TSize& aMinimumSize, CMIDUIManager* aUIManager); |
|
40 |
|
41 // |
|
42 // From MMIDSpacer |
|
43 // |
|
44 void SetMinimumSizeL(const TSize& aSize); |
|
45 // |
|
46 // From MMIDItem |
|
47 // |
|
48 void SetLabelL(const TDesC& aLabel); |
|
49 void SetLayoutL(TLayout aLayout); |
|
50 void SetPreferredSizeL(const TSize& aSize); |
|
51 TSize PreferredSize() const; |
|
52 TSize MinimumSize() const; |
|
53 void AddCommandL(MMIDCommand* aCommand); |
|
54 void RemoveCommand(MMIDCommand* aCommand); |
|
55 void SetDefaultCommand(MMIDCommand* aCommand); |
|
56 TBool IsSelectable() const; |
|
57 // |
|
58 // From MMIDComponent |
|
59 // |
|
60 void Dispose(); |
|
61 // |
|
62 // From CCoeControl |
|
63 // |
|
64 TSize MinimumSize(); |
|
65 virtual void Draw(const TRect& /*aRect*/) const; |
|
66 // |
|
67 // From CMIDItem |
|
68 // |
|
69 TInt ItemPreferredHeightWithoutLabel(); |
|
70 void SetUsedForStringFormatting(TBool iVal); |
|
71 TBool UsedForStringFormatting(); |
|
72 public: |
|
73 /** |
|
74 * Ctor |
|
75 * @param aUIManager UI manager |
|
76 * |
|
77 * @since s60 |
|
78 */ |
|
79 CMIDSpacer(CMIDUIManager* aUIManager); |
|
80 |
|
81 void ConstructL(const TSize& aMinimumSize); |
|
82 private: |
|
83 TSize iMinimumSize; |
|
84 |
|
85 // if this is true, this spacer is just used for string formatting |
|
86 // and should be deleted when reformatting the form |
|
87 TBool iUsedForStringFormatting; |
|
88 }; |
|
89 |
|
90 #endif // CMIDSPACER_H |