summaryrefslogtreecommitdiff
path: root/include/libHX/wx_helper.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/libHX/wx_helper.hpp')
-rw-r--r--include/libHX/wx_helper.hpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/libHX/wx_helper.hpp b/include/libHX/wx_helper.hpp
new file mode 100644
index 0000000..07d7802
--- /dev/null
+++ b/include/libHX/wx_helper.hpp
@@ -0,0 +1,20 @@
+#ifndef _LIBHX_WXHELPER_HPP
+#define _LIBHX_WXHELPER_HPP 1
+
+/* Convert from UTF-8 to wxString; only valid within the scope of the result */
+#define wxfu8(s) wxString((s), wxConvUTF8)
+
+/* Convert from UTF-8 to wxString for varargs/wxPrintf */
+#define wxfv8(s) (wxfu8(s).c_str())
+
+/* Convert from wxString to UTF-8; limited validity */
+#define wxtu8(s) static_cast<const char *>((s).ToUTF8())
+
+/* Common dialog flags */
+#define wxCDF (wxDEFAULT_FRAME_STYLE | wxFRAME_NO_TASKBAR)
+#define wxACV wxALIGN_CENTER_VERTICAL
+#define wxDPOS wxDefaultPosition
+#define wxDSIZE wxDefaultSize
+#define wxDSPAN wxDefaultSpan
+
+#endif /* _LIBHX_WXHELPER_HPP */