Using Vertical Lists

This section walks you through four example applications ” SimpleList, DynamicList , MarkableList , and PopUpList ”that explore the list features described.

SimpleList just makes very simple use of lists, in order to show you the basics. Specifically, it demonstrates how to use resources to define a list and list items (including icons), and how to instantiate the list. It also shows how to ensure scrollbars will be displayed if your list requires them and how to handle list events.

DynamicList covers the use of dynamic list items. In particular, it describes how to define a dynamic list resource and to set and change items dynamically in a list.

MarkableList builds on the DynamicList example to demonstrate how to produce a list that can be marked (by a tick or some other icon). It shows you how to define the icons to be used for marking and how to determine which items have been marked . Finally, PopUpList explains how to create a pop-up list, set the title for a pop-up list, display a pop-up list and handle selections.

Basic Lists

The application SimpleList displays a list of saved games ”each has a small icon representing the number of players, and a single line of text representing the name , as shown in Figure 7-9. When you select an item from the list, the appropriate game opens. The code for playing the game was not implemented, but instead an empty method, PlaySelectedGame() , is used to indicate where the game-playing functionality should be.

Figure 7-9. SimpleList screen.


Defining a List Using Resources

The first step when creating a list is to define it a resource. This is achieved using a LISTBOX resource, as in SimpleList.rss :

 RESOURCE LISTBOX r_simplelist_saved_games_listbox    {    array_id = r_simplelist_saved_games_items;    flags = EAknListBoxSelectionList;    } 

The flags field determines the type of list ”in SimpleList , a selection list is chosen . The array_id field refers to an array of LBUF strings, which defines the items contained in the list. You will see how to define the actual strings representing each item in the list later in the SimpleList example.

Series 60 ignores the height and width flags in the LISTBOX resource. In addition, you should not change the version field.


A list can be made to loop (that is, when the top item is in focus and the up key is pressed, focus moves to the bottom item, and vice versa). To do this you need to add the flag EAknListBoxLoopScrolling to the flags list. For example:

 flags = EAknListBoxSelectionList  EAknListBoxLoopScrolling; 

Instantiating a List Using Resources

In the SimpleList example, the list is declared as member data in the header file of the container class, SimpleListContainer.h :

 CAknColumnListBox* iSavedGamesListBox; 

