summaryrefslogtreecommitdiff
path: root/Widgets/Widget.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-01-09 02:06:04 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-01-09 02:06:04 +0100
commit9963da900583dc54f46c649978aa8a574a0bd508 (patch)
treef1cf7e9bd17f37cb6bc02d98cd255652c6ab4c64 /Widgets/Widget.h
parent2735b7e50da8c979e413042a1dc8023a5dba28c4 (diff)
downloadserenity-9963da900583dc54f46c649978aa8a574a0bd508.zip
Start refactoring graphics system to have per-window backing stores.
It was fun for everyone to share a single framebuffer but it was also kinda really awful. Let's move towards having a "GraphicsBitmap" as the backing store for each Window. This is going to need a lot of refactoring so let's get started.
Diffstat (limited to 'Widgets/Widget.h')
-rw-r--r--Widgets/Widget.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/Widgets/Widget.h b/Widgets/Widget.h
index 132baa595c..90dd8850a2 100644
--- a/Widgets/Widget.h
+++ b/Widgets/Widget.h
@@ -6,8 +6,8 @@
#include "Color.h"
#include "Font.h"
#include <AK/AKString.h>
-#include <functional>
+class GraphicsBitmap;
class Window;
class Widget : public Object {
@@ -15,7 +15,7 @@ public:
explicit Widget(Widget* parent = nullptr);
virtual ~Widget();
- virtual void event(Event&);
+ virtual void event(Event&) override;
virtual void paintEvent(PaintEvent&);
virtual void showEvent(ShowEvent&);
virtual void hideEvent(HideEvent&);
@@ -83,6 +83,8 @@ public:
const Font& font() const { return *m_font; }
void setFont(RetainPtr<Font>&&);
+ virtual GraphicsBitmap* backing();
+
private:
Window* m_window { nullptr };