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:
The status pane layout to display when the application is launched.
layout = r_status_pane_layout;
r_status_pane_layout
is the resource id of a supported layout — as defined in the global status pane resource. If a layout is not specified, the
default layout (also defined in the global status pane resource) is used.
Different controls to display in each layout's application owned sub-panes.
The global status pane resource defines the default control owned by application-owned sub-planes. This control can be over-ridden using the SPANE_PANE
resource struct, which must include:
The id of one of the application owned subpanes, as defined in the global status pane resource.
The type of control to use for the content of the subpane.
This can be any valid control, including custom controls.
A reference to the resource that defines the custom control.
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"; }