mirror of
https://github.com/moudey/Shell.git
synced 2026-11-16 09:04:25 +08:00
230 lines
7.6 KiB
HTML
230 lines
7.6 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 class="syntax"><code>shell
|
|
{
|
|
static
|
|
{
|
|
item(find = <span class="syntax-string">'copy'</span> image = <span class="syntax-number">#00ff00</span>)
|
|
item(find = <span class="syntax-string">'paste'</span> image = <span class="syntax-number">#0000ff</span>)
|
|
}
|
|
}</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>
|
|
<h3>Syntax</h5>
|
|
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>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">MultiUnique</td>
|
|
<td>Accept when multiple selections are single type.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="syntax-keyword">MultiSingle</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">single</span>
|
|
</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>
|
|
<tr>
|
|
<td class="syntax-keyword">Extended</td>
|
|
<td>The menuitem appears when the <kbd>Shift</kbd> key is pressed.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="syntax-keyword">ExtendedHidden</td>
|
|
<td>Hide the menuitem when the <kbd>Shift</kbd> key is pressed.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="syntax-keyword">ExtendedDisable</td>
|
|
<td>The item appears disabled when the <kbd>Shift</kbd> key is pressed.</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</td>
|
|
<td>Add a separator before the menuitem.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="syntax-keyword">After</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</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>Parent</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/>
|
|
Syntax <br/>
|
|
<pre class="syntax"><code>
|
|
tip = "Lorem Ipsum is simply dummy text."
|
|
tip = ["Lorem Ipsum is simply dummy text.", <span class="syntax-keyword">tip.info</span>]
|
|
tip = ["Lorem Ipsum is simply dummy text.", <span class="syntax-keyword">tip.info</span>, <span class="syntax-number">1.2</span>]
|
|
</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>
|