openMSX
|
Interface for display layers. More...
#include <Layer.hh>
Public Types | |
enum class | ZIndex { BACKGROUND , MSX_PASSIVE , MSX_ACTIVE , OSDGUI , IMGUI } |
Determines stacking order of layers: layers with higher Z-indices are closer to the viewer. More... | |
enum class | Coverage { FULL , PARTIAL , NONE } |
Describes how much of the screen is currently covered by a particular layer. More... | |
Public Member Functions | |
virtual | ~Layer ()=default |
virtual void | paint (OutputSurface &output)=0 |
Paint this layer. | |
ZIndex | getZ () const |
Query the Z-index of this layer. | |
bool | isActive () const |
Coverage | getCoverage () const |
Query the coverage of this layer. | |
void | setDisplay (Display &display_) |
Store pointer to Display. | |
Protected Member Functions | |
Layer (Coverage coverage_, ZIndex z_) | |
Construct a layer. | |
void | setCoverage (Coverage coverage_) |
Changes the current coverage of this layer. | |
void | setZ (ZIndex z) |
Changes the current Z-index of this layer. | |
Friends | |
class | ScopedLayerHider |
auto | operator<=> (ZIndex x, ZIndex y) |
|
strong |
Describes how much of the screen is currently covered by a particular layer.
Enumerator | |
---|---|
FULL | Layer fully covers the screen: any underlying layers are invisible. |
PARTIAL | Layer partially covers the screen: it may cover only part of the screen area, or it may be (semi-)transparent in places. |
NONE | Layer is not visible, that is completely transparent. |
|
strong |
|
virtualdefault |
|
inline |
|
inline |
Query the Z-index of this layer.
Definition at line 52 of file Layer.hh.
Referenced by openmsx::Display::addLayer(), isActive(), and openmsx::Display::updateZ().
|
inline |
Definition at line 53 of file Layer.hh.
References getZ(), and MSX_ACTIVE.
Referenced by openmsx::Display::findActiveLayer().
|
pure virtual |
Paint this layer.
Implemented in openmsx::OSDGUILayer, openmsx::DummyRenderer, openmsx::GLSnow, and openmsx::PostProcessor.
|
inlineprotected |
Changes the current coverage of this layer.
Definition at line 73 of file Layer.hh.
Referenced by openmsx::ScopedLayerHider::ScopedLayerHider(), and openmsx::ScopedLayerHider::~ScopedLayerHider().
|
inline |
Store pointer to Display.
Will be called by Display::addLayer().
Definition at line 62 of file Layer.hh.
Referenced by openmsx::Display::addLayer().
|
protected |
Changes the current Z-index of this layer.
Definition at line 7 of file Layer.cc.
References openmsx::Display::updateZ().
|
friend |