openMSX
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
openmsx::Display Class Referencefinal

Represents the output window/screen of openMSX. More...

#include <Display.hh>

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

Public Types

using Layers = std::vector< Layer * >
 

Public Member Functions

 Display (Reactor &reactor)
 
 ~Display ()
 
void createVideoSystem ()
 
VideoSystemgetVideoSystem ()
 
CliCommgetCliComm () const
 
RenderSettingsgetRenderSettings ()
 
OSDGUIgetOSDGUI ()
 
void repaint ()
 Redraw the display.
 
void repaintDelayed (uint64_t delta)
 
void repaintImpl ()
 
void repaintImpl (OutputSurface &surface)
 
void addLayer (Layer &layer)
 
void removeLayer (Layer &layer)
 
void updateZ (Layer &layer)
 
void attach (VideoSystemChangeListener &listener)
 
void detach (VideoSystemChangeListener &listener)
 
LayerfindActiveLayer () const
 
const LayersgetAllLayers () const
 
OutputSurfacegetOutputSurface ()
 
std::string getWindowTitle ()
 
gl::ivec2 getWindowPosition ()
 Get/set x,y coordinates of top-left window corner.
 
void setWindowPosition (gl::ivec2 pos)
 
void storeWindowPosition (gl::ivec2 pos)
 
gl::ivec2 retrieveWindowPosition ()
 
gl::ivec2 getWindowSize () const
 
float getFps () const
 
- Public Member Functions inherited from openmsx::EventListener
 EventListener (const EventListener &)=delete
 
 EventListener (EventListener &&)=delete
 
EventListeneroperator= (const EventListener &)=delete
 
EventListeneroperator= (EventListener &&)=delete
 

Static Public Attributes

static constexpr std::string_view SCREENSHOT_DIR = "screenshots"
 
static constexpr std::string_view SCREENSHOT_EXTENSION = ".png"
 

Additional Inherited Members

- Protected Member Functions inherited from openmsx::EventListener
 EventListener ()=default
 
 ~EventListener ()=default
 

Detailed Description

Represents the output window/screen of openMSX.

A display contains several layers.

Definition at line 29 of file Display.hh.

Member Typedef Documentation

◆ Layers

using openmsx::Display::Layers = std::vector<Layer*>

Definition at line 37 of file Display.hh.

Constructor & Destructor Documentation

◆ Display()

openmsx::Display::Display ( Reactor reactor)
explicit

◆ ~Display()

openmsx::Display::~Display ( )

Member Function Documentation

◆ addLayer()

void openmsx::Display::addLayer ( Layer layer)

◆ attach()

void openmsx::Display::attach ( VideoSystemChangeListener listener)

◆ createVideoSystem()

void openmsx::Display::createVideoSystem ( )

◆ detach()

void openmsx::Display::detach ( VideoSystemChangeListener listener)

◆ findActiveLayer()

Layer * openmsx::Display::findActiveLayer ( ) const

Definition at line 126 of file Display.cc.

References ranges::find_if(), and openmsx::Layer::isActive().

◆ getAllLayers()

const Layers & openmsx::Display::getAllLayers ( ) const
inline

Definition at line 65 of file Display.hh.

◆ getCliComm()

CliComm & openmsx::Display::getCliComm ( ) const

◆ getFps()

float openmsx::Display::getFps ( ) const

Definition at line 252 of file Display.cc.

◆ getOSDGUI()

OSDGUI & openmsx::Display::getOSDGUI ( )
inline

◆ getOutputSurface()

OutputSurface * openmsx::Display::getOutputSurface ( )

Definition at line 97 of file Display.cc.

Referenced by openmsx::OSDImageBasedWidget::getRenderedSize().

◆ getRenderSettings()

RenderSettings & openmsx::Display::getRenderSettings ( )
inline

◆ getVideoSystem()

VideoSystem & openmsx::Display::getVideoSystem ( )

◆ getWindowPosition()

gl::ivec2 openmsx::Display::getWindowPosition ( )

Get/set x,y coordinates of top-left window corner.

Either the actual, or the last known coordinates.

Definition at line 222 of file Display.cc.

References retrieveWindowPosition(), and storeWindowPosition().

◆ getWindowSize()

gl::ivec2 openmsx::Display::getWindowSize ( ) const

◆ getWindowTitle()

string openmsx::Display::getWindowTitle ( )

◆ removeLayer()

void openmsx::Display::removeLayer ( Layer layer)

◆ repaint()

void openmsx::Display::repaint ( )

Redraw the display.

The repaintImpl() methods are for internal and VideoSystem/VisibleSurface use only.

Definition at line 373 of file Display.cc.

◆ repaintDelayed()

void openmsx::Display::repaintDelayed ( uint64_t  delta)

◆ repaintImpl() [1/2]

void openmsx::Display::repaintImpl ( )

◆ repaintImpl() [2/2]

void openmsx::Display::repaintImpl ( OutputSurface surface)

Definition at line 364 of file Display.cc.

References end(), and openmsx::Layer::NONE.

◆ retrieveWindowPosition()

gl::ivec2 openmsx::Display::retrieveWindowPosition ( )

◆ setWindowPosition()

void openmsx::Display::setWindowPosition ( gl::ivec2  pos)

Definition at line 230 of file Display.cc.

References storeWindowPosition().

◆ storeWindowPosition()

void openmsx::Display::storeWindowPosition ( gl::ivec2  pos)

◆ updateZ()

void openmsx::Display::updateZ ( Layer layer)

Definition at line 402 of file Display.cc.

References ranges::find_if(), openmsx::Layer::getZ(), and rfind_unguarded().

Referenced by openmsx::Layer::setZ().

Member Data Documentation

◆ SCREENSHOT_DIR

constexpr std::string_view openmsx::Display::SCREENSHOT_DIR = "screenshots"
staticconstexpr

Definition at line 33 of file Display.hh.

◆ SCREENSHOT_EXTENSION

constexpr std::string_view openmsx::Display::SCREENSHOT_EXTENSION = ".png"
staticconstexpr

Definition at line 34 of file Display.hh.


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