epoc32/include/eikdoc.h
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 2fe1408b6811
child 4 837f303aceeb
     1.1 --- a/epoc32/include/eikdoc.h	Tue Mar 16 16:12:26 2010 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,128 +0,0 @@
     1.4 -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 -// All rights reserved.
     1.6 -// This component and the accompanying materials are made available
     1.7 -// 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.8 -// which accompanies this distribution, and is available
     1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.10 -//
    1.11 -// Initial Contributors:
    1.12 -// Nokia Corporation - initial contribution.
    1.13 -//
    1.14 -// Contributors:
    1.15 -//
    1.16 -// Description:
    1.17 -//
    1.18 -
    1.19 -#ifndef __EIKDOC_H__
    1.20 -#define __EIKDOC_H__
    1.21 -
    1.22 -#include <apparc.h>
    1.23 -#include <savenotf.h>
    1.24 -
    1.25 -class CEikAppUi;
    1.26 -class CEikApplication;
    1.27 -class CApaWindowGroupName;
    1.28 -
    1.29 -
    1.30 -/** The base class for all GUI applications' documents. 
    1.31 -
    1.32 -In file-based applications, the document represents the data that relates to a 
    1.33 -particular instance of the application, and should handle storing and restoring 
    1.34 -it. In all applications, whether file-based or not, the document is used to create 
    1.35 -the application UI. 
    1.36 -
    1.37 -A class derived from CEikDocument must be defined by each GUI application, and minimally 
    1.38 -it must implement CreateAppUiL(). Note that UIs may implement their own document base class, 
    1.39 -derived from CEikDocument, which applications may need to derive from instead. 
    1.40 -
    1.41 -The document is created by the application's CreateDocumentL() function.
    1.42 -
    1.43 -@publishedAll
    1.44 -@released 
    1.45 -@see CEikApplication::CreateDocumentL()
    1.46 -@see CEikAppUi */
    1.47 -class CEikDocument : public CApaDocument, public MSaveObserver
    1.48 -	{
    1.49 -public: // new functions
    1.50 -	/** Constructs the application UI.
    1.51 -	
    1.52 -	This function is called by the UI framework during application start-up. It should 
    1.53 -	only carry out first phase construction of the app UI, in other words, using new(ELeave). 
    1.54 -	It should not call the app UI's ConstructL(), because the UI framework is responsible 
    1.55 -	for this. Note also that the UI framework takes ownership of the app UI, so the 
    1.56 -	document does not need to destroy it.
    1.57 -
    1.58 -	@return A partially-constructed app UI object. */
    1.59 -	virtual CEikAppUi* CreateAppUiL()=0;
    1.60 -	IMPORT_C virtual CFileStore* OpenFileL(TBool aDoOpen,const TDesC& aFilename,RFs& aFs);
    1.61 -	IMPORT_C void PrepareToEditL(MApaEmbeddedDocObserver* aObserver,TBool aReadOnly);
    1.62 -	IMPORT_C void PrepareToEditL();
    1.63 -	IMPORT_C void SetAppFileMode(TUint aMode);
    1.64 -	IMPORT_C TUint AppFileMode() const;
    1.65 -	IMPORT_C virtual void UpdateTaskNameL(CApaWindowGroupName* aWgName);
    1.66 -	IMPORT_C const TApaAppCaption& AppCaption() const;
    1.67 -	IMPORT_C void SetChanged(TBool aHasChanged);
    1.68 -	IMPORT_C void SetEditStoreL(CStreamStore* aStore);
    1.69 -	void SetEditStoreWithoutAppUiNotificationL(CStreamStore* aStore);
    1.70 -	inline CStreamStore* EditStore() const;
    1.71 -	IMPORT_C ~CEikDocument();
    1.72 -public: // from MSaveObserver
    1.73 -	IMPORT_C virtual void SaveL(MSaveObserver::TSaveType aSaveType);
    1.74 -public: // from CApaDocument
    1.75 -	IMPORT_C void NewDocumentL();
    1.76 -	IMPORT_C CFileStore* CreateFileStoreLC(RFs& aFs,const TDesC& aFileName);
    1.77 -	IMPORT_C void EditL(MApaEmbeddedDocObserver* aObserver,TBool aReadOnly=EFalse);
    1.78 -	IMPORT_C void PrintL(const CStreamStore& aSourceStore);
    1.79 -	IMPORT_C void SaveL();
    1.80 -	IMPORT_C void StoreL(CStreamStore& aStore,CStreamDictionary& aStreamDic) const;
    1.81 -	IMPORT_C void RestoreL(const CStreamStore& aStore,const CStreamDictionary& aStreamDic);
    1.82 -	IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
    1.83 -	IMPORT_C TBool IsEmpty() const;
    1.84 -	IMPORT_C TBool HasChanged() const;
    1.85 -	IMPORT_C virtual void ValidatePasswordL() const; // return EFalse if there *is* a password *and* the user doesn't get it right, ETrue otherwise (ie they get it right or there isn't one). Returns ETrue by default
    1.86 -protected:
    1.87 -	IMPORT_C CEikDocument();
    1.88 -	IMPORT_C CEikDocument(CEikApplication& aApp);
    1.89 -public:
    1.90 -	IMPORT_C virtual void OpenFileL(CFileStore*& aFileStore, RFile& aFile);
    1.91 -private:
    1.92 -	void NullAppUi();
    1.93 -	// reserved functions from CApaDocument
    1.94 -	IMPORT_C virtual void Reserved_2();
    1.95 -protected:
    1.96 -	/** A pointer to the app UI which the document is associated with. */
    1.97 -	CEikAppUi* iAppUi;
    1.98 -	/** A pointer to the file store object which is used to edit the document. */
    1.99 -	CStreamStore* iEditStore;
   1.100 -private:
   1.101 -	TBool iChanged;
   1.102 -	TUint iAppFileMode;
   1.103 -	friend class CEikAppUi;
   1.104 -	};
   1.105 -
   1.106 -/** A pointer to the application process associated with this document.
   1.107 -
   1.108 -@publishedAll
   1.109 -@released */
   1.110 -#define iEikProcess ((CEikProcess*)Process())
   1.111 -
   1.112 -/** A pointer to the application that created this document.
   1.113 -
   1.114 -@publishedAll
   1.115 -@released */
   1.116 -#define iEikApplication ((CEikApplication*)Application())
   1.117 -
   1.118 -/** The default size in twips of icons that represent embedded objects.
   1.119 -
   1.120 -@publishedPartner
   1.121 -@released */
   1.122 -#define KDefaultIconicDoorSize TSize(500,500)
   1.123 -
   1.124 -
   1.125 -/** Gets the file store object which is used to edit the document.
   1.126 -
   1.127 -@return A pointer to the file store object which is used to edit the document. */
   1.128 -inline CStreamStore* CEikDocument::EditStore() const
   1.129 -	{ return(iEditStore); }
   1.130 -
   1.131 -#endif	// __EIKDOC_H__