Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



How to define a status pane application model resource

Every Symbian device has a global status pane resource which defines all the status pane layouts that are supported on the device, the sub-panes from which the layouts are constructed, and a default layout. Applications can use the STATUS_PANE_APP_MODEL resource to over-ride the default status pane layout, and to change the controls that are displayed in application owned sub-panes.

Note: Application's cannot define new layouts, or alter server-owned sub-panes.

Note: Some reference designs support only a single status pane layout which contains only server-owned sub-panes. In this case there is no need for application to declare a STATUS_PANE_APP_MODEL, as the status pane is not editable.

The STATUS_PANE_APP_MODEL resource structure may specify:

Example

In the following example, a game application defines status pane layout and subpane content.

RESOURCE STATUS_PANE_APP_MODEL r_status_pane_game_app_declaration
 {

 // Specify the required layout, or omit for the default.
 layout = r_status_pane_layout;

 panes =
  {
  SPANE_PANE
   {
   // Id of the application owned subpane.
   id = EEikStatusPaneUidMessageValue;

   // Pane ownership flag not available to applications.

   // Type of control to use for pane content.
   type = EEikCtLabel;

   // Resource to use for pane content.
   resource = r_status_pane_game_message;
   }
  };
 }

// Define the construction resources for the default controls.
// The default contents of the message pane is Hello, the game
// application changes this to Ready to play.

RESOURCE LABEL r_status_pane_default_message { txt = "Hello"; }
RESOURCE LABEL r_status_pane_game_message { txt = "Ready to play"; }