1// Aseprite
2// Copyright (C) 2018-2022 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_BRUSH_POPUP_H_INCLUDED
9#define APP_UI_BRUSH_POPUP_H_INCLUDED
10#pragma once
11
12#include "app/ui/button_set.h"
13#include "doc/brushes.h"
14#include "ui/box.h"
15#include "ui/popup_window.h"
16
17namespace app {
18
19 class BrushPopup : public ui::PopupWindow {
20 public:
21 BrushPopup();
22
23 void setBrush(doc::Brush* brush);
24 void regenerate(ui::Display* display,
25 const gfx::Point& pos);
26
27 static os::SurfaceRef createSurfaceForBrush(const doc::BrushRef& brush,
28 const bool useOriginalImage = false);
29
30 private:
31 void onStandardBrush();
32 void onBrushChanges();
33
34 ui::VBox m_box;
35 ButtonSet m_standardBrushes;
36 ButtonSet* m_customBrushes;
37 };
38
39} // namespace app
40
41#endif
42