diff -r 4ea6f81c838a -r 0e9bb658ef58 mulwidgets/mulcoverflowwidget/inc/mulcoverflowitemelement.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mulwidgets/mulcoverflowwidget/inc/mulcoverflowitemelement.h Wed Sep 01 12:23:18 2010 +0100 @@ -0,0 +1,100 @@ +/* +* 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: Item element header for Cover Flow. +* +*/ + +// This file defines the API for mulcoverflowwidget.dll +#ifndef MULCOVERFLOWITEMELEMENT_H_ +#define MULCOVERFLOWITEMELEMENT_H_ + + +// Includes +#include +#include + +#include + +#include "mulvisualtemplate.h" +// Forward declarations. +class MulTemplateInterface; + +namespace Alf + { + +class MulCoverFlowItemElement: public AlfElement, public IAlfWidgetEventHandler + { + +public: // Constructor and Destructor + + /** + * Constructor + * @param aControl WidgetControl + * @param aName Name of the element. + */ + // third parameter shd be moved. + MulCoverFlowItemElement( CAlfWidgetControl& aControl, const char* aName , MulTemplateInterface& aControlInterface ); + + /** + * Destructor + */ + ~MulCoverFlowItemElement(); + +public: // From IAlfWidgetEventHandler + + bool accept( CAlfWidgetControl& aControl, const TAlfEvent& aEvent ) const; + + void setActiveStates( unsigned int aStates ); + + AlfEventStatus offerEvent( CAlfWidgetControl& aControl, const TAlfEvent& aEvent ); + + IAlfInterfaceBase* makeInterface( const IfId& aType ); + + void setEventHandlerData( const AlfWidgetEventHandlerInitData& aData ); + + AlfWidgetEventHandlerInitData* eventHandlerData(); + + AlfEventHandlerType eventHandlerType() ; + + AlfEventHandlerExecutionPhase eventExecutionPhase() ; + + +public: // new methods + + CAlfVisual* CreateIconStructure(CAlfLayout* aParentLayout, const UString& aTemplateId); + + void DoSetImage(IAlfVariantType* data, CAlfImageVisual* aImgVisual); + + + +private: + + /** + * gets the handle to the visual template. + */ + MulVisualTemplate* VisualTemplate() + { + return static_cast(getVisualTemplate()); + } +private: // Member data + + std::vector mRecycleVisualArray; //stores sizes and positions of all items + bool mVisualRecycled; + int mNumVisualsRecycled; + CAlfFlowLayout* mIconFlow; + }; + + } // namespace ends here + +#endif /*MULCOVERFLOWITEMELEMENT_H_*/