diff options
author | Andreas Kling <kling@serenityos.org> | 2020-02-06 11:56:38 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-06 11:56:38 +0100 |
commit | 11580babbfb1b8ae0acab2400f11d905c35642f5 (patch) | |
tree | 3b26fcd4bf7afe9ff92203468ba7cd95e192d55f /Servers/WindowServer/WSMenuItem.h | |
parent | 939a605334a71dd8b7af91cdcbe9047281f7b5b9 (diff) | |
download | serenity-11580babbfb1b8ae0acab2400f11d905c35642f5.zip |
LibDraw: Put all classes in the Gfx namespace
I started adding things to a Draw namespace, but it somehow felt really
wrong seeing Draw::Rect and Draw::Bitmap, etc. So instead, let's rename
the library to LibGfx. :^)
Diffstat (limited to 'Servers/WindowServer/WSMenuItem.h')
-rw-r--r-- | Servers/WindowServer/WSMenuItem.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/Servers/WindowServer/WSMenuItem.h b/Servers/WindowServer/WSMenuItem.h index feabb20535..5c049d63c9 100644 --- a/Servers/WindowServer/WSMenuItem.h +++ b/Servers/WindowServer/WSMenuItem.h @@ -26,11 +26,14 @@ #pragma once -#include <AK/String.h> #include <AK/Function.h> +#include <AK/String.h> #include <LibDraw/Rect.h> -class GraphicsBitmap; +namespace Gfx { +class Bitmap; +} + class WSMenu; class WSMenuItem { @@ -41,7 +44,7 @@ public: Separator, }; - WSMenuItem(WSMenu&, unsigned identifier, const String& text, const String& shortcut_text = {}, bool enabled = true, bool checkable = false, bool checked = false, const GraphicsBitmap* icon = nullptr); + WSMenuItem(WSMenu&, unsigned identifier, const String& text, const String& shortcut_text = {}, bool enabled = true, bool checkable = false, bool checked = false, const Gfx::Bitmap* icon = nullptr); WSMenuItem(WSMenu&, Type); ~WSMenuItem(); @@ -62,13 +65,13 @@ public: String shortcut_text() const { return m_shortcut_text; } void set_shortcut_text(const String& text) { m_shortcut_text = text; } - void set_rect(const Rect& rect) { m_rect = rect; } - Rect rect() const; + void set_rect(const Gfx::Rect& rect) { m_rect = rect; } + Gfx::Rect rect() const; unsigned identifier() const { return m_identifier; } - const GraphicsBitmap* icon() const { return m_icon; } - void set_icon(const GraphicsBitmap* icon) { m_icon = icon; } + const Gfx::Bitmap* icon() const { return m_icon; } + void set_icon(const Gfx::Bitmap* icon) { m_icon = icon; } bool is_submenu() const { return m_submenu_id != -1; } int submenu_id() const { return m_submenu_id; } @@ -88,8 +91,8 @@ private: unsigned m_identifier { 0 }; String m_text; String m_shortcut_text; - Rect m_rect; - RefPtr<GraphicsBitmap> m_icon; + Gfx::Rect m_rect; + RefPtr<Gfx::Bitmap> m_icon; int m_submenu_id { -1 }; bool m_exclusive { false }; }; |