www.pudn.com > QHelloWorld.rar > HelloWorld.rss
// HelloWorld.rss // // © Symbian Software Ltd 2005. All rights reserved. // #include#include #include #include "HelloWorld.hrh" // Application specific commands // Strings that should be localised should not be defined in the resource file itself, // but in separate files with the extension .rls. #include "HelloWorld.rls" // Defines localisable strings // Use this statement to ensure that the resources in the file have a unique ID // so that an application can use multiple resource files without resource ID // conflict. This statement must be the first non-comment statement in the file. NAME HWHW // The three following resources are mandatory fields and need to be the // first resource fields in the resource file. Need to be defined in this order. // These resources don't need to contain any useful info, just need to be there. // RSS_SIGNATURE can be used to specify version information RESOURCE RSS_SIGNATURE { } // Defines the name of the default file the application framework creates. // This resource must always be the second resource in the resource file. RESOURCE TBUF { buf = ""; } // This resource is used to define an application's GUI. // Although it's not used directly by UIQ, its declaration is mandatory. RESOURCE EIK_APP_INFO { } //---------------------------------------------------- //------------------ TEXT CONSTANTS ------------------ //---------------------------------------------------- // These resources hold strings that are used in the C++ source code, // these strings are used as infoprint text. // The actual string is defined in the .rls file. RESOURCE TBUF r_helloworld_infoprint1_text { buf = STRING_r_helloworld_infoprint1_text; } RESOURCE TBUF r_helloworld_infoprint2_text { buf = STRING_r_helloworld_infoprint2_text; } RESOURCE TBUF r_helloworld_infoprint3_text { buf = STRING_r_helloworld_infoprint3_text; } //---------------------------------------------------- //-------------- CONFIGURATION FOR VIEW -------------- //---------------------------------------------------- // A view shall use the QIK_VIEW_CONFIGURATIONS resource struct to define which // UI configurations it supports. Can also use QIK_VIEW_CONFIGURATIONS to setup // the view to switch layout and command list automatically when changes of UI // configuration occur. This is done with the view and command_list members of // the QIK_VIEW_CONFIGURATIONS. // The application supports the reference UI Configurations that are supported // in the UIQ 3 SDK. Use the UiqEnv tool, to change the UI Configuration in the // emulator in order to develop and test the application with varying phone styles. RESOURCE QIK_VIEW_CONFIGURATIONS r_helloworld_ui_configurations { configurations = { QIK_VIEW_CONFIGURATION { ui_config_mode = KQikPenStyleTouchPortrait; command_list = r_helloworld_commands; view = r_helloworld_layout; }, QIK_VIEW_CONFIGURATION { ui_config_mode = KQikPenStyleTouchLandscape; command_list = r_helloworld_commands; view = r_helloworld_layout; }, QIK_VIEW_CONFIGURATION { ui_config_mode = KQikSoftkeyStyleTouchPortrait; command_list = r_helloworld_commands; view = r_helloworld_layout; }, QIK_VIEW_CONFIGURATION { ui_config_mode = KQikSoftkeyStylePortrait; command_list = r_helloworld_commands; view = r_helloworld_layout; }, QIK_VIEW_CONFIGURATION { ui_config_mode = KQikSoftkeyStyleSmallPortrait; command_list = r_helloworld_commands; view = r_helloworld_layout; } }; } //---------------------------------------------------- //------------------ VIEW COMMANDS ------------------- //---------------------------------------------------- // Commands are defined with the QIK_COMMAND_LIST struct, // commands can also be created in code by instantiating CQikCommand. // The control command id for debug command is a reserved id from uikon.hrh. // The id for each infoprint command is defined in the HelloWorld.hrh file. // The string for each command is defined in the HelloWorld.rls file, // due to localisation. RESOURCE QIK_COMMAND_LIST r_helloworld_commands { items = { // This command shall only be visible in debug mode because it is only // used to find memory leaks during development of the application. QIK_COMMAND { id = EEikCmdExit; type = EQikCommandTypeScreen; // Indicate that this command will only be visible in debug stateFlags = EQikCmdFlagDebugOnly; text = STRING_r_helloworld_close_debug_cmd; }, QIK_COMMAND { id = EHelloWorldInfoPrint1Cmd; type = EQikCommandTypeScreen; text = STRING_r_helloworld_infoprint1_cmd; }, QIK_COMMAND { id = EHelloWorldInfoPrint2Cmd; type = EQikCommandTypeScreen; text = STRING_r_helloworld_infoprint2_cmd; }, QIK_COMMAND { id = EHelloWorldInfoPrint3Cmd; type = EQikCommandTypeScreen; text = STRING_r_helloworld_infoprint3_cmd; } }; } //---------------------------------------------------- //------------------- VIEW LAYOUT -------------------- //---------------------------------------------------- // Defines the view by linking to the pages. RESOURCE QIK_VIEW r_helloworld_layout { pages = r_helloworld_layout_pages; } // Defines the pages of a view. // In Hello world there only exist one page for the label to be displayed in. RESOURCE QIK_VIEW_PAGES r_helloworld_layout_pages { pages = { QIK_VIEW_PAGE { page_id = EHelloWorldViewPage; page_content = r_helloworld_page_control; } }; } //---------------------------------------------------- //------------------ VIEW CONTROLS ------------------- //---------------------------------------------------- // Defines the content of the page. // The page consist of one label that is displayed in the middle of the view. RESOURCE QIK_CONTAINER_SETTINGS r_helloworld_page_control { layout_manager_type = EQikGridLayoutManager; layout_manager = r_helloworld_grid_layout_manager; controls = { QIK_CONTAINER_ITEM_CI_LI { unique_handle = EHelloWorldLabelCtrl; type = EEikCtLabel; control = r_helloworld_label; } }; } //---------------------------------------------------- //---------------------- LABEL ----------------------- //---------------------------------------------------- // Defines the label and specifies the labels font and text. RESOURCE LABEL r_helloworld_label { standard_font = EEikLabelFontLegend; txt = STRING_r_helloworld_text; } //---------------------------------------------------- //-------------- GRID LAYOUT MANAGER ----------------- //---------------------------------------------------- // Defines the grid layout manager that places the label control in the middle // of the view. RESOURCE QIK_GRID_LAYOUT_MANAGER r_helloworld_grid_layout_manager { default_layout_data = QIK_GRID_LAYOUT_DATA { horizontal_alignment = EQikLayoutHAlignCenter; vertical_alignment = EQikLayoutVAlignCenter; }; }