CAknGrid Class Reference

class CAknGrid : public CEikListBox

Application grid handling class from Avkon. Provides support for ordering application grids items.

Since
Series 60 0.9
Public Member Functions
CAknGrid()
~CAknGrid()
IMPORT_C TIntColumnWidth()
IMPORT_C voidConstructFromResourceL(TResourceReader &)
IMPORT_C voidConstructL(const CCoeControl *, TInt)
IMPORT_C TIntCurrentDataIndex()
const TDesC *EmptyGridText()
IMPORT_C voidFocusChanged(TDrawNow)
IMPORT_C voidHandleItemAdditionL()
IMPORT_C voidHandleItemRemovalL()
IMPORT_C voidHandlePointerEventL(const TPointerEvent &)
IMPORT_C voidHandleResourceChange(TInt)
IMPORT_C voidHandleViewRectSizeChangeL()
IMPORT_C TIntIndexOfPosition(TPoint)
IMPORT_C CFormattedCellListBoxItemDrawer *ItemDrawer()
IMPORT_C CListBoxView *MakeViewClassInstanceL()
IMPORT_C CTextListBoxModel *Model()
IMPORT_C TKeyResponseOfferKeyEventL(const TKeyEvent &, TEventCode)
IMPORT_C TPointPositionAtIndex(TInt)
IMPORT_C voidSetColumnWidth(TInt)
IMPORT_C voidSetCurrentDataIndex(TInt)
IMPORT_C voidSetEmptyGridTextL(const TDesC &)
IMPORT_C voidSetItemHeightL(TInt)
IMPORT_C voidSetLayoutFromResourceL(TResourceReader &)
IMPORT_C voidSetLayoutL(TBool, TBool, TBool, TInt, TInt, TSize, TInt, TInt)
IMPORT_C voidSetModel(CAknGridM *)
IMPORT_C voidSetPrimaryScrollingType(CAknGridView::TScrollingType)
IMPORT_C voidSetRect(const TRect &)
IMPORT_C voidSetSecondaryScrollingType(CAknGridView::TScrollingType)
IMPORT_C voidSetStartPositionL(TPoint)
IMPORT_C voidSetTopItemIndex(TInt)
IMPORT_C voidSizeChanged()
IMPORT_C voidUpdateScrollBarsL()
Protected Member Functions
IMPORT_C TIntAdjustRectHeightToWholeNumberOfItems(TRect &)
IMPORT_C voidAdjustTopItemIndex()
IMPORT_C voidCalcGridSizeL()
IMPORT_C TIntCountComponentControls()
IMPORT_C voidCreateItemDrawerL()
IMPORT_C voidHandleDragEventL(TPoint)
IMPORT_C voidHandleScrollEventL(CEikScrollBar *, TEikScrollEvent)
IMPORT_C TIntHorizScrollGranularityInPixels()
IMPORT_C TIntHorizontalNudgeValue()
IMPORT_C TTypeUid::PtrMopSupplyObject(TTypeUid)
IMPORT_C voidMoveToNextOrPreviousItemL(TPoint)
IMPORT_C voidRestoreClientRectFromViewRect(TRect &)
IMPORT_C voidUpdateScrollBarThumbs()
Private Member Functions
voidDoSetLayoutL(TInt, TInt, TInt, TInt, TInt, TSize, TInt, TInt)
IMPORT_C void *ExtensionInterface(TUid)
CAknGridM *GridModel()
CAknGridView *GridView()
IMPORT_C TAny *MListBoxModel_Reserved()
Inherited Functions
CAknControl::CAknControl()
CAknControl::~CAknControl()
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CCoeControl::AccumulatedZoom()const
CCoeControl::ActivateGc()const
CCoeControl::BackedUpWindow()const
CCoeControl::Background()const
CCoeControl::CCoeControl()
CCoeControl::CCoeControl(CCoeEnv *)
CCoeControl::CCoeControl(const CCoeControl &)
CCoeControl::CapturesPointer()const
CCoeControl::ClaimPointerGrab(TBool)
CCoeControl::ClaimPointerGrab(TInt,TBool)
CCoeControl::CloseWindow()
CCoeControl::ComponentArrayExists()const
CCoeControl::Components()
CCoeControl::Components()const
CCoeControl::ControlContext()const
CCoeControl::ControlEnv()const
CCoeControl::CopyControlContextFrom(const CCoeControl *)
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &)
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &,TDisplayMode)
CCoeControl::CreateWindowL()
CCoeControl::CreateWindowL(RWindowGroup *)
CCoeControl::CreateWindowL(RWindowTreeNode &)
CCoeControl::CreateWindowL(const CCoeControl *)
CCoeControl::CustomGc()const
CCoeControl::DeactivateGc()const
CCoeControl::DrawBackground(const TRect &)const
CCoeControl::DrawDeferred()const
CCoeControl::DrawForeground(const TRect &)const
CCoeControl::DrawNow()const
CCoeControl::DrawNow(const TRect &)const
CCoeControl::DrawableWindow()const
CCoeControl::EnableDragEvents()
CCoeControl::EnableReportControlStateChange(TBool)
CCoeControl::EnableWindowTransparency()
CCoeControl::FindBackground()const
CCoeControl::FindFontProvider()const
CCoeControl::GetColor(TInt,TRgb &)const
CCoeControl::GetGc()const
CCoeControl::GetHelpContext(TCoeHelpContext &)const
CCoeControl::GrabbingComponent()const
CCoeControl::GrabbingComponent(TInt)const
CCoeControl::HandleComponentControlsResourceChange(TInt)
CCoeControl::HandleControlArrayEventL(CCoeControlArray::TEvent,const CCoeControlArray *,CCoeControl *,TInt)
CCoeControl::HandlePointerBufferReadyL()
CCoeControl::HandleRedrawEvent(const TRect &)const
CCoeControl::HitTest()const
CCoeControl::IgnoreEventsUntilNextPointerUp()
CCoeControl::Index(const CCoeControl *)const
CCoeControl::InitComponentArrayL()
CCoeControl::IsActivated()const
CCoeControl::IsBackedUp()const
CCoeControl::IsBeingDestroyed()const
CCoeControl::IsBlank()const
CCoeControl::IsDimmed()const
CCoeControl::IsFocused()const
CCoeControl::IsNonFocusing()const
CCoeControl::IsReadyToDraw()const
CCoeControl::IsVisible()const
CCoeControl::LayoutManager()const
CCoeControl::MaximumWidth()const
CCoeControl::NotifyFontChange(const CCoeFontProvider *)
CCoeControl::Observer()const
CCoeControl::OverrideColorL(TInt,TRgb)
CCoeControl::OwnsWindow()const
CCoeControl::Parent()
CCoeControl::Parent()const
CCoeControl::Position()const
CCoeControl::PositionChanged()
CCoeControl::PositionRelativeToScreen()const
CCoeControl::PrepareForFocusGainL()
CCoeControl::PrepareForFocusLossL()
CCoeControl::ProcessPointerBufferReadyL()
CCoeControl::ProcessPointerEventL(const TPointerEvent &)
CCoeControl::Rect()const
CCoeControl::RecursivelyMergeInputCapabilities(TCoeInputCapabilities &)const
CCoeControl::RecursivelyMergedInputCapabilities()const
CCoeControl::RefetchPixelMappingL()
CCoeControl::RemoveFromParent()
CCoeControl::ReportEventL(MCoeControlObserver::TCoeEvent)
CCoeControl::RequestRelayout(const CCoeControl *)
CCoeControl::ResetGc()const
CCoeControl::ScreenFont(const TCoeFont &)const
CCoeControl::SetAllowStrayPointers()
CCoeControl::SetBackground(const MCoeControlBackground *)
CCoeControl::SetBlank()
CCoeControl::SetCanDrawOutsideRect()
CCoeControl::SetComponentsToInheritVisibility(TBool)
CCoeControl::SetContainerWindowL(RBackedUpWindow &)
CCoeControl::SetContainerWindowL(RWindow &)
CCoeControl::SetControlContext(MCoeControlContext *)
CCoeControl::SetCornerAndSize(TGulAlignment,const TSize &)
CCoeControl::SetCustomGc(CWindowGc *)
CCoeControl::SetExtent(const TPoint &,const TSize &)
CCoeControl::SetExtentToWholeScreen()
CCoeControl::SetFocus(TBool,TDrawNow)
CCoeControl::SetFocusing(TBool)
CCoeControl::SetFontProviderL(const CCoeFontProvider &)
CCoeControl::SetGc(CWindowGc *)const
CCoeControl::SetGloballyCapturing(TBool)
CCoeControl::SetHitTest(const MCoeControlHitTest *)
CCoeControl::SetLayoutManagerL(MCoeLayoutManager *)
CCoeControl::SetMaximumWidth(TInt)
CCoeControl::SetMopParent(MObjectProvider *)
CCoeControl::SetNeighbor(CCoeControl *)
CCoeControl::SetNonFocusing()
CCoeControl::SetObserver(MCoeControlObserver *)
CCoeControl::SetParent(CCoeControl *)
CCoeControl::SetPointerCapture(TBool)
CCoeControl::SetPosition(const TPoint &)
CCoeControl::SetSize(const TSize &)
CCoeControl::SetSizeWithoutNotification(const TSize &)
CCoeControl::SetTextBaselineSpacing(TInt)
CCoeControl::SetUniqueHandle(TInt)
CCoeControl::SetZoomFactorL(TInt,TZoomType)
CCoeControl::Size()const
CCoeControl::SystemGc()const
CCoeControl::TextBaselineOffset(const TSize &)const
CCoeControl::TextDrawer(TInt)const
CCoeControl::UniqueHandle()const
CCoeControl::Window()const
CCoeControl::WriteInternalStateNowL(RWriteStream &)const
CCoeControl::ZoomWithType()const
CCoeControl::operator=(const CCoeControl &)
CCoeControl::~CCoeControl()
CEikBorderedControl::Border()const
CEikBorderedControl::CEikBorderedControl()
CEikBorderedControl::CEikBorderedControl(const TGulBorder &)
CEikBorderedControl::HasBorder()const
CEikBorderedControl::SetAdjacent(TInt)
CEikBorderedControl::SetBorder(TGulBorder::TBorderType)
CEikBorderedControl::SetBorder(TInt)
CEikBorderedControl::WriteInternalStateL(RWriteStream &)const
CEikListBox::ActivateL()
CEikListBox::AddItemChangeObserverL(MListBoxItemChangeObserver *)
CEikListBox::AddSelectionObserverL(MListBoxSelectionObserver *)
CEikListBox::BackColor()const
CEikListBox::BackgroundDrawingSuppressed()const
CEikListBox::BottomItemIndex()const
CEikListBox::Buffer()const
CEikListBox::CEikListBox()
CEikListBox::CalcHeightBasedOnNumOfItems(TInt)const
CEikListBox::CalcSizeInPixels(TInt,TInt)const
CEikListBox::CalcWidthBasedOnNumOfChars(TInt)const
CEikListBox::CalcWidthBasedOnRequiredItemWidth(TInt)const
CEikListBox::CalculatePopoutRect(TInt,TInt,TRect &,TInt)
CEikListBox::ChangeSelectionMode(TBool)
CEikListBox::CheckCreateBufferL()
CEikListBox::CheckCreateExtension()
CEikListBox::CheckCreateExtensionL()
CEikListBox::ClearMargins()const
CEikListBox::ClearMatchBuffer()const
CEikListBox::ClearSelection()
CEikListBox::ComponentControl(TInt)const
CEikListBox::ConstructL(MListBoxModel *,CListItemDrawer *,const CCoeControl *,TGulBorder,TInt)
CEikListBox::ConstructL(MListBoxModel *,CListItemDrawer *,const CCoeControl *,TInt)
CEikListBox::CreateMatchBufferL()
CEikListBox::CreateScrollBarFrameL(TBool)
CEikListBox::CreateScrollBarFrameL(TBool,TBool)
CEikListBox::CreateScrollBarFrameL(TBool,TBool,TBool)
CEikListBox::CreateScrollBarFrameLayout(TEikScrollBarFrameLayout &)const
CEikListBox::CreateViewL()
CEikListBox::CurrentItemIndex()const
CEikListBox::DisableItemSpecificMenu()
CEikListBox::DisableScrolling(TBool)
CEikListBox::DisableSingleClick(TBool)
CEikListBox::DoShiftMSKMarkingL()
CEikListBox::Draw(const TRect &)const
CEikListBox::DrawItem(TInt)const
CEikListBox::DrawMatcherCursor()const
CEikListBox::EditItemL(TInt)
CEikListBox::EnableMSKObserver(TBool)
CEikListBox::EventModifiers()
CEikListBox::FireItemChange()
CEikListBox::GetColorUseListL(CArrayFix< TCoeColorUse > &)const
CEikListBox::HandleItemAdditionL(CArrayFix< TInt > &)
CEikListBox::HandleItemRemovalL(CArrayFix< TInt > &)
CEikListBox::HandleLeftArrowKeyL(CListBoxView::TSelectionMode)
CEikListBox::HandlePhysicsScrollEventL(TInt)
CEikListBox::HandleRightArrowKeyL(CListBoxView::TSelectionMode)
CEikListBox::HighlightRect()const
CEikListBox::HorizontalMargin()const
CEikListBox::InformMSKButtonGroupDeletion()
CEikListBox::InputCapabilities()const
CEikListBox::InterItemGap()
CEikListBox::IsHighlightEnabled()
CEikListBox::IsMatchBuffer()const
CEikListBox::IsMultiselection()
CEikListBox::ItemEditor()
CEikListBox::ItemExists(TInt)const
CEikListBox::ItemHeight()const
CEikListBox::ItemsInSingleLine()const
CEikListBox::LastCharMatched()const
CEikListBox::ListBoxMargins()const
CEikListBox::MakeVisible(TBool)
CEikListBox::MatchBuffer()const
CEikListBox::MatchTypedCharL(TUint)
CEikListBox::MinimumSize()
CEikListBox::ReasonForFocusLostL()
CEikListBox::RedrawItem(TInt)
CEikListBox::RemoveItemChangeObserver(MListBoxItemChangeObserver *)
CEikListBox::RemoveSelectionObserver(MListBoxSelectionObserver *)
CEikListBox::ReportListBoxEventL(MEikListBoxObserver::TListBoxEvent)
CEikListBox::Reset()
CEikListBox::ResetItemEditor()
CEikListBox::RestoreCommonListBoxPropertiesL(TResourceReader &)
CEikListBox::ScrollBarFrame()
CEikListBox::ScrollToMakeItemVisible(TInt)const
CEikListBox::ScrollingDisabled()
CEikListBox::SelectionIndexes()const
CEikListBox::SetContainerWindowL(const CCoeControl &)
CEikListBox::SetCurrentItemIndex(TInt)const
CEikListBox::SetCurrentItemIndexAndDraw(TInt)const
CEikListBox::SetDimmed(TBool)
CEikListBox::SetHorizontalMargin(TInt)
CEikListBox::SetItemEditor(MEikListBoxEditor *)
CEikListBox::SetItemsInSingleLine(TInt)
CEikListBox::SetLaunchingButton(CEikButtonBase *)
CEikListBox::SetListBoxObserver(MEikListBoxObserver *)
CEikListBox::SetMarkingMode(TBool)
CEikListBox::SetMarkingModeObserver(MAknMarkingModeObserver *)
CEikListBox::SetPointerEventFilterDisabledL(const CArrayFix< TInt > &)
CEikListBox::SetReasonForFocusLostL(TReasonForFocusLost)
CEikListBox::SetScrollBarFrame(CEikScrollBarFrame *,TScrollBarOwnerShip)
CEikListBox::SetSelectionIndexesL(CListBoxView::CSelectionIndexArray *)
CEikListBox::SetShortcutValueFromPrevList(TInt)
CEikListBox::SetVerticalMargin(TInt)
CEikListBox::SetViewRectFromClientRect(const TRect &)
CEikListBox::SetViewRectHeightAdjustment(TInt)
CEikListBox::ShortcutValueForNextList()
CEikListBox::SimulateArrowKeyEventL(TKeyCode)
CEikListBox::StopEditingL(TBool)
CEikListBox::SuspendEffects(TBool)
CEikListBox::TopItemIndex()const
CEikListBox::UndoLastChar()
CEikListBox::UpdateCurrentItem(TInt)const
CEikListBox::UpdateItemDrawerColors()
CEikListBox::UpdateMarkUnmarkMSKL()const
CEikListBox::UpdateViewColors()
CEikListBox::VerticalInterItemGap()const
CEikListBox::VerticalMargin()const
CEikListBox::View()const
CEikListBox::ViewRectHeightAdjustment()const
CEikListBox::~CEikListBox()
Private Member Enumerations
enumTIndicatorEvent { EMove, EChangeNumOfItems, EResize }
Inherited Enumerations
CCoeControl:TZoomType
CEikListBox:@131
CEikListBox:TFlags
CEikListBox:TReasonForFocusLost
CEikListBox:TScrollBarOwnerShip
Private Attributes
__DECLARE_TEST
TBool iCurrentIsValid
CAknGridExtension *iExtension
TBitFlags iHorizontalFlags
TInt iMinColWidth
TInt iNumOfColsInView
TInt iNumOfRowsInView
TBitFlags iOrientationFlags
TSize iSpaceBetweenItems
TInt iSpare
TBitFlags iVerticalFlags
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize
CEikBorderedControl::iBorder
CEikListBox::iItemDrawer
CEikListBox::iItemHeight
CEikListBox::iLaunchingButton
CEikListBox::iListBoxFlags
CEikListBox::iListBoxObserver
CEikListBox::iModel
CEikListBox::iRequiredHeightInNumOfItems
CEikListBox::iSBFrame
CEikListBox::iSBFrameOwned
CEikListBox::iView

