Skinning.menus

From Shareaza Wiki
Revision as of 01:16, 28 August 2010 by Old death (talk | contribs)
Jump to navigation Jump to search
  Languages:

[[::Skinning.menus|English]] • [[::Skinning.menus/de|Deutsch]] • [[::Skinning.menus/es|Español]] • [[::Skinning.menus/fr|Français]] • [[::Skinning.menus/he|עברית]] • [[::Skinning.menus/it|Italiano]] • [[::Skinning.menus/nl|Nederlands]] • [[::Skinning.menus/pl|Polski]] • [[::Skinning.menus/pt|Português]] • [[::Skinning.menus/ru|Русский]] • [[::Skinning.menus/zh-hant|‪中文(繁體)]]

e
  Recovered

The following content has been recovered from the old wiki and pantheraproject*net. Competent verification is needed.

e

Menu Names

For an up-to-date version of names see default-en.xml in your skins folder. A selection of the current menu names are:

<form name="languageselector-form-1" id="languageselector-form-1" method="get" action="/wiki/index.php" style="display:inline;"><input name="title" type="hidden" value="Skinning.menus" /><select name="setlang" id="languageselector-select-1" style=""><option value="en" selected="selected">English</option><option value="es">Español</option><option value="de">Deutsch</option><option value="fr">Français</option><option value="he">עברית</option><option value="it">Italiano</option><option value="nl">Nederlands</option><option value="pl">Polski</option><option value="ru">Русский</option><option value="pt">Português</option><option value="tw">Twi</option></select><input type="submit" value="set" id="languageselector-commit-1" style="" /></form><a name=".3Cmenus.3E" id=".3Cmenus.3E"></a>

<menus>

The <menus> element defines the menus used in the program. Shareaza contains many menus, and each of which is assigned a name to identify it. Skins can override the design for every menu, or just a few. To see what the menus currently look like, check out default-en.xml in your skins folder.

Here is an example from MyMenuSkin.xml:

 <span class="re1"><?xml</span> <span class="re0">version</span>=<span class="st0">"1.0"</span> <span class="re0">encoding</span>=<span class="st0">"UTF-8"</span><span class="re2">?></span>
 <span class="re1"><skin</span> <span class="re0">xmlns</span>=<span class="st0">"http://www.shareaza.com/schemas/Skin.xsd"</span> <span class="re0">version</span>=<span class="st0">"1.0"</span><span class="re2">></span>
  <span class="re1"><manifest</span> <span class="re0">name</span>=<span class="st0">"My Menu Skin"</span> <span class="re0">author</span>=<span class="st0">"Me"</span> <span class="re0">type</span>=<span class="st0">"Skin"</span><span class="re2">/></span>
  <span class="re1"><menus<span class="re2">></span></span>
   <span class="re1"><menu</span> <span class="re0">name</span>=<span class="st0">"CHomeWnd"</span><span class="re2">></span>
    <span class="re1"><item</span> <span class="re0">id</span>=<span class="st0">"ID_TAB_HOME"</span> <span class="re0">text</span>=<span class="st0">"_Home"</span><span class="re2">/></span>
    <span class="re1"><item</span> <span class="re0">id</span>=<span class="st0">"ID_TAB_LIBRARY"</span> <span class="re0">text</span>=<span class="st0">"_Library"</span><span class="re2">/></span>
    <span class="re1"><item</span> <span class="re0">id</span>=<span class="st0">"ID_TAB_NETWORK"</span> <span class="re0">text</span>=<span class="st0">"_Network"</span><span class="re2">/></span>
    <span class="re1"><item</span> <span class="re0">id</span>=<span class="st0">"ID_TAB_TRANSFERS"</span> <span class="re0">text</span>=<span class="st0">"_Transfers"</span><span class="re2">/></span>
    <span class="re1"><separator</span><span class="re2">/></span>
    <span class="re1"><item</span> <span class="re0">id</span>=<span class="st0">"ID_TAB_CONNECT"</span> <span class="re0">text</span>=<span class="st0">"_Connect"</span><span class="re2">/></span>
    <span class="re1"><item</span> <span class="re0">id</span>=<span class="st0">"ID_NETWORK_SEARCH"</span> <span class="re0">text</span>=<span class="st0">"New _Search..."</span><span class="re2">/></span>
   <span class="re1"></menu<span class="re2">></span></span>
  <span class="re1"></menus<span class="re2">></span></span>
 <span class="re1"></skin<span class="re2">></span></span>

Each menu is contained within a <menu> element, which is named by a name attribute. A list of current menu names is included at the end of this section (there are many!).

