classicui_pub/misc_controls_api/inc/EIKDPOBS.H
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 1999 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:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __EIKDPOBS_H__
       
    20 #define __EIKDPOBS_H__
       
    21 
       
    22 #include <eikfctry.h>
       
    23 
       
    24 
       
    25 /**
       
    26  * The MEikDialogPageObserver class specifies an interface through which the behaviour of the pages of
       
    27  * a dialog may be observed.
       
    28  *
       
    29  * @since ER5U
       
    30  */
       
    31 class MEikDialogPageObserver
       
    32 	{
       
    33 /**
       
    34  * It is necessary to know from which base class a control has been derived from
       
    35  * in order to use the correct layout method.
       
    36  * These are all the known form control base types.
       
    37  */
       
    38 	public:
       
    39 		enum TFormControlTypes
       
    40 		{
       
    41 		EUnknownType,
       
    42 		EEdwinDerived,
       
    43 		EMfneDerived,
       
    44 		EPopfieldDerived,
       
    45 		ESecretEditorDerived,
       
    46 		ESliderDerived,
       
    47 		EColourSelectionGridDerived
       
    48 		};
       
    49  
       
    50     public:
       
    51         enum TDialogPageObserverEvents
       
    52             {
       
    53             EDialogPageTapped
       
    54             };
       
    55  
       
    56 public:
       
    57 	/**
       
    58 	 * Prepares for focus transition from the current line e.g. to validate the
       
    59 	 * contents of the current control.
       
    60 	 */
       
    61 	virtual void PrepareForFocusTransitionL()=0;
       
    62 
       
    63 	/**
       
    64 	 * Takes any action required when the active dialog page is changed to aPageId.
       
    65 	 */
       
    66 	virtual void PageChangedL(TInt aPageId)=0;
       
    67 
       
    68 	/**
       
    69 	 * Takes any action required when the current line is changed to aControlId.
       
    70 	 */
       
    71 	virtual void LineChangedL(TInt aControlId)=0;
       
    72 
       
    73 	/**
       
    74 	 * Creates a custom control of type aControlType and returns the control information for the custom control
       
    75 	 * which is created. Called when creating a line on the dialog page if the Eikon control factory does not
       
    76 	 * recognise the type aControlType.
       
    77 	 */
       
    78 	virtual SEikControlInfo CreateCustomControlL(TInt aControlType)=0;
       
    79 
       
    80 	/**
       
    81 	 * ConvertCustomControlTypeToKnownControlType
       
    82 	 * Used for custom control, to provide a mapping for forms between custom controls
       
    83 	 * and the base types that the layout knows how to deal with.
       
    84 	 * For example an edwin derived custom control could return EEikCtEdwin
       
    85 	*/
       
    86 	virtual TFormControlTypes ConvertCustomControlTypeToBaseControlType(TInt aControlType)const =0 ;
       
    87 
       
    88 	/**
       
    89 	 * Gets the custom auto value for the custom control aControl of type aControlType with return value
       
    90 	 * aReturnValue. This method is included in the interface to support deprecated legacy code only.
       
    91 	 */
       
    92 	virtual void GetCustomAutoValue(TAny* aReturnValue,TInt aControlType,const CCoeControl* aControl)=0;
       
    93 
       
    94 	/**
       
    95 	 * Takes any action required when the dialog page event happens.
       
    96 	 */
       
    97 	virtual void HandleDialogPageEventL(TInt aEventID) = 0;
       
    98 	};
       
    99 
       
   100 #endif