epoc32/include/mw/cakncommondialogsbase.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 /*
     2 * Copyright (c) 2002-2006 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:  Base class for Common File Dialogs.
    15 *
    16 */
    17 
    18 
    19 #ifndef CAKNCOMMONDIALOGSBASE_H
    20 #define CAKNCOMMONDIALOGSBASE_H
    21 
    22 // INCLUDES
    23 #include <e32base.h>
    24 #include <ConeResLoader.h>
    25 
    26 // CONSTANTS
    27 
    28 /**
    29 * Enumerations for different dialogs. A dialog loads its default values
    30 * (such as softkey texts and title) depending on its type.
    31 */
    32 enum TCommonDialogType
    33     {
    34     ECFDDialogTypeNormal,
    35     ECFDDialogTypeSelect,
    36     ECFDDialogTypeSave,
    37     ECFDDialogTypeMove,
    38     ECFDDialogTypeBrowse,
    39     ECFDDialogTypeDefaultSetting, //Cannot be used in multi-drive
    40     ECFDDialogTypeCopy
    41     };
    42 
    43 /**
    44 * Text that is shown when Common File Dialogs panics.
    45 */
    46 _LIT( KCFDPanicText, "CommonDialogs" );
    47 
    48 /**
    49 * Enumerations for Common File Dialog panics.
    50 */
    51 enum TCFDPanics
    52     {
    53     ECFDPanicInvalidFilterType                      =  1,
    54     ECFDPanicInvalidFilterStyle                     =  2,
    55     ECFDPanicInvalidAttributeFilterDataLength       =  3,
    56     ECFDPanicInvalidAttributeFilterDataCount        =  4,
    57     ECFDPanicInvalidFileNameFilterDataLength        =  5,
    58     ECFDPanicInvalidFileNameFilterDataCount         =  6,
    59     ECFDPanicNoLocationStructures                   =  7,
    60     ECFDPanicRootPathNotDefined                     =  8,
    61     ECFDPanicNoPathForFileNamePromptDialog          =  9,
    62     ECFDPanicOutOfBounds                            = 10,
    63     ECFDPanicNullParameter                          = 11,
    64     ECFDPanicNoResourceDefined                      = 12,
    65     ECFDPanicTitleOrSoftkeyNotSet                   = 13
    66     };
    67 
    68 // FORWARD DECLARATIONS
    69 class CCoeEnv;
    70 
    71 //  CLASS DEFINITION
    72 /**
    73 *  Base class for Common File Dialogs.
    74 *  Can't be created without derivation because of the protected constructor.
    75 *  Opens CFD's resource in BaseConstructL.
    76 *
    77 *  @lib CommonDialogs.lib
    78 *  @since 1.2
    79 */
    80 NONSHARABLE_CLASS(CAknCommonDialogsBase) : public CBase
    81     {
    82     public:     // Enumerations
    83 
    84         /**
    85         * Sometimes it is necessary to know if dialog was exited by
    86         * left softkey or selection key. This enumeration works as TBool,
    87         * ERightSoftkey is not true and other return values are.
    88         * For example, memory selection dialog and file selection dialog
    89         * return values of this enumeration.
    90         */
    91         enum TReturnKey
    92             {
    93             ERightSoftkey = EFalse,
    94             ELeftSoftkey,
    95             ESelectionKey
    96             };
    97 
    98     protected:  // Constructors and destructors
    99 
   100         CAknCommonDialogsBase();
   101 
   102         virtual ~CAknCommonDialogsBase();
   103 
   104         /**
   105         * Loads resource of Common File Dialogs on any language.
   106         */
   107         void BaseConstructL();
   108 
   109     protected:  // Data
   110 
   111         /**
   112         * Ref: Pointer to control environment.
   113         * Pointer is cached because using of CCoeEnv::Static() is slow.
   114         * For direct use for derived classes.
   115         */
   116         CCoeEnv* iCoeEnv;
   117 
   118     private:    // Data
   119 
   120         // Own: Loads resource file of Common File Dialogs on any language.
   121         RConeResourceLoader iResourceLoader;
   122     };
   123 
   124 #endif // CAKNCOMMONDIALOGSBASE_H
   125 
   126 // End of File