2019-03-28 17:32:38 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
2019-07-27 11:15:20 +02:00
|
|
|
#include <LibDraw/Color.h>
|
|
|
|
|
|
2019-03-28 17:32:38 +01:00
|
|
|
class Painter;
|
|
|
|
|
class Rect;
|
|
|
|
|
|
2019-06-07 17:13:23 +02:00
|
|
|
enum class ButtonStyle {
|
2019-06-07 11:46:55 +02:00
|
|
|
Normal,
|
|
|
|
|
CoolBar
|
|
|
|
|
};
|
2019-06-07 17:13:23 +02:00
|
|
|
enum class FrameShadow {
|
2019-06-07 11:46:55 +02:00
|
|
|
Plain,
|
|
|
|
|
Raised,
|
|
|
|
|
Sunken
|
|
|
|
|
};
|
2019-06-07 17:13:23 +02:00
|
|
|
enum class FrameShape {
|
2019-06-07 11:46:55 +02:00
|
|
|
NoFrame,
|
|
|
|
|
Box,
|
|
|
|
|
Container,
|
|
|
|
|
Panel,
|
|
|
|
|
VerticalLine,
|
|
|
|
|
HorizontalLine
|
|
|
|
|
};
|
2019-03-28 17:32:38 +01:00
|
|
|
|
|
|
|
|
class StylePainter {
|
|
|
|
|
public:
|
2019-04-12 02:51:59 +02:00
|
|
|
static void paint_button(Painter&, const Rect&, ButtonStyle, bool pressed, bool hovered = false, bool checked = false, bool enabled = true);
|
2019-05-05 14:39:37 +02:00
|
|
|
static void paint_tab_button(Painter&, const Rect&, bool active, bool hovered, bool enabled);
|
2019-05-05 20:53:04 +02:00
|
|
|
static void paint_surface(Painter&, const Rect&, bool paint_vertical_lines = true, bool paint_top_line = true);
|
2019-04-10 03:43:46 +02:00
|
|
|
static void paint_frame(Painter&, const Rect&, FrameShape, FrameShadow, int thickness, bool skip_vertical_lines = false);
|
2019-05-11 01:31:10 +02:00
|
|
|
static void paint_window_frame(Painter&, const Rect&);
|
2019-08-14 20:31:46 +02:00
|
|
|
static void paint_progress_bar(Painter&, const Rect&, int min, int max, int value, const StringView& text = {});
|
2019-07-27 11:15:20 +02:00
|
|
|
|
2019-12-23 20:24:26 +01:00
|
|
|
static Color hover_highlight_color() { return SystemColor::HoverHighlight; }
|
2019-03-28 17:32:38 +01:00
|
|
|
};
|