45
|
1 |
/*
|
|
2 |
* Copyright (c) 1997-1999 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:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#if !defined(__EIKMOVER_H__)
|
|
20 |
#define __EIKMOVER_H__
|
|
21 |
|
|
22 |
#include <AknControl.h>
|
|
23 |
|
|
24 |
//
|
|
25 |
// Forward declarations
|
|
26 |
//
|
|
27 |
|
|
28 |
class TResourceReader;
|
|
29 |
|
|
30 |
/**
|
|
31 |
* The CEikMover class implements a draggable bar that can be used as
|
|
32 |
* the title bar of a dialog window.
|
|
33 |
*/
|
|
34 |
class CEikMover : public CAknControl
|
|
35 |
{
|
|
36 |
public: // class specific
|
|
37 |
/** Destructor
|
|
38 |
*/
|
|
39 |
IMPORT_C ~CEikMover();
|
|
40 |
/** Constructor
|
|
41 |
*/
|
|
42 |
IMPORT_C CEikMover();
|
|
43 |
/** SetText sets the text
|
|
44 |
* @param aText a descriptor
|
|
45 |
*/
|
|
46 |
IMPORT_C void SetText(HBufC* aText);
|
|
47 |
/** SetTextL sets the text
|
|
48 |
* @param aText a descriptor
|
|
49 |
*/
|
|
50 |
IMPORT_C void SetTextL(const TDesC& aText);
|
|
51 |
/** SetActive() sets mover active state
|
|
52 |
*/
|
|
53 |
IMPORT_C void SetActive(TBool aActive);
|
|
54 |
/** Active() returns whether mover is active
|
|
55 |
*/
|
|
56 |
IMPORT_C TBool Active() const;
|
|
57 |
/** SetFont sets the font for the text
|
|
58 |
*/
|
|
59 |
IMPORT_C void SetFont(const CFont* aFont);
|
|
60 |
/** SetTitleLeftMargin sets left margin of the title text
|
|
61 |
*/
|
|
62 |
IMPORT_C void SetTitleLeftMargin(TInt aLeftMargin);
|
|
63 |
public: // from CCoeControl
|
|
64 |
/** ConstructFromResourceL constructs mover from resource
|
|
65 |
* from CCoeControl
|
|
66 |
*/
|
|
67 |
IMPORT_C virtual void ConstructFromResourceL(TResourceReader& aReader);
|
|
68 |
/** MinimumSize()
|
|
69 |
* from CCoeControl
|
|
70 |
*/
|
|
71 |
IMPORT_C virtual TSize MinimumSize();
|
|
72 |
/** SetContainerWindowL()
|
|
73 |
* from CCoeControl
|
|
74 |
*/
|
|
75 |
IMPORT_C virtual void SetContainerWindowL(const CCoeControl& aContainer);
|
|
76 |
/** GetColorUseListL()
|
|
77 |
* from CCoeControl
|
|
78 |
*/
|
|
79 |
IMPORT_C virtual void GetColorUseListL(CArrayFix<TCoeColorUse>& aColorUseList) const; // not available before Release 005u
|
|
80 |
/** HandleResourceChange
|
|
81 |
* from CCoeControl
|
|
82 |
*/
|
|
83 |
IMPORT_C virtual void HandleResourceChange(TInt aType); // not available before Release 005u
|
|
84 |
/** HandlePointerEventL()
|
|
85 |
* from CCoeControl
|
|
86 |
*/
|
|
87 |
IMPORT_C virtual void HandlePointerEventL(const TPointerEvent& aPointerEvent);
|
|
88 |
protected: //from CCoeControl
|
|
89 |
IMPORT_C virtual void WriteInternalStateL(RWriteStream& aWriteStream) const;
|
|
90 |
private: // from CCoeControl
|
|
91 |
IMPORT_C virtual void Draw(const TRect& aRect) const;
|
|
92 |
private:
|
|
93 |
IMPORT_C virtual void Reserved_2();
|
|
94 |
private:
|
|
95 |
/**
|
|
96 |
* From CAknControl
|
|
97 |
*/
|
|
98 |
IMPORT_C void* ExtensionInterface( TUid aInterface );
|
|
99 |
private:
|
|
100 |
HBufC* iText;
|
|
101 |
const CFont* iFont;
|
|
102 |
TPoint iPointerDownPos;
|
|
103 |
TInt iMoverFlags;
|
|
104 |
TInt iTitleLeftMargin;
|
|
105 |
CCoeControl* iParentControl;
|
|
106 |
TInt iSpare;
|
|
107 |
};
|
|
108 |
|
|
109 |
#endif
|