Each menu contains one or more items, which can be either <item>'s, <separator>'s or sub-menus (<menu>'s).

<a name="Menu_Items" id="Menu_Items"></a>

Menu Items

Menu items are created with an <item/> element, and are the most common element in menus. Each menu has the following attributes:

  • id - The command ID of the menu item, which controls what it actually does.
  • text - The text to display next to the icon for the menu item.


<a name="Separators" id="Separators"></a>

Separators

Separators are created with a <separator/> element, and are the second most common element found in menus. Separators have no additional attributes, as they simply produce a "gap" in the menu, often used to group sets of commands together.

<a name="Sub-Menus" id="Sub-Menus"></a>

Sub-Menus

Menus can be nested by creating sub-menus, or popup-menus within an existing menu. This allows a very logical grouping of commands which can simplify the overall experience. It's easy to create a sub-menu -- simply start a new <menu> element within an existing menu. The only difference is that you don't need to assign a name attribute -- assign a text attribute instead, which will be how the sub-menu is displayed.

An example:

 <span class="re1"><?xml</span> <span class="re0">version</span>=<span class="st0">"1.0"</span> <span class="re0">encoding</span>=<span class="st0">"UTF-8"</span><span class="re2">?></span>
 <span class="re1"><skin</span> <span class="re0">xmlns</span>=<span class="st0">"http://www.shareaza.com/schemas/Skin.xsd"</span> <span class="re0">version</span>=<span class="st0">"1.0"</span><span class="re2">></span>
  <span class="re1"><manifest</span> <span class="re0">name</span>=<span class="st0">"My Menu Skin"</span> <span class="re0">author</span>=<span class="st0">"Me"</span> <span class="re0">type</span>=<span class="st0">"Skin"</span><span class="re2">/></span>
   <span class="re1"><menus<span class="re2">></span></span>
    <span class="re1"><menu</span> <span class="re0">name</span>=<span class="st0">"CHomeWnd"</span><span class="re2">></span>
     <span class="re1"><item</span> <span class="re0">id</span>=<span class="st0">"ID_TAB_HOME"</span> <span class="re0">text</span>=<span class="st0">"_Home"</span><span class="re2">/></span>
     <span class="re1"><item</span> <span class="re0">id</span>=<span class="st0">"ID_TAB_LIBRARY"</span> <span class="re0">text</span>=<span class="st0">"_Library"</span><span class="re2">/></span>
     <span class="re1"><item</span> <span class="re0">id</span>=<span class="st0">"ID_TAB_NETWORK"</span> <span class="re0">text</span>=<span class="st0">"_Network"</span><span class="re2">/></span>
     <span class="re1"><item</span> <span class="re0">id</span>=<span class="st0">"ID_TAB_TRANSFERS"</span> <span class="re0">text</span>=<span class="st0">"_Transfers"</span><span class="re2">/></span>
     <span class="re1"><separator</span><span class="re2">/></span>
     <span class="re1"><menu</span> <span class="re0">text</span>=<span class="st0">"_Advanced"</span><span class="re2">></span>
      <span class="co1"><!--(Sub-Menu)--></span>
      <span class="re1"><item</span> <span class="re0">id</span>=<span class="st0">"ID_VIEW_SECURITY"</span> <span class="re0">text</span>=<span class="st0">"Se_curity"</span> <span class="re0">shortcut</span>=<span class="st0">"F7"</span><span class="re2">/></span>
      <span class="re1"><item</span> <span class="re0">id</span>=<span class="st0">"ID_VIEW_HOSTS"</span> <span class="re0">text</span>=<span class="st0">"H_ost Cache"</span> <span class="re0">shortcut</span>=<span class="st0">"F8"</span><span class="re2">/></span>
      <span class="re1"><item</span> <span class="re0">id</span>=<span class="st0">"ID_VIEW_DISCOVERY"</span> <span class="re0">text</span>=<span class="st0">"Disco_very"</span> <span class="re0">shortcut</span>=<span class="st0">"F9"</span><span class="re2">/></span>
      <span class="re1"><item</span> <span class="re0">id</span>=<span class="st0">"ID_VIEW_TRAFFIC"</span> <span class="re0">text</span>=<span class="st0">"_Graph"</span> <span class="re0">shortcut</span>=<span class="st0">"F10"</span><span class="re2">/></span>
     <span class="re1"></menu<span class="re2">></span></span>
     <span class="re1"><item</span> <span class="re0">id</span>=<span class="st0">"ID_TAB_CONNECT"</span> <span class="re0">text</span>=<span class="st0">"_Connect"</span><span class="re2">/></span>
     <span class="re1"><item</span> <span class="re0">id</span>=<span class="st0">"ID_NETWORK_SEARCH"</span> <span class="re0">text</span>=<span class="st0">"New _Search..."</span><span class="re2">/></span>
    <span class="re1"></menu<span class="re2">></span></span>
   <span class="re1"></menus<span class="re2">></span></span>
 <span class="re1"></skin<span class="re2">></span></span>


<a name="Menu_Names" id="Menu_Names"></a>

Menu Names

For an up-to-date version of names see default-en.xml in your skins folder. A selection of the current menu names are:

Menu Description
CBrowseHostWnd The browse host window popup menu.
CDiscoveryWnd The discovery services window popup menu.
CDownloadTabBar
CDownloadsWnd.Completed The download window popup menu, when a completed download is selected.
CDownloadsWnd.Download The download window popup menu, when a download is selected.
CDownloadsWnd.Source The download window popup menu, when a transfer or source is selected.
CHitMonitorWnd The hit monitor window popup menu.
CHomeWnd The home window popup menu.
CHostCacheWnd The host cache window popup menu.
CLibraryFileView
CLibraryTileView
CLibraryTree.Physical
CLibraryTree.Virtual
CLibraryWnd.File The library window popup menu, when a file is selected.
CLibraryWnd.Folder The library window popup menu, when a folder is selected.
CMainWnd.Basic The main window menu, in normal mode.
CMainWnd.Tabbed The main window menu, in tabbed mode.
CMainWnd.Tray The popup tray menu.
CMainWnd.Windowed The main window menu, in windowed mode.
CMainWnd.View.Tabbed The popup view menu, when the user right-clicks nowhere. Tabbed mode.
CMainWnd.View.Windowed The popup view menu, when the user right-clicks nowhere. Windowed mode.
CMediaFrame
CMediaFrame.Zoom
CMediaList
CNeighboursWnd The neighbours window popup menu.
CPrivateChatFrame
CSearchMonitorWnd The search monitor window popup menu.
CSearchWnd The search window popup menu.
CSecurityWnd The security window popup menu.
CSystemWnd The system window popup menu.
CTrafficWnd The traffic graph window popup menu.
CUploadsWnd The uploads window popup menu.