1// Aseprite UI Library
2// Copyright (C) 2001-2017 David Capello
3//
4// This file is released under the terms of the MIT license.
5// Read LICENSE.txt for more information.
6
7#ifndef UI_PAINT_EVENT_H_INCLUDED
8#define UI_PAINT_EVENT_H_INCLUDED
9#pragma once
10
11#include "ui/event.h"
12
13namespace ui {
14
15 class Graphics;
16 class Widget;
17
18 class PaintEvent : public Event {
19 public:
20 PaintEvent(Widget* source, Graphics* graphics);
21 virtual ~PaintEvent();
22
23 Graphics* graphics();
24
25 bool isPainted() const { return m_painted; }
26 bool isTransparentBg() const { return m_transparentBg; }
27
28 void setTransparentBg(bool state) {
29 m_transparentBg = state;
30 }
31
32 private:
33 Graphics* m_graphics;
34 bool m_painted;
35 bool m_transparentBg;
36 };
37
38} // namespace ui
39
40#endif
41