mulwidgets/common/inc/imulmodelobserver.h
changeset 17 3eca7e70b1b8
parent 3 4526337fb576
equal deleted inserted replaced
3:4526337fb576 17:3eca7e70b1b8
     1 /*
       
     2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Implementation of model interface
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef	I_MULMODEOBSERVER_H
       
    20 #define I_MULMODEOBSERVER_H
       
    21 
       
    22 #include <alf/ialfmodelchangeobserver.h> 
       
    23 
       
    24 namespace Alf
       
    25 	{
       
    26 	
       
    27 //Forward Declaration
       
    28 class IMulVariantType;
       
    29 
       
    30 /**
       
    31  * Observer interface to provide notification about model state change.
       
    32  * Widget needs to implement this interface to get highlight or marking change event.
       
    33  */
       
    34 class IMulModelObserver //: public IAlfModelChangeObserver
       
    35 	{
       
    36 	
       
    37 public: //enum
       
    38 
       
    39 	/**
       
    40 	 *Changed state of model 
       
    41 	 */
       
    42 	enum TMulChangedState 
       
    43 	    { 
       
    44 	    EHighlightChanged = 1, 
       
    45 	    EMarkingChanged,
       
    46 	    EDataWindowUpdated, 
       
    47 	    EItemsInserted,
       
    48 	    EItemsRemoved,
       
    49 	    EItemUpdated,
       
    50 	    ETemplateChanged,
       
    51 	    EModelRefreshed
       
    52 	    };
       
    53 
       
    54 public: //method
       
    55 
       
    56 	/**
       
    57      * Notify observer about IMulModel state change.
       
    58 	 * Observer will be notified when highlight or marking is changed from model.
       
    59 	 *
       
    60 	 * @param aState Highlight or making changed
       
    61 	 * @param aData Index of new highlight or Index of marked or unmarked item.
       
    62 	 *				( Item is marked or not should be checked using IMulModelAccessor interface)
       
    63 	 */
       
    64 	virtual void ModelStateChanged( TMulChangedState aState, IMulVariantType& aData ) = 0;
       
    65 
       
    66 	};
       
    67 	
       
    68 	} // Namespace Alf
       
    69 	
       
    70 #endif //I_MULMODEOBSERVER_H	
       
    71 	
       
    72 //End of file
       
    73