Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
openmsx::OSDImageBasedWidget Class Referenceabstract

#include <OSDImageBasedWidget.hh>

Inheritance diagram for openmsx::OSDImageBasedWidget:
Inheritance graph
Collaboration diagram for openmsx::OSDImageBasedWidget:
Collaboration graph

Public Member Functions

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 paintSDLRecursive (OutputSurface &output)
void paintGLRecursive (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

Protected Member Functions

 OSDImageBasedWidget (Display &display, const TclObject &name)
 ~OSDImageBasedWidget () override
bool hasConstantAlpha () const
void createImage (OutputSurface &output)
void invalidateLocal () override
void paintSDL (OutputSurface &output) override
void paintGL (OutputSurface &output) override
virtual std::unique_ptr< BaseImagecreateSDL (OutputSurface &output)=0
virtual std::unique_ptr< BaseImagecreateGL (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 paintSDL (OutputSurface &output)=0
virtual void paintGL (OutputSurface &output)=0

Protected Attributes

std::unique_ptr< BaseImageimage

Static Protected Attributes

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

Detailed Description

Definition at line 16 of file OSDImageBasedWidget.hh.

Constructor & Destructor Documentation

◆ OSDImageBasedWidget()

openmsx::OSDImageBasedWidget::OSDImageBasedWidget ( Display display,
const TclObject name 

Definition at line 22 of file

References ranges::fill().

◆ ~OSDImageBasedWidget()

openmsx::OSDImageBasedWidget::~OSDImageBasedWidget ( )

Member Function Documentation

◆ createGL()

virtual std::unique_ptr< BaseImage > openmsx::OSDImageBasedWidget::createGL ( OutputSurface output)
protectedpure virtual

Referenced by createImage().

◆ createImage()

void openmsx::OSDImageBasedWidget::createImage ( OutputSurface output)

◆ createSDL()

virtual std::unique_ptr< BaseImage > openmsx::OSDImageBasedWidget::createSDL ( OutputSurface output)
protectedpure virtual

Referenced by createImage().

◆ getFadedAlpha()

virtual uint8_t openmsx::OSDImageBasedWidget::getFadedAlpha ( ) const
pure virtual

Referenced by isVisible().

◆ getPos()

gl::vec2 openmsx::OSDImageBasedWidget::getPos ( ) const

Reimplemented from openmsx::OSDWidget.

Definition at line 170 of file

References openmsx::OSDWidget::getPos(), openmsx::Timer::getTime(), and t.

◆ getProperties()

std::span< const std::string_view > openmsx::OSDImageBasedWidget::getProperties ( ) const

Reimplemented from openmsx::OSDWidget.

Reimplemented in openmsx::OSDRectangle, and openmsx::OSDText.

Definition at line 41 of file OSDImageBasedWidget.hh.

References imageBasedProperties.

◆ getProperty()

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

◆ getRecursiveFadeValue()

float openmsx::OSDImageBasedWidget::getRecursiveFadeValue ( ) const

◆ getRenderedSize()

vec2 openmsx::OSDImageBasedWidget::getRenderedSize ( ) const

◆ getRGBA()

uint32_t openmsx::OSDImageBasedWidget::getRGBA ( uint32_t  corner) const

Definition at line 36 of file OSDImageBasedWidget.hh.

◆ getRGBA4()

std::span< const uint32_t, 4 > openmsx::OSDImageBasedWidget::getRGBA4 ( ) const

Definition at line 37 of file OSDImageBasedWidget.hh.

◆ hasConstantAlpha()

bool openmsx::OSDImageBasedWidget::hasConstantAlpha ( ) const

Definition at line 205 of file

References ranges::all_equal().

◆ hasError()

bool openmsx::OSDImageBasedWidget::hasError ( ) const

Definition at line 64 of file OSDImageBasedWidget.hh.

Referenced by createImage().

◆ invalidateLocal()

void openmsx::OSDImageBasedWidget::invalidateLocal ( )

Implements openmsx::OSDWidget.

Definition at line 272 of file

References image.

Referenced by openmsx::OSDRectangle::setProperty(), and openmsx::OSDText::setProperty().

◆ isRecursiveFading()

bool openmsx::OSDImageBasedWidget::isRecursiveFading ( ) const

◆ isVisible()

bool openmsx::OSDImageBasedWidget::isVisible ( ) const

Implements openmsx::OSDWidget.

Definition at line 215 of file

References getFadedAlpha(), and isRecursiveFading().

◆ paintGL()

void openmsx::OSDImageBasedWidget::paintGL ( OutputSurface output)

Implements openmsx::OSDWidget.

Definition at line 305 of file

◆ paintSDL()

void openmsx::OSDImageBasedWidget::paintSDL ( OutputSurface output)

Implements openmsx::OSDWidget.

Definition at line 300 of file

◆ setError()

void openmsx::OSDImageBasedWidget::setError ( std::string  message)

◆ setProperty()

void openmsx::OSDImageBasedWidget::setProperty ( Interpreter interp,
std::string_view  name,
const TclObject value 

Member Data Documentation

◆ image

std::unique_ptr<BaseImage> openmsx::OSDImageBasedWidget::image

Definition at line 66 of file OSDImageBasedWidget.hh.

Referenced by createImage(), getRenderedSize(), and invalidateLocal().

◆ imageBasedProperties

constexpr auto openmsx::OSDImageBasedWidget::imageBasedProperties
Initial value:
= [] {
using namespace std::literals;
return concatArray(
"-rgba"sv, "-rgb"sv, "-alpha"sv,
"-fadePeriod"sv, "-fadeTarget"sv,
static constexpr auto widgetProperties
Definition: OSDWidget.hh:23
constexpr auto concatArray(const std::array< T, X > &x, const std::array< T, Y > &y)
Definition: stl.hh:381

Definition at line 19 of file OSDImageBasedWidget.hh.

Referenced by getProperties().

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