The list is instantiated in the ConstructL() method of the container by calling a private convenience method CreateListL() :

 void CSimpleListContainer::CreateListL()    {    iSavedGamesListBox = new (ELeave) CAknSingleGraphicStyleListBox();    iSavedGamesListBox->SetContainerWindowL(*this);    TResourceReader reader;    iEikonEnv->CreateResourceReaderLC(reader, R_SIMPLELIST_SAVED_GAMES_LISTBOX);    iSavedGamesListBox->ConstructFromResourceL(reader);    CleanupStack::PopAndDestroy(); // reader    } 

A list of appropriate type is constructed , in this case CAknSingleGraphicStyleListBox , and a list resource (in this example, R_SIMPLELIST_SAVED_GAMES_LISTBOX ) is passed in during the second phase of construction. The name of the list class indicates the fields contained in each item of the list. CAknSingleGraphicStyleListBox indicates a single line of text and a small graphic. (Table 7-2 provides a graphical representation of each of the available list types to help you decide which is appropriate.)

Adding Icons to a List

For the list defined in the SimpleList example ( CAknSingleGraphic StyleListBox ), an icon of size 13 by 13-pixels is displayed on the left-hand side. Two bitmaps are required for each icon ”the graphic itself and a mask for the icon, and these are packaged into an .mbm file. The .mbg file, generated when creating the .mbm file, should be included in the file implementing the container class, as this contains the enumerated indices for each bitmap stored within the .mbm file.

Lists will crop any icons supplied that are too large. If you do not know the correct size for an icon, supply an icon of any size to the list, run up the debugger, and look at the output window. It will say that the supplied icon is not of the expected size and give the size that it should be. For example, " Error: Icon size (50, 50) in listbox different from expected size (13, 13) ".


Table 7-2. List Item Definitions

Class

Example

CAknSingleStyleListBox

CAknSingleGraphicStyleListBox

CAknSingleNumberStyleListBox

CAknSingleHeadingStyleListBox

CAknSingleGraphicHeadingStyleListBox

CAknSingleLargeStyleListBox

CAknSingleNumberHeadingStyleListBox

CAknDoubleStyleListBox

CAknDoubleStyle2ListBox

CAknDoubleNumberStyleListBox

CAknDoubleTimeStyleListBox

CAknDoubleLargeStyleListBox


In SimpleList , the icons are added to the list in the SetupListIconsL() method, which is called by ConstructL() :

[View full width]
 
[View full width]
void CSimpleListContainer::SetupListIconsL() { HBufC* iconFileName; iconFileName = StringLoader::LoadLC(R_ICON_FILE_NAME); CArrayPtr<CGulIcon>* icons = new(ELeave) CAknIconArray(KNumberOfIcons); CleanupStack::PushL(icons); icons->AppendL(iEikonEnv->CreateIconL(*iconFileName, EMbmSimplelist1player, EMbmSimplelist1player_mask)); icons->AppendL(iEikonEnv->CreateIconL(*iconFileName, EMbmSimplelist2player, EMbmSimplelist2player_mask)); CleanupStack::Pop(icons); CleanupStack::PopAndDestroy(iconFileName); iSavedGamesListBox->ItemDrawer()->ColumnData()->SetIconArray(icons); }

Col A

Col B

Col C

Example Item String

Main text

"\tLabel"

13 by 13 icon

Main text

"1\tLabel"

Number

Main text

"1\tLabel"

Heading

Main text

"Head\tLabel"

13 by 13 icon

Heading

Main Text

"0\tHead\tLabel"

42 by 29 icon

Main text

"1\tLabel"

Number

Heading

Main text

"1\tHead\tLabel"

Main text

Secondary text

"\tMain Label\tSecondary Label"

Main text

Secondary text

"\tMain Label\tSecondary Label"

Number

Main text

Secondary text

"1\tMain Label\tSecondary Label"

Time

AM or PM

Main text

Secondary text

"13.00\tPM\tMain Label\t

Secondary Label"

42 by 36 icon

Main text

Secondary text

"1\tMain Label\tSecondary Label"


To create the icons, you need the name of the .mbm file containing the bitmaps for the icons. In SimpleList , this filename is loaded from the R_ICON_FILE_NAME resource, and equates to \system\apps\simplelist\simplelist.mbm .

The icons are stored in an array, and this is populated using CEikonEnv::CreateIconL() , which uses the name of the .mbm file, and two enumerated indices from the .mbg file (for the icon and its mask) to create each CGulIcon .

The list has a drawer object, which is responsible for drawing the list on screen. You can get a handle to this by using the ItemDrawer() method. The drawer contains a data object, which determines how each item will appear in the list. In the SimpleList example, a handle to the data object is acquired using the drawer's ColumnData() method.

The data object owns the icon array, so you should give it a pointer to the icon array you have just created and populated, using the SetIconArray() method. As you are passing ownership of the array, there is no need to handle its deletion.

SimpleList uses a list derived from CAknColumnListBox . This has a drawer object of type CEikColumnListDrawer , which uses the ColumnData() method to get a handle on its data object. If the list derived from CEikFormattedCellListBox , which has a CEikFormattedCellDrawer , then you would get a handle on its data object using the FormattedCellData() method.


Defining List Items Using Resources

When you define the list in a resource, the list items are defined as an array_id field in the list structure. This refers to an array of LBUF strings, one for each list item. In the SimpleList example, the list items are defined statically in the resource file. In a real-world application, list items are often dynamically inserted; this is covered in the Dynamic Lists subsection later in this chapter.

The string for a list item is separated into columns by the tab escape sequence (" \t "). Each string defined for the SimpleList example contains one field for the icon and one for the game name ”for example, #define SAVED_GAME1_TEXT "0\tSaved Game 1" . Here, the number " " denotes the icon to use; it specifies the position of an icon in the icon array (created previously in Adding Icons to a List ). The game name is defined as "Saved Game 1".

Lists have three virtual columns, referred to as A, B and C, as shown in Figure 7-10. Each field within a list item occupies one or more columns. Column A can contain a graphic or a number, column B a heading, and column C the main text for the item.

Figure 7-10. List virtual columns.


If required, a field can span more than one column. The span of columns AB can contain a heading or a large graphic, as shown in Figure 7-11. The span of columns BC or ABC can contain the main text of an item.

Figure 7-11. List virtual columns with span across columns A and B.


The list type determines the columns in which fields will reside. In the SimpleList application, there is a small icon in column A, and the main text in columns BC, as shown in Figure 7-9.

Table 7-2 also contains string formats for each list type.

Column C can contain additional indicator icons. These are small icons, which need not appear in each item of the list (hence, they are part of column C, rather than columns in their own right). To specify these additional indicators, you will need to add \t and the number of the icon to the end of the item strings for each indicator. For example, if a third icon had been defined, it could be used as an indicator in SAVED_GAME1_TEXT using "0\tLevel 3\t2 ".

Incorrect item strings are a common cause of panics when constructing lists. If your application crashes as soon as you attempt to launch it, check that you have formatted the strings correctly, and that the values for icons are numeric and within the bounds of the icon array.


Allowing the List to Scroll

The SimpleList example list contains only three items and so has no reason to scroll. However, it is good practice to ensure that any list has the capability to scroll. This means that if further items are added to the list later, then the list will still operate correctly.

In the SimpleList example, the scroll bars are created in the ConstructL() function by calling the private convenience method SetupScrollBarsL() .

 void CSimpleListContainer::SetupScrollBarsL()    {    iSavedGamesListBox->CreateScrollBarFrameL(ETrue);    iSavedGamesListBox->ScrollBarFrame() ->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);    } 

