Files
Shell/docs/syntax/static.html
T
2023-02-03 21:03:18 +02:00

323 lines
11 KiB
HTML

<h4>Static Items</h4>
<br>
<p>This section modifies context menu items added by the system or by a third party. more than one item can be added with some properties to customize the context menu. explained below in more details.<br>The items must have the property <code>find</code>. to search in the titles of the menu items to catches them and customize by other properties such as changing the title, icon, visibility, or moving it to another location.</p>
<p>In the following example, it shows how to write add an items to static:</p>
<pre><code class="lang-shell">shell
{
static
{
item(find = 'copy'image = #00ff00)
item(find = 'paste' image = #0000ff)
}
}</code></pre>
<br>
<br>
<h4>Properties</h4>
<div class="table-container">
<table class="table">
<thead>
<tr>
<th scope="col">Property</th>
<th scope="col">Summary</th>
</tr>
</thead>
<tbody>
<tr>
<td>Where</td>
<td>Allow menu item to be passed if a true value is returned<br>
Default = <span class="syntax-keyword">true</span>
</td>
</tr>
<tr>
<td>Find</td>
<td>Accept menuitem when the specific menuitem title is contains or equal to the current find property.<br>Use this delimiter <code>|</code> to separate patterns.
<p class="has-text-danger">This property must be included with another property at least if where property is not defined.</p>
Default = <span class="syntax-keyword">null</span>
<br>
<br><strong>Syntax</strong><br>
find = 'undo' Find any word contains "undo"<br>
find = '"undo"' Match whole word only<br>
find = '*undo' Find a word that ends with<br>
find = 'undo*' Find a word that starts with<br>
<br>
find = '!undo' Find any word not contains "undo"<br>
find = '!"undo"' Search for any word not equal to "undo"<br>
find = '!*undo' Find a word that not ends with<br>
find = 'undo*!' Find a word that starts with<br>
<br>
find = 'undo delete|undo copy' Find an equal title for "undo delete" or "undo copy"
</td>
</tr>
<tr>
<td>In</td>
<td>
<p>Determine the path of the menu being searched.</p>
Default = <span class="syntax-keyword">null</span>
</td>
</tr>
<tr>
<td>Title</td>
<td>
<p>Change value indicating the caption of the menuitem.</p>
Default = <span class="syntax-keyword">null</span>
</td>
</tr>
<tr>
<td>Mode</td>
<td>Accept item by selections behavior. Value have one of the following parameters:
<table class="table">
<tr>
<td class="syntax-keyword">none</td>
<td>Accept item when there are no selections.</td>
</tr>
<tr>
<td class="syntax-keyword">Single</td>
<td>Accept menuitem when there are single selection.</td>
</tr>
<tr>
<td class="syntax-keyword">multi_unique</td>
<td>Accept when multiple selections are single type.</td>
</tr>
<tr>
<td class="syntax-keyword">multi_single</td>
<td>Accept when multiple selections are single file extension.</td>
</tr>
<tr>
<td class="syntax-keyword">multiple</td>
<td>Accept all types.</td>
</tr>
</table>
Default = <span class="syntax-keyword">multiple</span>
</td>
</tr>
<tr>
<td>Type</td>
<td>Specify the types of object files allowed for the menu item to appear. The property is assigned to one or more of these parameters and this character <code>|</code> is used to separate types.<br/>
Add a character <code>~</code> before single type to exclude.
<p class="has-text-danger">The property not supported syntax expressions.</p>
<table class="table">
<tr>
<td class="syntax-keyword">*</td>
<td>Accept menuitem when any type are selected.</td>
</tr>
<tr>
<td class="syntax-keyword">File</td>
<td>Accept menuitem when file are selected.</td>
</tr>
<tr>
<td class="syntax-keyword">Dirctory(Dir)</td>
<td>Accept menuitem when Dirctory are selected.</td>
</tr>
<tr>
<td class="syntax-keyword">Drive</td>
<td>Drive objects</td>
</tr>
<tr>
<td class="syntax-keyword">USB</td>
<td>Accept menuitem when USB flash drive are selected.</td>
</tr>
<tr>
<td class="syntax-keyword">DVD</td>
<td>The drive is a DVD-ROM drive</td>
</tr>
<tr>
<td class="syntax-keyword">Fixed</td>
<td>Accept menuitem when Fixed drive are selected. The drive has fixed media; for example, a hard disk drive or flash drive.</td>
</tr>
<tr>
<td class="syntax-keyword">VHD</td>
<td>Accept menuitem when Virtual Hard Disk are selected.</td>
</tr>
<tr>
<td class="syntax-keyword">Removable</td>
<td>The drive has removable media; for example, a floppy drive, thumb drive, or flash card reader.</td>
</tr>
<tr>
<td class="syntax-keyword">Remote</td>
<td>The drive is a remote (network) drive.</td>
</tr>
<tr>
<td class="syntax-keyword">Back</td>
<td>Accept menu item when the background of all types are selected or can specify of this types for the background (back.directory, back.drive[back.fixed, back.usb, back.dvd, back.vhd, back.Removable], back.namespace[back.computer, back.recyclebin])
</td>
</tr>
<tr>
<td class="syntax-keyword">Desktop</td>
<td>Accept menuitem when the Desktop are selected.</td>
</tr>
<tr>
<td class="syntax-keyword">Namespace</td>
<td>Accept menuitem when Namespace are selected. Can be virtual objects such as the My Network Places and Recycle Bin.</td>
</tr>
<tr>
<td class="syntax-keyword">Computer</td>
<td>Accept menuitem when the My Computer are selected.</td>
</tr>
<tr>
<td class="syntax-keyword">Recyclebin</td>
<td>Accept menuitem when the Recycle bin are selected.</td>
</tr>
<tr>
<td class="syntax-keyword">Taskbar</td>
<td>Accept menuitem when the Taskbar are selected.</td>
</tr>
</table>
Default = <span class="syntax-keyword">Accepts all types except for the taskbar.</span>
<p class="syntax-prop">Required for menu, item, separator.</p>
</td>
</tr>
<tr>
<td>Visibility (vis)</td>
<td>Visibility of menuitem and can have one of the following parameters:.
<table class="table">
<tr>
<td class="syntax-keyword">Hidden</td>
<td>Hide the menuitem.</td>
</tr>
<tr>
<td class="syntax-keyword">Normal</td>
<td>Enabled the menuitem.</td>
</tr>
<tr>
<td class="syntax-keyword">Disable</td>
<td>Disabled the menuitem.</td>
</tr>
</table>
Default = <span class="syntax-keyword">normal</span>
</td>
</tr>
<tr>
<td>Position (pos)</td>
<td>The position at which a menuitem should be inserted into the menu.<br/>Position can have one of the following parameters:
<table class="table">
<tr>
<td class="syntax-keyword">Auto</td>
<td>Insert the menuitem to the current position.</td>
</tr>
<tr>
<td class="syntax-keyword">Middle</td>
<td>Insert the menuitem to the middle of the menu.</td>
</tr>
<tr>
<td class="syntax-keyword">Top</td>
<td>Insert the menuitem to the top of the menu.</td>
</tr>
<tr>
<td class="syntax-keyword">Bottom</td>
<td>Insert the menuitem to the bottom of the menu.</td>
</tr>
<tr>
<td class="syntax-keyword">Number sets</td>
<td>Insert the menuitem to a specified position with integer numbers.</td>
</tr>
</table>
Default = <span class="syntax-keyword">auto</span>
</td>
</tr>
<tr>
<td>Separator (sep)</td>
<td>Add separator with menuitem position by parameters:
<table class="table">
<tr>
<td class="syntax-keyword">None</td>
<td>Not adding a separator with the menuitem.</td>
</tr>
<tr>
<td class="syntax-keyword">Before, Top</td>
<td>Add a separator before the menuitem.</td>
</tr>
<tr>
<td class="syntax-keyword">After, Bottom</td>
<td>Add a separator after the menuitem.</td>
</tr>
<tr>
<td class="syntax-keyword">Both</td>
<td>Add a separator before and after the menuitem.</td>
</tr>
</table>
Default = <span class="syntax-keyword">none</span>
</td>
</tr>
<tr>
<td>Image, Icon</td>
<td>The icon that appears in a menuitem, This property can be assigned as image files, resource icons, glyph or color. With one of the following parameters
<table class="table">
<tr>
<td class="syntax-keyword">Null</td>
<td>Show menuitem without icon.</td>
</tr>
<tr>
<td class="syntax-keyword">Inherit</td>
<td>Inheriting the image from the parent.</td>
</tr>
<tr>
<td class="syntax-keyword">Glyph</td>
<td>Assign image as Glyph.</td>
</tr>
<tr>
<td class="syntax-keyword">Color</td>
<td>Assign image as color.</td>
</tr>
<tr>
<td class="syntax-keyword">Path</td>
<td>Assign image from location path or resource icon.</td>
</tr>
</table>
Default = <span class="syntax-keyword">null</span>
</td>
</tr>
<tr>
<td>Checked</td>
<td>Value that indicates whether the menuitem checked type:
<table class="table">
<tr>
<td class="syntax-keyword">0</td>
<td>Not checked</td>
</tr>
<tr>
<td class="syntax-keyword">1</td>
<td>Display as checked mark.</td>
</tr>
<tr>
<td class="syntax-keyword">2</td>
<td>Display as radio bullet.</td>
</tr>
</table>
Default = <span class="syntax-keyword">0</span>
<p class="syntax-prop">Required for item.</p>
</td>
</tr>
<tr>
<td>Parent, Menu</td>
<td><p>Move current menu item(s) to another menu.</p>
Default = <span class="syntax-keyword">null</span></td>
</tr>
<tr>
<td>Keys</td>
<td><p>Show keyboard shortcuts.</p>
Default = <span class="syntax-keyword">null</span></td>
</tr>
<tr>
<td>Tip</td>
<td>
<p>Show a tip for the current item</p>
Default = <span class="syntax-keyword">null</span><br/>
<strong>Syntax</strong><br/>
<pre><code class="lang-shell">
tip = "Lorem Ipsum is simply dummy text."
tip = ["Lorem Ipsum is simply dummy text.", tip.info]
tip = ["Lorem Ipsum is simply dummy text.", tip.info, 1.2]
</code></pre>
</td>
</tr>
<tr>
<td>Default</td>
<td>
<p>Specifies that the menuitem is the default. A menu can contain only one default menuitem, which is displayed in bold.</p>
Default = <span class="syntax-keyword">false</span>
</td>
</tr>
</tbody>
</table>
</div>