| 1 | #ifndef EDITPASS_HH |
| 2 | #define EDITPASS_HH |
| 3 | |
| 4 | #include <FL/Fl_Button.H> |
| 5 | #include <FL/Fl_Input.H> |
| 6 | #include <FL/Fl_Secret_Input.H> |
| 7 | |
| 8 | #include "dialog.hh" |
| 9 | |
| 10 | #include <string> |
| 11 | |
| 12 | class Editpass : public Dialog { |
| 13 | public: |
| 14 | Fl_Button *btn = nullptr; |
| 15 | std::string file; |
| 16 | std::string inputpass1; |
| 17 | std::string inputpass2; |
| 18 | |
| 19 | static void dialog_cb(Fl_Widget *w, void *); |
| 20 | void edit_cb(Fl_Widget *, void *data); |
| 21 | static void setFile(std::string &f); |
| 22 | std::string getFile(); |
| 23 | bool exec(const std::string &file, const std::string &pass); |
| 24 | |
| 25 | private: |
| 26 | static void static_ok_cb(Fl_Widget *w, void *data); |
| 27 | static void static_cancel_cb(Fl_Widget *w, void *data); |
| 28 | }; |
| 29 | |
| 30 | #endif |