Scroll bars are automatic for all controls apart from lists and editors, where the developer needs to enable scrollbars explicitly. (For editors, to enable the scrollbars, a different API is used than is used for lists ”see Chapter 8 for details.) To enable the scroll bars for a list, you use the list's CreateScrollBarFrameL() method. Note that, although CreateScrollBarFrameL() can have an argument to indicate that scrollbars should be preallocated, this has no effect.

The scroll bars are made visible using the scroll bar frame's SetVisibility() method. The arguments specify visibility for horizontal and vertical scrollbars, respectively. In the SimpleList example, horizontal scroll bars do not appear, and vertical scroll bars appear only when necessary.

Handling List Events

In order to perform an action on a selected item in the list, you will need to generate and handle list events. In SimpleList , the user can choose to open a selected game.

The list will generate events only if you offer key presses to it. You do this by overriding OfferKeyEventL() in the container such that it passes key events to the list.

[View full width]
 
[View full width]
TKeyResponse CSimpleListContainer::OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType) { if (iSavedGamesListBox) { return iSavedGamesListBox->OfferKeyEventL(aKeyEvent, aType); } else { return EKeyWasNotConsumed; } }

To handle list events you need to implement the MEikListboxObserver mixin and register with the list to receive events. In SimpleList , the mixin is implemented by the container class, and its pure virtual method HandleListBoxEventL() is overridden.

[View full width]
 
[View full width]
void CSimpleListContainer::HandleListBoxEventL( sCEikListBox* /*aListBox*/, TListBoxEvent aListBoxEvent) { if (aListBoxEvent == MEikListBoxObserver::EEventEnterKeyPressed) { PlaySelectedGame(); } }

Pressing the Selection key creates an EEventEnterKeyPressed event. In SimpleList , the PlaySelectedGame() method is called when this occurs.

In order for the observer to receive events, you register it with the list, using the line SetListBoxObserver() method. This is performed in the ConstructL() method, using the line iSavedGamesListBox->SetListBoxObserver(this) .

List box observers can register themselves with more than one list in an application. The HandleListBoxEventL() method has a list box parameter that indicates which list generated the event.


Dynamic Lists

To demonstrate how you can alter the contents of a list dynamically, the application DynamicList is considered . This example displays a list of saved games, as shown in Figure 7-12, the names of which are set at runtime. Selecting Delete from the Options menu, as shown in Figure 7-13, will delete the currently focused item.

Figure 7-12. DynamicList screen.


Figure 7-13. DynamicList options menu.


Defining a Dynamic List Resource

When defining the LISTBOX resource for a dynamic list, you do not need the array_id field, as you will create the item array at runtime. The list resource definition is therefore very simple, as shown in DynamicList.rss :

 RESOURCE LISTBOX r_dynamiclist_saved_games_listbox    {    flags = EAknListBoxSelectionList;    } 

Setting Items Dynamically in a List

Once the list is constructed, you can add items to it. This is performed in the ConstructL() method by calling the private convenience method SetupListItemsL() :

 void CDynamicListContainer::SetupListItemsL()    {    CTextListBoxModel* model = iSavedGamesListBox->Model();    model->SetOwnershipType(ELbmOwnsItemArray);    CDesCArray* savedGamesArray = STATIC_CAST(CDesCArray*, model->ItemTextArray());    LoadSavedGamesL(*savedGamesArray);    } 

