class CHgGrid : public CHgScroller |
Public Member Functions | |
---|---|
~CHgGrid() | |
IMPORT_C CHgGrid * | NewL(const TRect &, TInt, CGulIcon *, RWsSession *) |
IMPORT_C TSize | PreferredImageSize() |
IMPORT_C void | SetLandscapeScrollingSupport(TBool) |
IMPORT_C void | SetToolbarVisibility(TBool) |
Protected Member Functions | |
---|---|
TInt | CurrentIndex() |
void | DoDraw(const TRect &) |
TBool | DoHandleKeyEvent(const TKeyEvent &) |
void | FitSelectionToView() |
void | FitTopItemToView(TInt) |
TInt | GetSelected(TPoint) |
void | HandleScrollbarVisibilityChange(TBool) |
void | HandleSizeChanged() |
void | InitItemsL() |
TBool | IsDisplayed(TInt) |
TSize | TotalSize() |
Private Member Functions | |
---|---|
CHgGrid(TInt, CGulIcon *) | |
void | CalculateSizes() |
void | ChangeSelectedIndex(TInt) |
void | ConstructL(const TRect &, RWsSession *) |
void | DrawCols(TInt, const TRect &, TInt) |
void | DrawHighlight(const TRect &) |
void | DrawItem(TInt, const TRect &) |
void | DrawRows(TInt, const TRect &, TInt) |
TRect | GridRect() |
void | HandleDownArrow() |
void | HandleLeftArrow() |
void | HandleRightArrow() |
void | HandleUpArrow() |
void | SelectDefaultItem() |
Inherited Enumerations | |
---|---|
CCoeControl:TZoomType | |
CHgScroller:THgScrollBarType | |
CHgScroller:THgScrollerMode | |
CHgScroller:TKeyScrollingState | |
CHgScroller:TSelectionMode |
Private Attributes | |
---|---|
TInt | iCols |
TBool | iLandScapeScrollingSupported |
CHgGridLayoutData * | iLayoutData |
TInt | iRowWidth |
TInt | iRows |
TBool | iToolbarVisible |
void | ConstructL | ( | const TRect & | aRect, |
RWsSession * | aSession | |||
) | [private] |
Usage:
#include <featdiscovery.h> #include <featureinfo.h> // for feature definitions // replace <featureUIDx> with a real UID ) // If querying only one feature, it is more efficient to use the class // via the static method, IsFeatureSupportedL(). // When querying more than one feature, it is more efficient to use the // class by creating an instance and calling the IsSupported() method. // Static way of using the class: TBool isSupported = CFeatureDiscovery::IsFeatureSupportedL(<featureUIDx>); // Dynamic way of using the class using NewL(): // Call NewL() to create an instance of CFeatureDiscovery. CFeatureDiscovery* testA = CFeatureDiscovery::NewL(); // Call the exported IsSupported() method to query whether features // are supported in the current environment or not. TBool usbSupported = testA->IsSupported(<featureUIDx>); TBool mmcSupported = testA->IsSupported(<featureUIDx>); // Delete the created instance of CFeatureDiscovery. delete testA; // Dynamic way of using the class using NewLC(): // Call NewLC() to create an instance of CFeatureDiscovery. // The method leaves the instance of the object on the cleanup stack. CFeatureDiscovery* testB = CFeatureDiscovery::NewLC(); // Call the exported IsSupported() method to query whether features // are supported in the current environment or not. TBool wcdmaSupported = testB->IsSupported(<featureUIDx>); TBool gsmSupported = testB->IsSupported(<featureUIDx>); // Dynamic way of using multiple feature query. This is preferred // way to fetch support statuses if there are several features to be // queried, because it involves less inter-process communication. TFeatureSet featset; User::LeaveIfError( featset.Append( <featureUIDx> ) ); User::LeaveIfError( featset.Append( <featureUIDx> ) ); TInt err = testB->FeaturesSupported( featset ); if(!err) { TBool uid1Supported = featset.IsFeatureSupported(<featureUIDx>); TBool uid2Supported = featset.IsFeatureSupported(<featureUIDx>); // ... or whether all QUERIED features are supported TBool allSupported = featset.AreAllFeaturesSupported(); } // featset cleans array up in destructor on scope exit // Pop and delete the created instance of CFeatureDiscovery. CleanupStack::PopAndDestroy();
const TRect & aRect | |
RWsSession * aSession |
void | DoDraw | ( | const TRect & | aRect | ) | const [protected, virtual] |
const TRect & aRect |
TBool | DoHandleKeyEvent | ( | const TKeyEvent & | aEvent | ) | [protected, virtual] |
const TKeyEvent & aEvent |
void | DrawCols | ( | TInt | aRow, |
const TRect & | aRect, | |||
TInt | aYPos | |||
) | const [private] |
void | DrawHighlight | ( | const TRect & | aOuterRect | ) | const [private] |
const TRect & aOuterRect |
void | DrawRows | ( | TInt | aCol, |
const TRect & | aRect, | |||
TInt | aXPos | |||
) | const [private] |
TInt | GetSelected | ( | TPoint | aPosition | ) | const [protected, virtual] |
TPoint aPosition |
void | HandleScrollbarVisibilityChange | ( | TBool | aVisible | ) | [protected, virtual] |
TBool aVisible |
IMPORT_C CHgGrid * | NewL | ( | const TRect & | aRect, |
TInt | aItemCount, | |||
CGulIcon * | aDefaultIcon = NULL, | |||
RWsSession * | aSession = NULL | |||
) | [static] |
Creates new HgGrid.
const TRect & aRect | Rect that the control draws onto. |
TInt aItemCount | Total count of items in the grid |
CGulIcon * aDefaultIcon = NULL | Default icon to be used. |
RWsSession * aSession = NULL | Window server session for DSA. Default is NULL and DSA is disabled. |
IMPORT_C TSize | PreferredImageSize | ( | ) | [static] |
Returns preferred image size that should be used when passing images.
IMPORT_C void | SetLandscapeScrollingSupport | ( | TBool | aSupportLandscapeScrolling | ) |
Set landscape scrolling support. If enabled lanscape scrolling is on only in landscape orientation. InitScreenL must be called after this to relayout the grid.
TBool aSupportLandscapeScrolling | Landscape scrolling supported or not. |
IMPORT_C void | SetToolbarVisibility | ( | TBool | aToolbarVisible | ) |
Set toolbar visibilty. The toolbar visibility ETrue changes the lanscape layout to fill the toolbar space with grid content.
TBool aToolbarVisible | Is toolbar visible or not. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.