Toast Engine
Loading...
Searching...
No Matches
editor.Workspace.SettingRow Class Referenceabstract

Base for one editable row in a settings panel. More...

Inheritance diagram for editor.Workspace.SettingRow:
Collaboration diagram for editor.Workspace.SettingRow:

Public Member Functions

void Reload ()
 Re-reads the engine's value without writing anything back.

Protected Member Functions

 SettingRow (SettingDescriptor descriptor)
virtual void ResetValue ()

Protected Attributes

bool SuppressWrite
 Set while Reload() assigns, so the setter does not echo the engine's own value back at it.

Properties

SettingDescriptor Descriptor [get]
string Key [get]
virtual string Label [get]
string Description [get]
bool HasDescription [get]
bool RequiresRestart [get]

Detailed Description

Base for one editable row in a settings panel.

One subclass per widget shape rather than one row with a mode flag, because the view picks its template by row type - which keeps the type test in XAML's DataTemplates where Avalonia already does it, instead of in a converter that has to be kept in step with the engine's Type enum

Member Data Documentation

◆ SuppressWrite

bool editor.Workspace.SettingRow.SuppressWrite
protected

Set while Reload() assigns, so the setter does not echo the engine's own value back at it.

Every row writes through on change, which is what makes the viewport respond live. Reload() is the one path that assigns a value the engine already holds - after a reset, or when the panel re-reads - and writing that back would mark the settings dirty for a change nobody made


The documentation for this class was generated from the following file:
  • editor/Workspace/SettingRowViewModels.cs