S60 3rd Edition SDK for Symbian OS Example Applications Guide |
Filelist Example
1. About this Example
2. Prerequisites
3. Design and Implementation
4. Class Hierarchy
This tutorial explains how to use the grid control for Avkon applications. A grid is used to layout items in grid style. The grid control is derived from the listbox control.
The tutorial starts by listing the pre-requisites the user should know before starting this example, and describes how to build and run the example.
This example exists as a complete application, and has the standard Symbian OS application architecture employing the Application, Document, UI, and View classes. The example makes use of other Symbian OS concepts which the reader should be aware of before attempting to understand this example. These are:
- Familiarity with the file server architecture.
- How to use a single item selection grid
This application supports changing the screen size when program is running.
The program capabilities are defined in the Filelist.mmp file: CAPABILITY NONE
The program takes screen parameters in the start of the application and works with all screen modes. The program support changing the screen layout while the program is running. The program determinates new size for grid cells and image in cell.
This example can be built in directory filelist\group by running the following commands:
bldmake bldfiles
abld build winscw udeb
In addition it is possible to create project for CodeWarrior IDE by running the following command:
abld makefile cw_ide
Series 60 provides a number of different types of grid. In this example Selection grid -type is used. It is derived from CAknGrid-class.
The grid is constructed without a resource file in Container's Construct(). Initial parameters for grid are set in SetGridInitialParametersL(). Next an icon and a text in the grid's cell are added using LoadGraphicsL() and AddDataL() in CreateGridResourceL(). The file names in private folder are fetched using File Server's GetDir()-method.
The Options menu commands are handled in CFilelistAppUi::HandleCommandL(). When private folder is changed, CFilelistContainer::ChangePrivateFolderL() calls SetFolderID() to set new folder ID, then it creates new filelist (CreateFilelistL()) and adds fetched data to grid with AddDataL(). Protected folder -option in the Options menu demostrates how the framework handles protected resourse activity. Return value from GetDir() is shown in error note inform that the application hasn't access to protected folder. SetNaviPaneTextL() is used to show active folder name in navication pane.
This inheritance list is sorted roughly, but not completely, alphabetically:
|
© Nokia 2006 |

|