diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/_fonts_shell_8h-source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/_fonts_shell_8h-source.html Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,132 @@ + +
+00001 // Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). +00002 // All rights reserved. +00003 // This component and the accompanying materials are made available +00004 // under the terms of "Eclipse Public License v1.0" +00005 // which accompanies this distribution, and is available +00006 // at the URL "http://www.eclipse.org/legal/epl-v10.html". +00007 // +00008 // Initial Contributors: +00009 // Nokia Corporation - initial contribution. +00010 // +00011 // Contributors: +00012 // +00013 // Description: +00014 // +00015 +00016 #ifndef __FontsShell_H +00017 #define __FontsShell_H +00018 +00019 #include <coecntrl.h> +00020 #include <coeccntx.h> +00021 +00022 #include <eikappui.h> +00023 #include <eikapp.h> +00024 #include <eikdoc.h> +00025 +00026 #include "FontsGraphicsControl.h" +00027 +00028 // UID of app +00029 +00030 const TUid KUidExampleShellApp={ 0xE8000051 }; +00031 +00032 // +00033 // TExampleShellModel +00034 // +00035 +00036 class TExampleShellModel +00037 { +00038 public: +00039 TExampleShellModel(); +00040 TBool Differs(const TExampleShellModel* aCompare) const; +00041 public: +00042 TFileName iLibrary; // active control +00043 }; +00044 +00045 // +00046 // class CExampleShellContainer +00047 // +00048 +00049 class CExampleShellContainer : public CCoeControl, +00050 public MCoeControlBrushContext, +00051 public MGraphicsExampleObserver +00052 { +00053 public: +00054 void ConstructL(const TRect& aRect, TExampleShellModel* aModel); +00055 ~CExampleShellContainer(); +00056 // changing view +00057 void ResetExampleL(CGraphicExampleControl* aExample); +00058 private: // from CCoeControl +00059 void Draw(const TRect& /*aRect*/) const; +00060 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); +00061 TInt CountComponentControls() const; +00062 CCoeControl* ComponentControl(TInt aIndex) const; +00063 private: // from MGraphicsExampleObserver +00064 void NotifyGraphicExampleFinished(); +00065 public: // also from MGraphicsExampleObserver +00066 void NotifyStatus(const TDesC& aMessage); +00067 private: // new function +00068 void CreateLabelL(); +00069 private: // data +00070 CGraphicExampleControl* iExampleControl; // example control +00071 CEikLabel* iLabel; // label for status messages +00072 // irrelevant +00073 TExampleShellModel* iModel; +00074 }; +00075 +00076 // +00077 // CExampleShellDocument +00078 // +00079 +00080 class CExampleShellDocument : public CEikDocument +00081 { +00082 public: +00083 CExampleShellDocument(CEikApplication& aApp): CEikDocument(aApp) { } +00084 TExampleShellModel* Model() { return(&iModel); } +00085 private: // from CEikDocument +00086 CEikAppUi* CreateAppUiL(); +00087 private: +00088 TExampleShellModel iModel; +00089 }; +00090 +00091 // +00092 // CExampleShellAppUi +00093 // +00094 +00095 class CExampleShellAppUi : public CEikAppUi +00096 { +00097 public: +00098 void ConstructL(); +00099 ~CExampleShellAppUi(); +00100 private: // from CEikAppUi +00101 void HandleCommandL(TInt aCommand); +00102 private: // internal use +00103 // void PrepareToolbarButtons(); +00104 private: +00105 CExampleShellContainer* iContainer; +00106 TExampleShellModel* iModel; +00107 }; +00108 +00109 // +00110 // CExampleShellApplication +00111 // +00112 +00113 class CExampleShellApplication : public CEikApplication +00114 { +00115 private: // from CApaApplication +00116 CApaDocument* CreateDocumentL(); +00117 TUid AppDllUid() const; +00118 }; +00119 +00120 #endif +