epoc32/include/mw/eikmover.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 1997-1999 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@2
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:
williamr@2
    15
*
williamr@2
    16
*/
williamr@2
    17
williamr@2
    18
williamr@2
    19
#if !defined(__EIKMOVER_H__)
williamr@2
    20
#define __EIKMOVER_H__
williamr@2
    21
williamr@2
    22
#include <AknControl.h>
williamr@2
    23
williamr@2
    24
//
williamr@2
    25
// Forward declarations
williamr@2
    26
//
williamr@2
    27
williamr@2
    28
class TResourceReader;
williamr@2
    29
williamr@2
    30
/**
williamr@2
    31
 * The CEikMover class implements a draggable bar that can be used as
williamr@2
    32
 * the title bar of a dialog window.
williamr@2
    33
 */
williamr@2
    34
class CEikMover : public CAknControl
williamr@2
    35
	{
williamr@2
    36
public: // class specific
williamr@2
    37
	/** Destructor
williamr@2
    38
	 */
williamr@2
    39
	IMPORT_C ~CEikMover();
williamr@2
    40
	/** Constructor
williamr@2
    41
	 */
williamr@2
    42
	IMPORT_C CEikMover();
williamr@2
    43
    /** SetText sets the text
williamr@2
    44
     * @param aText a descriptor
williamr@2
    45
     */
williamr@2
    46
	IMPORT_C void SetText(HBufC* aText);
williamr@2
    47
    /** SetTextL sets the text
williamr@2
    48
     * @param aText a descriptor
williamr@2
    49
     */
williamr@2
    50
	IMPORT_C void SetTextL(const TDesC& aText);
williamr@2
    51
	/** SetActive() sets mover active state
williamr@2
    52
	 */
williamr@2
    53
	IMPORT_C void SetActive(TBool aActive);
williamr@2
    54
    /** Active() returns whether mover is active
williamr@2
    55
     */
williamr@2
    56
	IMPORT_C TBool Active() const;
williamr@2
    57
    /** SetFont sets the font for the text
williamr@2
    58
     */
williamr@2
    59
	IMPORT_C void SetFont(const CFont* aFont);
williamr@2
    60
    /** SetTitleLeftMargin sets left margin of the title text
williamr@2
    61
     */
williamr@2
    62
	IMPORT_C void SetTitleLeftMargin(TInt aLeftMargin);
williamr@2
    63
public: // from CCoeControl
williamr@2
    64
    /** ConstructFromResourceL constructs mover from resource
williamr@2
    65
     * from CCoeControl
williamr@2
    66
     */
williamr@2
    67
	IMPORT_C virtual void ConstructFromResourceL(TResourceReader& aReader);
williamr@2
    68
    /** MinimumSize()
williamr@2
    69
	 * from CCoeControl
williamr@2
    70
     */
williamr@2
    71
	IMPORT_C virtual TSize MinimumSize(); 
williamr@2
    72
	/** SetContainerWindowL()
williamr@2
    73
	 * from CCoeControl
williamr@2
    74
	 */
williamr@2
    75
	IMPORT_C virtual void SetContainerWindowL(const CCoeControl& aContainer);
williamr@2
    76
    /** GetColorUseListL()
williamr@2
    77
	 * from CCoeControl
williamr@2
    78
     */
williamr@2
    79
	IMPORT_C virtual void GetColorUseListL(CArrayFix<TCoeColorUse>& aColorUseList) const; // not available before Release 005u
williamr@2
    80
    /** HandleResourceChange
williamr@2
    81
	 * from CCoeControl
williamr@2
    82
     */
williamr@2
    83
	IMPORT_C virtual void HandleResourceChange(TInt aType);			// not available before Release 005u
williamr@2
    84
    /** HandlePointerEventL()
williamr@2
    85
	 * from CCoeControl
williamr@2
    86
     */
williamr@2
    87
	IMPORT_C virtual void HandlePointerEventL(const TPointerEvent& aPointerEvent);
williamr@2
    88
protected: //from CCoeControl
williamr@2
    89
	IMPORT_C virtual void WriteInternalStateL(RWriteStream& aWriteStream) const;
williamr@2
    90
private: // from CCoeControl
williamr@2
    91
	IMPORT_C virtual void Draw(const TRect& aRect) const;
williamr@2
    92
private:
williamr@2
    93
	IMPORT_C virtual void Reserved_2();
williamr@2
    94
private:
williamr@2
    95
    /**
williamr@2
    96
    * From CAknControl
williamr@2
    97
    */
williamr@2
    98
    IMPORT_C void* ExtensionInterface( TUid aInterface );
williamr@2
    99
private:
williamr@2
   100
	HBufC* iText;
williamr@2
   101
	const CFont* iFont;
williamr@2
   102
	TPoint iPointerDownPos;
williamr@2
   103
	TInt iMoverFlags;
williamr@2
   104
	TInt iTitleLeftMargin;
williamr@2
   105
	CCoeControl* iParentControl;
williamr@2
   106
    TInt iSpare;
williamr@2
   107
	};
williamr@2
   108
williamr@2
   109
#endif