Btk
impl.hpp
1 #if !defined(_BTK_MSGBOX_IMPL)
2 #define _BTK_MSGBOX_IMPL
3 #include "../impl/atomic.hpp"
4 #include "fselect.hpp"
5 #include "msgbox.hpp"
6 #include <string>
7 #include <memory>
8 namespace Btk{
9  namespace Impl{
15  template<class T>
16  struct RefDeleter{
17  RefDeleter(T *ptr){
18  this->ptr = ptr;
19  }
20  RefDeleter(const RefDeleter &) = delete;
21  ~RefDeleter(){
22  ptr->unref();
23  }
24  T *ptr;
25  };
26  };
29 
30  //< The return value of the box
31  std::string value;
32  std::string title;
33  //< The title
34  Atomic refcount = 1;
35 
36  bool multiple = false;
37  bool save = false;
38 
39  SignalAsync signal;
40  //< The async signal
41  void Run();
42  void unref();
43  };
46 
47  std::string title;
48  std::string message;
49  SignalAsync signal;
50  //messagebox flag
51  int flag;
52  Atomic refcount = 1;
53  void Run();
54  void unref();
55  };
56 }
57 
58 
59 
60 #endif // _BTK_MSGBOX_IMPL
Definition: atomic.hpp:6
Definition: signal.hpp:113
This header include many useful containers.
Definition: async.hpp:7
Definition: impl.hpp:44
A helper class to delete MessageBox impl.
Definition: impl.hpp:16
Definition: impl.hpp:27