📄 aknexgridcontainerasgms.h
字号:
/* Copyright (c) 2004, Nokia. All rights reserved */
#ifndef __AKNEXGRIDCONTAINERASGMS_H__
#define __AKNEXGRIDCONTAINERASGMS_H__
// INCLUDES
#include <aknview.h>
#include "AknExGridContainerAsSelection.h"
#include "AknExGridCommonConstants.h"
// CONSTANTS
// Number of components in the GMS container
const TInt KNumberOfComponentGMS = 1; // only iGridGMS
// The initial number of items to be created.
const TInt KInitialNumOfItemsInGMS = 10;
// The height of GMS grid
const TInt KHeightOfGMSGrid = 139;
// The width of GMS grid
const TInt KWidthOfGMSGrid = 161;
// The top horizontal value in relation to its parent's top side
const TInt KTopOfGMSGrid = 2;
// The left vertical value in relation to its parent's left side
const TInt KLeftOfGMSGrid = 8;
// The color index number
const TInt KGMSColorIndex = 0;
// The number of rows in GMS grid
const TInt KNumOfGMSRows = 3;
// The number of rows in GMS grid
const TInt KNumOfGMSColumns = 2;
// FORWARD DECLARATIONS
class CAknGMSStyleGrid;
// CLASS DECLARATION
/**
* CAknExGridContainerAsGMS container control class.
*/
class CAknExGridContainerAsGMS : public CAknExGridContainerAsSelection
{
public: // Constructors and destructor
/**
* NewL.
* Two-phased constructor.
* @param aRect The rectangle this container will be drawn to.
* @return Pointer to the created instance of CAknExGridContainerAsGMS.
*/
static CAknExGridContainerAsGMS* NewL( const TRect& aRect );
/**
* NewLC.
* Two-phased constructor.
* @param aRect The rectangle this container will be drawn to.
* @return Pointer to the created instance of CAknExGridContainerAsGMS.
*/
static CAknExGridContainerAsGMS* NewLC( const TRect& aRect );
/**
* ~CAknExGridContainerAsGMS.
* Destructor.
*/
virtual ~CAknExGridContainerAsGMS();
public: // New functions
/**
* ShowPopupGMSGridL.
* Creates a popup GMS grid and show it.
*/
void ShowPopupGMSGridL();
/**
* AutoTestL.
* Runs different tests.
* @return ETrue if there are still tests to be run.
*/
TBool AutoTestL();
protected: // New functions
/**
* CheckIndex.
* Shows the current index.
*/
void CheckIndex();
private: // Functions from base classes
/**
* From CoeControl, SizeChanged.
* Called by framework when the view size is changed.
*/
void SizeChanged();
/**
* From CoeControl, CountComponentControls.
* Returns the number of components owned by this container.
* @return Number of component controls
*/
TInt CountComponentControls() const;
/**
* From CCoeControl, ComponentControl.
* Returns pointer to a particular control.
* @param aIndex Index of wanted control
* @return Pointer to component control
*/
CCoeControl* ComponentControl( TInt aIndex ) const;
/**
* From CCoeControl, Draw.
* Draws this container to the screen.
* @param aRect The region of the control to be redrawn.
*/
void Draw( const TRect& aRect ) const;
/**
* From CCoeControl, OfferKeyEventL.
* Handles key events.
* @param aKeyEvent the key event.
* @param aType The type of the event.
* @return Indicates whether or not the key event was used by
this control.
*/
TKeyResponse OfferKeyEventL(
const TKeyEvent& aKeyEvent, TEventCode aType );
/**
* From MCoeControlObserver, HandleControlEventL
* Handle event from observed control.
* @param aControl The control that sent the event.
* @param aEventType The event type.
*/
void HandleControlEventL(
CCoeControl* aControl, TCoeEvent aEventType );
private: // Constructors and destructor
/**
* CAknExGridContainerAsGMS.
* C++ default constructor.
*/
CAknExGridContainerAsGMS();
/**
* ConstructL.
* 2nd phase constructor.
* @param aRect Frame rectangle for container.
*/
void ConstructL( const TRect& aRect );
private: // Enumerations
enum TSelectionTitles
{
EGMSTest1=0,
EGMSTest2
};
enum TPointerToComponentGMS
{
EGmsGrid = 0
};
enum TAknExGridGMSGridType
{
EAknExGridGMSGrid = 0, // Show grid as "GMS Grid"
EAknExGridMarkableGMSGrid // Show grid as "Markable GMS Grid"
};
private: // Data
/**
* iGridGMS, the grid shown in this container.
* Owned by CAknExGridContainerAsGMS object.
*/
CAknGMSStyleGrid* iGridGMS;
/**
* iTitles, the title list.
* Owned by CAknExGridContainerAsGMS object.
*/
CDesCArrayFlat* iTitles;
/**
* iTestNumber, the next test to be run.
*/
TInt iTestNumber;
};
#endif // __AKNEXGRIDCONTAINERASGMS_H__
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -