mirror of
https://gitlab.com/square-game-liberation-front/F.E.I.S.git
synced 2024-11-15 11:33:24 +01:00
3ab8e02fd4
- created as global object in the main function - holds a default of ten notifications on screen
48 lines
915 B
C++
48 lines
915 B
C++
//
|
|
// Created by Syméon on 02/03/2019.
|
|
//
|
|
|
|
#ifndef FEIS_NOTIFICATION_H
|
|
#define FEIS_NOTIFICATION_H
|
|
|
|
|
|
#include <string>
|
|
#include "HistoryActions.h"
|
|
|
|
class Notification {
|
|
public:
|
|
virtual void display() const = 0;
|
|
|
|
virtual ~Notification() = default;
|
|
};
|
|
|
|
|
|
class TextNotification : public Notification {
|
|
public:
|
|
explicit TextNotification(const std::string &message);
|
|
|
|
void display() const override;
|
|
|
|
const std::string message;
|
|
};
|
|
|
|
class UndoNotification : public Notification {
|
|
public:
|
|
explicit UndoNotification(const ActionWithMessage& awm) : message(awm.getMessage()) {};
|
|
|
|
void display() const override;
|
|
|
|
const std::string message;
|
|
};
|
|
|
|
class RedoNotification : public Notification {
|
|
public:
|
|
explicit RedoNotification(const ActionWithMessage& awm) : message(awm.getMessage()) {};
|
|
|
|
void display() const override;
|
|
|
|
const std::string message;
|
|
};
|
|
|
|
#endif //FEIS_NOTIFICATION_H
|