diff -r 4526337fb576 -r 3eca7e70b1b8 mmuifw_plat/mul_widget_api/inc/mul/imulmultiitemwidget.h --- a/mmuifw_plat/mul_widget_api/inc/mul/imulmultiitemwidget.h Tue Feb 02 00:28:09 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,328 +0,0 @@ -/* -* Copyright (c) 2007 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: The base class for Multimedia multi-item widgets. - * -*/ - - -#ifndef I_MULMULTIITEMWIDGET_H -#define I_MULMULTIITEMWIDGET_H - -// Includes -#include - -// Namespaces used -using namespace osncore; - -namespace Alf - { - - // Forward declaration - class IMulModelAccessor; - - namespace mulmultiitemwidget - { - static const IfId Ident= - { - 0, "mulmultiitemwidget" - }; - } - - /*! @class IMulMultiItemWidget - * @brief An interface for all Multimedia multi-item widgets. - */ - class IMulMultiItemWidget : public IMulWidget - { - public: - - /*! @enum TMulWidgetPropertiesFlag - * This enumeration defines some properties for the widgets. These can - * be enabled or disabled for individual widget instances. - */ - enum TMulWidgetPropertiesFlag - { - EMulWidgetFlagFastScroll = 0x0001, /*!< Enable fast scroll.*/ - EMulWidgetFlagCyclic = 0x0002, /*!< Enable cyclic/looping effect on widget.*/ - EMulWidgetFlagNaviScroll = 0x0004, /*!< Enable navi scroll support.*/ - EMulWidgetFlagCenterFocus = 0x0008, /*!Examples: - * @code - * Set the flag for selection. - * - * mListWidget->SetFlags( IMulMultiItemWidget::EMulWidgetFlagMultiSelect ); - * @endcode - */ - virtual void SetFlags(unsigned int aAnyFlag) = 0; - - /** - * Clear a property or a group of properties. Properties not specified are not changed. - * - * @param aAnyFlag Property flag(s) to be cleared. To clear more than one property, - * the flags can be ORed. - * @throw Invalid argument, if unknown/undefined flag is passed. - * @throw Invalid argument, if the property is not supported by the widget. - * - * Examples: - * @code - * Clear the flag for selection. - * - * mListWidget->ClearFlags( IMulMultiItemWidget::EMulWidgetFlagMultiSelect ); - * @endcode - */ - virtual void ClearFlags(unsigned int aAnyFlag) = 0; - - /** - * Return the status of all the flags. The flags that are set have the - * corresponding bit ON. - * - * @return All enabled flag(s). The corresponding bit for enabled flag(s) are set to 1. - * - * Examples: - * @code - * Get all flags status. - * - * int allFlags = mListWidget->GetFlags(); - * @endcode - */ - virtual unsigned int GetFlags() const = 0; - - /** - * Returns the property state, whether flag is on or off for widget. - * - * @param aAnyFlag Flag to be cross-checked - * @return True if set, False if not set - * - * Examples: - * @code - * Check if the cyclic flag is set - * - * if( mListWidget->IsFlagSet( IMulMultiItemWidget::EMulWidgetFlagCyclic ) ) - * { - * ... - * } - * @endcode - */ - virtual bool IsFlagSet(TMulWidgetPropertiesFlag aAnyFlag) const = 0; - - /** - * Provide an empty text for the widget. This text is shown if there is no - * data to be displayed in the widget. Widget makes a copy of the variable - * and it is safe to call it many times. - * - * @param aDefaultText Text to be displayed in empty widget - * - * Examples: - * @code - * Set the empty text to "No Images" - * - * mListWidget->SetEmptyText( UString("No Images") ); - * @endcode - */ - virtual void SetEmptyText( const UString& aDefaultText ) = 0; - - /** - * Set the data model for this widget. Widget uses the data model via - * IMulModelBase interface because it needs to know only limited functionality - * about the data model. - * - * @param aModel Model to be set for widget. - * @param aOwnership Flag which conveys the widget whether it should take - * the ownersip of the model or not. - * @throw Logic error, if same accessor object passed again. - * - * Examples: - * @code - * Create the data model using widget factory and assign it to a widget. - * - * mWidgetModel = widgetFactory.createModel (KLoadNameModel); - * - * Set the default visualization for the list items. If the visualization is not - * specified there will be a panic when the model is assigned to the widget. - * - * mWidgetModel->SetTemplate( UString ( mulwidget::KTemplate6)); - * - * Setting the data model to the widget. - * - * AddItems(10); - * mListWidget->SetModel( mWidgetModel); - * @endcode - */ - // virtual void SetModel(IMulModelBase* aModel, bool aOwnership) = 0; - - /** - * Set the state of the mark mode. - * - * @param aFlag True means mode is On, False means mode is Off. - * - * Examples: - * @code - * Switch on the mark mode. - * - * mListWidget->SetMarkMode(true); - * @endcode - */ - virtual void SetMarkMode(bool aFlag) = 0; - - /** - * Returns the state of the mark mode. - * - * @return Status of the mark mode. - * - * Examples: - * @code - * Check if the mark mode is On. - * - * if( mListWidget->IsMarkMode() ) - * { - * ... - * } - * @endcode - */ - virtual bool IsMarkMode()const = 0; - - /** - * Set the state of the reorder mode. - * - * @param aFlag EReorderShiftOn : Switch on reorder mode in type shift. - * EReorderSwapOn : Switch on reorder mode in type swap. - * EReorderDone : Switch Off the reorder with operatoin done - * EReorderCancel : Switch off the reorder mode with cancel last operation. - * - * Examples: - * @code - * Switch on the reorder mode. - * - * mListWidget->SetReorderMode(IMulMultiItemWidget::EReorderShiftOn); - * @endcode - */ - virtual void SetReorderMode(IMulMultiItemWidget::TMulReOrderMode aReorderMode ) = 0; - - - /** - * Returns whether reorder mode on/off. - * - * @return Reorder Mode On/Off Status. - * - * Examples: - * @code - * Check if the reorder mode is On. - * - * if( mListWidget->IsReorderModeOn() ) - * { - * ... - * } - * @endcode - */ - virtual bool IsReorderModeOn()const = 0 ; - - - /** - * During fast scroll mode, the widget displays an overlay with more info. - * Setter API for the overlay strip. - * - * @param aType Attribute data type - * @param aAttribute Attribute whose value will be shown in the overlay - * @param aFormat Format string for formatting the value of the attribute - * - * Examples: - * @code - * Set the overlay to display (Month, Year) as more info. - * - * mListWidget->SetOverlay( IMulMultiItemWidget::EDate, - * UString(mulvisualitem::KMulDetail), - * UString("") ); - * @endcode - */ - virtual void SetOverlay(TMulAttributeDataType aType, const UString& aAttribute, const UString& aFormat) = 0 ; - - /** - * Sets the default image of the widget. - * This image will be shown when the actual image data is not available - * - * @param aTextureId texture id to be used for default image. - * - * Examples: - * @code - * Set default image in coverflow widget. - * - * mCoverFlowWidget->SetDefaultImage( 1000 ); - * - * @endcode - */ - virtual void SetDefaultImage(int aTextureId) = 0; - - /** - * Virtual destructor. - */ - virtual ~IMulMultiItemWidget() - { - } - - }; - - } // namespace Alf - -#endif // I_MULMULTIITEMWIDGET_H -