You will need to get a pointer to the list's model (which manages the list items) using the Model() method. Note that, although the Model() method returns a pointer to the model, it does not transfer ownership of the model. In other words, the returned pointer must not be deleted or pushed onto the Cleanup Stack.

The list items are defined by descriptors, which are stored in an array of type CDesCArray . You can choose whether the model owns the array, using the SetOwnershipType() method. The model owns the item array by default ”although here the model is explicitly set as the owner, both to demonstrate the method and for maintainability.

If the model owns the array, as in the DynamicList example, you can get a pointer to it using the ItemTextArray() method. You will need to cast it up to a CDesCArray pointer before you can populate it, as the returned MDesCArray pointer does not give you functionality to do this. Further information on descriptor arrays, such as CDesCArray , can be found in Chapter 3.

You can then populate the array with item strings, which you can create in whatever way you choose. In DynamicList this is performed using the LoadSavedGamesL() method, which simply creates a list of saved game names of the form " Saved Game X ", where X is a value initially set to 1 , which is incremented as each item is created in a loop.

If you need to own the array, you should set the ownership type accordingly and then call the model's SetItemTextArray() method to set it.


Changing Items Dynamically in a List

It is possible to alter the items in your list dynamically. To demonstrate this, DynamicList provides an option to delete an item ”selecting Delete from the Options menu results in a call to the container method DeleteSelectedL() :

 void CDynamicListContainer::DeleteSelectedL()    {    if (iSavedGamesListBox)       {       CTextListBoxModel* model = iSavedGamesListBox->Model();       if (model->NumberOfItems() > 0)          {          CDesCArray* itemArray = STATIC_CAST(CDesCArray*, model->ItemTextArray());          TInt currentItem = iSavedGamesListBox->CurrentItemIndex();          itemArray->Delete(currentItem);    AknListBoxUtils::    HandleItemRemovalAndPositionHighlightL(iSavedGamesListBox, currentItem, ETrue);          }       }    } 

To access the item text array, you will need to get a pointer to the model first. You should then check that there is actually something to delete. The DynamicList example ensures that the number of items in the model is greater than zero. The list item that you want to delete is the one that has been selected by the user. To get the index of the currently selected item, call the list's CurrentItemIndex() method. This will return the position within the item text array of the required item. The item can then be removed from the list using the array's Delete() method, passing in the item's index as an argument. To effect the change on screen, use the static method AknListBoxUtils::HandleItemRemovalAndPositionHighlightL() , passing in the list, the index of the removed item, and Etrue to indicate that you have removed the currently selected item.

For portability, note that the HandleItemRemovalAndPositionHighlightL() method is available only in Series 60, not in other Symbian OS platforms. You should not use CEikListBox::HandleItemRemovalL() in Series 60, as this causes indexing problems for the current and top item.


Markable Lists

The application MarkableList demonstrates the implementation of a list where the individual items can be marked. On opening, the application displays a list of saved games. Any item from this list can be marked by selecting Mark from the menu, as shown in Figure 7-14. When an item in the list is marked, a small tick displays next to it, as shown in Figure 7-15. Selecting Delete from the Options menu deletes the marked items.

Figure 7-14. MarkableList Options menu.


Figure 7-15. MarkableList screen.


Defining a Markable List Using Resources

The LISTBOX resource in this case indicates that the list is markable, as in MarkableList.rss :

 RESOURCE LISTBOX r_markablelist_saved_games_listbox    {    flags = EAknListBoxMarkableList;    } 

Add Marking Icons to a List

To indicate that a list item has been marked, a specified icon is displayed next to it. Therefore, you will need to create an icon for this purpose. In the MarkableList example, the icon chosen is a tick. Adding the icon to the list is performed in exactly the same way as in the SimpleList example, with the marking icon being defined as the first element in the array.

Handling Marking Commands

The user needs to be able to mark and unmark items via the Options menu, so a submenu for marking is defined with options for the user to mark and unmark specific items, or mark and unmark all items. These menu items have specific system-defined commands associated with them: EAknCmdMark , EAknCmdUnmark , EAknMarkAll , and EAknCmdUnmarkAll , respectively.

