epoc32/include/mw/eikalign.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) 2002-2006 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:  Class declaration for EIKON aligned control.
williamr@2
    15
*
williamr@2
    16
*/
williamr@2
    17
williamr@2
    18
williamr@2
    19
#ifndef __EIKALIGN_H__
williamr@2
    20
#define __EIKALIGN_H__
williamr@2
    21
williamr@2
    22
#include <coecntrl.h>
williamr@2
    23
#include <gulalign.h>
williamr@2
    24
#include <gulutil.h>
williamr@4
    25
#include <AknControl.h>
williamr@2
    26
williamr@2
    27
/**
williamr@2
    28
 * Extends @c CAknControl to support control alignment and margins.
williamr@2
    29
 *
williamr@2
    30
 * @lib eikcoctl.lib
williamr@2
    31
 * @since S60 0.9
williamr@2
    32
 */
williamr@2
    33
class CEikAlignedControl : public CAknControl
williamr@2
    34
	{
williamr@2
    35
public:
williamr@2
    36
williamr@2
    37
    /**
williamr@2
    38
     * C++ default constructor.
williamr@2
    39
     */
williamr@2
    40
	IMPORT_C CEikAlignedControl();
williamr@2
    41
	
williamr@2
    42
	/**
williamr@2
    43
	 * Destructor
williamr@2
    44
	 */
williamr@2
    45
	IMPORT_C ~CEikAlignedControl();
williamr@2
    46
	
williamr@2
    47
	/**
williamr@2
    48
	 * Sets all of the control's margins.
williamr@2
    49
	 *
williamr@2
    50
	 * @param aValue The number of pixels to which all margins will be set.
williamr@2
    51
	 */
williamr@2
    52
	IMPORT_C void SetAllMarginsTo(TInt aValue);
williamr@2
    53
	
williamr@2
    54
	/**
williamr@2
    55
	 * Sets the control's alignment.
williamr@2
    56
     *
williamr@2
    57
	 * @param aAlign The alignment to be set to the control.
williamr@2
    58
	 */
williamr@2
    59
	IMPORT_C void SetAlignment(TGulAlignmentValue aAlign);
williamr@2
    60
	
williamr@2
    61
public: /** From @c CCoeControl. */
williamr@2
    62
williamr@2
    63
    /**
williamr@2
    64
     * Handles pointer events.
williamr@2
    65
     *
williamr@2
    66
     * This function gets called whenever a pointer event occurs in the 
williamr@2
    67
     * control, i.e. when the pointer is within the control's extent, or when 
williamr@2
    68
     * the control has grabbed the pointer. The control should implement this 
williamr@2
    69
     * function to handle pointer events.
williamr@2
    70
     * 
williamr@2
    71
     * If overriding this method, the implementation must 
williamr@2
    72
     * include a base call to this method.
williamr@2
    73
     *
williamr@2
    74
     * From @c CCoeControl.
williamr@2
    75
     *
williamr@2
    76
     * @param aPointerEvent The pointer event.
williamr@2
    77
     */
williamr@2
    78
    IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
williamr@2
    79
    	
williamr@2
    80
protected:
williamr@2
    81
williamr@2
    82
    /**
williamr@2
    83
     * Writes the internal state of the control and its components
williamr@2
    84
     * to @c aWriteStream.
williamr@2
    85
     *
williamr@2
    86
     * Does nothing in release mode.
williamr@2
    87
     * Designed to be overridden and base called from subclasses.
williamr@2
    88
     *
williamr@2
    89
     * From @c CCoeControl.
williamr@2
    90
     *
williamr@2
    91
     * @param[in,out] aWriteStream A connected write stream.
williamr@2
    92
     */
williamr@2
    93
	IMPORT_C void WriteInternalStateL(RWriteStream& aWriteStream) const;
williamr@2
    94
	
williamr@2
    95
private: /** From @c CAknControl. */
williamr@2
    96
williamr@2
    97
    IMPORT_C void* ExtensionInterface( TUid aInterface );
williamr@2
    98
    
williamr@2
    99
public:
williamr@2
   100
    /** The control's margins. */
williamr@2
   101
	TMargins8 iMargin;
williamr@2
   102
	
williamr@2
   103
	/** The control's alignment. */
williamr@2
   104
	TGulAlignment iAlignment;
williamr@2
   105
williamr@2
   106
private:
williamr@2
   107
    TInt iSpare[2];
williamr@2
   108
	};
williamr@2
   109
williamr@2
   110
#endif // __EIKALIGN_H__