Constructor & Destructor Documentation

CAknGrid()

IMPORT_CCAknGrid()

Base class default constructor.

~CAknGrid()

IMPORT_C~CAknGrid()[virtual]

Destructor.

Member Functions Documentation

AdjustRectHeightToWholeNumberOfItems(TRect &)

IMPORT_C TIntAdjustRectHeightToWholeNumberOfItems(TRect &aRect)const [protected, virtual]

This function rounds down the height of the rectangle (if necessary) so that only a whole number of items can be displayed inside the list box.

Parameters

TRect & aRectRectangle parameter.

AdjustTopItemIndex()

IMPORT_C voidAdjustTopItemIndex()const [protected, virtual]

This function called by various functions of this class to ensure that the top item index is always a sane value. The implementation in CEikListBox tries to ensure the minimum amount of white space at the bottom of the list box. Note that this function does not affect the current item index.

CalcGridSizeL()

IMPORT_C voidCalcGridSizeL()[protected, virtual]

This protected function used by functions to check/alter the dimensions of the grid as data items are added or removed or the size of the items are altered. It also assumes that SetLayoutL has been called. This will not leave if scrollbars have both been turned off. If a leave occurs the framework generates a Symbian Leave code.

ColumnWidth()

IMPORT_C TIntColumnWidth()const

