Enigma
3.2.0
A Simple, Reliable and Efficient Encryption Tool
Notification.hpp
Go to the documentation of this file.
1
#pragma once
2
#ifndef ENIGMA_NOTIFICATION_H
3
#define ENIGMA_NOTIFICATION_H
4
5
#include <
Core/Core.hpp
>
6
#include <portable-file-dialogs.h>
7
8
NS_ENIGMA_BEGIN
12
class
Notification
{
13
public
:
/* Enums */
17
enum class
Icon
: std::uint8_t {
18
Info
=
static_cast<
std::uint8_t
>
(pfd::icon::info),
19
Warning
=
static_cast<
std::uint8_t
>
(pfd::icon::warning),
20
Error
=
static_cast<
std::uint8_t
>
(pfd::icon::error)
21
};
22
23
public
:
/* Constructors / Destructor */
29
Notification
(
const
std::string& title,
const
std::string& message,
Icon
icon =
Icon::Info
);
30
~Notification
() noexcept = default;
31
32
public:
/* Accessors */
36
void
Show
() const;
37
38
private:
39
const std::
string
m_title;
/*< Notification title */
40
const std::
string
m_message;
/*< Notification message */
41
const
Icon
m_icon;
/*< Notification icon (Info, Error or Warning) */
42
};
43
44
NS_ENIGMA_END
45
46
#endif
// !ENIGMA_NOTIFICATION_H
Core.hpp
NS_ENIGMA_BEGIN
#define NS_ENIGMA_BEGIN
Enable/Disable Assertions.
Definition:
Macros.hpp:13
NS_ENIGMA_END
#define NS_ENIGMA_END
Definition:
Macros.hpp:14
Notification
Definition:
Notification.hpp:12
Notification::Show
void Show() const
Notification::Icon
Icon
Definition:
Notification.hpp:17
Notification::Icon::Warning
@ Warning
Notification::Icon::Info
@ Info
Notification::Icon::Error
@ Error
Notification::Notification
Notification(const std::string &title, const std::string &message, Icon icon=Icon::Info)
Notification::~Notification
~Notification() noexcept=default
src
System
Notification
Notification.hpp
Generated on Sat Oct 19 2024 20:10:46 for Enigma by
1.9.1