feisty meow concerns codebase  2.140
definitions_wx.h
Go to the documentation of this file.
1 #ifndef WX_DEFINITIONS_GROUP
2 #define WX_DEFINITIONS_GROUP
3 
4 /*****************************************************************************\
5 * *
6 * Name : definitions for wx *
7 * Author : Chris Koeritz *
8 * *
9 * Purpose: *
10 * *
11 * Some macros that support the use of WX widgets. *
12 * *
13 *******************************************************************************
14 * Copyright (c) 2006-$now By Author. This program is free software; you can *
15 * redistribute it and/or modify it under the terms of the GNU General Public *
16 * License as published by the Free Software Foundation; either version 2 of *
17 * the License or (at your option) any later version. This is online at: *
18 * http://www.fsf.org/copyleft/gpl.html *
19 * Please send any updates to: fred@gruntose.com *
20 \*****************************************************************************/
21 
22 #include <basis/utf_conversion.h>
23 
24 #include <wx/defs.h>
25 
26 namespace loggers {
27 
28 #ifdef wxUSE_UNICODE
30  #define to_unicode_wx(s) ((const wxChar *)(const flexichar *)transcode_to_utf16(s))
32  #define from_unicode_wx(s) ((const char *)(const UTF8 *)transcode_to_utf8(s))
33 #else
34  // turn off the unicode macro to ensure nothing gets confused.
35  #undef UNICODE
36  // placeholder macros try not to do much.
37  #define to_unicode_wx(s) ((const wxChar *)null_transcoder(s, false))
38  #define from_unicode_wx(s) ((const char *)null_transcoder((const wxChar *)s, false))
39 #endif
40 
41 } //namespace.
42 
43 #endif
44 
A logger that sends to the console screen using the standard output device.
Support for unicode builds.