/* Machine-made version of this file copyright (c) 2005 Somusar */ /* Derived from samples that are Copyright (c) 2004, Nokia. All rights reserved */ #ifndef __TWOFORMSCONTAINER_H__ #define __TWOFORMSCONTAINER_H__ // INCLUDES #include // MACROS #define TWOFORMS_BACKGROUND_COLOR AKN_LAF_COLOR( 219 ) // CONSTANTS const TInt KTwoFormsCountComponent = 1; const TInt KTwoFormsMessageBufLength = 256; // FORWARD DECLARATIONS class CTwoFormsView; class CEikLabel; // CLASS DECLARATION /** * CTwoFormsContainer container control class. */ class CTwoFormsContainer : public CCoeControl { private: // Enumerations enum TTwoFormsComponentControls { ETwoFormsComponentLabel }; public: // Constructors and destructor /** * Overload constructor. * @param aView Pointer to view class object. */ CTwoFormsContainer( CTwoFormsView* aView ); /** * Symbian constructor. * @param aRect Frame rectangle for container. */ void ConstructL( const TRect& aRect ); /** * Destructor. */ virtual ~CTwoFormsContainer(); public: // New functions /** * SetTextToLabelL * @param aResourceId */ void SetTextToLabelL( TInt aResourceId ); /** * DisplayFormL * @param aResourceId */ void DisplayFormL( TInt aResourceId ); private: // New functions /** * Creates the label object. */ void CreateLabelL(); private: // From CCoeControl /** * From CCoeControl, OfferKeyEventL. * Handles the key events. * @return if key-event is consumed, EKeyWasConsumed. Else EKeyWasNotConsumed * @param aKeyEvent Key event * @param aType Type of key event ( EEventKey, EEventKeyUp or EEventKeyDown ) */ TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); /** * From CCoeControl, SizeChanged. * */ void SizeChanged(); /** * From CCoeControl, CountComponentControls. * Returns number of component. * @return Number of controls */ TInt CountComponentControls() const; /** * From CCoeControl, ComponentControl. * Returns pointer to particular component. * @return Pointer to Control's component control, identified by index * @param aIndex Index of the control */ CCoeControl* ComponentControl( TInt aIndex ) const; /** * From CCoeControl, Draw. * * @param aRect Region of the control to be ( re )drawn. */ void Draw( const TRect& aRect ) const; private: // Data /** * iView * Does not own. */ CTwoFormsView* iView; /** * iLabel * Owned by CTwoFormsContainer object. */ CEikLabel* iLabel; }; #endif // __TWOFORMSCONTAINER_H__