summaryrefslogtreecommitdiff
path: root/src/gui_progress.hh
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@yahoo.com>2017-08-06 22:27:09 +0200
committerJoel Klinghed <the_jk@yahoo.com>2017-08-06 22:28:12 +0200
commitea8148077fa28964e3b582cd6e0bb9cfea850b66 (patch)
tree1c8679be716830d6f1835aaa50d7f18b55528c1e /src/gui_progress.hh
parent178bb3a1ceab88f29aa7d0ceb453e76de172fd27 (diff)
Add support for protocols in monitor-gui
Diffstat (limited to 'src/gui_progress.hh')
-rw-r--r--src/gui_progress.hh38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/gui_progress.hh b/src/gui_progress.hh
new file mode 100644
index 0000000..2c92693
--- /dev/null
+++ b/src/gui_progress.hh
@@ -0,0 +1,38 @@
+// -*- mode: c++; c-basic-offset: 2; -*-
+
+#ifndef GUI_PROGRESS_HH
+#define GUI_PROGRESS_HH
+
+#include <string>
+#include <vector>
+
+#include "gui_window.hh"
+
+class GuiProgress : public GuiWindow {
+public:
+ class Listener : public GuiWindow::Listener {
+ public:
+ virtual ~Listener() {}
+
+ virtual bool about_to_close(GuiProgress* progress) = 0;
+
+ protected:
+ Listener() {}
+ };
+
+ static GuiProgress* create(std::string const& title,
+ std::string const& text,
+ float min, float max);
+
+ virtual void add_listener(Listener* listener) = 0;
+ virtual void remove_listener(Listener* listener) = 0;
+
+ virtual void show(GuiWindow* parent) = 0;
+
+ virtual void set_progress(float progress) = 0;
+
+protected:
+ GuiProgress() {}
+};
+
+#endif // GUI_PROGRESS_HH