This function gives a width of the column.

ConstructFromResourceL(TResourceReader &)

IMPORT_C voidConstructFromResourceL(TResourceReader &aReader)[virtual]

The ConstructFromResourceL function needs to be called in case resource data is used. Usually, the CAknGridM class object is instantiated automatically during the construction phase of the CAknGrid object. If an application programmer provides their own grid model class, the application programmer must instantiate their own grid model class object and give it to the CAknGrid object using the SetModel function before calling the ConstructL/ConstructFromResourceL function. If a leave occurs the framework generates a Symbian Leave code.

Parameters

TResourceReader & aReaderConstruct controls from resource file.

ConstructL(const CCoeControl *, TInt)

IMPORT_C voidConstructL(const CCoeControl *aParent,
TIntaFlags = 0
)[virtual]

This is Symbian default constructor. The ConstructL function needs to be called in case resource data is not used. If a leave occurs the framework generates a Symbian Leave code.

Parameters

const CCoeControl * aParent
TInt aFlags = 0Parameter for CEikListBox constructor. If the parameter is missing default value is 0.

CountComponentControls()

IMPORT_C TIntCountComponentControls()const [protected, virtual]

Gets a count of the component controls of this grid.

CreateItemDrawerL()

IMPORT_C voidCreateItemDrawerL()[protected, virtual]

