diff -r 000000000000 -r ba25891c3a9e iaupdate/IAD/ui/inc/iaupdatemaincontainer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/iaupdate/IAD/ui/inc/iaupdatemaincontainer.h Thu Dec 17 08:51:10 2009 +0200 @@ -0,0 +1,186 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This file contains the header file of the CIAUpdateMainContainer class +* +*/ + + + +#ifndef IAUPDATEMAINCONTAINER_H +#define IAUPDATEMAINCONTAINER_H + +//INCLUDES +#include // CCoeControl + +// FORWARD DECLARATIONS +class CAknDoubleGraphicStyleListBox; +class MIAUpdateContainerObserver; + +class MIAUpdateNode; +class MIAUpdateAnyNode; + +// CLASS DECLARATION +/** +* This class represents the container of main view of IAUpdate +* +*/ +class CIAUpdateMainContainer : + public CCoeControl, + public MEikListBoxObserver + { +public: + + /** + * Symbian two phased constructor. + * @param aRect the rectangle this view will be drawn to + * @return Instance of the created server object. + */ + static CIAUpdateMainContainer* NewL( const TRect& aRect, + MIAUpdateContainerObserver& aObserver ); + + /** + * Symbian two phased constructor. Created object is pushed to clenaup stack + * @param aRect the rectangle this view will be drawn to + * @return Instance of the created server object. + */ + static CIAUpdateMainContainer* NewLC( const TRect& aRect, + MIAUpdateContainerObserver& aObserver ); + /** + * Destructor + */ + ~CIAUpdateMainContainer(); + + /** + * Handles Mark/Unmark + * @param aCommand Mark or unmark commannd + */ + void HandleMarkCommandL( TInt aCommand ); + + /** + * Resfresh the list + * @param aNodes List of nodes + * @param aError Error code + */ + void RefreshL( const RPointerArray& aNodes, + TInt aError ); + + /** + * Returns node that's highlighted in a list + * @param aNodes List of nodes + * @return Current (highlighted) node + */ + MIAUpdateAnyNode* GetCurrentNode( const RPointerArray& aNodes ); + + /** + * Set selected items to list + * @param aIndices List of indices + */ + void SetSelectedIndicesL( const RArray& aIndices ); + + + /** + * Clean all the selection + */ + void CleanAllSelection(); + + /** + * Set selected items to list + * @param aListBox List box + * @param aEventType Event type + */ + void HandleListBoxEventL( + CEikListBox* aListBox, + TListBoxEvent aEventType ); + +private: // from CCoeControl + + /** + * Handle key events by forwarding them to the list box. + * @param aKeyEvent The key event. + * @param aType The event type. + * @result Indicates whether or not the key event was consumed by this control. + */ + TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); + + /** + * Called when size is changed by framework. + * Set current size to listbox + */ + void SizeChanged(); + + /** + * Count of components. + * @return Count of child components + */ + TInt CountComponentControls() const; + + /** + * Component control + * @param aIndex Index numer of child component. + * @return Pointer to a component + */ + CCoeControl* ComponentControl( TInt aIndex ) const; + + /** + * Get the help context for this control. + * + * @param aContext Help context + */ + void GetHelpContext( TCoeHelpContext& aContext ) const; + + /** + * Handles a resource relative event + * + * @param aType Event type + */ + void HandleResourceChange( TInt aType ); + + + +private: + + /** + * Constuctor + * @param aRect Rectangular this view will be drawn to + */ + void ConstructL (const TRect& aRect ); + + /** + * C++ constuctor + * @param aObserver Observer of the container + */ + CIAUpdateMainContainer( MIAUpdateContainerObserver& aObserver ); + + /** + * Update Middle soft key label text (Mark/Unmark) + */ + void UpdateMSKTextL(); + + void CreateIconL( CFbsBitmap*& aBitmap, + CFbsBitmap*& aMask, + const TDesC& aFileName, + TInt aBitmapId, + TInt aMaskId ); + + +private: // Data + + MIAUpdateContainerObserver& iObserver; + CDesCArray* iItemTextArray; + CAknDoubleGraphicStyleListBox* iListBox; + }; + +#endif // IAUPDATEMAINCONTAINER_H + +// End of File