S60 3rd Edition API Reference: caknfileselectiondialog.h Source File

caknfileselectiondialog.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : CAknFileSelectionDialog.h
00004 *  Part of     : Common File Dialogs / CommonDialogs.dll
00005 *  Interface   : ?Interface_category, ?Interface_name
00006 *  Description : ?Description
00007 *  Version     : ?Version
00008 *
00009 *  Copyright (c) 2002-2006 Nokia Corporation.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia Corporation. All rights are reserved. Copying, 
00013 *  including reproducing, storing, adapting or translating, any 
00014 *  or all of this material requires the prior written consent of 
00015 *  Nokia Corporation. This material also contains confidential 
00016 *  information which may not be disclosed to others without the 
00017 *  prior written consent of Nokia Corporation.
00018 * ==============================================================================
00019 */
00020 
00021 #ifndef CAKNFILESELECTIONDIALOG_H
00022 #define CAKNFILESELECTIONDIALOG_H
00023 
00024 // INCLUDES
00025 #include <CAknCommonDialogsBase.h>
00026 
00027 // FORWARD DECLARATIONS
00028 class CAknFileSelectionModel;
00029 class CAknFileSelectionEventHandler;
00030 class MAknFileSelectionObserver;
00031 class MAknFileFilter;
00032 
00033 //  CLASS DEFINITION
00040 NONSHARABLE_CLASS(CAknFileSelectionDialog) : public CAknCommonDialogsBase
00041         {
00042         public:         // Constructors and destructors
00048                 IMPORT_C static CAknFileSelectionDialog* NewL(
00049                         TCommonDialogType aDialogType );
00050 
00057                 IMPORT_C static CAknFileSelectionDialog* NewL(
00058                         TCommonDialogType aDialogType, TInt aResourceId );
00059 
00060                 IMPORT_C ~CAknFileSelectionDialog();
00061 
00062         public: // New functions
00063                 
00068                 IMPORT_C void SetObserver( MAknFileSelectionObserver* aObserver );
00069 
00075                 IMPORT_C void AddFilterL( MAknFileFilter* aFilter );
00076 
00083                 IMPORT_C void SetDefaultFolderL( const TDesC& aDefaultFolder );
00084 
00089                 IMPORT_C void SetTitleL( const TDesC& aText );
00090 
00095                 IMPORT_C void SetLeftSoftkeyFileL( const TDesC& aText );
00096 
00101                 IMPORT_C void SetLeftSoftkeyFolderL( const TDesC& aText );
00102 
00107                 IMPORT_C void SetRightSoftkeyRootFolderL( const TDesC& aText );
00108 
00113                 IMPORT_C void SetRightSoftkeySubfolderL( const TDesC& aText );
00114 
00123                 IMPORT_C TBool ExecuteL( TDes& aFileName );
00124 
00129                 IMPORT_C static TBool RunDlgLD( TDes& aFileName,
00130                         const TDesC& aDefaultFolder,
00131                         MAknFileSelectionObserver* aObserver = NULL );
00132 
00137                 IMPORT_C static TBool RunDlgLD( TDes& aFileName,
00138                         const TDesC& aDefaultFolder,
00139                         const TDesC& aTitle,
00140                         MAknFileSelectionObserver* aObserver = NULL );
00141 
00146                 IMPORT_C static TBool RunDlgLD( TDes& aFileName,
00147                         const TDesC& aDefaultFolder,
00148                         TInt aResourceId,
00149                         MAknFileSelectionObserver* aObserver = NULL );
00150 
00151         private:        // New functions
00152 
00172                 static TBool RunL(
00173                         TInt aResourceId,
00174                         TDes& aFileName,
00175                         const TDesC& aDefaultFolder,
00176                         const TDesC& aTitle,
00177                         MAknFileSelectionObserver* aObserver );
00178 
00187                 TBool PrepareL( const TDesC& aFileName );
00188 
00194                 void SetResourceId( TInt& aResourceId, TCommonDialogType aType ) const;
00195 
00200                 void ReadFromResourceL( TInt aResourceId );
00201 
00202         private:        // Constructors and destructors
00203 
00204                 CAknFileSelectionDialog( TCommonDialogType aDialogType );
00205 
00210                 void ConstructFromResourceL( TInt aResourceId );
00211 
00212         private:        // Data
00213 
00214                 // Own: Dialog type
00215                 TCommonDialogType iDialogType;
00216 
00217                 // Own: Model
00218                 CAknFileSelectionModel* iModel;
00219 
00220                 // Own: Event handler
00221                 CAknFileSelectionEventHandler* iEventHandler;
00222 
00223                 // Ref: Observer
00224                 MAknFileSelectionObserver* iObserver;
00225 
00226                 // Own: Title
00227                 HBufC* iTitle;
00228 
00229                 // Own: Left softkey when file focused
00230                 HBufC* iLeftSoftkeyFile;
00231 
00232                 // Own: Left softkey when folder focused
00233                 HBufC* iLeftSoftkeyFolder;
00234 
00235                 // Own: Right softkey when in root folder
00236                 HBufC* iRightSoftkeyRootFolder;
00237 
00238                 // Own: Right softkey when in subfolder
00239                 HBufC* iRightSoftkeySubfolder;
00240 
00241                 // Own: Root path
00242                 HBufC* iRootPath;
00243 
00244                 // Own: Default folder
00245                 HBufC* iDefaultFolder;
00246 
00247                 // Own: Boolean value that tells if the dialog has been executed already.
00248                 TBool iExecuted;
00249         };
00250 
00251 // CAKNFILESELECTIONDIALOG_H
00252 #endif
00253 
00254 // End of File

Copyright © Nokia Corporation 2001-2007
Back to top