API Reference
MenuPreset
A preset the app comes with (Menu.Presets): selections of selection items and values of forms under one name. A MenuItem.Presets item lists it before the presets people save, marked as built in; it cannot be overwritten or deleted, and applying it changes what it names the way a saved preset does (items and fields it does not name keep their values). Configure it with the chainable methods: preset.Selection(targets, "SRV01", "SRV02").Form(patch, values).
Inheritance
- Object
- MenuPreset
Usage
Explore 6 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 5
- Property Menu.Presets
- Method MenuPreset.Describe
- Method MenuPreset.Form
- Method MenuPreset.Selection
- Method MenuPreset.WithPreview
Accepted by parameters 1
- Method Menu.Preset
Constructors
public MenuPreset(String name) #Creates a built-in preset.
Parameters
- name System.String
- The name; a saved preset cannot take it.
Methods
public MenuPreset Describe(String text) #MenuPresetSets the description.
Parameters
- text System.String
- The text.
Returns
The preset.
public MenuPreset Form(Form form, IDictionary<String, Object?> values) #MenuPresetSets field values of a form opened from the menu (see Form.Apply for how they apply).
Parameters
- form ConsoleMonster.Interactive.Form
- The form.
- values System.Collections.Generic.IDictionary<System.String, System.Object?>
- Values by field name, as the fields take them: a string, a number, a bool, or a list for a multi-choice field.
Returns
The preset.
public override String ToString() #StringReturns a string that represents the current object.
Returns
A string that represents the current object.
public MenuPreset WithPreview(IWidget preview) #MenuPresetSets the preview (see MenuPreset.Preview).
Parameters
- preview ConsoleMonster.Layout.IWidget
- The content.
Returns
The preset.