1.1 --- a/epoc32/include/mw/cakncommondialogsbase.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/mw/cakncommondialogsbase.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,126 @@
1.4 -cakncommondialogsbase.h
1.5 +/*
1.6 +* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description: Base class for Common File Dialogs.
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +#ifndef CAKNCOMMONDIALOGSBASE_H
1.24 +#define CAKNCOMMONDIALOGSBASE_H
1.25 +
1.26 +// INCLUDES
1.27 +#include <E32BASE.H>
1.28 +#include <ConeResLoader.h>
1.29 +
1.30 +// CONSTANTS
1.31 +
1.32 +/**
1.33 +* Enumerations for different dialogs. A dialog loads its default values
1.34 +* (such as softkey texts and title) depending on its type.
1.35 +*/
1.36 +enum TCommonDialogType
1.37 + {
1.38 + ECFDDialogTypeNormal,
1.39 + ECFDDialogTypeSelect,
1.40 + ECFDDialogTypeSave,
1.41 + ECFDDialogTypeMove,
1.42 + ECFDDialogTypeBrowse,
1.43 + ECFDDialogTypeDefaultSetting, //Cannot be used in multi-drive
1.44 + ECFDDialogTypeCopy
1.45 + };
1.46 +
1.47 +/**
1.48 +* Text that is shown when Common File Dialogs panics.
1.49 +*/
1.50 +_LIT( KCFDPanicText, "CommonDialogs" );
1.51 +
1.52 +/**
1.53 +* Enumerations for Common File Dialog panics.
1.54 +*/
1.55 +enum TCFDPanics
1.56 + {
1.57 + ECFDPanicInvalidFilterType = 1,
1.58 + ECFDPanicInvalidFilterStyle = 2,
1.59 + ECFDPanicInvalidAttributeFilterDataLength = 3,
1.60 + ECFDPanicInvalidAttributeFilterDataCount = 4,
1.61 + ECFDPanicInvalidFileNameFilterDataLength = 5,
1.62 + ECFDPanicInvalidFileNameFilterDataCount = 6,
1.63 + ECFDPanicNoLocationStructures = 7,
1.64 + ECFDPanicRootPathNotDefined = 8,
1.65 + ECFDPanicNoPathForFileNamePromptDialog = 9,
1.66 + ECFDPanicOutOfBounds = 10,
1.67 + ECFDPanicNullParameter = 11,
1.68 + ECFDPanicNoResourceDefined = 12,
1.69 + ECFDPanicTitleOrSoftkeyNotSet = 13
1.70 + };
1.71 +
1.72 +// FORWARD DECLARATIONS
1.73 +class CCoeEnv;
1.74 +
1.75 +// CLASS DEFINITION
1.76 +/**
1.77 +* Base class for Common File Dialogs.
1.78 +* Can't be created without derivation because of the protected constructor.
1.79 +* Opens CFD's resource in BaseConstructL.
1.80 +*
1.81 +* @lib CommonDialogs.lib
1.82 +* @since 1.2
1.83 +*/
1.84 +NONSHARABLE_CLASS(CAknCommonDialogsBase) : public CBase
1.85 + {
1.86 + public: // Enumerations
1.87 +
1.88 + /**
1.89 + * Sometimes it is necessary to know if dialog was exited by
1.90 + * left softkey or selection key. This enumeration works as TBool,
1.91 + * ERightSoftkey is not true and other return values are.
1.92 + * For example, memory selection dialog and file selection dialog
1.93 + * return values of this enumeration.
1.94 + */
1.95 + enum TReturnKey
1.96 + {
1.97 + ERightSoftkey = EFalse,
1.98 + ELeftSoftkey,
1.99 + ESelectionKey
1.100 + };
1.101 +
1.102 + protected: // Constructors and destructors
1.103 +
1.104 + CAknCommonDialogsBase();
1.105 +
1.106 + virtual ~CAknCommonDialogsBase();
1.107 +
1.108 + /**
1.109 + * Loads resource of Common File Dialogs on any language.
1.110 + */
1.111 + void BaseConstructL();
1.112 +
1.113 + protected: // Data
1.114 +
1.115 + /**
1.116 + * Ref: Pointer to control environment.
1.117 + * Pointer is cached because using of CCoeEnv::Static() is slow.
1.118 + * For direct use for derived classes.
1.119 + */
1.120 + CCoeEnv* iCoeEnv;
1.121 +
1.122 + private: // Data
1.123 +
1.124 + // Own: Loads resource file of Common File Dialogs on any language.
1.125 + RConeResourceLoader iResourceLoader;
1.126 + };
1.127 +
1.128 +#endif // CAKNCOMMONDIALOGSBASE_H
1.129 +
1.130 +// End of File