williamr@2: /* williamr@2: * Copyright (c) 1997-1999 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: williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: #if !defined(__EIKTXLBX_H__) williamr@2: #define __EIKTXLBX_H__ williamr@2: williamr@2: #if !defined(__COECNTRL_H__) williamr@2: #include williamr@2: #endif williamr@2: williamr@2: #if !defined(__EIKLBX_H__) williamr@2: #include williamr@2: #endif williamr@2: williamr@2: #if !defined(__EIKLBM_H__) williamr@2: #include williamr@2: #endif williamr@2: williamr@2: class CTextListBoxModel; williamr@2: williamr@2: /** williamr@2: * List box for displaying text. williamr@2: * williamr@2: * Text list boxes use the standard list box view, @c CListBoxView, and a williamr@2: * customised item drawer and list box model. williamr@2: * williamr@2: * @since Symbian 5.0 williamr@2: */ williamr@2: class CEikTextListBox : public CEikListBox williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: * Destructor. williamr@2: */ williamr@2: IMPORT_C ~CEikTextListBox(); williamr@2: williamr@2: /** williamr@2: * C++ default constructor. williamr@2: */ williamr@2: IMPORT_C CEikTextListBox(); williamr@2: williamr@2: /** williamr@2: * Second phase construction from a resource. williamr@2: * williamr@2: * This constructor initialises the list box model, flags, required williamr@2: * dimensions etc. from a resource. The function fully constructs the williamr@2: * associated list box model and item drawer for this list box. williamr@2: * williamr@2: * @param aReader A resource reader initialised to point at a list box williamr@2: * resource williamr@2: */ williamr@2: IMPORT_C virtual void ConstructFromResourceL(TResourceReader& aReader); williamr@2: williamr@2: /** williamr@2: * By default Symbian 2nd phase constructor is private williamr@2: * williamr@2: * This initializes the C-classes of a newly-created @c CEikTextListBox williamr@2: * from supplied arguments. This function fully constructs the associated williamr@2: * list box model and item drawer for this list box, and then invokes williamr@2: * @c CEikListBox::ConstructL(). williamr@2: * williamr@2: * @param aParent Parent control for this control. williamr@2: * @param aFlags Flags for the list box. williamr@2: */ williamr@2: IMPORT_C void ConstructL(const CCoeControl* aParent, TInt aFlags = 0); williamr@2: williamr@2: /** williamr@2: * Gets the text list box model. williamr@2: * williamr@2: * @return The text list box model used by this list box. williamr@2: */ williamr@2: IMPORT_C CTextListBoxModel* Model() const; williamr@2: williamr@2: public: // from CCoeControl williamr@2: williamr@2: /** williamr@2: * From @c CCoeControl. williamr@2: * williamr@2: * Gets the list of logical colours employed in the drawing of the control, williamr@2: * paired with an explanation of how they are used. Appends the list to williamr@2: * @c aColorUseList. williamr@2: * williamr@2: * @deprecated williamr@2: * @param aColorUseList List of logical colours. williamr@2: */ williamr@2: IMPORT_C virtual void GetColorUseListL( williamr@2: CArrayFix& aColorUseList) const; williamr@2: // not available before Release 005u williamr@2: williamr@2: /** williamr@2: * From @c CCoeControl. williamr@2: * williamr@2: * Handles a change to the control's resources. These resources are of williamr@2: * type aType, which are shared across the environment, for example williamr@2: * colours or fonts. williamr@2: * williamr@2: * @param aType The type of resource that has changed. williamr@2: */ williamr@2: IMPORT_C virtual void HandleResourceChange(TInt aType); williamr@2: // not available before Release 005u williamr@2: /** williamr@2: * From @c CCoeControl. williamr@2: * williamr@2: * Handles pointer events. williamr@2: * williamr@2: * @param aPointerEvent The pointer event. williamr@2: */ williamr@2: IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); williamr@2: protected: //from CCoeControl williamr@2: williamr@2: /** williamr@2: * From @c CCoeControl williamr@2: * williamr@2: * Write internal state of the @c CEikTextListBox to the given stream. williamr@2: * NOTE: Only operational in debug mode. williamr@2: * williamr@2: * @param aWriteStream Target stream. williamr@2: */ williamr@2: IMPORT_C void WriteInternalStateL(RWriteStream& aWriteStream) const; williamr@2: williamr@2: protected: williamr@2: williamr@2: /** williamr@2: * Creates @c CTextListItemDrawer for @c CListBoxView for drawing williamr@2: * individual list box items . williamr@2: */ williamr@2: IMPORT_C virtual void CreateItemDrawerL(); williamr@2: williamr@2: private: williamr@2: /** williamr@2: * From CAknControl williamr@2: */ williamr@2: IMPORT_C void* ExtensionInterface( TUid aInterface ); williamr@2: private: williamr@2: IMPORT_C virtual void CEikListBox_Reserved(); // listbox use only williamr@2: protected: williamr@2: TInt iRequiredCellCharWidth; williamr@2: private: williamr@2: williamr@2: TInt iSpare; // Unused williamr@2: }; williamr@2: williamr@2: /** williamr@2: * Horizontal snaking text list box. williamr@2: * williamr@2: * This snaking list box is intended for displaying text. The list box lays its williamr@2: * items out using the @c CEikSnakingListBox algorithms, and uses a williamr@2: * @c CTextListItemDrawer to draw its items. williamr@2: * williamr@2: * @since Symbian 5.0 williamr@2: */ williamr@2: class CEikSnakingTextListBox : public CEikSnakingListBox williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: * Destructor. williamr@2: */ williamr@2: IMPORT_C ~CEikSnakingTextListBox(); williamr@2: williamr@2: /** williamr@2: * C++ default constructor. williamr@2: */ williamr@2: IMPORT_C CEikSnakingTextListBox(); williamr@2: williamr@2: /** williamr@2: * By default Symbian 2nd phase constructor is private. williamr@2: * williamr@2: * Completes the construction of a default-constructed snaking text list williamr@2: * box, initialising its heap-stored members from the supplied arguments. williamr@2: * This function will leave if any of the pointer members being williamr@2: * constructed leave. williamr@2: * williamr@2: * @param aParent Parent control. williamr@2: * @param aFlags Flags for the control. williamr@2: * @see @c CEikListBox::TFlags williamr@2: */ williamr@2: IMPORT_C void ConstructL(const CCoeControl* aParent, TInt aFlags = 0); williamr@2: williamr@2: /** williamr@2: * Gets a pointer to the model used by this list box. williamr@2: * williamr@2: * @return This list box model. williamr@2: */ williamr@2: IMPORT_C CTextListBoxModel* Model() const; williamr@2: williamr@2: public: // from CCoeControl williamr@2: williamr@2: /** williamr@2: * From @c CCoeControl. williamr@2: * williamr@2: * Not implemented or used in S60. williamr@2: * williamr@2: * @param aColorUseList On return, a list of logical colours. williamr@2: */ williamr@2: IMPORT_C virtual void GetColorUseListL( williamr@2: CArrayFix& aColorUseList) const; williamr@2: // not available before Release 005u williamr@2: williamr@2: /** williamr@2: * From @c CCoeControl. williamr@2: * williamr@2: * Handles a change in a resource. williamr@2: * williamr@2: * The types (@c aType) of list box resources handled are those which williamr@2: * are shared across the environment, for example, colours or fonts. williamr@2: * williamr@2: * @param aType The type of resource that has changed. williamr@2: */ williamr@2: IMPORT_C virtual void HandleResourceChange(TInt aType); williamr@2: // not available before Release 005u williamr@2: williamr@2: /** williamr@2: * From @c CCoeControl. williamr@2: * williamr@2: * Handles pointer events. williamr@2: * williamr@2: * @param aPointerEvent The pointer event. williamr@2: */ williamr@2: IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); williamr@2: private: williamr@2: /** williamr@2: * From CAknControl williamr@2: */ williamr@2: IMPORT_C void* ExtensionInterface( TUid aInterface ); williamr@2: }; williamr@2: williamr@2: williamr@2: #endif // __EIKTXLBX_H__