www.pudn.com > UIQ_Code1.rar > Commands.rss
// Commands.rss // // © Symbian Software Ltd 2005. All rights reserved. // #include#include #include #include #include "Commands.hrh" #include "Commands.rls" // 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 CMDS // 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 NOT used by UIQ. // Otherwise is this resource used to define an application's GUI. 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_commands_cmd_extra_expand_commands { buf = STRING_r_commands_cmd_extra_expand_commands; } RESOURCE TBUF r_commands_cmd_extra_contract_commands { buf = STRING_r_commands_cmd_extra_contract_commands; } RESOURCE TBUF r_commands_cmd_cancel { buf = STRING_r_commands_cmd_cancel; } RESOURCE TBUF r_commands_infoprint_cmd_text { buf = STRING_r_commands_infoprint_cmd_text; } //---------------------------------------------------- //------------------ VIEW COMMANDS ------------------- //---------------------------------------------------- // If commands are declared in a seperate file they need to be // included after the three mandatory resources, see above. #include "Commands.ra" //---------------------------------------------------- //-------------- CONFIGURATION FOR VIEW -------------- //---------------------------------------------------- // A view shall use the QIK_VIEW_CONFIGURATIONS resource struct to define which // UI configurations it supports. // QIK_VIEW_CONFIGURATIONS is used to setup the view layout and command list // that automatically will switch when changes of UI configuration occur. // The view specific command list is defined by the command_list, these // commands will never be removed in this example, which mean that the commands // will occur in all pages. // 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_commands_view_ui_configurations { configurations = { QIK_VIEW_CONFIGURATION { ui_config_mode = KQikPenStyleTouchPortrait; view = r_commands_view_layout; command_list = r_commands_view_commands; }, QIK_VIEW_CONFIGURATION { ui_config_mode = KQikPenStyleTouchLandscape; view = r_commands_view_layout; command_list = r_commands_view_commands; }, QIK_VIEW_CONFIGURATION { ui_config_mode = KQikSoftkeyStyleSmallPortrait; view = r_commands_view_layout; command_list = r_commands_view_commands; }, QIK_VIEW_CONFIGURATION { ui_config_mode = KQikSoftkeyStyleTouchPortrait; view = r_commands_view_layout; command_list = r_commands_view_commands; }, QIK_VIEW_CONFIGURATION { ui_config_mode = KQikSoftkeyStylePortrait; view = r_commands_view_layout; command_list = r_commands_view_commands; } }; } //---------------------------------------------------- //------------------- VIEW LAYOUT -------------------- //---------------------------------------------------- // Defines the view for pen style by linking to the pages. RESOURCE QIK_VIEW r_commands_view_layout { pages = r_commands_view_layout_pages; } // Defines the pages of a view. For page 2-4 there exist page specific command // lists. Page specific command list will be automatically loaded/removed // when the specific page is activated/deactivated. RESOURCE QIK_VIEW_PAGES r_commands_view_layout_pages { pages = { QIK_VIEW_PAGE { page_id = ECommandsViewPage1; tab_bmpid = EMbmCommandsPagetab; tab_bmpmaskid = EMbmCommandsPagetab_mask; page_content = r_commands_view_page1_control; }, QIK_VIEW_PAGE { page_id = ECommandsViewPage2; tab_bmpid = EMbmCommandsPagetab; tab_bmpmaskid = EMbmCommandsPagetab_mask; page_content = r_commands_view_page2_control; command_list = r_commands_page2_commands; }, QIK_VIEW_PAGE { page_id = ECommandsViewPage3; tab_bmpid = EMbmCommandsPagetab; tab_bmpmaskid = EMbmCommandsPagetab_mask; page_content = r_commands_view_page3_control; command_list = r_commands_page3_commands; }, QIK_VIEW_PAGE { page_id = ECommandsViewPage4; tab_bmpid = EMbmCommandsPagetab; tab_bmpmaskid = EMbmCommandsPagetab_mask; page_content = r_commands_view_page4_control; command_list = r_commands_page4_commands; } }; } //---------------------------------------------------- //------------------ 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_commands_view_page1_control { layout_manager_type = EQikGridLayoutManager; layout_manager = r_commands_grid_layout_manager; controls = { // This container item defines the resources for the control and layout // data as LLINKS. The layout is not defined which means that it uses // the default layout data. QIK_CONTAINER_ITEM_CI_LI { unique_handle = ECommandsLabelCtrl; type = EEikCtLabel; control = r_commands_label1; } }; } //---------------------------------------------------- //------------------ 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_commands_view_page2_control { layout_manager_type = EQikGridLayoutManager; layout_manager = r_commands_grid_layout_manager; controls = { // This container item defines the resources for the control and layout // data as LLINKS. The layout is not defined which means that it uses // the default layout data. QIK_CONTAINER_ITEM_CI_LI { unique_handle = ECommandsLabelCtrl; type = EEikCtLabel; control = r_commands_label2; } }; } //---------------------------------------------------- //------------------ 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_commands_view_page3_control { layout_manager_type = EQikGridLayoutManager; layout_manager = r_commands_grid_layout_manager; controls = { // This container item defines the resources for the control and layout // data as LLINKS. The layout is not defined which means that it uses // the default layout data. QIK_CONTAINER_ITEM_CI_LI { unique_handle = ECommandsLabelCtrl; type = EEikCtLabel; control = r_commands_label3; } }; } //---------------------------------------------------- //------------------ 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_commands_view_page4_control { layout_manager_type = EQikGridLayoutManager; layout_manager = r_commands_grid_layout_manager; controls = { // This container item defines the resources for the control and layout // data as LLINKS. The layout is not defined which means that it uses // the default layout data. QIK_CONTAINER_ITEM_CI_LI { unique_handle = ECommandsLabelCtrl; type = EEikCtLabel; control = r_commands_label4; } }; } //---------------------------------------------------- //---------------------- LABEL ----------------------- //---------------------------------------------------- // Defines the label and specifies the labels font and text. RESOURCE LABEL r_commands_label1 { standard_font = EEikLabelFontLegend; txt = STRING_r_commands_page1_text; } //---------------------------------------------------- //---------------------- LABEL ----------------------- //---------------------------------------------------- // Defines the label and specifies the labels font and text. RESOURCE LABEL r_commands_label2 { standard_font = EEikLabelFontLegend; txt = STRING_r_commands_page2_text; } //---------------------------------------------------- //---------------------- LABEL ----------------------- //---------------------------------------------------- // Defines the label and specifies the labels font and text. RESOURCE LABEL r_commands_label3 { standard_font = EEikLabelFontLegend; txt = STRING_r_commands_page3_text; } //---------------------------------------------------- //---------------------- LABEL ----------------------- //---------------------------------------------------- // Defines the label and specifies the labels font and text. RESOURCE LABEL r_commands_label4 { standard_font = EEikLabelFontLegend; txt = STRING_r_commands_page4_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_commands_grid_layout_manager { default_layout_data = QIK_GRID_LAYOUT_DATA { horizontal_alignment = EQikLayoutHAlignCenter; vertical_alignment = EQikLayoutVAlignCenter; }; }