1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:27:35 +00:00

WindowServer+LibGUI+LibGfx: Add WindowType::ToolWindow

Tool windows are secondary windows with a smaller title bar. The sit on
the layer above normal windows, and cannot be minimized.

These are intended for complex yet non-modal interactions with the
content of a primary window, such as find/replace windows, property
windows, etc.
This commit is contained in:
Andreas Kling 2021-02-16 16:10:39 +01:00
parent 15c1f7a40d
commit 11c8596ad3
12 changed files with 105 additions and 37 deletions

View file

@ -35,6 +35,7 @@ class WindowTheme {
public:
enum class WindowType {
Normal,
ToolWindow,
Notification,
Other,
};
@ -51,9 +52,10 @@ public:
static WindowTheme& current();
virtual void paint_normal_frame(Painter&, WindowState, const IntRect& window_rect, const StringView& title, const Bitmap& icon, const Palette&, const IntRect& leftmost_button_rect) const = 0;
virtual void paint_tool_window_frame(Painter&, WindowState, const IntRect& window_rect, const StringView& title, const Palette&, const IntRect& leftmost_button_rect) const = 0;
virtual void paint_notification_frame(Painter&, const IntRect& window_rect, const Palette&, const IntRect& close_button_rect) const = 0;
virtual int title_bar_height(const Palette&) const = 0;
virtual int title_bar_height(WindowType, const Palette&) const = 0;
virtual IntRect title_bar_rect(WindowType, const IntRect& window_rect, const Palette&) const = 0;
virtual IntRect title_bar_icon_rect(WindowType, const IntRect& window_rect, const Palette&) const = 0;
virtual IntRect title_bar_text_rect(WindowType, const IntRect& window_rect, const Palette&) const = 0;