Skinning.menus

From Shareaza Wiki
Revision as of 21:44, 4 May 2014 by Ji d (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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
  Updated:

This page has been updated on 2014.05.04 for the release of Shareaza v2.7.x.0.

e

<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:

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

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).

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.


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.

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:

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


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:

Menus 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.



Navigation:     ShareazaWiki > Skinning tutorial > Skinning.menus