Creates a formatted list item drawer. If a leave occurs the framework generates a Symbian Leave code.

CurrentDataIndex()

IMPORT_C TIntCurrentDataIndex()const

CurrentDataIndex retrieves the index of the selection. In grids, you should use this method instead of CEikListBox::CurrentItemIndex(), when you are manipulating data stored in the grid's ItemTextArray. While CurrentItemIndex() returns the same value as CurrentItemIndex() on most phones, there will be difference in some language variants where text reading/writing direction is different from left-to-right.

DoSetLayoutL(TInt, TInt, TInt, TInt, TInt, TSize, TInt, TInt)

voidDoSetLayoutL(TIntaOrientation,
TIntaHorizontal,
TIntaVertical,
TIntaNumOfItemsInPrimaryOrient,
TIntaNumOfItemsInSecondaryOrient,
TSizeaSizeOfItems,
TIntaWidthOfSpaceBetweenItems = 0,
TIntaHeightOfSpaceBetweenItems = 0
)[private]

This function sets the size and initial layout of items. If a leave occurs the framework generates a Symbian Leave code.

Parameters

TInt aOrientation
TInt aHorizontal
TInt aVertical
TInt aNumOfItemsInPrimaryOrient
TInt aNumOfItemsInSecondaryOrient
TSize aSizeOfItems
TInt aWidthOfSpaceBetweenItems = 0
TInt aHeightOfSpaceBetweenItems = 0

