photosgallery/viewframework/uiutilities/inc/glxtextentrypopup.h
changeset 0 4e91876724a2
equal deleted inserted replaced
-1:000000000000 0:4e91876724a2
       
     1 /*
       
     2 * Copyright (c) 2008-2009 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:    text entry popup class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __GLXTEXTENTRYPOPUP_H__
       
    22 #define __GLXTEXTENTRYPOPUP_H__
       
    23 
       
    24 #include <AknQueryDialog.h>
       
    25 
       
    26 /**
       
    27  *  text entry popup class definition
       
    28  *
       
    29  *  @lib glxuiutilities.lib
       
    30  *
       
    31  * @internal reviewed 06/06/2007 by Dave Schofield
       
    32  */
       
    33 class CGlxTextEntryPopup : protected CAknTextQueryDialog
       
    34 	{
       
    35 public:
       
    36 	
       
    37 	/**
       
    38 	 * Creates a new CGlxTextEntryPopup.
       
    39 	 * @param aTitle Dialog title.
       
    40 	 * @param aText default dialog text
       
    41 	 *      on completion of ExecuteLD() contains text entered by user.
       
    42 	 * @return a pointer to a new instance of CGlxTextEntryPopup.
       
    43 	 */
       
    44 	IMPORT_C static CGlxTextEntryPopup* NewL(const TDesC& aTitle, TDes& aText);	
       
    45 
       
    46 	/**
       
    47     * calls the popup for text entry
       
    48     * @return Zero, unless it is a waiting dialog. 
       
    49     * For a waiting dialog, the return value is the ID 
       
    50     * of the button that closed the dialog, or zero if 
       
    51     * it was the cancel button 
       
    52     */
       
    53 	IMPORT_C TInt ExecuteLD();
       
    54 
       
    55     /**
       
    56     * Updates left softkey 
       
    57     */	
       
    58 	virtual void UpdateLeftSoftKeyL();
       
    59 	
       
    60 	/**
       
    61     * Sets left softkey based on conditions whether to make it visible or not
       
    62     * @param aAllowEmptyString - bool to set the leftsoft key status
       
    63     */
       
    64 	IMPORT_C void SetLeftSoftKeyL(TBool aAllowEmptyString);
       
    65 
       
    66 	
       
    67 protected:
       
    68 	/**
       
    69 	 * Constructor
       
    70 	 * @param aText default dialog text
       
    71 	 *      on completion of ExecuteLD() contains text entered by user.
       
    72 	 */
       
    73 	CGlxTextEntryPopup(TDes& aText);	
       
    74 	/**
       
    75 	 * Second stage constructor
       
    76 	 * @param aTitle Dialog title.
       
    77 	 */
       
    78 	void ConstructL(const TDesC& aTitle);
       
    79 	
       
    80 	/**
       
    81 	 * Helper function to revert state in case anything leaves
       
    82 	 * between state changes
       
    83 	 */
       
    84 	static void RollbackState( TAny* aParam );
       
    85 private:
       
    86     //Bool which sets the leftsoftkey status
       
    87     TBool iAllowEmptyString;	
       
    88 	};
       
    89 
       
    90 #endif // __GLXTEXTENTRYPOPUP_H__