The list handles marking commands by calling the static method AknSelectionService::HandleMarkableListProcessCommandL() . In the MarkableList example, this is performed in the container class method HandleMarkCommandL() , which is called by the AppUi whenever it receives a marking command from the menu.

 void CMarkableListContainer::HandleMarkCommandL(TInt aCommand)    {    if (iSavedGamesListBox)       {       AknSelectionService::       HandleMarkableListProcessCommandL(       aCommand, iSavedGamesListBox);       }    } 

The marking command is simply passed on to HandleMarkableListProcessCommandL() , along with a pointer to the list that is to be marked. Note that the framework provides functionality for marking items via key presses, rather than the Options menu, so you do not need to handle this in code.

Dynamically Changing Marked List Items

As with DynamicList , the deletion of an item will be used to demonstrate dynamically changing a marked list. (Remember, you need to add the Delete command to the Options menu, and handle it in the usual way.) In MarkableList , the container method DeleteSelectedL() is called to handle the deletion.

 void CMarkableListContainer::DeleteSelectedL()    {    if (iSavedGamesListBox)       {       CTextListBoxModel* model = iSavedGamesListBox->Model();       if (model->NumberOfItems() > 0)          {          // Create a copy of the currently selected          // items (copyIndices) in numeric order.          const CListBoxView::CSelectionIndexArray*             selectionIndices = iSavedGamesListBox             ->SelectionIndexes();          RArray<TInt> copyIndices;          CleanupClosePushL(copyIndices);          TInt numberSelectedGames = selectionIndices->Count();          for (TInt i = 0; i < numberSelectedGames; i++)             {             copyIndices.InsertInOrder ((*selectionIndices)[i]);             }          // Iterate through the copyIndices in reverse order,          // deleting them from the list's item array          TInt currentItem(0);          CDesCArray* itemArray = STATIC_CAST(             CDesCArray*, model->ItemTextArray());          for (TInt j = numberSelectedGames-1; j >= 0; j--)             {             currentItem = copyIndices[j];             itemArray->Delete(currentItem);             }          // Close copyIndices and free memory          CleanupStack::PopAndDestroy();          // Redraw the list following removal          AknListBoxUtils::          HandleItemRemovalAndPositionHighlightL(             iSavedGamesListBox,             currentItem,             ETrue);          }       }    } 

The marked items are stored in an array in the list, which you access using the SelectionIndexes() method. As with the DynamicList example, you delete them from the item text array using the Delete() method. The array contains the indices in the order in which they were marked, not numerical order.

Because you have only the indices of the array, and not the objects in it, you will have to be careful about the order in which you delete ” otherwise you could end up deleting items that are not marked. Consider a list in which items 3 and 4 have been marked. If you first delete item 3, when you delete item 4, it will delete what is currently in position 4, in other words, what was originally item 5. To get around this, you should copy the indices from the array into an RArray in numerical order. You can then iterate through this array in reverse order, deleting the items in turn .

You will need to call HandleItemRemovalAndPositionHighlightL() to update the screen. Take care, however, when using this method, as it resets the marks and the selection indices. Call it after you have deleted all marked items from the array; otherwise it will only delete the first item.

To use a multiselection list in an application, rather than a markable list, is straightforward. You change the LISTBOX resource flags to EAknMultiselectionList and supply two icons only: one for checked and one for unchecked. The checked icon must again be the first in the icon array. The unchecked icon should be shown in the A column of each menu item ”for example, " 1\tSaved Game 1 ". If you still wish to show the number-of-player's icon, supply those icons as well, but since the checking icon is in column A, put the number-of-player's icon in column C ”for example, " 1\tSaved Game 1\t2 ".

Pop-up Menu Lists

The example application, PopUpList displays a list of saved games, as shown in Figure 7-16. When you select a saved game, it displays a pop-up menu list showing a number of levels at which you can restart the game, as shown in Figure 7-17. If the code had been implemented, selecting a level would play the game at the appropriate point.

Figure 7-16. PopUpList screen.


Figure 7-17. PopUpList menu list.


Creating a Pop-up List

The usual way to invoke a pop-up menu list is to select an item from a selection list. In the PopUpList example, the pop-up list is displayed when a saved game is selected. It is common to construct it in response to an EEventEnterKeyPressed event in HandleListBoxEventL() . In PopUpList , the list is displayed through a call to OpenMenuListForSavedGameL() , with the name of the currently selected item passed as a parameter.

[View full width]
 
[View full width]
void CPopUpListContainer::OpenMenuListForSavedGameL(TDesC& aSavedGameName) { CAknSinglePopupMenuStyleListBox* savedGameMenuList = new (ELeave) CAknSinglePopupMenuStyleListBox; CleanupStack::PushL(savedGameMenuList); CAknPopupList* popupList = CAknPopupList::NewL(savedGameMenuList, R_AVKON_SOFTKEYS_OK_BACK); CleanupStack::PushL(popupList); savedGameMenuList->ConstructL(popupList, EAknListBoxMenuList); ...

You need to construct the pop-up list using an appropriate list class. Here CAknSinglePopupMenuStyleListBox is used, to enable a single line of text to be displayed in a menu list. As with the other types of list, it is also possible to display items containing small or large graphics, two lines of text, or headings by using a different class. Table 7-3 contains details of the pop-up list classes.

Table 7-3. Pop-up Menu List Classes and Item Definitions

Class

Example

CAknSinglePopupMenuStyleListBox

CAknSingleGraphicBtPopupMenuStyleListBox

CAknSingleHeadingPopupMenuStyleListBox

CAknSingleGraphicPopupMenuStyleListBox

CAknDoublePopupMenuStyleListBox

CAknSingleGraphicHeadingPopupMenuStyleListBox

CAknDoubleLargeGraphicPopupMenuStyleListBox


At this point, you do not continue construction in resource, but instead construct a CAknPopupList object, passing a pointer to the list, and a soft key resource. The CAknPopupList is a helper class, which displays the list in a pop-up window and provides a set of soft keys for dismissing it. You then complete the menu list's construction by calling its ConstructL() method, passing in the pop-up list as its parent, and a type. In the PopUpList example, a type of EAknListBoxMenuList is passed in, indicating that the list is a menu.

Setting the Title for a Pop-up List

The title of a pop-up list should describe the list's contents or give the user an indication of what they should do ”" Select Level: " is used in the PopUpList example. As with other strings, you should load the title from a resource file. You then set it in the CAknPopupList , using the SetTitleL() method:

 ... HBufC* title; title = StringLoader::LoadLC(R_SAVED_GAME_MENU_LIST_TITLE); popupList->SetTitleL(*title); CleanupStack::PopAndDestroy(title); ... 

Col A

Col B

Col C

Example Item String

Main text

"Label"

13 by 13 icon

Main text

"1\tLabel"

Heading

Main text

"Head\tLabel"

13 by 13 icon

Main text

"1\tLabel"

Main text

Secondary text

"MainText\tSecondaryText"

13 by 13 icon

Head

Main text

"1\tHead\tLabel"

42 by 32 icon

Main text

Secondary text

"1\tMainText\tSecondaryText


Displaying a Pop-up List and Handling Selections

Once constructed, displaying the pop-up list is simply a matter of calling its ExecuteLD() method. In the PopUpList example, this is performed in the continuation of the OpenMenuListForSavedGameL() method:

 ... TInt popupOk = popupList->ExecuteLD(); CleanupStack::Pop(popupList); if (popupOk)    {    TDesC level = (*savedGameMenuListArray)[savedGameMenuList->CurrentItemIndex()];    CleanupStack::PopAndDestroy(savedGameMenuList);    PlayGame(aSavedGameName, level);    } else    {    CleanupStack::PopAndDestroy(savedGameMenuList);    } ... 

The method does not return until you dismiss the pop-up menu. If you select an item and accept the selection, in this case by pressing the Ok soft key, it returns Etrue ; otherwise, it returns EFalse . You can handle an accepted selection using the usual list methods ”in this case, the index of the selected item is used to play the chosen level of a game.

The suffix D on the ExecuteLD() method indicates that the method destroys the pop-up list. Because of this, it should only be popped it from the Cleanup Stack rather than using PopAndDestroy() .


List Dialogs

You can implement selection and markable lists using predefined dialog classes, such as CAknSelectionListDialog or CAknMarkableListDialog . These simplify the use of lists, in particular when using a search field. They are covered in Chapter 6.



Developing Series 60 Applications. A Guide for Symbian OS C++ Developers
Developing Series 60 Applications: A Guide for Symbian OS C++ Developers: A Guide for Symbian OS C++ Developers
ISBN: 0321227220
EAN: 2147483647
Year: 2003
Pages: 139

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net