S60UIExample.rss
上传用户:laixiong
上传日期:2007-03-11
资源大小:2994k
文件大小:10k
源码类别:

Symbian

开发平台:

C/C++

  1. // Copyright (c) 2006 Nokia Corporation.
  2. //  RESOURCE IDENTIFIER
  3. NAME S60U    // 4 letter ID
  4. //  INCLUDES
  5. #include <eikon.rh>
  6. #include <avkon.rh>
  7. #include <avkon.rsg>
  8. #include <appinfo.rh>
  9. #include "S60UIExample.hrh"
  10. #include "S60UIExample.rls"
  11. #include <S60UIExample.mbg>  // for the weapon icons
  12. //  RESOURCE DEFINITIONS
  13. // -----------------------------------------------------------------------------
  14. //
  15. //    Define the resource file signature
  16. //    This resource should be empty.
  17. //
  18. // -----------------------------------------------------------------------------
  19. //
  20. RESOURCE RSS_SIGNATURE
  21.     {
  22.     }
  23. // -----------------------------------------------------------------------------
  24. //
  25. //    Default Document Name
  26. //
  27. // -----------------------------------------------------------------------------
  28. //
  29. RESOURCE TBUF r_default_document_name
  30.     {
  31.     buf="HEWB";
  32.     }
  33. // -----------------------------------------------------------------------------
  34. //
  35. //    Define default menu and CBA key.
  36. //
  37. // -----------------------------------------------------------------------------
  38. //
  39. RESOURCE EIK_APP_INFO
  40.     {
  41.     }
  42. // -----------------------------------------------------------------------------
  43. //
  44. //    r_s60uiexample_initialview
  45. //    Define initial view 
  46. //
  47. // -----------------------------------------------------------------------------
  48. //
  49. RESOURCE AVKON_VIEW r_s60uiexample_initialview
  50.     {
  51.     menubar = r_s60uiexample_initialmenubar;
  52.     cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
  53.     }
  54. // -----------------------------------------------------------------------------
  55. //
  56. //   r_s60uiexample_initialmenubar
  57. //   Menu title definition
  58. //
  59. // -----------------------------------------------------------------------------
  60. //
  61. RESOURCE MENU_BAR r_s60uiexample_initialmenubar
  62.     {
  63.     titles =
  64.         {
  65.         MENU_TITLE
  66.             {
  67.             menu_pane = r_s60uiexample_initialmenu;
  68.             }
  69.         };
  70.     }
  71. // -----------------------------------------------------------------------------
  72. //
  73. //   r_s60uiexample_initialmenu
  74. //   Menu for "Options"
  75. //
  76. // -----------------------------------------------------------------------------
  77. //
  78. RESOURCE MENU_PANE r_s60uiexample_initialmenu
  79.     {
  80.     items =
  81.         {
  82.         MENU_ITEM
  83.             {
  84.             command = ES60UIExampleStartGame;
  85.             txt = qtn_startgame;
  86.             },
  87.         MENU_ITEM
  88.             {
  89.             command = ES60UIExampleContinueGame;
  90.             txt = qtn_continuegame;
  91.             },
  92.         MENU_ITEM
  93.             {
  94.             command = ES60UIExampleHighscores;
  95.             txt = qtn_highscores;
  96.             },
  97.         MENU_ITEM
  98.             {
  99.             command = EAknSoftkeyExit;
  100.             txt = qtn_exit;
  101.             }
  102.         };
  103.     }
  104. // -----------------------------------------------------------------------------
  105. //
  106. //    r_s60uiexample_playview
  107. //    Define play view 
  108. //
  109. // -----------------------------------------------------------------------------
  110. //
  111. RESOURCE AVKON_VIEW r_s60uiexample_playview
  112.     {
  113.     menubar = r_s60uiexample_playmenubar;
  114.     cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
  115.     }
  116. // -----------------------------------------------------------------------------
  117. //
  118. //   r_S60UIExample_playmenubar
  119. //   Menu title definition
  120. //
  121. // -----------------------------------------------------------------------------
  122. //
  123. RESOURCE MENU_BAR r_s60uiexample_playmenubar
  124.     {
  125.         titles =
  126.         {
  127.             MENU_TITLE
  128.             {
  129.             menu_pane = r_s60uiexample_playmenu;
  130.             }
  131.         };
  132.     }
  133. // -----------------------------------------------------------------------------
  134. //
  135. //   r_s60uiexample_playmenu
  136. //   Menu for "Options"
  137. //
  138. // -----------------------------------------------------------------------------
  139. //
  140. RESOURCE MENU_PANE r_s60uiexample_playmenu
  141.     {
  142.     items =
  143.         {
  144.             MENU_ITEM
  145.             {
  146.                 command = ES60UIExampleStopGame;
  147.                 txt = qtn_endgame;
  148.             },
  149.             MENU_ITEM
  150.             {
  151.                 command = ES60UIExampleContinueGame;
  152.                 txt = qtn_continuegame;
  153.             },
  154.             MENU_ITEM
  155.             {
  156.                 command = ES60UIExampleStartGame;
  157.                 txt = qtn_restartgame;
  158.             },
  159.             MENU_ITEM
  160.             {
  161.                 command = ES60UIExamplePauseGame;
  162.                 txt = qtn_pausegame;
  163.             },
  164.             MENU_ITEM
  165.             {
  166.                 command = ES60UIExampleWeapon;
  167.                 txt = qtn_selectweapon;
  168.             },
  169.             MENU_ITEM
  170.             {
  171.                 command = EAknSoftkeyExit;
  172.                 txt = qtn_exit;
  173.             }
  174.         };
  175.     }
  176.     
  177.     
  178. RESOURCE DIALOG r_s60uiexample_enter_score_query
  179.     {
  180.     flags = EGeneralQueryFlags;
  181.     buttons = R_AVKON_SOFTKEYS_YES_NO;
  182.     items = 
  183.         { 
  184.             DLG_LINE 
  185.             {
  186.                 type = EAknCtQuery;
  187.                 id = EGeneralQuery;
  188.                 control = AVKON_CONFIRMATION_QUERY 
  189.                 {
  190.                     layout =  EConfirmationQueryLayout;
  191.                     label = qtn_enter_score_query_label;
  192.                 };
  193.             }
  194.         };
  195.     }
  196. RESOURCE DIALOG r_s60uiexample_confirmation_query
  197.     {
  198.     flags = EGeneralQueryFlags;
  199.     buttons = R_AVKON_SOFTKEYS_YES_NO;
  200.     items = 
  201.         { 
  202.             DLG_LINE 
  203.             {
  204.                 type = EAknCtQuery;
  205.                 id = EGeneralQuery;
  206.                 control = AVKON_CONFIRMATION_QUERY 
  207.                 {
  208.                     layout =  EConfirmationQueryLayout;
  209.                     label = qtn_confirmation_query_label;
  210.                 };
  211.             }
  212.         };
  213.     }
  214. //-----------------------------------------------------------------------------
  215. //
  216. //    r_s60uiexample_name_query
  217. //    Resource of Data Query.
  218. //
  219. //-----------------------------------------------------------------------------
  220. //
  221. RESOURCE DIALOG r_s60uiexample_name_query
  222.     {
  223.     flags = EGeneralQueryFlags;
  224.     buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
  225.     items =
  226.         {
  227.         DLG_LINE
  228.             {
  229.             type = EAknCtQuery;
  230.             id = EGeneralQuery;
  231.             control = AVKON_DATA_QUERY
  232.                 {
  233.                 layout = EDataLayout;
  234.                 label = qtn_name_query_label;
  235.                 control = EDWIN
  236.                     {
  237.                     flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable;
  238.                     width = 23;
  239.                     maxlength = 18;
  240.                     max_view_height_in_lines = 2; 
  241.                     };
  242.                 };
  243.             }
  244.         };
  245.     }
  246. //-----------------------------------------------------------------------------
  247. //
  248. //    r_s60uiexample_list_query
  249. //    Resources of Weapon Selection Query.
  250. //
  251. //-----------------------------------------------------------------------------
  252. //
  253. RESOURCE AVKON_LIST_QUERY r_s60uiexample_list_query
  254.     {
  255.     flags = EGeneralQueryFlags;
  256.     softkeys = R_AVKON_SOFTKEYS_OK_CANCEL;
  257.     items =
  258.         {
  259.         AVKON_LIST_QUERY_DLG_LINE
  260.             {
  261.             control = AVKON_LIST_QUERY_CONTROL
  262.                 {
  263.                 listtype = EAknCtSingleGraphicPopupMenuListBox;
  264.                 listbox = AVKON_LIST_QUERY_LIST
  265.                     {
  266.                     array_id = r_s60uiexample_list_query_item;
  267.                     };
  268.                 heading = qtn_list_query_heading;
  269.                 };
  270.             }
  271.         };
  272.     }
  273.     
  274.     
  275. RESOURCE ARRAY r_s60uiexample_list_query_item
  276.     {
  277.     items =
  278.         {
  279.         LBUF
  280.             {
  281.             txt = qtn_list_query_item_gun;
  282.             }, 
  283.         LBUF
  284.             {
  285.             txt = qtn_list_query_item_dagger;
  286.             },
  287.         LBUF
  288.             {
  289.             txt = qtn_list_query_item_candlestick;
  290.             }
  291.         };
  292.     }
  293. RESOURCE AKN_ICON_ARRAY r_s60uiexample_weapon_icons
  294.     {
  295.     bmpfile = "\resource\apps\S60UIExample.mif";
  296.     icons =
  297.         {
  298.         AKN_ICON
  299.             {
  300.             iconId = EMbmS60uiexampleGun;
  301.             maskId = EMbmS60uiexampleGun_mask;
  302.             },
  303.         AKN_ICON
  304.             {
  305.             iconId = EMbmS60uiexampleDagger;
  306.             maskId = EMbmS60uiexampleDagger_mask;
  307.             },
  308.         AKN_ICON
  309.             {
  310.             iconId = EMbmS60uiexampleCandlestick;
  311.             maskId = EMbmS60uiexampleCandlestick_mask;
  312.             }
  313.         };
  314.     }
  315. // -----------------------------------------------------------------------------
  316. //
  317. // String Resources .
  318. //
  319. // -----------------------------------------------------------------------------
  320. //
  321. RESOURCE TBUF32 r_s60uiexample_title_text
  322.     { 
  323.     buf = qtn_s60uiexample_title_text; 
  324.     }
  325. RESOURCE TBUF32 r_s60uiexample_highscore_title_text
  326.     { 
  327.     buf = qtn_high_score_title_text; 
  328.     }
  329. RESOURCE TBUF32 r_s60uiexample_resetting_text
  330.     { 
  331.     buf = qtn_resetting_text; 
  332.     }
  333. // -----------------------------------------------------------------------------
  334. //
  335. // Resources HighScore View.
  336. //
  337. // -----------------------------------------------------------------------------
  338. //
  339. RESOURCE AVKON_VIEW r_s60uiexample_highscore_view
  340.     {
  341.     cba = R_AVKON_SOFTKEYS_OK_CANCEL;
  342.     }
  343. // ---------------------------------------------------------------------------- 
  344. //
  345. // r_localisable_app_info
  346. //
  347. // ---------------------------------------------------------------------------- 
  348. //
  349. RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info
  350.     {
  351.     short_caption = qtn_short_caption_string;
  352.     caption_and_icon = 
  353.     CAPTION_AND_ICON_INFO
  354.         {
  355.         caption = qtn_caption_string;
  356.         number_of_icons = 1;
  357.     icon_file = "\resource\apps\S60UIExample_icon.mif";
  358.     };
  359.     }
  360. // End of File