Skinning Tutorial

[ Back to Shareaza Skinning ]

<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://www.shareaza.com/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://www.shareaza.com/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"> <!--(Sub-Menu)-->
         <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:

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.

[ Back to Shareaza Skinning ]

  • en
  • es
  • fr
  • de
  • hr
  • it
  • lt
  • nl
  • nb
  • pl
  • pt
  • sl
  • tr
  • el
  • he
  • ja
  • zh-tw
  • en
  • ca
  • fa
  • ru
Many people contribute their time and effort to Shareaza. Please see our acknowledgements page.
Visit Shareaza's Project Page at SourceForge.net
< Top of the Page | Contact Us >