XML Settings - SharpE Menu File
Menu file specifying the content of a SharpE menu is a simple xml file containing the items of the menu and some properties for each item.
The xml file for a menu is saved in
\Settings\User\{Username}\SharpMenu\
The structure of this file is very simple.
<SharpEMenuFile> <item> <type>{itemtype}</type> </item> ... <item> <type>{itemtype}</type> </item> </SharpEMenuFile>
The necessary additional properties like caption or icon depend on the used item type.
Menu Item Types
- Label
Menu items of the Label type are used to display simple text in the menu.
Properties: Caption
<item> <type>label</type> <caption>SharpE Menu</caption> </item>
- Seperator
A seperator menu item doesn't need any additional properties.
<item> <type>seperator</type> </item>
- Submenu
By using the submenu item a complete new sub menu is created.
The submenu item requires an Items property which contains the new menu items of the submenu.
Properties: Caption, Icon, Items
<item> <type>submenu</type> <icon>{#SharpEDir#}Icons\Cubeix White\Control panel.ico</icon> <caption>Desktop</caption> <items> <item> <type>dynamicdirectory</type> <target>{#DesktopDir#}</target> </item> <item> <type>dynamicdirectory</type> <target>{#CommonDesktopDir#}</target> </item> </items> </item>
- Dynamicdirectory
The dynamic directory menu item can be used to fully included the content of a directory in the menu.
This means that all files and folders of the target directory are added as menu items.
Each time a menu containing a dynamic directory menu item is displayed the menu is updated (new files/folders are added and no longer existing are removed). There are some special properties available. Only the amount of items specified in the <maxitems> property will be added the menu (0 = unlimited). The <sort> property can be used to sort the items by caption (sort = 0), by directory (sort = 1), by files (sort = -1) or the last time a file has been modified (sort = 2).
Properties: Target, Maxitems, Sort (0/1/2), Filter
<item> <type>dynamicdirectory</type> <target>{#DesktopDir#}</target> <maxItems>10</maxitems> <sort>2</sort> <filter>*.jpg</filter> </item>
- Drivelist
The drivelist menu is a dynamic menu item which will add a list of all drives to the menu.
By setting the <showdrivenames> property to 0/1 (False/True) it is possible to disable/enable the display of the drive name. If disable the drive type will be displayed.
Note: on some computers getting the drive name might slow down the menu for several seconds!
Property: Showdrivenames
<item> <type>drivelist</type> <showdrivenames>0</showdrivenames> </item>
- CPLList
This dynamic menu item will create a list of all control panel applets
<item> <type>cpllist</type> </item>
- Link
The Link item is the most generic menu item. By using the SharpE exec.service this menu item can not only be used to create links to to files, drives and directories. It's also possible to execute SharpE Actions and Shell Folders.
Properties: Caption, Icon, Target
<item> <type>link</type> <icon>shell:icon</icon> <target>{#SharpEDir#}SharpBar.exe</target> <caption>SharpBar</caption> </item>
Menu Item Properties
Some of the properties used by the menu tems are supporting usage in different ways.
Those menu item properties are:
- Icon
The value specified in an <icon> property can be a direct link to a .png file or it can bet set to shellicon to use the shell icon which windows explorer would display.
It is also possible to set the <icon> property to a SharpE icon tag like icon.folder.sound. (note: not yet implemented)
<icon>shell:icon</icon> <icon>{#SharpEDir#}Icons\Cubeix White\Control panel.ico</icon> <icon>icon.folder.sound</icon>
