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 = EAknSoftkeyExit;
  167.                 txt = qtn_exit;
  168.             }
  169.         };
  170.     }
  171.     
  172.     
  173. RESOURCE DIALOG r_s60uiexample_enter_score_query
  174.     {
  175.     flags = EGeneralQueryFlags;
  176.     buttons = R_AVKON_SOFTKEYS_YES_NO;
  177.     items = 
  178.         { 
  179.             DLG_LINE 
  180.             {
  181.                 type = EAknCtQuery;
  182.                 id = EGeneralQuery;
  183.                 control = AVKON_CONFIRMATION_QUERY 
  184.                 {
  185.                     layout =  EConfirmationQueryLayout;
  186.                     label = qtn_enter_score_query_label;
  187.                 };
  188.             }
  189.         };
  190.     }
  191. RESOURCE DIALOG r_s60uiexample_confirmation_query
  192.     {
  193.     flags = EGeneralQueryFlags;
  194.     buttons = R_AVKON_SOFTKEYS_YES_NO;
  195.     items = 
  196.         { 
  197.             DLG_LINE 
  198.             {
  199.                 type = EAknCtQuery;
  200.                 id = EGeneralQuery;
  201.                 control = AVKON_CONFIRMATION_QUERY 
  202.                 {
  203.                     layout =  EConfirmationQueryLayout;
  204.                     label = qtn_confirmation_query_label;
  205.                 };
  206.             }
  207.         };
  208.     }
  209. //-----------------------------------------------------------------------------
  210. //
  211. //    r_s60uiexample_name_query
  212. //    Resource of Data Query.
  213. //
  214. //-----------------------------------------------------------------------------
  215. //
  216. RESOURCE DIALOG r_s60uiexample_name_query
  217.     {
  218.     flags = EGeneralQueryFlags;
  219.     buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
  220.     items =
  221.         {
  222.         DLG_LINE
  223.             {
  224.             type = EAknCtQuery;
  225.             id = EGeneralQuery;
  226.             control = AVKON_DATA_QUERY
  227.                 {
  228.                 layout = EDataLayout;
  229.                 label = qtn_name_query_label;
  230.                 control = EDWIN
  231.                     {
  232.                     flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable;
  233.                     width = 23;
  234.                     maxlength = 18;
  235.                     max_view_height_in_lines = 2; 
  236.                     };
  237.                 };
  238.             }
  239.         };
  240.     }
  241. //-----------------------------------------------------------------------------
  242. //
  243. //    r_s60uiexample_list_query
  244. //    Resources of Weapon Selection Query.
  245. //
  246. //-----------------------------------------------------------------------------
  247. //
  248. RESOURCE AVKON_LIST_QUERY r_s60uiexample_list_query
  249.     {
  250.     flags = EGeneralQueryFlags;
  251.     softkeys = R_AVKON_SOFTKEYS_OK_CANCEL;
  252.     items =
  253.         {
  254.         AVKON_LIST_QUERY_DLG_LINE
  255.             {
  256.             control = AVKON_LIST_QUERY_CONTROL
  257.                 {
  258.                 listtype = EAknCtSinglePopupMenuListBox;
  259.                 listbox = AVKON_LIST_QUERY_LIST
  260.                     {
  261.                     array_id = r_s60uiexample_list_query_item;
  262.                     };
  263.                 heading = qtn_list_query_heading;
  264.                 };
  265.             }
  266.         };
  267.     }
  268.     
  269.     
  270. RESOURCE ARRAY r_s60uiexample_list_query_item
  271.     {
  272.     items =
  273.         {
  274.         LBUF
  275.             {
  276.             txt = qtn_list_query_item_gun;
  277.             }, 
  278.         LBUF
  279.             {
  280.             txt = qtn_list_query_item_dagger;
  281.             },
  282.         LBUF
  283.             {
  284.             txt = qtn_list_query_item_candlestick;
  285.             }
  286.         };
  287.     }
  288. RESOURCE AKN_ICON_ARRAY r_s60uiexample_weapon_icons
  289.     {
  290.     bmpfile = "\resource\apps\S60UIExample.mif";
  291.     icons =
  292.         {
  293.         AKN_ICON
  294.             {
  295.             iconId = EMbmS60uiexampleGun;
  296.             maskId = EMbmS60uiexampleGun_mask;
  297.             },
  298.         AKN_ICON
  299.             {
  300.             iconId = EMbmS60uiexampleDagger;
  301.             maskId = EMbmS60uiexampleDagger_mask;
  302.             },
  303.         AKN_ICON
  304.             {
  305.             iconId = EMbmS60uiexampleCandlestick;
  306.             maskId = EMbmS60uiexampleCandlestick_mask;
  307.             }
  308.         };
  309.     }
  310. // -----------------------------------------------------------------------------
  311. //
  312. // String Resources .
  313. //
  314. // -----------------------------------------------------------------------------
  315. //
  316. RESOURCE TBUF32 r_s60uiexample_title_text
  317.     { 
  318.     buf = qtn_s60uiexample_title_text; 
  319.     }
  320. RESOURCE TBUF32 r_s60uiexample_highscore_title_text
  321.     { 
  322.     buf = qtn_high_score_title_text; 
  323.     }
  324. RESOURCE TBUF32 r_s60uiexample_resetting_text
  325.     { 
  326.     buf = qtn_resetting_text; 
  327.     }
  328. // -----------------------------------------------------------------------------
  329. //
  330. // Resources HighScore View.
  331. //
  332. // -----------------------------------------------------------------------------
  333. //
  334. RESOURCE AVKON_VIEW r_s60uiexample_highscore_view
  335.     {
  336.     cba = R_AVKON_SOFTKEYS_OK_CANCEL;
  337.     }
  338. // ---------------------------------------------------------------------------- 
  339. //
  340. // r_localisable_app_info
  341. //
  342. // ---------------------------------------------------------------------------- 
  343. //
  344. RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info
  345.     {
  346.     short_caption = qtn_short_caption_string;
  347.     caption_and_icon = 
  348.     CAPTION_AND_ICON_INFO
  349.         {
  350.         caption = qtn_caption_string;
  351.         number_of_icons = 1;
  352.     icon_file = "\resource\apps\S60UIExample_icon.mif";
  353.     };
  354.     }
  355. // End of File