akngmsstylegrid.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name     : CAknGMSStyleGrid.h
00004 *  Part of  : Avkon
00005 *
00006 *  Description:
00007 *       Contains the View and the Component of the photoalbum picture grid
00008 *       component.
00009 *
00010 *  Version:
00011 *
00012 *  Copyright © 2002 Nokia Corporation.
00013 *  This material, including documentation and any related 
00014 *  computer programs, is protected by copyright controlled by 
00015 *  Nokia Corporation. All rights are reserved. Copying, 
00016 *  including reproducing, storing,  adapting or translating, any 
00017 *  or all of this material requires the prior written consent of 
00018 *  Nokia Corporation. This material also contains confidential 
00019 *  information which may not be disclosed to others without the 
00020 *  prior written consent of Nokia Corporation.
00021 */
00022 
00023 #ifndef __CAknGMSStyleGrid_h
00024 #define __CAknGMSStyleGrid_h
00025 
00026 #include <AknGrid.h>
00027 #include <aknpopup.h>
00028 #include <aknlists.h>
00029 
00030 class CGulIcon;
00031 
00032 // ============================================================================
00033 // CAknGMSStyleGridView
00034 // ============================================================================
00035 
00039 class CAknGMSStyleGridView : public CAknGridView
00040         {
00041 public: // from CAknGridView
00042         IMPORT_C CAknGMSStyleGridView();
00043 public: // from CAknGridView
00047         IMPORT_C void Draw(const TRect* aClipRect = NULL) const;
00048 public: // new methods
00053         IMPORT_C void SetupLayout(const TRect& aRect, TBool aIsPopup = EFalse, TInt aNum = -1);
00054 private: // overridden from CListBoxView
00055         IMPORT_C virtual TAny* Reserved_1();
00056 
00057 private: // new methods
00061     TInt MaxNumOfHorLines() const;
00062 
00066     TInt MaxNumOfVerLines() const;
00067 
00068 private: // data
00069         TAknLayoutRect iHorLine[5];
00070         TAknLayoutRect iVerLine[3];
00071         const TRect* iRect;
00072         };
00073 
00074 
00075 // ============================================================================
00076 // CAknGMSStyleGrid
00077 // ============================================================================
00084 class CAknGMSStyleGrid : public CAknSelectionGridTypedef
00085     {
00086 public:
00092     IMPORT_C static CAknGMSStyleGrid* NewL(const CCoeControl* aParent, TBool aIsPopup = EFalse);
00097     IMPORT_C CAknGMSStyleGrid(); 
00101     IMPORT_C CAknGMSStyleGrid(TBool aIsPopup);
00108         IMPORT_C void ConstructL(const CCoeControl* aParent, TInt aRows=4, TInt aCols=2);
00109 
00113         IMPORT_C ~CAknGMSStyleGrid();
00114 
00118     IMPORT_C void SetupLayout();
00119 
00124     IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); 
00125 
00126 public: // from CAknGrid
00130         IMPORT_C void SizeChanged();
00131          
00135         IMPORT_C TSize MinimumSize();
00136 
00142         IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
00143 
00148     static TSize KCELL_SIZE();
00149 
00154         IMPORT_C void Draw(const TRect& aRect) const;
00155         
00160         IMPORT_C CListBoxView* MakeViewClassInstanceL();
00161 
00162 protected:
00166     TBool iIsPopup;
00167     
00168 private:
00172     IMPORT_C void* ExtensionInterface( TUid aInterface );
00173 
00174 private:
00178         static void _LOG(const TDesC& aText);
00179 
00180 private: // data
00181 
00182 };
00183 
00187 class CAknGMSPopupGrid : public CAknPopupList
00188     {
00189 public:
00196     IMPORT_C static CAknGMSPopupGrid* NewL(CEikListBox* aListBox, TInt aCbaResource, AknPopupLayouts::TAknPopupLayouts aType=AknPopupLayouts::EMenuWindow);
00197 public:
00202     IMPORT_C void SetupWindowLayout(AknPopupLayouts::TAknPopupLayouts);
00206     IMPORT_C static void CalcPopupGridLargeGraphicWindow(TAknPopupWindowLayoutDef &aDef, TRect aClientRect, TInt aNumberOfLinesInListBox);
00210     IMPORT_C static void SetupPopupGridLargeGraphicWindow(TAknPopupWindowLayoutDef &aDef, 
00211                                      TInt aNumberOfLinesInListBox, 
00212                                      TBool aHeading);
00216     IMPORT_C static void PopupGridLargeGraphicGraphics(TAknPopupWindowLayoutDef &aDef);
00217 
00222     IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);    
00223 
00224 private:
00228     IMPORT_C void* ExtensionInterface( TUid aInterface );
00229     };
00230 
00231 // __CAknGMSStyleGrid_h
00232 #endif

Copyright © Nokia Corporation 2001-2008
Back to top