EmptyGridText()

const TDesC *EmptyGridText()const [inline]

This function sets the empty grid text. Return text currently in the empty grid text

ExtensionInterface(TUid)

IMPORT_C void *ExtensionInterface(TUidaInterface)[private, virtual]

Parameters

TUid aInterface

FocusChanged(TDrawNow)

IMPORT_C voidFocusChanged(TDrawNowaDrawNow)[virtual]
Indicates whether the control should be redrawn now. If ENoDrawNow, the function has no immediately effect. EDrawNow redraw control immediately.
Since
Series S60 3.0.

Parameters

TDrawNow aDrawNow

GridModel()

CAknGridM *GridModel()const [private, inline]

Return Model

GridView()

CAknGridView *GridView()const [private, inline]

Return View

HandleDragEventL(TPoint)

IMPORT_C voidHandleDragEventL(TPointaPointerPos)[protected, virtual]

This function handles drag events. If a leave occurs the framework generates a Symbian Leave code.

Parameters

TPoint aPointerPosThe position of the TPointerEvent for which this handler is invoked.

HandleItemAdditionL()

IMPORT_C voidHandleItemAdditionL()

This function should be called after one or more items have been added to the grid. If a leave occurs the framework generates a Symbian Leave code.

HandleItemRemovalL()

