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
};
27
struct
FSelectBoxImpl
{
28
using
SignalAsync
=
FSelectBox::SignalAsync
;
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
};
44
struct
MessageBoxImpl
{
45
using
SignalAsync
=
MessageBox::SignalAsync
;
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
Btk::Atomic
Definition:
atomic.hpp:6
Btk::Signal
Definition:
signal.hpp:113
Btk
This header include many useful containers.
Definition:
async.hpp:7
Btk::MessageBoxImpl
Definition:
impl.hpp:44
Btk::Impl::RefDeleter
A helper class to delete MessageBox impl.
Definition:
impl.hpp:16
Btk::FSelectBoxImpl
Definition:
impl.hpp:27
include
Btk
msgbox
impl.hpp
Generated by
1.8.13