1// Aseprite
2// Copyright (C) 2019 Igara Studio S.A.
3// Copyright (C) 2001-2015 David Capello
4//
5// This program is distributed under the terms of
6// the End-User License Agreement for Aseprite.
7
8#ifndef APP_UI_SKIN_SKIN_SLIDER_PROPERTY_H_INCLUDED
9#define APP_UI_SKIN_SKIN_SLIDER_PROPERTY_H_INCLUDED
10#pragma once
11
12#include "app/ui/skin/skin_property.h"
13#include "gfx/rect.h"
14
15#include <memory>
16
17namespace ui {
18 class Slider;
19 class Graphics;
20}
21
22namespace app {
23 namespace skin {
24
25 class ISliderBgPainter {
26 public:
27 virtual ~ISliderBgPainter() { }
28 virtual void paint(ui::Slider* slider, ui::Graphics* graphics, const gfx::Rect& rc) = 0;
29 };
30
31 class SkinSliderProperty : public ui::Property {
32 public:
33 static const char* Name;
34
35 // The given painter is deleted automatically when this
36 // property the destroyed.
37 SkinSliderProperty(ISliderBgPainter* painter);
38 ~SkinSliderProperty();
39
40 ISliderBgPainter* getBgPainter() const;
41
42 private:
43 ISliderBgPainter* m_painter;
44 };
45
46 } // namespace skin
47} // namespace app
48
49#endif
50