openMSX
Public Member Functions | Protected Member Functions | List of all members
openmsx::OSDWidget Class Referenceabstract

#include <OSDWidget.hh>

Inheritance diagram for openmsx::OSDWidget:
Inheritance graph
[legend]

Public Member Functions

virtual ~OSDWidget ()=default
 
string_view getName () const
 
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::vector< string_viewgetProperties () const
 
virtual void setProperty (Interpreter &interp, string_view name, const TclObject &value)
 
virtual void getProperty (string_view name, TclObject &result) const
 
virtual float getRecursiveFadeValue () const
 
virtual string_view getType () const =0
 
void invalidateRecursive ()
 
void paintSDLRecursive (OutputSurface &output)
 
void paintGLRecursive (OutputSurface &output)
 
int getScaleFactor (const OutputRectangle &output) const
 
gl::vec2 transformPos (const OutputRectangle &output, gl::vec2 pos, gl::vec2 relPos) const
 
void getBoundingBox (const OutputRectangle &output, gl::ivec2 &pos, gl::ivec2 &size)
 
virtual gl::vec2 getSize (const OutputRectangle &output) const =0
 
DisplaygetDisplay () const
 

Protected Member Functions

 OSDWidget (Display &display, const TclObject &name)
 
void invalidateChildren ()
 
bool needSuppressErrors () const
 
virtual void invalidateLocal ()=0
 
virtual void paintSDL (OutputSurface &output)=0
 
virtual void paintGL (OutputSurface &output)=0
 

Detailed Description

Definition at line 20 of file OSDWidget.hh.

Constructor & Destructor Documentation

◆ ~OSDWidget()

virtual openmsx::OSDWidget::~OSDWidget ( )
virtualdefault

◆ OSDWidget()

openmsx::OSDWidget::OSDWidget ( Display display,
const TclObject name 
)
protected

Definition at line 122 of file OSDWidget.cc.

Referenced by getDisplay().

Member Function Documentation

◆ addWidget()

void openmsx::OSDWidget::addWidget ( std::unique_ptr< OSDWidget widget)

Definition at line 133 of file OSDWidget.cc.

References begin().

Referenced by getChildren().

◆ deleteWidget()

void openmsx::OSDWidget::deleteWidget ( OSDWidget widget)

Definition at line 156 of file OSDWidget.cc.

References begin(), end(), getZ(), rfind_if_unguarded(), and gl::rotate().

Referenced by getChildren().

◆ getBoundingBox()

void openmsx::OSDWidget::getBoundingBox ( const OutputRectangle output,
gl::ivec2 pos,
gl::ivec2 size 
)

Definition at line 430 of file OSDWidget.cc.

References transformPos().

Referenced by getChildren(), paintGLRecursive(), and paintSDLRecursive().

◆ getChildren()

const SubWidgets& openmsx::OSDWidget::getChildren ( ) const
inline

◆ getDisplay()

Display& openmsx::OSDWidget::getDisplay ( ) const
inline

◆ getName()

string_view openmsx::OSDWidget::getName ( ) const
inline

◆ getParent() [1/2]

OSDWidget* openmsx::OSDWidget::getParent ( )
inline

◆ getParent() [2/2]

const OSDWidget* openmsx::OSDWidget::getParent ( ) const
inline

Definition at line 32 of file OSDWidget.hh.

◆ getPos()

gl::vec2 openmsx::OSDWidget::getPos ( ) const
inline

Definition at line 27 of file OSDWidget.hh.

Referenced by openmsx::OSDImageBasedWidget::invalidateLocal(), and transformPos().

◆ getProperties()

vector< string_view > openmsx::OSDWidget::getProperties ( ) const
virtual

◆ getProperty()

void openmsx::OSDWidget::getProperty ( string_view  name,
TclObject result 
) const
virtual

◆ getRecursiveFadeValue()

float openmsx::OSDWidget::getRecursiveFadeValue ( ) const
virtual

◆ getRelPos()

gl::vec2 openmsx::OSDWidget::getRelPos ( ) const
inline

Definition at line 28 of file OSDWidget.hh.

Referenced by openmsx::OSDImageBasedWidget::invalidateLocal(), and transformPos().

◆ getScaleFactor()

int openmsx::OSDWidget::getScaleFactor ( const OutputRectangle output) const

◆ getSize()

virtual gl::vec2 openmsx::OSDWidget::getSize ( const OutputRectangle output) const
pure virtual

◆ getType()

virtual string_view openmsx::OSDWidget::getType ( ) const
pure virtual

◆ getZ()

float openmsx::OSDWidget::getZ ( ) const
inline

Definition at line 29 of file OSDWidget.hh.

Referenced by deleteWidget().

◆ invalidateChildren()

void openmsx::OSDWidget::invalidateChildren ( )
protected

Definition at line 300 of file OSDWidget.cc.

Referenced by getDisplay(), invalidateRecursive(), and openmsx::OSDText::setProperty().

◆ invalidateLocal()

virtual void openmsx::OSDWidget::invalidateLocal ( )
protectedpure virtual

◆ invalidateRecursive()

void openmsx::OSDWidget::invalidateRecursive ( )

◆ needSuppressErrors()

bool openmsx::OSDWidget::needSuppressErrors ( ) const
protected

Definition at line 307 of file OSDWidget.cc.

References getParent().

Referenced by getDisplay(), and openmsx::OSDImageBasedWidget::setError().

◆ paintGL()

virtual void openmsx::OSDWidget::paintGL ( OutputSurface output)
protectedpure virtual

◆ paintGLRecursive()

void openmsx::OSDWidget::paintGLRecursive ( OutputSurface output)

Definition at line 333 of file OSDWidget.cc.

References getBoundingBox(), paintGL(), and utf8::unchecked::size().

Referenced by getChildren(), and openmsx::GLOSDGUILayer::paint().

◆ paintSDL()

virtual void openmsx::OSDWidget::paintSDL ( OutputSurface output)
protectedpure virtual

◆ paintSDLRecursive()

void openmsx::OSDWidget::paintSDLRecursive ( OutputSurface output)

Definition at line 316 of file OSDWidget.cc.

References getBoundingBox(), paintSDL(), and utf8::unchecked::size().

Referenced by getChildren(), and openmsx::SDLOSDGUILayer::paint().

◆ setProperty()

void openmsx::OSDWidget::setProperty ( Interpreter interp,
string_view  name,
const TclObject value 
)
virtual

◆ transformPos()

vec2 openmsx::OSDWidget::transformPos ( const OutputRectangle output,
gl::vec2  pos,
gl::vec2  relPos 
) const

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