midday-commander
Loading...
Searching...
No Matches
Modal.h
Go to the documentation of this file.
1//
2// Created by Vojtěch Pašek on 21.05.2023.
3//
4
5#ifndef MIDDAY_COMMANDER_MODAL_H
6#define MIDDAY_COMMANDER_MODAL_H
7
8#include "string"
9#include "ncurses.h"
10
14class Modal {
15public:
16 Modal(std::string title, int height, int width);
17 Modal(int height, int width);
18 Modal& show();
19 [[nodiscard]] std::string input();
20 Modal& message(std::string);
21 void destroy();
22private:
23 std::string title;
24 int height;
25 int width;
26 WINDOW* window{};
27};
28
29
30#endif //MIDDAY_COMMANDER_MODAL_H
A helper class allowing Actions to receive input and show messages.
Definition: Modal.h:14
int height
Definition: Modal.h:24
int width
Definition: Modal.h:25
Modal & show()
Definition: Modal.cpp:19
std::string input()
Definition: Modal.cpp:30
void destroy()
Definition: Modal.cpp:26
std::string title
Definition: Modal.h:23
WINDOW * window
Definition: Modal.h:26
Modal & message(std::string)
Definition: Modal.cpp:62