browserui/browser/BrowserAppInc/BrowserDialogs.h
branchRCL_3
changeset 65 8e6fa1719340
parent 0 84ad3b177aa3
equal deleted inserted replaced
64:6385c4c93049 65:8e6fa1719340
       
     1 /*
       
     2 * Copyright (c) 2002 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 the License "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 *      Helper class that pops up several dialogs.
       
    16 *      
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef BROWSERDIALOGS_H
       
    22 #define BROWSERDIALOGS_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32std.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CAknWaitDialog;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 *  TBrowserDialogs, Implements several dialogs used in Browser.
       
    34 *  
       
    35 *  @lib Browser.app
       
    36 *  @since Series 60 1.2
       
    37 */ 
       
    38 class TBrowserDialogs
       
    39     {
       
    40 	public:  // New functions
       
    41         /**
       
    42         * Functions from NWSS.
       
    43         */
       
    44 
       
    45         /**
       
    46         * Input prompt dialog used by Search and Home page features library
       
    47         * @since Series 60 2.8
       
    48         * @param aMsg prompt message
       
    49         * @param aResp entered text
       
    50         * @param aMaxLength maximum length allowed in editor
       
    51         * @param aIsUrlAddress flag for allowing only latin input for url addresses 
       
    52         * @return AVKON error code
       
    53         */
       
    54 		static TInt DialogPromptReqL( const TDesC& aMsg, 
       
    55                                         TDes* aResp, 
       
    56                                         TBool aIsUrlAddress, 
       
    57                                         TInt aMaxLength = 0 );
       
    58 
       
    59         /**
       
    60         * Confirmation query dialog used by WTAI library
       
    61         * @since Series 60 1.2
       
    62         * @param aMsg confirmation message
       
    63         * @param aYesMessage left softkey text
       
    64         * @param aNoMessage right softkey text
       
    65         * @return AVKON error code
       
    66         */
       
    67         static TInt DialogQueryReqL( const TDesC& aMsg, 
       
    68                                      const TDesC& aYesMessage, 
       
    69                                      const TDesC& aNoMessage);
       
    70 
       
    71 	
       
    72     public:     // Confirmation queries.
       
    73 
       
    74 
       
    75         /**
       
    76         * Display an confirmation query with given dialog resource
       
    77         * @since Series 60 1.2
       
    78         * @param aPrompt resource if of prompt to display.
       
    79         * @param aResId resource id of command set (aResId = 0 means R_AVKON_SOFTKEYS_YES_NO as per default )
       
    80         * @param aAnimation animation overrides default one
       
    81         * @return selected softkey id.
       
    82         * If you give your own aResId you have to check the return value!
       
    83         * In that case return value are commands 
       
    84         * as your specified in resource of that CBA.
       
    85         */
       
    86 		static TInt ConfirmQueryDialogL( const TInt aPromptResourceId, 
       
    87                                          TInt aResId = 0,
       
    88                                          TInt aAnimation = 0 );
       
    89 
       
    90         /**
       
    91         * Display an confirmation query with given dialog resource
       
    92         * @since Series 60 1.2
       
    93         * @param aPrompt Prompt to display.
       
    94         * @param aResId resource id of dialog
       
    95         * @param aAnimation animation overrides default one
       
    96         * @return selected softkey id.
       
    97         */
       
    98 		static TInt ConfirmQueryDialogL( const TDesC& aPrompt, 
       
    99                                          TInt aResId = 0,
       
   100                                          TInt aAnimation = 0 );
       
   101 
       
   102 
       
   103         /**
       
   104         * Display an confirmation query with buttons Yes and No.
       
   105         * @since Series 60 1.2
       
   106         * @param aPrompt Prompt to display.
       
   107         * @return ETrue if accepted, EFalse if not.
       
   108         */
       
   109         static TBool ConfirmQueryYesNoL( TDesC& aPrompt );
       
   110 
       
   111 
       
   112         /**
       
   113         * Display an confirmation query with buttons Yes and No.
       
   114         * @since Series 60 1.2
       
   115         * @param aPromptResourceId Resource id of the prompt (not the
       
   116         * dialog!).
       
   117         * @return ETrue if accepted, EFalse if not.
       
   118         */
       
   119         static TBool ConfirmQueryYesNoL( const TInt aPromptResourceId );
       
   120 
       
   121 
       
   122         /**
       
   123         * Display an confirmation query with buttons Yes - No.
       
   124         * @since Series 60 1.2
       
   125         * @param aPromptResourceId Resource id of the prompt (not the
       
   126         * dialog!).
       
   127         * @param aString This string will be substituted in place of the first
       
   128         * %U in the format string.
       
   129         * @return ETrue if accepted, EFalse if not.
       
   130         */
       
   131         static TBool ConfirmQueryYesNoL
       
   132 						( const TInt aPromptResourceId, const TDesC& aString );
       
   133 
       
   134 
       
   135         /**
       
   136         * Display an confirmation query with buttons Yes and No.
       
   137         * @since Series 60 1.2
       
   138         * @param aPromptResourceId Resource id of the prompt (not the
       
   139         * dialog!).
       
   140         * @param aNum This number will be substituted in place of the first
       
   141         * %N in the format string.
       
   142         * @return ETrue if accepted, EFalse if not.
       
   143         */
       
   144         static TBool ConfirmQueryYesNoL
       
   145 							( const TInt aPromptResourceId, const TInt aNum );
       
   146 
       
   147 
       
   148     public:     // Information notes.
       
   149 
       
   150         /**
       
   151         * Display an information note with no buttons.
       
   152         * @since Series 60 1.2
       
   153         * @param aDialogResourceId Resource id of note to display.
       
   154         * Available notes: R_WMLBROWSER_OK_NOTE (check mark animation);
       
   155         * R_WMLBROWSER_INFO_NOTE (info mark animation).
       
   156         * @param aPrompt Prompt to display.
       
   157         */
       
   158         static void InfoNoteL( TInt aDialogResourceId, const TDesC& aPrompt );
       
   159 
       
   160 
       
   161         /**
       
   162         * Display an information note with no buttons.
       
   163         * @since Series 60 1.2
       
   164         * @param aDialogResourceId Resource id of note to display.
       
   165         * Available notes: R_WMLBROWSER_OK_NOTE (check mark animation);
       
   166         * R_WMLBROWSER_INFO_NOTE (info mark animation).
       
   167         * @param aPromptResourceId Resource id of the prompt.
       
   168         */
       
   169         static void InfoNoteL
       
   170 					( TInt aDialogResourceId, const TInt aPromptResourceId );
       
   171 		
       
   172 
       
   173         /**
       
   174         * Display an information note with no buttons.
       
   175         * @since Series 60 1.2
       
   176         * @param aDialogResourceId Resource id of note to display.
       
   177         * Available notes: R_WMLBROWSER_OK_NOTE (check mark animation);
       
   178         * R_WMLBROWSER_INFO_NOTE (info mark animation).
       
   179         * @param aPromptResourceId Resource id of the prompt.
       
   180         * @param aString This string will be substituted in place of the first
       
   181         * %U in the format string.
       
   182         */
       
   183 		static void InfoNoteL
       
   184 			(
       
   185             TInt aDialogResourceId,
       
   186             const TInt aPromptResourceId,
       
   187             const TDesC& aString
       
   188             );
       
   189 
       
   190 
       
   191         /**
       
   192         * Display an information note with no buttons.
       
   193         * @since Series 60 1.2
       
   194         * @param aDialogResourceId Resource id of note to display.
       
   195         * Available notes: R_WMLBROWSER_OK_NOTE (check mark animation);
       
   196         * R_WMLBROWSER_INFO_NOTE (info mark animation).
       
   197         * @param aPromptResourceId Resource id of the prompt.
       
   198         * @param aNum This number will be substituted in place of the first
       
   199         * %N in the format string.
       
   200         */
       
   201         static void InfoNoteL
       
   202 			(
       
   203             TInt aDialogResourceId,
       
   204             const TInt aPromptResourceId,
       
   205             const TInt aNum
       
   206             );
       
   207 
       
   208 
       
   209     public:     // error note
       
   210 
       
   211         /**
       
   212         * Display an error note with buttons Ok - <empty>.
       
   213         * @since Series 60 1.2
       
   214         * @param aPromptResourceId Resource id of the prompt (not the
       
   215         * dialog!).
       
   216         */
       
   217         static void ErrorNoteL( const TInt aPromptResourceId );
       
   218 
       
   219         /**
       
   220         * Display an error note with buttons Ok - <empty>.
       
   221         * @since Series 60 1.2
       
   222         * @param aPrompt Prompt to display.
       
   223         */
       
   224         static void ErrorNoteL( const TDesC& aPrompt );
       
   225 
       
   226     };
       
   227 
       
   228 #endif
       
   229             
       
   230 // End of File