File tree 3 files changed +36
-0
lines changed
3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -61,13 +61,42 @@ typedef wxStringEqual lk_string_equal;
61
61
62
62
#else
63
63
#include < string>
64
+ #include < sstream>
64
65
65
66
typedef std::string::value_type lk_char;
66
67
typedef std::string lk_string;
67
68
68
69
typedef std::hash<std::string> lk_string_hash;
69
70
typedef std::equal_to<std::string> lk_string_equal;
70
71
72
+ inline lk_string& operator << (lk_string& a, const lk_string& lstr)
73
+ {
74
+ a += lstr;
75
+ return a;
76
+ }
77
+
78
+ inline lk_string& operator << (lk_string& a, const char * s)
79
+ {
80
+ a += s;
81
+ return a;
82
+ }
83
+
84
+ inline lk_string& operator << (lk_string& a, int i)
85
+ {
86
+ std::stringstream sstr;
87
+ sstr << i;
88
+ a += sstr.str ();
89
+ return a;
90
+ }
91
+
92
+ inline lk_string& operator << (lk_string& a, size_t i)
93
+ {
94
+ std::stringstream sstr;
95
+ sstr << i;
96
+ a += sstr.str ();
97
+ return a;
98
+ }
99
+
71
100
#endif
72
101
73
102
#define lk_tr (s ) lk::get_translation(s)
Original file line number Diff line number Diff line change @@ -32,7 +32,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
32
#ifndef __lk_stdlib_h
33
33
#define __lk_stdlib_h
34
34
35
+ #ifdef LK_USE_WXWIDGETS
35
36
#include < wx/wx.h>
37
+ #endif
36
38
37
39
#include < lk/env.h>
38
40
@@ -169,6 +171,8 @@ namespace lk {
169
171
double erfc (double x);
170
172
};
171
173
174
+ #ifdef LK_USE_WXWIDGETS
175
+
172
176
class MyMessageDialog : public wxDialog {
173
177
public:
174
178
MyMessageDialog (wxWindow *parent,
@@ -261,5 +265,6 @@ DECLARE_EVENT_TABLE();
261
265
};
262
266
263
267
wxWindow *GetCurrentTopLevelWindow ();
268
+ #endif
264
269
265
270
#endif
Original file line number Diff line number Diff line change @@ -4105,6 +4105,7 @@ double lk::erfc(double x) {
4105
4105
return x < 0.0 ? 1.0 + gammp (0.5 , x * x) : gammq (0.5 , x * x);
4106
4106
}
4107
4107
4108
+ #ifdef LK_USE_WXWIDGETS
4108
4109
wxWindow *GetCurrentTopLevelWindow () {
4109
4110
wxWindowList &wl = ::wxTopLevelWindows;
4110
4111
for (wxWindowList::iterator it = wl.begin (); it != wl.end (); ++it)
@@ -4114,6 +4115,7 @@ wxWindow *GetCurrentTopLevelWindow() {
4114
4115
4115
4116
return 0 ;
4116
4117
}
4118
+ #endif
4117
4119
4118
4120
#ifdef WIN32
4119
4121
You can’t perform that action at this time.
0 commit comments