Menus.html 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
  1. <!DOCTYPE html>
  2. <html dir="ltr">
  3. <head>
  4. <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  5. <title>App/UI/Menus - XOWA</title>
  6. <link rel="shortcut icon" href="https://gnosygnu.github.io/xowa/xowa_logo.png" />
  7. <link rel="stylesheet" href="https://gnosygnu.github.io/xowa/xowa_common.css" type="text/css">
  8. </head>
  9. <body class="mediawiki ltr sitedir-ltr ns-0 ns-subject skin-vector action-submit vector-animateLayout" spellcheck="false">
  10. <div id="mw-page-base" class="noprint"></div>
  11. <div id="mw-head-base" class="noprint"></div>
  12. <div id="content" class="mw-body">
  13. <h1 id="firstHeading" class="firstHeading"><span>App/UI/Menus</span></h1>
  14. <div id="bodyContent" class="mw-body-content">
  15. <div id="siteSub">From XOWA: the free, open-source, offline wiki application</div>
  16. <div id="contentSub"></div>
  17. <div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr">
  18. <p>
  19. XOWA provides a menu for the main window as well as a popup menu for the HTML browser.
  20. </p>
  21. <ul>
  22. <li>
  23. The main menu can be activated by pressing and releasing Alt and then using the arrow keys (or the shortcuts)
  24. </li>
  25. <li>
  26. The popup menu can be activated by right-clicking anywhere in the HTML area.
  27. </li>
  28. </ul>
  29. <p>
  30. These menus can also be customized using the source at <a href="/wiki/Options/Menus" id="xolnki_2" title="Options/Menus">Options/Menus</a>
  31. </p>
  32. <p>
  33. Note that internationalization (translation by language) is only supported for German. Other languages can be supported, but translations are needed! See <a href="/wiki/Help/Feedback" id="xolnki_3" title="Help/Feedback">Help/Feedback</a>.
  34. </p>
  35. <div id="toc" class="toc">
  36. <div id="toctitle" class="toctitle">
  37. <h2>
  38. Contents
  39. </h2>
  40. </div>
  41. <ul>
  42. <li class="toclevel-1 tocsection-1">
  43. <a href="#Reordering_items"><span class="tocnumber">1</span> <span class="toctext">Reordering items</span></a>
  44. </li>
  45. <li class="toclevel-1 tocsection-2">
  46. <a href="#Removing_buttons"><span class="tocnumber">2</span> <span class="toctext">Removing buttons</span></a>
  47. </li>
  48. <li class="toclevel-1 tocsection-3">
  49. <a href="#Removing_groups"><span class="tocnumber">3</span> <span class="toctext">Removing groups</span></a>
  50. </li>
  51. <li class="toclevel-1 tocsection-4">
  52. <a href="#Modifying_buttons"><span class="tocnumber">4</span> <span class="toctext">Modifying buttons</span></a>
  53. </li>
  54. <li class="toclevel-1 tocsection-5">
  55. <a href="#Modifying_groups"><span class="tocnumber">5</span> <span class="toctext">Modifying groups</span></a>
  56. </li>
  57. <li class="toclevel-1 tocsection-6">
  58. <a href="#Adding_buttons"><span class="tocnumber">6</span> <span class="toctext">Adding buttons</span></a>
  59. </li>
  60. <li class="toclevel-1 tocsection-7">
  61. <a href="#Adding_groups"><span class="tocnumber">7</span> <span class="toctext">Adding groups</span></a>
  62. </li>
  63. </ul>
  64. </div>
  65. <h2>
  66. <span class="mw-headline" id="Reordering_items">Reordering items</span>
  67. </h2>
  68. <p>
  69. To reorder buttons / groups, simply move the corresponding line / lines
  70. </p>
  71. <p>
  72. For example, to move the <code>about</code> item
  73. </p>
  74. <ul>
  75. <li>
  76. Cut line 7
  77. </li>
  78. <li>
  79. Paste at line 3
  80. </li>
  81. </ul>
  82. <p>
  83. <b>Before</b>:
  84. </p>
  85. <div class="mw-highlight">
  86. <pre style="overflow:auto">
  87. <span style="-moz-user-select:none;">1</span> <span>add_grp_default('xowa.help') {</span>
  88. <span style="-moz-user-select:none;">2</span> <span> add_btn_default('xowa.help.help');</span>
  89. <span style="-moz-user-select:none;">3</span> <span> add_btn_default('xowa.help.change_log');</span>
  90. <span style="-moz-user-select:none;">4</span> <span> add_btn_default('xowa.help.diagnostics');</span>
  91. <span style="-moz-user-select:none;">5</span> <span> add_btn_default('xowa.help.context_menu');</span>
  92. <span style="-moz-user-select:none;">6</span> <span> add_spr();</span>
  93. <span style="-moz-user-select:none;">7</span> <span style="background-color: #FFFFCC;"> add_btn_default('xowa.help.about');</span>
  94. <span style="-moz-user-select:none;">8</span> <span>}</span>
  95. </pre>
  96. </div>
  97. <p>
  98. <b>After</b>:
  99. </p>
  100. <div class="mw-highlight">
  101. <pre style="overflow:auto">
  102. <span style="-moz-user-select:none;">1</span> <span>add_grp_default('xowa.help') {</span>
  103. <span style="-moz-user-select:none;">2</span> <span> add_btn_default('xowa.help.help');</span>
  104. <span style="-moz-user-select:none;">3</span> <span style="background-color: #FFFFCC;"> add_btn_default('xowa.help.about');</span>
  105. <span style="-moz-user-select:none;">4</span> <span> add_btn_default('xowa.help.change_log');</span>
  106. <span style="-moz-user-select:none;">5</span> <span> add_btn_default('xowa.help.diagnostics');</span>
  107. <span style="-moz-user-select:none;">6</span> <span> add_btn_default('xowa.help.context_menu');</span>
  108. <span style="-moz-user-select:none;">7</span> <span> add_spr();</span>
  109. <span style="-moz-user-select:none;">8</span> <span>}</span>
  110. </pre>
  111. </div>
  112. <h2>
  113. <span class="mw-headline" id="Removing_buttons">Removing buttons</span>
  114. </h2>
  115. <p>
  116. To remove a button, remove the entire line.
  117. </p>
  118. <p>
  119. For example, to remove the <code>diagnostics</code> item, remove the line <code>add_btn_default('xowa.help.diagnostics');</code>
  120. </p>
  121. <p>
  122. <b>Before</b>:
  123. </p>
  124. <div class="mw-highlight">
  125. <pre style="overflow:auto">
  126. <span style="-moz-user-select:none;">1</span> <span>add_grp_default('xowa.help') {</span>
  127. <span style="-moz-user-select:none;">2</span> <span> add_btn_default('xowa.help.help');</span>
  128. <span style="-moz-user-select:none;">3</span> <span> add_btn_default('xowa.help.change_log');</span>
  129. <span style="-moz-user-select:none;">4</span> <span style="background-color: #FFFFCC;"> add_btn_default('xowa.help.diagnostics');</span>
  130. <span style="-moz-user-select:none;">5</span> <span> add_btn_default('xowa.help.context_menu');</span>
  131. <span style="-moz-user-select:none;">6</span> <span> add_spr();</span>
  132. <span style="-moz-user-select:none;">7</span> <span> add_btn_default('xowa.help.about');</span>
  133. <span style="-moz-user-select:none;">8</span> <span>}</span>
  134. </pre>
  135. </div>
  136. <p>
  137. <b>After</b>:
  138. </p>
  139. <div class="mw-highlight">
  140. <pre style="overflow:auto">
  141. <span style="-moz-user-select:none;">1</span> <span>add_grp_default('xowa.help') {</span>
  142. <span style="-moz-user-select:none;">2</span> <span> add_btn_default('xowa.help.help');</span>
  143. <span style="-moz-user-select:none;">3</span> <span> add_btn_default('xowa.help.change_log');</span>
  144. <span style="-moz-user-select:none;">4</span> <span> add_btn_default('xowa.help.context_menu');</span>
  145. <span style="-moz-user-select:none;">5</span> <span> add_spr();</span>
  146. <span style="-moz-user-select:none;">6</span> <span> add_btn_default('xowa.help.about');</span>
  147. <span style="-moz-user-select:none;">7</span> <span>}</span>
  148. </pre>
  149. </div>
  150. <h2>
  151. <span class="mw-headline" id="Removing_groups">Removing groups</span>
  152. </h2>
  153. <p>
  154. To remove a group, remove the entire group starting at the line with the <code>{</code> and ending at the line with the <code>}</code>.
  155. </p>
  156. <p>
  157. For example, to remove the <code>wikis</code> group, remove lines 4 - 7.
  158. </p>
  159. <p>
  160. <b>Before</b>:
  161. </p>
  162. <div class="mw-highlight">
  163. <pre style="overflow:auto">
  164. <span style="-moz-user-select:none;">1</span> <span>add_grp_default('xowa.tools') {</span>
  165. <span style="-moz-user-select:none;">2</span> <span> add_btn_default('xowa.tools.options');</span>
  166. <span style="-moz-user-select:none;">3</span> <span> add_spr;</span>
  167. <span style="-moz-user-select:none;">4</span> <span style="background-color: #FFFFCC;"> add_grp_default('xowa.tools.wikis') {</span>
  168. <span style="-moz-user-select:none;">5</span> <span style="background-color: #FFFFCC;"> add_btn_default('xowa.tools.wikis.import_from_list');</span>
  169. <span style="-moz-user-select:none;">6</span> <span style="background-color: #FFFFCC;"> add_btn_default('xowa.tools.wikis.import_from_script');</span>
  170. <span style="-moz-user-select:none;">7</span> <span style="background-color: #FFFFCC;"> }</span>
  171. <span style="-moz-user-select:none;">8</span> <span>}</span>
  172. </pre>
  173. </div>
  174. <p>
  175. <b>After</b>:
  176. </p>
  177. <div class="mw-highlight">
  178. <pre style="overflow:auto">
  179. <span style="-moz-user-select:none;">1</span> <span>add_grp_default('xowa.tools') {</span>
  180. <span style="-moz-user-select:none;">2</span> <span> add_btn_default('xowa.tools.options');</span>
  181. <span style="-moz-user-select:none;">3</span> <span> add_spr;</span>
  182. <span style="-moz-user-select:none;">4</span> <span>}</span>
  183. </pre>
  184. </div>
  185. <h2>
  186. <span class="mw-headline" id="Modifying_buttons">Modifying buttons</span>
  187. </h2>
  188. <p>
  189. To modify a button, change the properties for the button.
  190. </p>
  191. <p>
  192. For example, to change the properties of the <code>diagnostics</code> item, do the following:
  193. </p>
  194. <p>
  195. <b>Before</b>:
  196. </p>
  197. <div class="mw-highlight">
  198. <pre style="overflow:auto">
  199. <span style="-moz-user-select:none;">1</span> <span>add_grp_default('xowa.help') {</span>
  200. <span style="-moz-user-select:none;">2</span> <span> add_btn_default('xowa.help.help');</span>
  201. <span style="-moz-user-select:none;">3</span> <span> add_btn_default('xowa.help.change_log');</span>
  202. <span style="-moz-user-select:none;">4</span> <span style="background-color: #FFFFCC;"> add_btn_default('xowa.help.diagnostics');</span>
  203. <span style="-moz-user-select:none;">5</span> <span> add_btn_default('xowa.help.context_menu');</span>
  204. <span style="-moz-user-select:none;">6</span> <span> add_spr();</span>
  205. <span style="-moz-user-select:none;">7</span> <span> add_btn_default('xowa.help.about');</span>
  206. <span style="-moz-user-select:none;">8</span> <span>}</span>
  207. </pre>
  208. </div>
  209. <p>
  210. <b>After</b>:
  211. </p>
  212. <div class="mw-highlight">
  213. <pre style="overflow:auto">
  214. <span style="-moz-user-select:none;">1</span> <span>add_grp_default('xowa.help') {</span>
  215. <span style="-moz-user-select:none;">2</span> <span> add_btn_default('xowa.help.help');</span>
  216. <span style="-moz-user-select:none;">3</span> <span> add_btn_default('xowa.help.change_log');</span>
  217. <span style="-moz-user-select:none;">4</span> <span style="background-color: #FFFFCC;"> add_btn_default('xowa.help.diagnostics') {</span>
  218. <span style="-moz-user-select:none;">5</span> <span style="background-color: #FFFFCC;"> text = 'Diagnostics for Scribunto';</span>
  219. <span style="-moz-user-select:none;">6</span> <span style="background-color: #FFFFCC;"> shortcut = 's';</span>
  220. <span style="-moz-user-select:none;">7</span> <span style="background-color: #FFFFCC;"> img = 'help/about.png';</span>
  221. <span style="-moz-user-select:none;">8</span> <span style="background-color: #FFFFCC;"> cmd = 'app.api.nav.goto("home/wiki/Help:Diagnostics/Scribunto/All");';</span>
  222. <span style="-moz-user-select:none;">9</span> <span style="background-color: #FFFFCC;"> }</span>
  223. <span style="-moz-user-select:none;">10</span> <span> add_btn_default('xowa.help.context_menu');</span>
  224. <span style="-moz-user-select:none;">11</span> <span> add_spr();</span>
  225. <span style="-moz-user-select:none;">12</span> <span> add_btn_default('xowa.help.about');</span>
  226. <span style="-moz-user-select:none;">13</span> <span>}</span>
  227. </pre>
  228. </div>
  229. <ul>
  230. <li>
  231. To leave text, shortcut, img, or cmd unchanged, omit the line.
  232. </li>
  233. <li>
  234. To leave an image or a shortcut blank, use <code>''</code>
  235. </li>
  236. </ul>
  237. <p>
  238. <br>
  239. </p>
  240. <h2>
  241. <span class="mw-headline" id="Modifying_groups">Modifying groups</span>
  242. </h2>
  243. <p>
  244. To modify a group, change the properties for the group.
  245. </p>
  246. <p>
  247. For example, to change the properties of the <code>help</code> item, do the following:
  248. </p>
  249. <p>
  250. <b>Before</b>:
  251. </p>
  252. <div class="mw-highlight">
  253. <pre style="overflow:auto">
  254. <span style="-moz-user-select:none;">1</span> <span style="background-color: #FFFFCC;">add_grp_default('xowa.help') {</span>
  255. <span style="-moz-user-select:none;">2</span> <span> add_btn_default('xowa.help.help');</span>
  256. <span style="-moz-user-select:none;">3</span> <span> add_btn_default('xowa.help.change_log');</span>
  257. <span style="-moz-user-select:none;">4</span> <span> add_btn_default('xowa.help.diagnostics');</span>
  258. <span style="-moz-user-select:none;">5</span> <span> add_btn_default('xowa.help.context_menu');</span>
  259. <span style="-moz-user-select:none;">6</span> <span> add_spr();</span>
  260. <span style="-moz-user-select:none;">7</span> <span> add_btn_default('xowa.help.about');</span>
  261. <span style="-moz-user-select:none;">8</span> <span>}</span>
  262. </pre>
  263. </div>
  264. <p>
  265. <b>After</b>:
  266. </p>
  267. <div class="mw-highlight">
  268. <pre style="overflow:auto">
  269. <span style="-moz-user-select:none;">1</span> <span style="background-color: #FFFFCC;">add_grp_default('xowa.help') {</span>
  270. <span style="-moz-user-select:none;">2</span> <span style="background-color: #FFFFCC;"> text = 'my help';</span>
  271. <span style="-moz-user-select:none;">3</span> <span style="background-color: #FFFFCC;"> shortcut = 'y';</span>
  272. <span style="-moz-user-select:none;">4</span> <span style="background-color: #FFFFCC;"> img = 'help/about.png';</span>
  273. <span style="-moz-user-select:none;">5</span> <span> add_btn_default('xowa.help.help');</span>
  274. <span style="-moz-user-select:none;">6</span> <span> add_btn_default('xowa.help.change_log');</span>
  275. <span style="-moz-user-select:none;">7</span> <span> add_btn_default('xowa.help.diagnostics');</span>
  276. <span style="-moz-user-select:none;">8</span> <span> add_btn_default('xowa.help.context_menu');</span>
  277. <span style="-moz-user-select:none;">9</span> <span> add_spr();</span>
  278. <span style="-moz-user-select:none;">10</span> <span> add_btn_default('xowa.help.about');</span>
  279. <span style="-moz-user-select:none;">11</span> <span>}</span>
  280. </pre>
  281. </div>
  282. <h2>
  283. <span class="mw-headline" id="Adding_buttons">Adding buttons</span>
  284. </h2>
  285. <p>
  286. To add a button, add a new line for <code>add_btn</code>
  287. </p>
  288. <p>
  289. For example, to add a new button to go to simplewiki/Earth, do the following:
  290. </p>
  291. <div class="mw-highlight">
  292. <pre style="overflow:auto">
  293. add_btn('my_custom_namespace.my_custom_button_key', 'Goto Earth', 'e', 'help/about.png', 'app.api.nav.goto("simple.wikipedia.org/wiki/Earth");');
  294. </pre>
  295. </div>
  296. <ul>
  297. <li>
  298. To leave an image or a shortcut blank, use <code>''</code>
  299. </li>
  300. </ul>
  301. <h2>
  302. <span class="mw-headline" id="Adding_groups">Adding groups</span>
  303. </h2>
  304. <p>
  305. To add a group, add a new section for <code>add_grp</code>
  306. </p>
  307. <p>
  308. For example, to add a new group called pages, do the following:
  309. </p>
  310. <div class="mw-highlight">
  311. <pre style="overflow:auto">
  312. add_grp('my_custom_namespace.my_custom_group_key', 'Pages', 'p', 'help/about.png') {
  313. }
  314. </pre>
  315. </div>
  316. </div>
  317. </div>
  318. </div>
  319. <div id="mw-head" class="noprint">
  320. <div id="left-navigation">
  321. <div id="p-namespaces" class="vectorTabs">
  322. <h3>Namespaces</h3>
  323. <ul>
  324. <li id="ca-nstab-main" class="selected"><span><a id="ca-nstab-main-href" href="index.html">Page</a></span></li>
  325. </ul>
  326. </div>
  327. </div>
  328. </div>
  329. <div id='mw-panel' class='noprint'>
  330. <div id='p-logo'>
  331. <a style="background-image: url(https://gnosygnu.github.io/xowa/xowa_logo.png);" href="http://xowa.org/" title="Visit the main page"></a>
  332. </div>
  333. <div class="portal" id='xowa-portal-home'>
  334. <h3>XOWA</h3>
  335. <div class="body">
  336. <ul>
  337. <li><a href="http://xowa.org/index.html" title='Visit the main page'>Main page</a></li>
  338. <li><a href="http://xowa.org/screenshots.html" title='See screenshots of XOWA'>Screenshots</a></li>
  339. <li><a href="https://www.youtube.com/watch?v=q0qbXYXEH6M" title="See a video of XOWA Desktop in action">Video</a></li>
  340. <li><a href="http://xowa.org/home/wiki/Help/Download_XOWA.html" title='Download the XOWA application'>Download XOWA</a></li>
  341. <li><a href="http://xowa.org/home/wiki/Dashboard/Image_databases.html" title='Download offline wikis and image databases'>Download wikis</a></li>
  342. </ul>
  343. </div>
  344. </div>
  345. <div class="portal" id='xowa-portal-started'>
  346. <h3>Getting started</h3>
  347. <div class="body">
  348. <ul>
  349. <li><a href="http://xowa.org/home/wiki/App/Setup/System_requirements.html" title='Get XOWA&apos;s system requirements'>Requirements</a></li>
  350. <li><a href="http://xowa.org/home/wiki/App/Setup/Installation.html" title='Get instructions for installing XOWA'>Installation</a></li>
  351. <li><a href="http://xowa.org/home/wiki/App/Import/Simple_Wikipedia.html" title='Learn how to set up Simple Wikipedia'>Simple Wikipedia</a></li>
  352. <li><a href="http://xowa.org/home/wiki/App/Import/English_Wikipedia.html" title='Learn how to set up English Wikipedia'>English Wikipedia</a></li>
  353. <li><a href="http://xowa.org/home/wiki/App/Import/Other_wikis.html" title='Learn how to set up other Wikipedias'>Other Wikipedias</a></li>
  354. </ul>
  355. </div>
  356. </div>
  357. <div class="portal" id='xowa-portal-android'>
  358. <h3>Android</h3>
  359. <div class="body">
  360. <ul>
  361. <li><a href="http://xowa.org/home/wiki/Android/Setup.html" title='Setup XOWA on your Android device'>Setup</a></li>
  362. <li><a href="https://www.youtube.com/watch?v=jsMTBxGweUw" title="See a video of XOWA Android in action">Video</a></li>
  363. </ul>
  364. </div>
  365. </div>
  366. <div class="portal" id='xowa-portal-help'>
  367. <h3>Help</h3>
  368. <div class="body">
  369. <ul>
  370. <li><a href="http://xowa.org/home/wiki/Help/About.html" title='Get more information about XOWA'>About</a></li>
  371. <li><a href="http://xowa.org/home/wiki/Help/Contents.html" title='View a list of help topics'>Contents</a></li>
  372. <li><a href="http://xowa.org/home/wiki/Help/Media.html" title='Read what others have written about XOWA'>Media</a></li>
  373. <li><a href="http://xowa.org/home/wiki/Help/Feedback.html" title='Questions? Comments? Leave feedback for XOWA'>Feedback</a></li>
  374. </ul>
  375. </div>
  376. </div>
  377. <div class="portal" id='xowa-portal-blog'>
  378. <h3>Blog</h3>
  379. <div class="body">
  380. <ul>
  381. <li><a href="http://xowa.org/home/wiki/Blog.html" title='Follow XOWA''s development process'>Current</a></li>
  382. </ul>
  383. </div>
  384. </div>
  385. <div class="portal" id='xowa-portal-links'>
  386. <h3>Links</h3>
  387. <div class="body">
  388. <ul>
  389. <li><a href="http://dumps.wikimedia.org/backup-index.html" title="Get wiki datababase dumps directly from Wikimedia">Wikimedia dumps</a></li>
  390. <li><a href="https://archive.org/search.php?query=xowa" title="Search archive.org for XOWA files">XOWA @ archive.org</a></li>
  391. <li><a href="http://en.wikipedia.org" title="Visit Wikipedia (and compare to XOWA!)">English Wikipedia</a></li>
  392. </ul>
  393. </div>
  394. </div>
  395. <div class="portal" id='xowa-portal-donate'>
  396. <h3>Donate</h3>
  397. <div class="body">
  398. <ul>
  399. <li><a href="https://archive.org/donate/index.php" title="Support archive.org!">archive.org</a></li><!-- listed first due to recent fire damages: http://blog.archive.org/2013/11/06/scanning-center-fire-please-help-rebuild/ -->
  400. <li><a href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector" title="Support Wikipedia!">Wikipedia</a></li>
  401. <li><a href="http://xowa.org/home/wiki/Help/Donate.html" title="Support XOWA!">XOWA</a></li>
  402. </ul>
  403. </div>
  404. </div>
  405. </div>
  406. </body>
  407. </html>