epoc32/include/mw/eikspace.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
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@2
     5
* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
williamr@2
     6
* which accompanies this distribution, and is available
williamr@2
     7
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.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 spacer control.
williamr@2
    15
*
williamr@2
    16
*/
williamr@2
    17
williamr@2
    18
williamr@2
    19
#ifndef __EIKSPACE_H__
williamr@2
    20
#define __EIKSPACE_H__
williamr@2
    21
williamr@2
    22
#include <akncontrol.h>
williamr@2
    23
#include <gdi.h>
williamr@2
    24
williamr@2
    25
// Forward declarations
williamr@2
    26
class TResourceReader;
williamr@2
    27
williamr@2
    28
/**
williamr@2
    29
 * An invisible control that is used to provide a space between
williamr@2
    30
 * visible controls. It has a width, a height and a color.
williamr@2
    31
 * The spacer is normally drawn using the background color
williamr@2
    32
 * so that it is invisible.
williamr@2
    33
 *
williamr@2
    34
 * Its associated resource struct is @c SPACER and its control
williamr@2
    35
 * factory identifier is @c EEikCtSpacer.
williamr@2
    36
 *
williamr@2
    37
 * @lib eikctl.lib
williamr@2
    38
 * @since S60 0.9
williamr@2
    39
 */
williamr@2
    40
class CEikSpacer : public CAknControl
williamr@2
    41
    {
williamr@2
    42
public:
williamr@2
    43
williamr@2
    44
    /**
williamr@2
    45
     * Default C++ constructor.
williamr@2
    46
     * The spacer's color is initialised to white.
williamr@2
    47
     */
williamr@2
    48
    IMPORT_C CEikSpacer();
williamr@2
    49
    
williamr@2
    50
    /**
williamr@2
    51
     * C++ constructor with a width, height and color.
williamr@2
    52
     *
williamr@2
    53
     * @param aWidth  The spacer's width.
williamr@2
    54
     * @param aHeight The spacer's height.
williamr@2
    55
     * @param aColor  The spacer's color.
williamr@2
    56
     */
williamr@2
    57
	IMPORT_C CEikSpacer(TInt aWidth,TInt aHeight,TRgb aColor);
williamr@2
    58
	
williamr@2
    59
	/**
williamr@2
    60
     * Destructor.
williamr@2
    61
     */
williamr@2
    62
    IMPORT_C ~CEikSpacer();
williamr@2
    63
    
williamr@2
    64
    /**
williamr@2
    65
     * Sets the spacer's width.
williamr@2
    66
     *
williamr@2
    67
     * @param aWidth The spacer's width.
williamr@2
    68
     */
williamr@2
    69
	IMPORT_C void SetWidth(TInt aWidth);
williamr@2
    70
	
williamr@2
    71
	/**
williamr@2
    72
     * Sets the spacer's height.
williamr@2
    73
     *
williamr@2
    74
     * @param aHeight The spacer's height.
williamr@2
    75
     */
williamr@2
    76
	IMPORT_C void SetHeight(TInt aHeight);
williamr@2
    77
	
williamr@2
    78
	/**
williamr@2
    79
     * Sets the spacer's color.
williamr@2
    80
     *
williamr@2
    81
     * @param aColor The spacer's color.
williamr@2
    82
     */
williamr@2
    83
	IMPORT_C void SetColor(TRgb aColor);
williamr@2
    84
	
williamr@2
    85
	/**
williamr@2
    86
     * Specifies whether the spacer is drawn using the standard brush color.
williamr@2
    87
     *
williamr@2
    88
     * If the "Is clear" flag is set, the spacer's color value is ignored,
williamr@2
    89
     * and it is drawn using the brush color defined in the system's
williamr@2
    90
     * standard graphics context. By default, the "Is clear" flag is unset.
williamr@2
    91
     *
williamr@2
    92
     * @param aClear @c ETrue to set the "Is clear" flag,
williamr@2
    93
     *               @c EFalse to unset it.
williamr@2
    94
     */
williamr@2
    95
	IMPORT_C void SetClear(TBool aClear);
williamr@2
    96
	
williamr@2
    97
public: // From @c CCoeControl.
williamr@2
    98
williamr@2
    99
    /**
williamr@2
   100
     * Handles pointer events.
williamr@2
   101
     *
williamr@2
   102
     * This function gets called whenever a pointer event occurs in the 
williamr@2
   103
     * control, i.e. when the pointer is within the control's extent, or when 
williamr@2
   104
     * the control has grabbed the pointer.
williamr@2
   105
     * 
williamr@2
   106
     * If overriding this method, the implementation must 
williamr@2
   107
     * include a base call to this method.
williamr@2
   108
     *
williamr@2
   109
     * From @c CCoeControl.
williamr@2
   110
     *
williamr@2
   111
     * @param aPointerEvent The pointer event.
williamr@2
   112
     */
williamr@2
   113
    IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
williamr@2
   114
    
williamr@2
   115
private: /** From @c CCoeControl. */
williamr@2
   116
williamr@2
   117
    void ConstructFromResourceL(TResourceReader& aReader);
williamr@2
   118
williamr@2
   119
	void Draw(const TRect& aRect) const;
williamr@2
   120
	
williamr@2
   121
private: /** From @c CAknControl. */
williamr@2
   122
williamr@2
   123
    IMPORT_C void* ExtensionInterface( TUid aInterface );
williamr@2
   124
    
williamr@2
   125
private:
williamr@2
   126
	TRgb iColor;
williamr@2
   127
	TBool iClear;
williamr@2
   128
    };
williamr@2
   129
williamr@2
   130
#endif // __EIKSPACE_H__