Skip to content

Commit f806e09

Browse files
committed
Updated documentation for 'class' attribute of <visibility> and <validity> elements. For issue #58.
1 parent 4eb27da commit f806e09

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

UserManual.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,40 @@ The &lt;visibility&gt; and &lt;validity&gt; elements have the following attribut
234234

235235

236236

237+
### class attribute: ###
238+
239+
The `class` attribute validates a menu based on type (class) of the selected files. The attribute can be used to quickly filter a menu based on the user selection. It covers most filtering use cases:
240+
* Filter for files only.
241+
* Filter for directories only.
242+
* Filter by file extensions.
243+
244+
If `class` attribute is specified, the classes of the files selected by the user must match for the validation to be successful. To specify multiple classes, one must separate each class with the `;` character. If multiple classes are specified, **at least one** class must match for the validation to be successful.
245+
246+
If multiple files are selected, the class of **each file** must match **at least one** allowed classes for the validation to be successful.
247+
248+
If `class` attribute is not specified, then the validation is successful.
249+
250+
The `class` attribute supports the following values which are explained in the following table:
251+
252+
| Values | Meaning |
253+
|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|
254+
| .&lt;ext&gt; | Validates a menu if the selected file extension matches the file extension *&lt;ext&gt;* . Replace *&lt;ext&gt;* by your desired file extension value. |
255+
| file | Validates a menu if the user has **only** selected files. |
256+
| directory | Validates a menu if the user has **only** selected folders or directories. |
257+
| drive | Validates a menu if the selected file is located on a drive. |
258+
| drive:removable | Validates a menu if the selected file is located on a removable drive. |
259+
| drive:fixed | Validates a menu if the selected file is located on a fixed drive. |
260+
| drive:network | Validates a menu if the selected file is located on a network drive or a network path. |
261+
| drive:optical | Validates a menu if the selected file is located on an optical drive. |
262+
| drive:ramdisk | Validates a menu if the selected file is located on a ramdisk drive. |
263+
264+
For example, the following set a menu visible only when the user right-click on files:
265+
```xml
266+
<visibility class="file" />
267+
```
268+
269+
270+
237271
### maxfiles and maxfolders attributes: ###
238272

239273
The `maxfiles` and `maxfolders` attributes validates a menu based on the number of files and folders selected by the user.

0 commit comments

Comments
 (0)