openMSX
OSDGUILayer.cc
Go to the documentation of this file.
1#include "OSDGUILayer.hh"
2#include "OSDGUI.hh"
3#include "OSDTopWidget.hh"
4
5namespace openmsx {
6
7// class OSDGUILayer
8
10 : Layer(COVER_PARTIAL, Z_OSDGUI)
11 , gui(gui_)
12{
13}
14
16{
18}
19
20
21// class SDLOSDGUILayer
22
24 : OSDGUILayer(gui_)
25{
26 getGUI().setOpenGL(false);
27}
28
30{
31 auto& top = getGUI().getTopWidget();
32 top.paintSDLRecursive(output);
33 top.showAllErrors();
34}
35
36
37// class GLOSDGUILayer
38
40 : OSDGUILayer(gui_)
41{
42 getGUI().setOpenGL(true);
43}
44
46{
47 auto& top = getGUI().getTopWidget();
48 top.paintGLRecursive(output);
49 top.showAllErrors();
50}
51
52} // namespace openmsx
void paint(OutputSurface &output) override
Paint this layer.
Definition: OSDGUILayer.cc:45
GLOSDGUILayer(OSDGUI &gui)
Definition: OSDGUILayer.cc:39
Interface for display layers.
Definition: Layer.hh:12
OSDGUILayer(OSDGUI &gui)
Definition: OSDGUILayer.cc:9
~OSDGUILayer() override
Definition: OSDGUILayer.cc:15
void setOpenGL(bool openGL_)
Definition: OSDGUI.hh:23
const OSDTopWidget & getTopWidget() const
Definition: OSDGUI.hh:19
void paintGLRecursive(OutputSurface &output)
Definition: OSDWidget.cc:330
void paintSDLRecursive(OutputSurface &output)
Definition: OSDWidget.cc:314
void invalidateRecursive()
Definition: OSDWidget.cc:292
A frame buffer where pixels can be written to.
SDLOSDGUILayer(OSDGUI &gui)
Definition: OSDGUILayer.cc:23
void paint(OutputSurface &output) override
Paint this layer.
Definition: OSDGUILayer.cc:29
This file implemented 3 utility functions:
Definition: Autofire.cc:9