williamr@2: /* williamr@2: * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@4: * under the terms of "Eclipse Public License v1.0" williamr@2: * which accompanies this distribution, and is available williamr@4: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: #if !defined(__EIKLBO_H__) williamr@2: #define __EIKLBO_H__ williamr@2: williamr@2: class CEikListBox; williamr@2: williamr@2: /** williamr@2: * List box observer interface. williamr@2: * williamr@2: * Each list box observer may be registered with a number of list williamr@2: * boxes; each of these send events to the list box observer through williamr@2: * its HandeListBoxEventL() method. williamr@2: * williamr@2: * Writing derived classes: williamr@2: * williamr@2: * Application authors should implement a class which derives from this williamr@2: * interface to receive events from list boxes williamr@2: */ williamr@2: class MEikListBoxObserver williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: * List box event codes williamr@2: */ williamr@2: enum TListBoxEvent williamr@2: { williamr@2: /** Keypress event. */ williamr@2: EEventEnterKeyPressed, williamr@2: /** Item single-tap event */ williamr@2: EEventItemClicked, williamr@2: /** Item two-taps event. */ williamr@2: EEventItemDoubleClicked, williamr@2: /** Special event: reported by directory tree and directory contents list boxes. */ williamr@2: EEventItemActioned, williamr@2: /** Editing started. */ williamr@2: EEventEditingStarted, williamr@2: /** Editing stopped. */ williamr@2: EEventEditingStopped, williamr@2: /** Pen is down and over an item */ williamr@2: EEventPenDownOnItem, williamr@2: /** Pen is dragged from item to another */ williamr@2: EEventItemDraggingActioned, williamr@2: /** Panning is started */ williamr@2: EEventPanningStarted, williamr@2: /** Panning is stopped */ williamr@2: EEventPanningStopped, williamr@2: /** Flick is started */ williamr@2: EEventFlickStarted, williamr@2: /** Flick is stopped */ williamr@4: EEventFlickStopped, williamr@4: /** Item single-tap event. This event should be used williamr@4: by applications that are single click compatible. */ williamr@4: EEventItemSingleClicked, williamr@4: /** An empty listbox was clicked */ williamr@4: EEventEmptyListClicked, williamr@4: /** An empty area of non-empty listbox was clicked */ williamr@4: EEventEmptyAreaClicked williamr@2: }; williamr@2: williamr@2: public: williamr@2: /** williamr@2: * Handles list box events. williamr@2: * williamr@2: * This pure virtual function is invoked by CEikListBox to williamr@2: * notify the observer of list box events. williamr@2: * williamr@2: * @param aListBox The originating list box. williamr@2: * @param aEventType A code for the event. Further information williamr@2: * may be obtained by accessing the list box itself. williamr@2: */ williamr@2: virtual void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType)=0; williamr@2: }; williamr@2: williamr@2: #endif