forked from fxsound2/fxsound-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFxNotification.h
More file actions
63 lines (48 loc) · 1.7 KB
/
Copy pathFxNotification.h
File metadata and controls
63 lines (48 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
FxSound
Copyright (C) 2023 FxSound LLC
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef FXNOTIFICATION_H
#define FXNOTIFICATION_H
#include <JuceHeader.h>
#include "FxTheme.h"
#include "FxHyperlink.h"
#include "FxController.h"
class FxNotification : public Component, private Timer
{
public:
FxNotification();
~FxNotification();
static constexpr int WIDTH = 216;
static constexpr int HEIGHT = 80;
static constexpr int MAX_WIDTH = 560;
static constexpr int MAX_HEIGHT = 120;
void setMessage(const String& message, const std::pair<String, String>& link, bool autohide=true);
void showMessage(bool autohide=true);
private:
static constexpr int ICON_WIDTH = 79;
static constexpr int ICON_HEIGHT = 12;
static constexpr int AD_WIDTH = 216;
static constexpr int AD_HEIGHT = 36;
static constexpr int TITLE_HEIGHT = 24;
static constexpr int HYPERLINK_HEIGHT = 24;
void paint(Graphics&) override;
void timerCallback() override;
std::unique_ptr<Drawable> icon_;
Label message_lines_[3];
FxHyperlink message_link_;
int line_count_;
int link_line_;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(FxNotification)
};
#endif