openMSX
|
#include <OSDWidget.hh>
Public Member Functions | |
virtual | ~OSDWidget ()=default |
std::string_view | getName () const |
virtual gl::vec2 | getPos () const |
gl::vec2 | getRelPos () const |
float | getZ () const |
OSDWidget * | getParent () |
const OSDWidget * | getParent () 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 |
Display & | getDisplay () const |
Protected Member Functions | |
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 |
Static Protected Attributes | |
static constexpr auto | widgetProperties |
Definition at line 18 of file OSDWidget.hh.
|
virtualdefault |
Definition at line 139 of file OSDWidget.cc.
void openmsx::OSDWidget::addWidget | ( | std::unique_ptr< OSDWidget > | widget | ) |
Definition at line 145 of file OSDWidget.cc.
References begin().
void openmsx::OSDWidget::deleteWidget | ( | OSDWidget & | widget | ) |
Definition at line 168 of file OSDWidget.cc.
References rfind_unguarded().
void openmsx::OSDWidget::getBoundingBox | ( | const OutputSurface & | output, |
gl::vec2 & | pos, | ||
gl::vec2 & | size | ||
) | const |
Definition at line 418 of file OSDWidget.cc.
References transformPos().
Referenced by openmsx::OSDImageBasedWidget::getRenderedSize(), paintGLRecursive(), and paintSDLRecursive().
|
inline |
Definition at line 41 of file OSDWidget.hh.
|
inline |
Definition at line 69 of file OSDWidget.hh.
Referenced by openmsx::OSDImageBasedWidget::createImage(), openmsx::OSDImageBasedWidget::getRenderedSize(), openmsx::OSDImageBasedWidget::setError(), and openmsx::OSDTopWidget::showAllErrors().
|
inline |
Definition at line 34 of file OSDWidget.hh.
References openmsx::TclObject::getString().
Referenced by openmsx::OSDTopWidget::addName(), and openmsx::OSDTopWidget::removeName().
|
inline |
Definition at line 39 of file OSDWidget.hh.
Referenced by openmsx::OSDImageBasedWidget::getRecursiveFadeValue(), getScaleFactor(), openmsx::OSDImageBasedWidget::isRecursiveFading(), needSuppressErrors(), setProperty(), and transformPos().
|
inline |
Definition at line 40 of file OSDWidget.hh.
|
inlinevirtual |
Reimplemented in openmsx::OSDImageBasedWidget.
Definition at line 35 of file OSDWidget.hh.
Referenced by openmsx::OSDImageBasedWidget::getPos(), and transformPos().
|
inlinevirtual |
Reimplemented in openmsx::OSDImageBasedWidget, openmsx::OSDRectangle, and openmsx::OSDText.
Definition at line 45 of file OSDWidget.hh.
References widgetProperties.
|
virtual |
Reimplemented in openmsx::OSDImageBasedWidget, openmsx::OSDRectangle, and openmsx::OSDText.
Definition at line 255 of file OSDWidget.cc.
References openmsx::TclObject::addListElement(), and getType().
Referenced by openmsx::OSDImageBasedWidget::getProperty().
|
virtual |
Reimplemented in openmsx::OSDImageBasedWidget.
Definition at line 283 of file OSDWidget.cc.
Referenced by openmsx::OSDImageBasedWidget::getRecursiveFadeValue().
|
inline |
Definition at line 36 of file OSDWidget.hh.
Referenced by transformPos().
int openmsx::OSDWidget::getScaleFactor | ( | const OutputSurface & | output | ) | const |
Definition at line 345 of file OSDWidget.cc.
References openmsx::OutputSurface::getLogicalWidth(), getParent(), and getScaleFactor().
Referenced by openmsx::OSDImageBasedWidget::getRenderedSize(), getScaleFactor(), and transformPos().
|
pure virtual |
Implemented in openmsx::OSDTopWidget.
Referenced by transformPos().
|
pure virtual |
Implemented in openmsx::OSDRectangle, openmsx::OSDText, and openmsx::OSDTopWidget.
Referenced by getProperty().
|
inline |
Definition at line 37 of file OSDWidget.hh.
|
protected |
Definition at line 294 of file OSDWidget.cc.
Referenced by invalidateRecursive(), and openmsx::OSDText::setProperty().
|
protectedpure virtual |
Implemented in openmsx::OSDImageBasedWidget, and openmsx::OSDTopWidget.
Referenced by invalidateRecursive().
void openmsx::OSDWidget::invalidateRecursive | ( | ) |
Definition at line 288 of file OSDWidget.cc.
References invalidateChildren(), and invalidateLocal().
Referenced by setProperty(), openmsx::OSDRectangle::setProperty(), openmsx::OSDText::setProperty(), and openmsx::OSDGUILayer::~OSDGUILayer().
|
pure virtual |
Implemented in openmsx::OSDImageBasedWidget, and openmsx::OSDTopWidget.
Referenced by openmsx::OSDImageBasedWidget::isRecursiveFading().
|
pure virtual |
Implemented in openmsx::OSDImageBasedWidget, and openmsx::OSDTopWidget.
|
protected |
Definition at line 301 of file OSDWidget.cc.
References getParent().
Referenced by openmsx::OSDImageBasedWidget::setError().
|
protectedpure virtual |
Implemented in openmsx::OSDImageBasedWidget, and openmsx::OSDTopWidget.
Referenced by paintGLRecursive().
void openmsx::OSDWidget::paintGLRecursive | ( | OutputSurface & | output | ) |
Definition at line 326 of file OSDWidget.cc.
References getBoundingBox(), paintGL(), and utf8::unchecked::size().
Referenced by openmsx::GLOSDGUILayer::paint().
|
protectedpure virtual |
Implemented in openmsx::OSDImageBasedWidget, and openmsx::OSDTopWidget.
Referenced by paintSDLRecursive().
void openmsx::OSDWidget::paintSDLRecursive | ( | OutputSurface & | output | ) |
Definition at line 310 of file OSDWidget.cc.
References getBoundingBox(), paintSDL(), and utf8::unchecked::size().
Referenced by openmsx::SDLOSDGUILayer::paint().
|
virtual |
Reimplemented in openmsx::OSDImageBasedWidget, openmsx::OSDRectangle, and openmsx::OSDText.
Definition at line 211 of file OSDWidget.cc.
References openmsx::TclObject::getBoolean(), openmsx::TclObject::getFloat(), getParent(), and invalidateRecursive().
Referenced by openmsx::OSDImageBasedWidget::setProperty().
vec2 openmsx::OSDWidget::transformPos | ( | const OutputSurface & | output, |
gl::vec2 | pos, | ||
gl::vec2 | relPos | ||
) | const |
Definition at line 356 of file OSDWidget.cc.
References getParent(), getPos(), getRelPos(), getScaleFactor(), and getSize().
Referenced by getBoundingBox().
|
staticconstexprprotected |
Definition at line 23 of file OSDWidget.hh.
Referenced by getProperties().