2 * Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Class declaration for EIKON spacer control.
19 #ifndef __EIKSPACE_H__
20 #define __EIKSPACE_H__
22 #include <AknControl.h>
25 // Forward declarations
26 class TResourceReader;
29 * An invisible control that is used to provide a space between
30 * visible controls. It has a width, a height and a color.
31 * The spacer is normally drawn using the background color
32 * so that it is invisible.
34 * Its associated resource struct is @c SPACER and its control
35 * factory identifier is @c EEikCtSpacer.
40 class CEikSpacer : public CAknControl
45 * Default C++ constructor.
46 * The spacer's color is initialised to white.
48 IMPORT_C CEikSpacer();
51 * C++ constructor with a width, height and color.
53 * @param aWidth The spacer's width.
54 * @param aHeight The spacer's height.
55 * @param aColor The spacer's color.
57 IMPORT_C CEikSpacer(TInt aWidth,TInt aHeight,TRgb aColor);
62 IMPORT_C ~CEikSpacer();
65 * Sets the spacer's width.
67 * @param aWidth The spacer's width.
69 IMPORT_C void SetWidth(TInt aWidth);
72 * Sets the spacer's height.
74 * @param aHeight The spacer's height.
76 IMPORT_C void SetHeight(TInt aHeight);
79 * Sets the spacer's color.
81 * @param aColor The spacer's color.
83 IMPORT_C void SetColor(TRgb aColor);
86 * Specifies whether the spacer is drawn using the standard brush color.
88 * If the "Is clear" flag is set, the spacer's color value is ignored,
89 * and it is drawn using the brush color defined in the system's
90 * standard graphics context. By default, the "Is clear" flag is unset.
92 * @param aClear @c ETrue to set the "Is clear" flag,
93 * @c EFalse to unset it.
95 IMPORT_C void SetClear(TBool aClear);
97 public: // From @c CCoeControl.
100 * Handles pointer events.
102 * This function gets called whenever a pointer event occurs in the
103 * control, i.e. when the pointer is within the control's extent, or when
104 * the control has grabbed the pointer.
106 * If overriding this method, the implementation must
107 * include a base call to this method.
109 * From @c CCoeControl.
111 * @param aPointerEvent The pointer event.
113 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
115 private: /** From @c CCoeControl. */
117 void ConstructFromResourceL(TResourceReader& aReader);
119 void Draw(const TRect& aRect) const;
121 private: /** From @c CAknControl. */
123 IMPORT_C void* ExtensionInterface( TUid aInterface );
130 #endif // __EIKSPACE_H__