Chapter 6. Dialogs

Dialogs are used extensively by system and application user interfaces for simple notification through to highly sophisticated data presentation and capture

Dialogs provide a wide variety of ways to interact with a user. They can be used to notify, obtain a response, present fixed information, or to allow the user to enter data. Series 60 provides a comprehensive set of dialog classes and base classes that support the typical dialog functionality required by most applications. You can use these classes to create your own custom dialogs and to develop forms, notes, queries, and list dialogs.

This chapter looks at how you can create dialogs in your applications. It covers:

  • Standard Dialogs ” A simple dialog can be constructed by defining its layout and then writing a dialog class to handle the data. Data from the dialog can be validated and saved. More features can be added to a dialog, such as defining a menu for it or adding a custom control. Multipage dialogs can also be created.

  • Forms ” A form can be used if you have a collection of related data that you want the user to edit.

  • Notes ” Notes provide a convenient way to convey information to the user. Wrapped Notes offer a very simple way of communicating with the user, providing a standard format for common types of notes, such as a confirmation note or an information note. Custom notes can also be constructed.

  • Queries ” Queries are a specialized type of dialog to be used when you wish to ask the user a question. In the simplest case, this is a confirmation query asking the user to say yes or no to a question. However, they can be more complex; for example, list queries can be constructed for the user to select items from.

  • List Dialogs ” Two types of list dialogs are available in Series 60: selection lists ”which allow one item to be selected, and markable lists ”which allow multiple selections.

Each section in this chapter is supported by code snippets from example applications. Details of how to build and run the applications can be found in the Preface. All the examples in this chapter are based around the idea of game playing. For example, one of the notes displays how many games have been loaded; a dialog asks for a player name . However, the applications are intended only to demonstrate the ideas discussed in this chapter ”no game-playing functionality has been implemented. Each application will be introduced at the appropriate point in the text.

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 © 2008-2017.
If you may any questions please contact us: