1// Aseprite
2// Copyright (C) 2021-2022 Igara Studio S.A.
3// Copyright (C) 2001-2017 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_PALETTE_POPUP_H_INCLUDED
9#define APP_UI_PALETTE_POPUP_H_INCLUDED
10#pragma once
11
12#include "app/ui/palettes_listbox.h"
13#include "ui/popup_window.h"
14
15namespace ui {
16 class Button;
17 class View;
18}
19
20namespace app {
21
22 namespace gen {
23 class PalettePopup;
24 }
25
26 class PalettePopup : public ui::PopupWindow {
27 public:
28 PalettePopup();
29
30 void showPopup(ui::Display* display,
31 const gfx::Rect& buttonPos);
32
33 protected:
34 void onPalChange(const doc::Palette* palette);
35 void onSearchChange();
36 void onLoadPal();
37 void onOpenFolder();
38
39 private:
40 gen::PalettePopup* m_popup;
41 PalettesListBox m_paletteListBox;
42 };
43
44} // namespace app
45
46#endif
47