diff -r 000000000000 -r 8466d47a6819 emailuis/uicomponents/inc/fstreevisualizerobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailuis/uicomponents/inc/fstreevisualizerobserver.h Thu Dec 17 08:39:21 2009 +0200 @@ -0,0 +1,140 @@ +/* +* 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: An observer interface for the tree list component. +* +*/ + + +#ifndef M_FSTREEVISUALIZEROBSERVER_H +#define M_FSTREEVISUALIZEROBSERVER_H + +#include "fstreelistconstants.h" + +/** + * MFsTreeObserver defines an interface which is used to observe tree list + * events. + * + * Observer of the tree list is notified of changes in the tree list through + * this interface with appropriate events. + * @code + * + * @endcode + * + * @lib + */ +NONSHARABLE_CLASS( MFsTreeVisualizerObserver ) + { +public: + + enum TFsTreeVisualizerEvent + { + + // "Base class modifications for using touch" + /** + * Action started for selected tree item. + */ + EFsTreeItemTouchAction, + + /** + * Long tap action started for selected tree item. + */ + EFsTreeItemTouchLongTap, + + /** + * Touch focus for list gained. + */ + EFsTreeItemTouchFocused, + + // + + + /** + * An item received focus. + */ + EFsTreeItemFocused, + + /** + * Focus will be moved to the specified item/node. + * Event triggered just before an item gets focus. + * No action required. + */ + EFsTreeItemWillGetFocused, + + /** + * An item has been selected. + */ + EFsTreeItemSelected, + /** + * An item with menu has been selected. + */ + EFsTreeItemWithMenuSelected, + /** + * Right arrow pressed. + */ + EFsTreeKeyRightArrow, + /** + * Left arrow pressed. + */ + EFsTreeKeyLeftArrow, + + /** + * Event generated when the list is fully hidden. + */ + EFsTreeListVisualizerHidden, + + /** + * Event generated when the list is fully shown. + */ + EFsTreeListVisualizerShown, + + // + /** + * Event generated when a single node is collapsed. + */ + EFsTreeListItemCollapsed, + /** + * Event generated when a single node is expanded. + */ + EFsTreeListItemExpanded, + /** + * Event generated when all nodes are collapsed. + */ + EFsTreeListCollapsedAll, + /** + * Event generated when all nodes are expanded. + */ + EFsTreeListExpandedAll + // + }; + +public: + + /** + * Observer of the tree list is notified of changes in the tree list + * through this function. + * + * @param aEvent Event which happend in the tree list. + * @param aId Id of the node/item associated with the event. KFsTreeNoneID + * means that the event is not associated with a node/item. + */ + // Touch + virtual void TreeVisualizerEventL( + const TFsTreeVisualizerEvent aEvent, + const TFsTreeItemId aId = KFsTreeNoneID ) const = 0; + // + + }; + + +#endif // M_FSTREEVISUALIZEROBSERVER_H