examples/Graphics/Bitmaps/BitmapsShell.h

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 // BitmapsGraphicsShell.h
00015 //
00016 
00017 #ifndef __BitmapsGraphicsShell_H
00018 #define __BitmapsGraphicsShell_H
00019 
00020 #include <coecntrl.h>
00021 #include <coeccntx.h>
00022 
00023 #include <eikappui.h>
00024 #include <eikapp.h>
00025 #include <eikdoc.h>
00026 
00027 #include "BitmapsGraphicsControl.h"
00028 
00029 // UID of app
00030 
00031 const TUid KUidExampleShellApp={ 0xE800004F };
00032 
00033 //
00034 // TExampleShellModel
00035 //
00036 
00037 class TExampleShellModel
00038         {
00039 public:
00040         TExampleShellModel();
00041         TBool Differs(const TExampleShellModel* aCompare) const;
00042 public:
00043         TFileName iLibrary; // active control
00044         };
00045 
00046 //
00047 // class CExampleShellContainer
00048 //
00049 
00050 class CExampleShellContainer : public CCoeControl,
00051                 public MCoeControlBrushContext,
00052                 public MGraphicsExampleObserver
00053     {
00054 public:
00055     void ConstructL(const TRect& aRect, TExampleShellModel* aModel);
00056     ~CExampleShellContainer();
00057         // changing view
00058         void ResetExampleL(CGraphicExampleControl* aExample);
00059 private: // from CCoeControl
00060         void Draw(const TRect& /*aRect*/) const;
00061         TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
00062     TInt CountComponentControls() const;
00063     CCoeControl* ComponentControl(TInt aIndex) const;
00064 private: // from MGraphicsExampleObserver
00065         void NotifyGraphicExampleFinished();
00066 public: // also from MGraphicsExampleObserver
00067         void NotifyStatus(const TDesC& aMessage);
00068 private: // new function
00069         void CreateLabelL();
00070 private: // data
00071         CGraphicExampleControl* iExampleControl; // example control
00072         CEikLabel* iLabel; // label for status messages
00073         // irrelevant
00074         TExampleShellModel* iModel;
00075     };
00076 
00077 //
00078 // CExampleShellDocument
00079 //
00080 
00081 class CExampleShellDocument : public CEikDocument
00082         {
00083 public:
00084         CExampleShellDocument(CEikApplication& aApp): CEikDocument(aApp) { }
00085         TExampleShellModel* Model() { return(&iModel); }
00086 private: // from CEikDocument
00087         CEikAppUi* CreateAppUiL();
00088 private:
00089         TExampleShellModel iModel;
00090         };
00091 
00092 //
00093 // CExampleShellAppUi
00094 //
00095 
00096 class CExampleShellAppUi : public CEikAppUi
00097     {
00098 public:
00099     void ConstructL();
00100         ~CExampleShellAppUi();
00101 private: // from CEikAppUi
00102         void HandleCommandL(TInt aCommand);
00103 private: // internal use
00104 //      void PrepareToolbarButtons();
00105 private:
00106     CExampleShellContainer* iContainer;
00107         TExampleShellModel* iModel;
00108     };
00109 
00110 //
00111 // CExampleShellApplication
00112 //
00113 
00114 class CExampleShellApplication : public CEikApplication
00115         {
00116 private: // from CApaApplication
00117         CApaDocument* CreateDocumentL();
00118         TUid AppDllUid() const;
00119         };
00120 
00121 #endif

Generated by  doxygen 1.6.2