openMSX
|
#include <ProxySetting.hh>
Public Member Functions | |
ProxySetting (Reactor &reactor, const TclObject &name) | |
void | setValue (const TclObject &value) override |
Change the value of this setting to the given value. More... | |
std::string_view | getTypeString () const override |
Returns a string describing the setting type (integer, string, ..) Could be used in a GUI to pick an appropriate setting widget. More... | |
std::string_view | getDescription () const override |
pure virtual methods /// More... | |
const TclObject & | getValue () const override |
Get current value as a TclObject. More... | |
std::optional< TclObject > | getOptionalValue () const override |
Like getValue(), but in case of error returns an empty optional instead of throwing an exception. More... | |
TclObject | getDefaultValue () const override |
Get the default value of this setting. More... | |
void | setValueDirect (const TclObject &value) override |
Similar to setValue(), but doesn't trigger Tcl traces. More... | |
void | tabCompletion (std::vector< std::string > &tokens) const override |
Complete a partly typed value. More... | |
bool | needLoadSave () const override |
Does this setting need to be loaded or saved (settings.xml). More... | |
bool | needTransfer () const override |
Does this setting need to be transfered on reverse. More... | |
void | additionalInfo (TclObject &result) const override |
Helper method for info(). More... | |
![]() | |
const TclObject & | getFullNameObj () const |
Get the name of this setting. More... | |
const TclObject & | getBaseNameObj () const |
std::string_view | getFullName () const |
std::string_view | getBaseName () const |
void | setPrefix (std::string_view prefix) |
Set a machine specific prefix. More... | |
void | info (TclObject &result) const |
For SettingInfo. More... | |
virtual std::string_view | getDescription () const =0 |
pure virtual methods /// More... | |
virtual std::string_view | getTypeString () const =0 |
Returns a string describing the setting type (integer, string, ..) Could be used in a GUI to pick an appropriate setting widget. More... | |
virtual void | additionalInfo (TclObject &result) const =0 |
Helper method for info(). More... | |
virtual void | tabCompletion (std::vector< std::string > &tokens) const =0 |
Complete a partly typed value. More... | |
virtual const TclObject & | getValue () const =0 |
Get current value as a TclObject. More... | |
virtual std::optional< TclObject > | getOptionalValue () const =0 |
Like getValue(), but in case of error returns an empty optional instead of throwing an exception. More... | |
virtual TclObject | getDefaultValue () const =0 |
Get the default value of this setting. More... | |
virtual void | setValue (const TclObject &value)=0 |
Change the value of this setting to the given value. More... | |
virtual void | setValueDirect (const TclObject &value)=0 |
Similar to setValue(), but doesn't trigger Tcl traces. More... | |
virtual bool | needLoadSave () const =0 |
Does this setting need to be loaded or saved (settings.xml). More... | |
virtual bool | needTransfer () const =0 |
Does this setting need to be transfered on reverse. More... | |
Additional Inherited Members | |
![]() | |
BaseSetting (std::string_view name) | |
BaseSetting (TclObject name) | |
~BaseSetting ()=default | |
Definition at line 10 of file ProxySetting.hh.
Definition at line 10 of file ProxySetting.cc.
|
overridevirtual |
Helper method for info().
Implements openmsx::BaseSetting.
Definition at line 117 of file ProxySetting.cc.
References setting.
|
overridevirtual |
Get the default value of this setting.
This is the initial value of the setting. Default values don't get saved in 'settings.xml'. This is also the value used for a Tcl 'unset' command.
Implements openmsx::BaseSetting.
Definition at line 73 of file ProxySetting.cc.
References setting.
|
overridevirtual |
pure virtual methods ///
Get a description of this setting that can be presented to the user.
Implements openmsx::BaseSetting.
Definition at line 46 of file ProxySetting.cc.
References setting.
|
overridevirtual |
Like getValue(), but in case of error returns an empty optional instead of throwing an exception.
Implements openmsx::BaseSetting.
Definition at line 64 of file ProxySetting.cc.
References setting.
|
overridevirtual |
Returns a string describing the setting type (integer, string, ..) Could be used in a GUI to pick an appropriate setting widget.
Implements openmsx::BaseSetting.
Definition at line 37 of file ProxySetting.cc.
References openmsx::BaseSetting::getFullName(), and setting.
|
overridevirtual |
Get current value as a TclObject.
Implements openmsx::BaseSetting.
Definition at line 55 of file ProxySetting.cc.
References openmsx::BaseSetting::getFullName(), and setting.
|
overridevirtual |
Does this setting need to be loaded or saved (settings.xml).
Implements openmsx::BaseSetting.
Definition at line 99 of file ProxySetting.cc.
References setting.
|
overridevirtual |
Does this setting need to be transfered on reverse.
Implements openmsx::BaseSetting.
Definition at line 108 of file ProxySetting.cc.
References setting.
|
overridevirtual |
Change the value of this setting to the given value.
This method will trigger Tcl traces. This value still passes via the 'checker-callback' (see below), so the value may be adjusted. Or in case of an invalid value this method may throw.
Implements openmsx::BaseSetting.
Definition at line 30 of file ProxySetting.cc.
References setting.
|
overridevirtual |
Similar to setValue(), but doesn't trigger Tcl traces.
Like setValue(), the given value may be adjusted or rejected. Should only be used by the Interpreter class.
Implements openmsx::BaseSetting.
Definition at line 82 of file ProxySetting.cc.
References openmsx::BaseSetting::getFullName(), and setting.
|
overridevirtual |
Complete a partly typed value.
Default implementation does not complete anything, subclasses can override this to complete according to their specific value type.
Implements openmsx::BaseSetting.
Definition at line 92 of file ProxySetting.cc.
References setting.