williamr@2: /* williamr@2: * Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@2: * 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: * which accompanies this distribution, and is available williamr@2: * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: Class declaration for EIKON spacer control. williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: #ifndef __EIKSPACE_H__ williamr@2: #define __EIKSPACE_H__ williamr@2: williamr@2: #include williamr@2: #include williamr@2: williamr@2: // Forward declarations williamr@2: class TResourceReader; williamr@2: williamr@2: /** williamr@2: * An invisible control that is used to provide a space between williamr@2: * visible controls. It has a width, a height and a color. williamr@2: * The spacer is normally drawn using the background color williamr@2: * so that it is invisible. williamr@2: * williamr@2: * Its associated resource struct is @c SPACER and its control williamr@2: * factory identifier is @c EEikCtSpacer. williamr@2: * williamr@2: * @lib eikctl.lib williamr@2: * @since S60 0.9 williamr@2: */ williamr@2: class CEikSpacer : public CAknControl williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: * Default C++ constructor. williamr@2: * The spacer's color is initialised to white. williamr@2: */ williamr@2: IMPORT_C CEikSpacer(); williamr@2: williamr@2: /** williamr@2: * C++ constructor with a width, height and color. williamr@2: * williamr@2: * @param aWidth The spacer's width. williamr@2: * @param aHeight The spacer's height. williamr@2: * @param aColor The spacer's color. williamr@2: */ williamr@2: IMPORT_C CEikSpacer(TInt aWidth,TInt aHeight,TRgb aColor); williamr@2: williamr@2: /** williamr@2: * Destructor. williamr@2: */ williamr@2: IMPORT_C ~CEikSpacer(); williamr@2: williamr@2: /** williamr@2: * Sets the spacer's width. williamr@2: * williamr@2: * @param aWidth The spacer's width. williamr@2: */ williamr@2: IMPORT_C void SetWidth(TInt aWidth); williamr@2: williamr@2: /** williamr@2: * Sets the spacer's height. williamr@2: * williamr@2: * @param aHeight The spacer's height. williamr@2: */ williamr@2: IMPORT_C void SetHeight(TInt aHeight); williamr@2: williamr@2: /** williamr@2: * Sets the spacer's color. williamr@2: * williamr@2: * @param aColor The spacer's color. williamr@2: */ williamr@2: IMPORT_C void SetColor(TRgb aColor); williamr@2: williamr@2: /** williamr@2: * Specifies whether the spacer is drawn using the standard brush color. williamr@2: * williamr@2: * If the "Is clear" flag is set, the spacer's color value is ignored, williamr@2: * and it is drawn using the brush color defined in the system's williamr@2: * standard graphics context. By default, the "Is clear" flag is unset. williamr@2: * williamr@2: * @param aClear @c ETrue to set the "Is clear" flag, williamr@2: * @c EFalse to unset it. williamr@2: */ williamr@2: IMPORT_C void SetClear(TBool aClear); williamr@2: williamr@2: public: // From @c CCoeControl. williamr@2: williamr@2: /** williamr@2: * Handles pointer events. williamr@2: * williamr@2: * This function gets called whenever a pointer event occurs in the williamr@2: * control, i.e. when the pointer is within the control's extent, or when williamr@2: * the control has grabbed the pointer. williamr@2: * williamr@2: * If overriding this method, the implementation must williamr@2: * include a base call to this method. williamr@2: * williamr@2: * From @c CCoeControl. williamr@2: * williamr@2: * @param aPointerEvent The pointer event. williamr@2: */ williamr@2: IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); williamr@2: williamr@2: private: /** From @c CCoeControl. */ williamr@2: williamr@2: void ConstructFromResourceL(TResourceReader& aReader); williamr@2: williamr@2: void Draw(const TRect& aRect) const; williamr@2: williamr@2: private: /** From @c CAknControl. */ williamr@2: williamr@2: IMPORT_C void* ExtensionInterface( TUid aInterface ); williamr@2: williamr@2: private: williamr@2: TRgb iColor; williamr@2: TBool iClear; williamr@2: }; williamr@2: williamr@2: #endif // __EIKSPACE_H__