openMSX
Public Member Functions | List of all members
openmsx::ProxySetting Class Referencefinal

#include <ProxySetting.hh>

Inheritance diagram for openmsx::ProxySetting:
Inheritance graph
[legend]
Collaboration diagram for openmsx::ProxySetting:
Collaboration graph
[legend]

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 TclObjectgetValue () const override
 Get current value as a TclObject. More...
 
TclObject getDefaultValue () const override
 Get the default value of this setting. More...
 
TclObject getRestoreValue () const override
 Get the value that will be set after a Tcl 'unset' command. 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 setDontSaveValue (const TclObject &dontSaveValue) override
 This value will never end up in the settings.xml file. More...
 
void additionalInfo (TclObject &result) const override
 Helper method for info(). More...
 
- Public Member Functions inherited from openmsx::BaseSetting
const TclObjectgetFullNameObj () const
 Get the name of this setting. More...
 
const TclObjectgetBaseNameObj () 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...
 

Additional Inherited Members

- Protected Member Functions inherited from openmsx::BaseSetting
 BaseSetting (std::string_view name)
 
 BaseSetting (const TclObject &name)
 
 ~BaseSetting ()=default
 

Detailed Description

Definition at line 10 of file ProxySetting.hh.

Constructor & Destructor Documentation

◆ ProxySetting()

openmsx::ProxySetting::ProxySetting ( Reactor reactor,
const TclObject name 
)

Definition at line 13 of file ProxySetting.cc.

Member Function Documentation

◆ additionalInfo()

void openmsx::ProxySetting::additionalInfo ( TclObject result) const
overridevirtual

Helper method for info().

Implements openmsx::BaseSetting.

Definition at line 127 of file ProxySetting.cc.

◆ getDefaultValue()

TclObject openmsx::ProxySetting::getDefaultValue ( ) const
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'.

Implements openmsx::BaseSetting.

Definition at line 67 of file ProxySetting.cc.

◆ getDescription()

std::string_view openmsx::ProxySetting::getDescription ( ) const
overridevirtual

pure virtual methods ///

Get a description of this setting that can be presented to the user.

Implements openmsx::BaseSetting.

Definition at line 49 of file ProxySetting.cc.

◆ getRestoreValue()

TclObject openmsx::ProxySetting::getRestoreValue ( ) const
overridevirtual

Get the value that will be set after a Tcl 'unset' command.

Usually this is the same as the default value. Though one exception is 'renderer', see comments in RendererFactory.cc.

Implements openmsx::BaseSetting.

Definition at line 76 of file ProxySetting.cc.

◆ getTypeString()

std::string_view openmsx::ProxySetting::getTypeString ( ) const
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 40 of file ProxySetting.cc.

◆ getValue()

const TclObject & openmsx::ProxySetting::getValue ( ) const
overridevirtual

Get current value as a TclObject.

Implements openmsx::BaseSetting.

Definition at line 58 of file ProxySetting.cc.

References openmsx::BaseSetting::getFullName().

◆ needLoadSave()

bool openmsx::ProxySetting::needLoadSave ( ) const
overridevirtual

Does this setting need to be loaded or saved (settings.xml).

Implements openmsx::BaseSetting.

Definition at line 102 of file ProxySetting.cc.

◆ needTransfer()

bool openmsx::ProxySetting::needTransfer ( ) const
overridevirtual

Does this setting need to be transfered on reverse.

Implements openmsx::BaseSetting.

Definition at line 111 of file ProxySetting.cc.

◆ setDontSaveValue()

void openmsx::ProxySetting::setDontSaveValue ( const TclObject dontSaveValue)
overridevirtual

This value will never end up in the settings.xml file.

Implements openmsx::BaseSetting.

Definition at line 120 of file ProxySetting.cc.

◆ setValue()

void openmsx::ProxySetting::setValue ( const TclObject value)
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 33 of file ProxySetting.cc.

◆ setValueDirect()

void openmsx::ProxySetting::setValueDirect ( const TclObject value)
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 85 of file ProxySetting.cc.

References openmsx::BaseSetting::getFullName().

◆ tabCompletion()

void openmsx::ProxySetting::tabCompletion ( std::vector< std::string > &  tokens) const
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 95 of file ProxySetting.cc.


The documentation for this class was generated from the following files: