openMSX
Public Member Functions | Static Protected Attributes | Friends | List of all members
openmsx::OSDText Class Referencefinal

#include <OSDText.hh>

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

Public Member Functions

 OSDText (Display &display, const TclObject &name)
 
std::span< const std::string_view > getProperties () const override
 
void setProperty (Interpreter &interp, std::string_view name, const TclObject &value) override
 
void getProperty (std::string_view name, TclObject &result) const override
 
std::string_view getType () const override
 
- Public Member Functions inherited from openmsx::OSDImageBasedWidget
gl::vec2 getPos () const override
 
uint32_t getRGBA (uint32_t corner) const
 
std::span< const uint32_t, 4 > getRGBA4 () const
 
virtual uint8_t getFadedAlpha () const =0
 
std::span< const std::string_view > getProperties () const override
 
void setProperty (Interpreter &interp, std::string_view name, const TclObject &value) override
 
void getProperty (std::string_view name, TclObject &result) const override
 
float getRecursiveFadeValue () const override
 
bool isVisible () const override
 
bool isRecursiveFading () const override
 
- Public Member Functions inherited from openmsx::OSDWidget
virtual ~OSDWidget ()=default
 
std::string_view getName () const
 
virtual gl::vec2 getPos () const
 
gl::vec2 getRelPos () const
 
float getZ () const
 
OSDWidgetgetParent ()
 
const OSDWidgetgetParent () const
 
const SubWidgets & getChildren () const
 
void addWidget (std::unique_ptr< OSDWidget > widget)
 
void deleteWidget (OSDWidget &widget)
 
virtual std::span< const std::string_view > getProperties () const
 
virtual void setProperty (Interpreter &interp, std::string_view name, const TclObject &value)
 
virtual void getProperty (std::string_view name, TclObject &result) const
 
virtual float getRecursiveFadeValue () const
 
virtual bool isRecursiveFading () const =0
 
virtual std::string_view getType () const =0
 
void invalidateRecursive ()
 
void paintRecursive (OutputSurface &output)
 
int getScaleFactor (const OutputSurface &output) const
 
gl::vec2 transformPos (const OutputSurface &output, gl::vec2 pos, gl::vec2 relPos) const
 
void getBoundingBox (const OutputSurface &output, gl::vec2 &pos, gl::vec2 &size) const
 
virtual gl::vec2 getSize (const OutputSurface &output) const =0
 
virtual bool isVisible () const =0
 
DisplaygetDisplay () const
 

Static Protected Attributes

static constexpr auto textProperties
 
- Static Protected Attributes inherited from openmsx::OSDImageBasedWidget
static constexpr auto imageBasedProperties
 
- Static Protected Attributes inherited from openmsx::OSDWidget
static constexpr auto widgetProperties
 

Friends

struct SplitAtChar
 

Additional Inherited Members

- Protected Member Functions inherited from openmsx::OSDImageBasedWidget
 OSDImageBasedWidget (Display &display, const TclObject &name)
 
 ~OSDImageBasedWidget () override
 
bool hasConstantAlpha () const
 
void createImage (OutputSurface &output)
 
void invalidateLocal () override
 
void paint (OutputSurface &output) override
 
virtual std::unique_ptr< GLImagecreate (OutputSurface &output)=0
 
gl::vec2 getRenderedSize () const
 
void setError (std::string message)
 
bool hasError () const
 
- Protected Member Functions inherited from openmsx::OSDWidget
 OSDWidget (Display &display, TclObject name)
 
void invalidateChildren ()
 
bool needSuppressErrors () const
 
virtual void invalidateLocal ()=0
 
virtual void paint (OutputSurface &output)=0
 
- Protected Attributes inherited from openmsx::OSDImageBasedWidget
std::unique_ptr< GLImageimage
 

Detailed Description

Definition at line 12 of file OSDText.hh.

Constructor & Destructor Documentation

◆ OSDText()

openmsx::OSDText::OSDText ( Display display,
const TclObject name 
)

Definition at line 25 of file OSDText.cc.

Member Function Documentation

◆ getProperties()

std::span< const std::string_view > openmsx::OSDText::getProperties ( ) const
inlineoverridevirtual

Reimplemented from openmsx::OSDImageBasedWidget.

Definition at line 28 of file OSDText.hh.

References textProperties.

◆ getProperty()

void openmsx::OSDText::getProperty ( std::string_view  name,
TclObject result 
) const
overridevirtual

Reimplemented from openmsx::OSDImageBasedWidget.

Definition at line 94 of file OSDText.cc.

References openmsx::OSDImageBasedWidget::getProperty(), and UNREACHABLE.

◆ getType()

string_view openmsx::OSDText::getType ( ) const
overridevirtual

Implements openmsx::OSDWidget.

Definition at line 127 of file OSDText.cc.

◆ setProperty()

void openmsx::OSDText::setProperty ( Interpreter interp,
std::string_view  name,
const TclObject value 
)
overridevirtual

Friends And Related Function Documentation

◆ SplitAtChar

friend struct SplitAtChar
friend

Definition at line 61 of file OSDText.hh.

Member Data Documentation

◆ textProperties

constexpr auto openmsx::OSDText::textProperties
staticconstexprprotected
Initial value:
= [] {
using namespace std::literals;
return concatArray(
std::array{
"-text"sv, "-font"sv, "-size"sv,
"-wrap"sv, "-wrapw"sv, "-wraprelw"sv,
});
}()
static constexpr auto imageBasedProperties
constexpr auto concatArray(const std::array< T, X > &x, const std::array< T, Y > &y)
Definition: stl.hh:390

Definition at line 15 of file OSDText.hh.

Referenced by getProperties().


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