#include <mw/AknGrid.h>
class CAknGrid : public CEikListBox |
Protected Member Functions | |
---|---|
virtual IMPORT_C TInt | AdjustRectHeightToWholeNumberOfItems(TRect &) |
virtual IMPORT_C void | AdjustTopItemIndex() |
virtual IMPORT_C void | CalcGridSizeL() |
virtual IMPORT_C TInt | CountComponentControls() |
virtual IMPORT_C void | CreateItemDrawerL() |
virtual IMPORT_C void | HandleDragEventL(TPoint) |
virtual IMPORT_C void | HandleScrollEventL(CEikScrollBar *, TEikScrollEvent) |
virtual IMPORT_C TInt | HorizScrollGranularityInPixels() |
virtual IMPORT_C TInt | HorizontalNudgeValue() |
virtual IMPORT_C TTypeUid::Ptr | MopSupplyObject(TTypeUid) |
IMPORT_C void | MoveToNextOrPreviousItemL(TPoint) |
virtual IMPORT_C void | RestoreClientRectFromViewRect(TRect &) |
virtual IMPORT_C void | UpdateScrollBarThumbs() |
Inherited Enumerations | |
---|---|
CCoeControl:TZoomType | |
CEikListBox:@131 | |
CEikListBox:TFlags | |
CEikListBox:TReasonForFocusLost | |
CEikListBox:TScrollBarOwnerShip |
Application grid handling class from Avkon. Provides support for ordering application grids items.
IMPORT_C | CAknGrid | ( | ) |
Base class default constructor.
Returns: A pointer to a new CAknGrid object.
Reimplemented from CEikListBox::AdjustRectHeightToWholeNumberOfItems(TRect &)const
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.
Parameter | Description |
---|---|
aRect | Rectangle parameter. |
IMPORT_C void | AdjustTopItemIndex | ( | ) | const [protected, virtual] |
Reimplemented from CEikListBox::AdjustTopItemIndex()const
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.
IMPORT_C void | CalcGridSizeL | ( | ) | [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.
IMPORT_C TInt | ColumnWidth | ( | ) | const |
This function gives a width of the column.
Returns: A width of the column.
IMPORT_C void | ConstructFromResourceL | ( | TResourceReader & | aReader | ) | [virtual] |
Reimplemented from CCoeControl::ConstructFromResourceL(TResourceReader &)
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.
Parameter | Description |
---|---|
aReader | Construct controls from resource file. |
IMPORT_C void | ConstructL | ( | const CCoeControl * | aParent, |
TInt | aFlags = 0 | |||
) | [virtual] |
Reimplemented from CEikListBox::ConstructL(const CCoeControl *,TInt)
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.
Parameter | Description |
---|---|
aFlags | Parameter for CEikListBox constructor. If the parameter is missing default value is 0. |
IMPORT_C TInt | CountComponentControls | ( | ) | const [protected, virtual] |
Reimplemented from CEikListBox::CountComponentControls()const
Gets a count of the component controls of this grid.
Returns: The number of component controls.
IMPORT_C void | CreateItemDrawerL | ( | ) | [protected, virtual] |
Creates a formatted list item drawer. If a leave occurs the framework generates a Symbian Leave code.
IMPORT_C TInt | CurrentDataIndex | ( | ) | 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.
Returns: A current position of highlight.
const TDesC * | EmptyGridText | ( | ) | const [inline] |
This function sets the empty grid text. Return text currently in the empty grid text
Returns: A pointer to the grid text descriptor.
IMPORT_C void | FocusChanged | ( | TDrawNow | aDrawNow | ) | [virtual] |
Reimplemented from CEikListBox::FocusChanged(TDrawNow)
IMPORT_C void | HandleDragEventL | ( | TPoint | aPointerPos | ) | [protected, virtual] |
Reimplemented from CEikListBox::HandleDragEventL(TPoint)
This function handles drag events. If a leave occurs the framework generates a Symbian Leave code.
Parameter | Description |
---|---|
aPointerPos | The position of the TPointerEvent for which this handler is invoked. |
IMPORT_C void | HandleItemAdditionL | ( | ) |
Reimplemented from CEikListBox::HandleItemAdditionL()
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.
IMPORT_C void | HandleItemRemovalL | ( | ) |
Reimplemented from CEikListBox::HandleItemRemovalL()
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.
IMPORT_C void | HandlePointerEventL | ( | const TPointerEvent & | aPointerEvent | ) | [virtual] |
Reimplemented from CEikListBox::HandlePointerEventL(const TPointerEvent &)
Handling of pointer event within the CEikListBox. Used for e.g. selecting an item from the list box.
Parameter | Description |
---|---|
aPointerEvent | Details of the pointer event that is being handled. |
IMPORT_C void | HandleResourceChange | ( | TInt | aType | ) | [virtual] |
Reimplemented from CEikListBox::HandleResourceChange(TInt)
Parameter | Description |
---|---|
aType | Message type. |
IMPORT_C void | HandleScrollEventL | ( | CEikScrollBar * | aScrollBar, |
TEikScrollEvent | aEventType | |||
) | [protected, virtual] |
Reimplemented from CEikListBox::HandleScrollEventL(CEikScrollBar *,TEikScrollEvent)
This function handles scroll events caused by scroll bar. It updates grid's view by event and new thumb position.
Parameter | Description |
---|---|
aScrollBar | pointer to scroll bar sent this event |
aEventType | type of event |
IMPORT_C void | HandleViewRectSizeChangeL | ( | ) | [virtual] |
Reimplemented from CEikListBox::HandleViewRectSizeChangeL()
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.
IMPORT_C TInt | HorizScrollGranularityInPixels | ( | ) | const [protected, virtual] |
Reimplemented from CEikListBox::HorizScrollGranularityInPixels()const
This function gets the granularity for horizontal scrolls. The granularity is the minimum size of a horizontal move of the client area.
Returns: A grain size for horizontal scrolling in pixels.
IMPORT_C TInt | HorizontalNudgeValue | ( | ) | const [protected, virtual] |
Reimplemented from CEikListBox::HorizontalNudgeValue()const
This function scroll horizontal by one column when the left/right scroll arrows (i.e. the nudge buttons) are tapped.
Returns: A nudge value when the buttons are pressed.
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.
Parameter | Description |
---|---|
aGridPosition | The data item's co-ordinate values. |
Returns: Activated item's index value.
IMPORT_C CFormattedCellListBoxItemDrawer * | ItemDrawer | ( | ) | const |
Item drawer. Gets the pointer to the grid class.
Returns: A pointer to CFormattedCellListBoxItemDrawer object.
IMPORT_C CListBoxView * | MakeViewClassInstanceL | ( | ) | [virtual] |
Reimplemented from CEikListBox::MakeViewClassInstanceL()
This function creates a new object and returns pointer to it. If the leave occurs the framework generates a Symbian Leave code.
Returns: A pointer to CListBoxView class.
IMPORT_C CTextListBoxModel * | Model | ( | ) | const |
Reimplemented from CEikListBox::Model()const
This function creates a new object and returns pointer to CTextListBoxModel class.
Returns: A pointer to CTextListBoxModel object.
IMPORT_C TTypeUid::Ptr | MopSupplyObject | ( | TTypeUid | aId | ) | [protected, virtual] |
Reimplemented from CCoeControl::MopSupplyObject(TTypeUid)
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.
Parameter | Description |
---|---|
aId | An encapsulated object type ID. |
Returns: Encapsulates the pointer to the object provided. Note that the encapsulated pointer may be NULL.
IMPORT_C void | MoveToNextOrPreviousItemL | ( | TPoint | aPoint | ) | [protected] |
Moves to the next or previous item on the grid. If a leave occurs the framework generates a Symbian Leave code.
Parameter | Description |
---|---|
aPoint | Co-ordinate object parameter. |
IMPORT_C TKeyResponse | OfferKeyEventL | ( | const TKeyEvent & | aKeyEvent, |
TEventCode | aType | |||
) | [virtual] |
Reimplemented from CEikListBox::OfferKeyEventL(const TKeyEvent &,TEventCode)
This function is from CEikAppUi, handles key events. If a leave occurs the framework generates a Symbian Leave code.
Parameter | Description |
---|---|
aKeyEvent | Event to handled. |
aType | of the key event. |
Returns: Response code ( EKeyWasConsumed, EKeyWasNotConsumed )
IMPORT_C void | RestoreClientRectFromViewRect | ( | TRect & | aClientRect | ) | const [protected, virtual] |
Reimplemented from CEikListBox::RestoreClientRectFromViewRect(TRect &)const
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.
Parameter | Description |
---|---|
aClientRect | On return contains a size for the client area in pixels. |
IMPORT_C void | SetColumnWidth | ( | TInt | aColumnWidth | ) |
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.
Parameter | Description |
---|---|
aColumnWidth | A parameter defines a width of the column. |
IMPORT_C void | SetCurrentDataIndex | ( | TInt | aDataIndex | ) |
Moves the cursor to the required grid data index.
Parameter | Description |
---|---|
aDataIndex | Data index value. |
IMPORT_C void | SetEmptyGridTextL | ( | const TDesC & | aText | ) |
Parameter | Description |
---|---|
aText | Descriptor parameter. |
IMPORT_C void | SetItemHeightL | ( | TInt | aHeight | ) | [virtual] |
Reimplemented from CEikListBox::SetItemHeightL(TInt)
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.
Parameter | Description |
---|---|
aHeight | The height of the item's rows. |
IMPORT_C void | SetLayoutFromResourceL | ( | 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.
Parameter | Description |
---|---|
aReader | Constructs controls from a resource file. |
IMPORT_C void | SetLayoutL | ( | TBool | aVerticalOrientation, |
TBool | aLeftToRight, | |||
TBool | aTopToBottom, | |||
TInt | aNumOfItemsInPrimaryOrient, | |||
TInt | aNumOfItemsInSecondaryOrient, | |||
TSize | aSizeOfItems, | |||
TInt | aWidthOfSpaceBetweenItems = 0, | |||
TInt | aHeightOfSpaceBetweenItems = 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.
Parameter | Description |
---|---|
aVerticalOrientation | Items vertical orientation. |
aLeftToRight | ETrue left to right. |
aTopToBottom | ETrue top to bottom. |
aNumOfItemsInPrimaryOrient | Number of items in primary orient. |
aNumOfItemsInSecondaryOrient | Number of items in Secondary orient. |
aSizeOfItems | Item size. |
aWidthOfSpaceBetweenItems | =0 Width of space between items. |
aHeightOfSpaceBetweenItems | =0 Height of space between items. |
IMPORT_C void | SetModel | ( | 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.
Parameter | Description |
---|---|
aModel | Pointer to CAknGridM class. |
IMPORT_C void | SetPrimaryScrollingType | ( | CAknGridView::TScrollingType | aScrollingType | ) |
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.
Parameter | Description |
---|---|
aScrollingType | Items scrolling type enum definition. |
IMPORT_C void | SetRect | ( | const TRect & | aRect | ) |
Reimplemented from CCoeControl::SetRect(const TRect &)
This function handles viewable rectangle.
Parameter | Description |
---|---|
aRect | Rectangle parameter. |
IMPORT_C void | SetSecondaryScrollingType | ( | CAknGridView::TScrollingType | aSecondaryScrolling | ) |
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.
Parameter | Description |
---|---|
aSecondaryScrolling | Secondary scrolling type enum definition. |
IMPORT_C void | SetStartPositionL | ( | TPoint | aGridStartPosition | ) |
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.
Parameter | Description |
---|---|
aGridStartPosition | Parameter manipulate the grid's starting position. |
IMPORT_C void | SetTopItemIndex | ( | TInt | aItemIndex | ) | const [virtual] |
Reimplemented from CEikListBox::SetTopItemIndex(TInt)const
This function sets top item index.
Parameter | Description |
---|---|
aItemIndex | Item index value. |
IMPORT_C void | SizeChanged | ( | ) | [virtual] |
Reimplemented from CEikListBox::SizeChanged()
This function handles size changes. This routine assumes that SetLayoutL has been called to set up the grid.
IMPORT_C void | UpdateScrollBarThumbs | ( | ) | const [protected, virtual] |
Reimplemented from CEikListBox::UpdateScrollBarThumbs()const
Updates the position of grids scroll bars thumbs to reflect the vertical position of selector.
IMPORT_C void | UpdateScrollBarsL | ( | ) | [virtual] |
Reimplemented from CEikListBox::UpdateScrollBarsL()
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.