1// Aseprite
2// Copyright (C) 2020 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_NOTIFICATIONS_H_INCLUDED
9#define APP_UI_NOTIFICATIONS_H_INCLUDED
10#pragma once
11
12#include "ui/button.h"
13#include "ui/menu.h"
14
15namespace ui {
16 class Style;
17}
18
19namespace app {
20 class INotificationDelegate;
21
22 class Notifications : public ui::Button {
23 public:
24 Notifications();
25
26 void addLink(INotificationDelegate* del);
27 bool hasNotifications() const { return m_popup.hasChildren(); }
28
29 protected:
30 void onSizeHint(ui::SizeHintEvent& ev) override;
31 void onPaint(ui::PaintEvent& ev) override;
32 void onClick(ui::Event& ev) override;
33
34 private:
35 ui::Style* m_flagStyle;
36 bool m_red;
37 ui::Menu m_popup;
38 };
39
40} // namespace app
41
42#endif
43