openMSX
|
#include <VideoSourceSetting.hh>
Public Member Functions | |
VideoSourceSetting (CommandController &commandController) | |
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. | |
void | additionalInfo (TclObject &result) const override |
Helper method for info(). | |
void | tabCompletion (std::vector< std::string > &tokens) const override |
Complete a partly typed value. | |
int | registerVideoSource (const std::string &source) |
void | unregisterVideoSource (int source) |
int | getSource () noexcept |
void | setSource (int id) |
std::vector< std::string_view > | getPossibleValues () const |
Public Member Functions inherited from openmsx::Setting | |
Setting (const Setting &)=delete | |
Setting (Setting &&)=delete | |
Setting & | operator= (const Setting &)=delete |
Setting & | operator= (Setting &&)=delete |
virtual | ~Setting () |
const TclObject & | getValue () const final |
Gets the current value of this setting as a TclObject. | |
std::optional< TclObject > | getOptionalValue () const final |
Like getValue(), but in case of error returns an empty optional instead of throwing an exception. | |
void | setChecker (std::function< void(TclObject &)> checkFunc_) |
Set value-check-callback. | |
void | setValue (const TclObject &newValue) final |
Change the value of this setting to the given value. | |
std::string_view | getDescription () const final |
pure virtual methods /// | |
TclObject | getDefaultValue () const final |
Get the default value of this setting. | |
void | setValueDirect (const TclObject &newValue) final |
Similar to setValue(), but doesn't trigger Tcl traces. | |
bool | needLoadSave () const final |
Does this setting need to be loaded or saved (settings.xml). | |
bool | needTransfer () const final |
Does this setting need to be transfered on reverse. | |
CommandController & | getCommandController () const |
Interpreter & | getInterpreter () const |
Public Member Functions inherited from openmsx::BaseSetting | |
const TclObject & | getFullNameObj () const |
Get the name of this setting. | |
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. | |
void | info (TclObject &result) const |
For SettingInfo. | |
Public Member Functions inherited from openmsx::Subject< Setting > | |
Subject (const Subject &)=delete | |
Subject (Subject &&)=delete | |
Subject & | operator= (const Subject &)=delete |
Subject & | operator= (Subject &&)=delete |
void | attach (Observer< Setting > &observer) |
void | detach (Observer< Setting > &observer) |
bool | anyObservers () const |
Additional Inherited Members | |
Public Types inherited from openmsx::Setting | |
enum class | Save { YES , NO , NO_AND_DONT_TRANSFER } |
Protected Member Functions inherited from openmsx::Setting | |
Setting (CommandController &commandController, std::string_view name, static_string_view description, const TclObject &initialValue, Save save=Save::YES) | |
void | init () |
void | notifyPropertyChange () const |
Protected Member Functions inherited from openmsx::BaseSetting | |
BaseSetting (std::string_view name) | |
BaseSetting (TclObject name) | |
~BaseSetting ()=default | |
Protected Member Functions inherited from openmsx::Subject< Setting > | |
Subject ()=default | |
~Subject () | |
void | notify () const |
Definition at line 9 of file VideoSourceSetting.hh.
|
explicit |
Definition at line 10 of file VideoSourceSetting.cc.
References openmsx::TclObject::getString(), openmsx::Setting::init(), and openmsx::Setting::setChecker().
|
overridevirtual |
Helper method for info().
Reimplemented from openmsx::Setting.
Definition at line 87 of file VideoSourceSetting.cc.
References openmsx::TclObject::addListElement(), openmsx::TclObject::addListElements(), and getPossibleValues().
std::vector< std::string_view > openmsx::VideoSourceSetting::getPossibleValues | ( | ) | const |
Definition at line 71 of file VideoSourceSetting.cc.
Referenced by additionalInfo(), and tabCompletion().
|
noexcept |
Definition at line 34 of file VideoSourceSetting.cc.
References openmsx::Setting::getValue(), id, max_value(), and setSource().
Referenced by openmsx::LDPixelRenderer::frameEnd(), openmsx::PixelRenderer::frameEnd(), openmsx::V9990PixelRenderer::frameEnd(), openmsx::VideoLayer::getVideoSourceSetting(), openmsx::VideoLayer::needRecord(), openmsx::VideoLayer::needRender(), registerVideoSource(), and unregisterVideoSource().
|
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 66 of file VideoSourceSetting.cc.
int openmsx::VideoSourceSetting::registerVideoSource | ( | const std::string & | source | ) |
Definition at line 100 of file VideoSourceSetting.cc.
References getSource(), openmsx::Setting::notifyPropertyChange(), and setSource().
void openmsx::VideoSourceSetting::setSource | ( | int | id | ) |
Definition at line 60 of file VideoSourceSetting.cc.
References find_unguarded(), and openmsx::Setting::setValue().
Referenced by getSource(), registerVideoSource(), and unregisterVideoSource().
|
overridevirtual |
Complete a partly typed value.
Default implementation does not complete anything, subclasses can override this to complete according to their specific value type.
Reimplemented from openmsx::Setting.
Definition at line 94 of file VideoSourceSetting.cc.
References openmsx::Completer::completeString(), and getPossibleValues().
void openmsx::VideoSourceSetting::unregisterVideoSource | ( | int | source | ) |
Definition at line 115 of file VideoSourceSetting.cc.
References getSource(), move_pop_back(), openmsx::Setting::notifyPropertyChange(), rfind_unguarded(), and setSource().
Referenced by openmsx::VideoSourceActivator::~VideoSourceActivator().