IMPORT_C voidHandleItemRemovalL()

This function should be called after one or more items have been removed from the grid. If a leave occurs the framework generates a Symbian Leave code.

HandlePointerEventL(const TPointerEvent &)

IMPORT_C voidHandlePointerEventL(const TPointerEvent &aPointerEvent)[virtual]

Handling of pointer event within the CEikListBox. Used for e.g. selecting an item from the list box.

Parameters

const TPointerEvent & aPointerEventDetails of the pointer event that is being handled.

HandleResourceChange(TInt)

IMPORT_C voidHandleResourceChange(TIntaType)[virtual]
This function handles resource changes.
Since
Series S60 2.6.

Parameters

TInt aTypeMessage type.

HandleScrollEventL(CEikScrollBar *, TEikScrollEvent)

IMPORT_C voidHandleScrollEventL(CEikScrollBar *aScrollBar,
TEikScrollEventaEventType
)[protected, virtual]

From MEikScrollBarObserver

This function handles scroll events caused by scroll bar. It updates grid's view by event and new thumb position.

Parameters

CEikScrollBar * aScrollBarpointer to scroll bar sent this event
TEikScrollEvent aEventTypetype of event

HandleViewRectSizeChangeL()

IMPORT_C voidHandleViewRectSizeChangeL()[virtual]

This function is called when the grid's items, item's data and scroll bars has been changed. This implementation ensures that the current item is visible after resize. If a leave occurs the framework generates a Symbian Leave code.

HorizScrollGranularityInPixels()

IMPORT_C TIntHorizScrollGranularityInPixels()const [protected, virtual]

This function gets the granularity for horizontal scrolls. The granularity is the minimum size of a horizontal move of the client area.

HorizontalNudgeValue()

IMPORT_C TIntHorizontalNudgeValue()const [protected, virtual]

This function scroll horizontal by one column when the left/right scroll arrows (i.e. the nudge buttons) are tapped.

IndexOfPosition(TPoint)

IMPORT_C TIntIndexOfPosition(TPointaGridPosition)const

The grid position function. Gives the data index by using grid's position. The position must be given from the top left corner. If the function returns -1 the item's position is invalid.

Parameters

TPoint aGridPositionThe data item's co-ordinate values.

ItemDrawer()

IMPORT_C CFormattedCellListBoxItemDrawer *ItemDrawer()const

Item drawer. Gets the pointer to the grid class.

MListBoxModel_Reserved()

IMPORT_C TAny *MListBoxModel_Reserved()[private, virtual]

MakeViewClassInstanceL()

IMPORT_C CListBoxView *MakeViewClassInstanceL()[virtual]

This function creates a new object and returns pointer to it. If the leave occurs the framework generates a Symbian Leave code.

Model()

IMPORT_C CTextListBoxModel *Model()const

This function creates a new object and returns pointer to CTextListBoxModel class.

MopSupplyObject(TTypeUid)

IMPORT_C TTypeUid::PtrMopSupplyObject(TTypeUidaId)[protected, virtual]

From MObjectProvider.

Retrieves an object of the same type as that encapsulated in aId. This function is used to allow controls to ask their owners for access to other objects that they own.

Parameters

TTypeUid aIdAn encapsulated object type ID.

MoveToNextOrPreviousItemL(TPoint)

IMPORT_C voidMoveToNextOrPreviousItemL(TPointaPoint)[protected]

Moves to the next or previous item on the grid. If a leave occurs the framework generates a Symbian Leave code.

Parameters

TPoint aPointCo-ordinate object parameter.

OfferKeyEventL(const TKeyEvent &, TEventCode)

IMPORT_C TKeyResponseOfferKeyEventL(const TKeyEvent &aKeyEvent,
TEventCodeaType
)[virtual]

This function is from CEikAppUi, handles key events. If a leave occurs the framework generates a Symbian Leave code.

Parameters

const TKeyEvent & aKeyEventEvent to handled.
TEventCode aTypeof the key event.

PositionAtIndex(TInt)

IMPORT_C TPointPositionAtIndex(TIntaItemIndex)const

The grid position function. Gives the data item's co-ordinate values by using item's index value.

Parameters

TInt aItemIndexThe data item's index value.

RestoreClientRectFromViewRect(TRect &)

IMPORT_C voidRestoreClientRectFromViewRect(TRect &aClientRect)const [protected, virtual]

This function calculates the client area. This method is called by various functions of this class to recalculate the extent of the client area from iViewRect. This implementation takes into account any rounding of the viewing rectangle made to fit a whole number of items.

Parameters

TRect & aClientRectOn return contains a size for the client area in pixels.

SetColumnWidth(TInt)

IMPORT_C voidSetColumnWidth(TIntaColumnWidth)

This function sets the column width of the grid. Column width cannot be set in a horizontal grid since the number of columns in the grid is defined by the initialising call to SetLayoutL. The column width cannot be larger than the width of the viewing rectangle.

Parameters

TInt aColumnWidthA parameter defines a width of the column.

SetCurrentDataIndex(TInt)

IMPORT_C voidSetCurrentDataIndex(TIntaDataIndex)

Moves the cursor to the required grid data index.

Parameters

TInt aDataIndexData index value.

SetEmptyGridTextL(const TDesC &)

IMPORT_C voidSetEmptyGridTextL(const TDesC &aText)
Function sets a grid text to the data item. If a leave occurs the framework generates a Symbian Leave code.
Since
Series S60 3.0

Parameters

const TDesC & aTextDescriptor parameter.

SetItemHeightL(TInt)

IMPORT_C voidSetItemHeightL(TIntaHeight)[virtual]

This function sets the row height of the grid. Row height cannot be set in a vertical grid since the number of rows in the grid is defined by the initialising call to SetLayoutL. The row height cannot be larger than the height of the viewing rectangle. If a leave occurs the framework generates a Symbian Leave code.

Parameters

TInt aHeightThe height of the item's rows.

SetLayoutFromResourceL(TResourceReader &)

IMPORT_C voidSetLayoutFromResourceL(TResourceReader &aReader)

Sets the layout from a resource. Layout includes orientation (either vertical or horizontal), horizontal and vertical direction of numbering, the number of items in the primary and secondary orientation, and the primary and secondary scrolling types. If a leave occurs the framework generates a Symbian Leave code.

Parameters

TResourceReader & aReaderConstructs controls from a resource file.

SetLayoutL(TBool, TBool, TBool, TInt, TInt, TSize, TInt, TInt)

IMPORT_C voidSetLayoutL(TBoolaVerticalOrientation,
TBoolaLeftToRight,
TBoolaTopToBottom,
TIntaNumOfItemsInPrimaryOrient,
TIntaNumOfItemsInSecondaryOrient,
TSizeaSizeOfItems,
TIntaWidthOfSpaceBetweenItems = 0,
TIntaHeightOfSpaceBetweenItems = 0
)

Sets the orientation of the grid, either vertical or horizontal, the ordering of the data and the size of the primary dimension of the grid. The value for the parameter aNumOfItemsInPrimaryOrient must be greater than zero since this determines the number of items (be it rows or columns) in the primary orientation of the grid. If a leave occurs the framework generates a Symbian Leave code.

Parameters

TBool aVerticalOrientationItems vertical orientation.
TBool aLeftToRightETrue left to right.
TBool aTopToBottomETrue top to bottom.
TInt aNumOfItemsInPrimaryOrientNumber of items in primary orient.
TInt aNumOfItemsInSecondaryOrientNumber of items in Secondary orient.
TSize aSizeOfItemsItem size.
TInt aWidthOfSpaceBetweenItems = 0=0 Width of space between items.
TInt aHeightOfSpaceBetweenItems = 0=0 Height of space between items.

SetModel(CAknGridM *)

IMPORT_C voidSetModel(CAknGridM *aModel)

This function gives CAknGridM class pointer to CAknGrid class. Usually, the CAknGridM class object is instantiated automatically during the construction phase of the CAknGrid object. If an application programmer provides their own grid model class, the application programmer must instantiate their own grid model class object and give it to the CAknGrid object using the SetModel function before calling the ConstructL/ConstructFromResourceL function.

Parameters

CAknGridM * aModelPointer to CAknGridM class.

SetPrimaryScrollingType(CAknGridView::TScrollingType)

IMPORT_C voidSetPrimaryScrollingType(CAknGridView::TScrollingTypeaScrollingType)

Sets the movement of the cursor with respect to scrolling when the end item in the current row or column, whichever is the primary orientation of the data items, is encountered. The movement maybe either stop, loop back to same row or column or move onto the next logical data item in the sequence.

Parameters

CAknGridView::TScrollingType aScrollingTypeItems scrolling type enum definition.

SetRect(const TRect &)

IMPORT_C voidSetRect(const TRect &aRect)

This function handles viewable rectangle.

Parameters

const TRect & aRectRectangle parameter.

SetSecondaryScrollingType(CAknGridView::TScrollingType)

IMPORT_C voidSetSecondaryScrollingType(CAknGridView::TScrollingTypeaSecondaryScrolling)

Sets the movement of the cursor with respect to scrolling when the end item in the secondary dimension of the grid is encountered. The movement maybe either stop, loop back back to same row or column or move onto the next logical data item in the sequence.

Parameters

CAknGridView::TScrollingType aSecondaryScrollingSecondary scrolling type enum definition.

SetStartPositionL(TPoint)

IMPORT_C voidSetStartPositionL(TPointaGridStartPosition)

Sets the starting position of the data within the grid. A blank page cannot be accessed (since cannot move into empty cells) so a totally blank page is the same as if the page never existed since the user cannot scroll into it. For this reason it is suggested that the start position be no more than one page into the grid. If a leave occurs the framework generates a Symbian Leave code.

Parameters

TPoint aGridStartPositionParameter manipulate the grid's starting position.

SetTopItemIndex(TInt)

IMPORT_C voidSetTopItemIndex(TIntaItemIndex)const [virtual]

This function sets top item index.

Parameters

TInt aItemIndexItem index value.

SizeChanged()

IMPORT_C voidSizeChanged()[virtual]

This function handles size changes. This routine assumes that SetLayoutL has been called to set up the grid.

UpdateScrollBarThumbs()

IMPORT_C voidUpdateScrollBarThumbs()const [protected, virtual]

Updates the position of grids scroll bars thumbs to reflect the vertical position of selector.

UpdateScrollBarsL()

IMPORT_C voidUpdateScrollBarsL()[virtual]

This function updates the scrollbars, including item position. This function is called when the size of the scrollbars or data changes. If the leave occurs the framework generates a Symbian Leave code.

Member Enumerations Documentation

Enum TIndicatorEvent

Enumerators

EMove
EChangeNumOfItems
EResize

Member Data Documentation

__DECLARE_TEST

__DECLARE_TEST[private]

TBool iCurrentIsValid

TBool iCurrentIsValid[private]

CAknGridExtension * iExtension

CAknGridExtension *iExtension[private]

TBitFlags iHorizontalFlags

TBitFlags iHorizontalFlags[private]

TInt iMinColWidth

TInt iMinColWidth[private]

TInt iNumOfColsInView

TInt iNumOfColsInView[private]

TInt iNumOfRowsInView

TInt iNumOfRowsInView[private]

TBitFlags iOrientationFlags

TBitFlags iOrientationFlags[private]

TSize iSpaceBetweenItems

TSize iSpaceBetweenItems[private]

TInt iSpare

TInt iSpare[private]

TBitFlags iVerticalFlags

TBitFlags iVerticalFlags[private]