diff --git a/docs/doxygen/mainpages/const_cpp.h b/docs/doxygen/mainpages/const_cpp.h index 4abd4e95c9..435a7f9894 100644 --- a/docs/doxygen/mainpages/const_cpp.h +++ b/docs/doxygen/mainpages/const_cpp.h @@ -375,6 +375,11 @@ more details. set to 1 for compatibility reasons as @c -DwxNO_UNSAFE_WXSTRING_CONV can be used only compiling the application code, without rebuilding the library. Support for this option appeared in wxWidgets 3.1.1.} +@itemdef{wxNO_IMPLICIT_WXSTRING_ENCODING, + this symbol is not defined by wxWidgets itself, but can be defined by + the applications using the library to disable implicit + conversions from and to const char* in wxString class. + Support for this option appeared in wxWidgets 3.1.4.} @itemdef{WXMAKINGDLL_XXX, used internally and defined when building the library @c XXX as a DLL; when a monolithic wxWidgets build is used only a diff --git a/docs/doxygen/overviews/string.h b/docs/doxygen/overviews/string.h index e3df7c8d64..e791565772 100644 --- a/docs/doxygen/overviews/string.h +++ b/docs/doxygen/overviews/string.h @@ -236,12 +236,40 @@ arguments should take const wxString& (this makes assignment to the strings inside the function faster) and all functions returning strings should return wxString - this makes it safe to return local variables. -Finally note that wxString uses the current locale encoding to convert any C string +Note that wxString uses by default the current locale encoding to convert any C string literal to Unicode. The same is done for converting to and from @c std::string and for the return value of c_str(). For this conversion, the @a wxConvLibc class instance is used. See wxCSConv and wxMBConv. +It is also possible to disable any automatic conversions from C +strings to Unicode. This can be useful when the @a wxConvLibc encoding +is not appropriate for the current software and platform. The macro @c +wxNO_IMPLICIT_WXSTRING_ENCODING disables all implicit conversions, and +forces the code to explicitly indicate the encoding of all C strings. + +Finally note that encodings, either implicitly or explicitly selected, +may not be able to represent all the string's characters. The result +in this case is undefined: the string may be empty, or the +unrepresentable characters may be missing or wrong. + +@code +wxString s; +// s = "world"; does not compile with wxNO_IMPLICIT_WXSTRING_ENCODING +s = wxString::FromAscii("world"); // Always compiles +s = wxASCII_STR("world"); // shorthand for the above +s = wxString::FromUTF8("world"); // Always compiles +s = wxString("world", wxConvLibc); // Always compiles, explicit encoding +s = wxASCII_STR("Grüße"); // Always compiles but encoding fails + +const char *c; +// c = s.c_str(); does not compile with wxNO_IMPLICIT_WXSTRING_ENCODING +// c = s.mb_str(); does not compile with wxNO_IMPLICIT_WXSTRING_ENCODING +c = s.ToAscii(); // Always compiles, encoding may fail +c = s.ToUTF8(); // Always compiles, encoding never fails +c = s.utf8_str(); // Alias for the above +c = s.mb_str(wxConvLibc); // Always compiles, explicit encoding +@endcode @subsection overview_string_iterating Iterating wxString Characters diff --git a/include/wx/addremovectrl.h b/include/wx/addremovectrl.h index 94e5630cce..617dfa1ee2 100644 --- a/include/wx/addremovectrl.h +++ b/include/wx/addremovectrl.h @@ -66,7 +66,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxAddRemoveCtrlNameStr) + const wxString& name = wxASCII_STR(wxAddRemoveCtrlNameStr)) { Init(); @@ -78,7 +78,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxAddRemoveCtrlNameStr); + const wxString& name = wxASCII_STR(wxAddRemoveCtrlNameStr)); virtual ~wxAddRemoveCtrl(); diff --git a/include/wx/animate.h b/include/wx/animate.h index 92051d6490..f024081600 100644 --- a/include/wx/animate.h +++ b/include/wx/animate.h @@ -171,7 +171,7 @@ protected: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxAC_DEFAULT_STYLE, - const wxString& name = wxAnimationCtrlNameStr) + const wxString& name = wxASCII_STR(wxAnimationCtrlNameStr)) : wxGenericAnimationCtrl(parent, id, anim, pos, size, style, name) {} diff --git a/include/wx/any.h b/include/wx/any.h index 4883214b46..7fb297956c 100644 --- a/include/wx/any.h +++ b/include/wx/any.h @@ -504,8 +504,10 @@ extern WXDLLIMPEXP_BASE bool wxAnyConvertString(const wxString& value, wxAnyValueBuffer& dst); WX_ANY_DEFINE_CONVERTIBLE_TYPE_BASE(wxString, wxString, wxAnyConvertString) +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING WX_ANY_DEFINE_CONVERTIBLE_TYPE(const char*, ConstCharPtr, wxAnyConvertString, wxString) +#endif WX_ANY_DEFINE_CONVERTIBLE_TYPE(const wchar_t*, ConstWchar_tPtr, wxAnyConvertString, wxString) @@ -757,11 +759,13 @@ public: } // These two constructors are needed to deal with string literals +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxAny(const char* value) { m_type = wxAnyValueTypeImpl::sm_instance.get(); wxAnyValueTypeImpl::SetValue(value, m_buffer); } +#endif wxAny(const wchar_t* value) { m_type = wxAnyValueTypeImpl::sm_instance.get(); @@ -865,11 +869,13 @@ public: #endif // These two operators are needed to deal with string literals +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxAny& operator=(const char* value) { Assign(value); return *this; } +#endif wxAny& operator=(const wchar_t* value) { Assign(value); @@ -888,8 +894,10 @@ public: return value == value2; } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING bool operator==(const char* value) const { return (*this) == wxString(value); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING bool operator==(const wchar_t* value) const { return (*this) == wxString(value); } @@ -1017,6 +1025,13 @@ public: #endif private: +#ifdef wxNO_IMPLICIT_WXSTRING_ENCODING + wxAny(const char*); // Disabled + wxAny& operator=(const char *&value); // Disabled + wxAny& operator=(const char value[]); // Disabled + wxAny& operator==(const char *value); // Disabled +#endif + // Assignment functions void AssignAny(const wxAny& any) { diff --git a/include/wx/anystr.h b/include/wx/anystr.h index 082d83f151..3f2fec3613 100644 --- a/include/wx/anystr.h +++ b/include/wx/anystr.h @@ -65,6 +65,7 @@ public: bool operator!() const { return !((bool)*this); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING // and these are the conversions operator which allow to assign the result // of FuncReturningAnyStrPtr() to either char* or wxChar* (i.e. wchar_t*) operator const char *() const @@ -94,6 +95,7 @@ public: return p; } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING operator const wchar_t *() const { diff --git a/include/wx/artprov.h b/include/wx/artprov.h index 29e0c71b26..b54597659b 100644 --- a/include/wx/artprov.h +++ b/include/wx/artprov.h @@ -27,10 +27,10 @@ class wxArtProviderModule; typedef wxString wxArtClient; typedef wxString wxArtID; -#define wxART_MAKE_CLIENT_ID_FROM_STR(id) ((id) + "_C") -#define wxART_MAKE_CLIENT_ID(id) (#id "_C") +#define wxART_MAKE_CLIENT_ID_FROM_STR(id) ((id) + wxASCII_STR("_C")) +#define wxART_MAKE_CLIENT_ID(id) wxASCII_STR(#id "_C") #define wxART_MAKE_ART_ID_FROM_STR(id) (id) -#define wxART_MAKE_ART_ID(id) (#id) +#define wxART_MAKE_ART_ID(id) wxASCII_STR(#id) // ---------------------------------------------------------------------------- // Art clients diff --git a/include/wx/aui/tabmdi.h b/include/wx/aui/tabmdi.h index af0a100ef6..a8ee5d38e6 100644 --- a/include/wx/aui/tabmdi.h +++ b/include/wx/aui/tabmdi.h @@ -46,7 +46,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); ~wxAuiMDIParentFrame(); @@ -56,7 +56,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr ); + const wxString& name = wxASCII_STR(wxFrameNameStr) ); void SetArtProvider(wxAuiTabArt* provider); wxAuiTabArt* GetArtProvider(); @@ -131,7 +131,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); virtual ~wxAuiMDIChildFrame(); bool Create(wxAuiMDIParentFrame *parent, @@ -140,7 +140,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); #if wxUSE_MENUS virtual void SetMenuBar(wxMenuBar *menuBar) wxOVERRIDE; diff --git a/include/wx/bannerwindow.h b/include/wx/bannerwindow.h index 00029b24e3..a10f7e1532 100644 --- a/include/wx/bannerwindow.h +++ b/include/wx/bannerwindow.h @@ -54,7 +54,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxBannerWindowNameStr) + const wxString& name = wxASCII_STR(wxBannerWindowNameStr)) { Init(); @@ -68,7 +68,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxBannerWindowNameStr); + const wxString& name = wxASCII_STR(wxBannerWindowNameStr)); // Provide an existing bitmap to show. For wxLEFT orientation the bitmap is diff --git a/include/wx/base64.h b/include/wx/base64.h index 14aaf7d83f..e682757598 100644 --- a/include/wx/base64.h +++ b/include/wx/base64.h @@ -42,7 +42,7 @@ inline wxString wxBase64Encode(const void *src, size_t srcLen) wxCharBuffer dst(dstLen); wxBase64Encode(dst.data(), dstLen, src, srcLen); - return dst; + return wxASCII_STR(dst); } inline wxString wxBase64Encode(const wxMemoryBuffer& buf) diff --git a/include/wx/catch_cppunit.h b/include/wx/catch_cppunit.h index 66e660b158..652367c7e6 100644 --- a/include/wx/catch_cppunit.h +++ b/include/wx/catch_cppunit.h @@ -90,7 +90,7 @@ namespace Catch { #if wxUSE_UNICODE if ( !iswprint(*i) ) - s += wxString::Format("\\u%04X", *i).ToStdString(); + s += wxString::Format(wxASCII_STR("\\u%04X"), *i).ToAscii(); else #endif // wxUSE_UNICODE s += *i; @@ -278,10 +278,10 @@ inline std::string wxGetCurrentTestName() // Use this macro to assert with the given formatted message (it should contain // the format string and arguments in a separate pair of parentheses) #define WX_ASSERT_MESSAGE(msg, cond) \ - CPPUNIT_ASSERT_MESSAGE(std::string(wxString::Format msg .mb_str()), (cond)) + CPPUNIT_ASSERT_MESSAGE(std::string(wxString::Format msg .mb_str(wxConvLibc)), (cond)) #define WX_ASSERT_EQUAL_MESSAGE(msg, expected, actual) \ - CPPUNIT_ASSERT_EQUAL_MESSAGE(std::string(wxString::Format msg .mb_str()), \ + CPPUNIT_ASSERT_EQUAL_MESSAGE(std::string(wxString::Format msg .mb_str(wxConvLibc)), \ (expected), (actual)) #endif // _WX_CATCH_CPPUNIT_H_ diff --git a/include/wx/clrpicker.h b/include/wx/clrpicker.h index d6d73d4abe..77ae61ab66 100644 --- a/include/wx/clrpicker.h +++ b/include/wx/clrpicker.h @@ -108,7 +108,7 @@ public: const wxColour& col = *wxBLACK, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLRP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxColourPickerCtrlNameStr) + const wxString& name = wxASCII_STR(wxColourPickerCtrlNameStr)) { Create(parent, id, col, pos, size, style, validator, name); } bool Create(wxWindow *parent, wxWindowID id, @@ -117,7 +117,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxCLRP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxColourPickerCtrlNameStr); + const wxString& name = wxASCII_STR(wxColourPickerCtrlNameStr)); public: // public API diff --git a/include/wx/collheaderctrl.h b/include/wx/collheaderctrl.h index 2364218d8e..546b7aa662 100644 --- a/include/wx/collheaderctrl.h +++ b/include/wx/collheaderctrl.h @@ -35,7 +35,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxBORDER_NONE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCollapsibleHeaderCtrlNameStr) + const wxString& name = wxASCII_STR(wxCollapsibleHeaderCtrlNameStr)) { Create(parent, id, label, pos, size, style, validator, name); } @@ -47,7 +47,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxBORDER_NONE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCollapsibleHeaderCtrlNameStr) + const wxString& name = wxASCII_STR(wxCollapsibleHeaderCtrlNameStr)) { if ( !wxControl::Create(parent, id, pos, size, style, validator, name) ) return false; @@ -91,7 +91,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxBORDER_NONE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCollapsibleHeaderCtrlNameStr) + const wxString& name = wxASCII_STR(wxCollapsibleHeaderCtrlNameStr)) { Create(parent, id, label, pos, size, style, validator, name); } diff --git a/include/wx/colour.h b/include/wx/colour.h index 87253462b5..4e9e0a1854 100644 --- a/include/wx/colour.h +++ b/include/wx/colour.h @@ -20,6 +20,12 @@ class WXDLLIMPEXP_FWD_CORE wxColour; // // It avoids the need to repeat these lines across all colour.h files, since // Set() is a virtual function and thus cannot be called by wxColourBase ctors +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING +#define wxWXCOLOUR_CTOR_FROM_CHAR \ + wxColour(const char *colourName) { Init(); Set(colourName); } +#else // wxNO_IMPLICIT_WXSTRING_ENCODING +#define wxWXCOLOUR_CTOR_FROM_CHAR +#endif #define DEFINE_STD_WXCOLOUR_CONSTRUCTORS \ wxColour() { Init(); } \ wxColour(ChannelType red, \ @@ -29,7 +35,7 @@ class WXDLLIMPEXP_FWD_CORE wxColour; { Init(); Set(red, green, blue, alpha); } \ wxColour(unsigned long colRGB) { Init(); Set(colRGB ); } \ wxColour(const wxString& colourName) { Init(); Set(colourName); } \ - wxColour(const char *colourName) { Init(); Set(colourName); } \ + wxWXCOLOUR_CTOR_FROM_CHAR \ wxColour(const wchar_t *colourName) { Init(); Set(colourName); } diff --git a/include/wx/commandlinkbutton.h b/include/wx/commandlinkbutton.h index bd4b5d2e23..d42322ba42 100644 --- a/include/wx/commandlinkbutton.h +++ b/include/wx/commandlinkbutton.h @@ -40,7 +40,7 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) + const wxString& name = wxASCII_STR(wxButtonNameStr)) : wxButton(parent, id, mainLabel + '\n' + note, @@ -103,7 +103,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) + const wxString& name = wxASCII_STR(wxButtonNameStr)) : wxCommandLinkButtonBase() { Create(parent, id, mainLabel, note, pos, size, style, validator, name); @@ -117,7 +117,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); + const wxString& name = wxASCII_STR(wxButtonNameStr)); virtual void SetMainLabelAndNote(const wxString& mainLabel, const wxString& note) wxOVERRIDE @@ -147,7 +147,7 @@ private: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) + const wxString& name = wxASCII_STR(wxButtonNameStr)) : wxGenericCommandLinkButton(parent, id, mainLabel, diff --git a/include/wx/confbase.h b/include/wx/confbase.h index 7188f50790..db98d725e3 100644 --- a/include/wx/confbase.h +++ b/include/wx/confbase.h @@ -225,8 +225,10 @@ public: // we have to provide a separate version for C strings as otherwise the // template Read() would be used +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString Read(const wxString& key, const char* defVal) const { return Read(key, wxString(defVal)); } +#endif wxString Read(const wxString& key, const wchar_t* defVal) const { return Read(key, wxString(defVal)); } @@ -268,10 +270,12 @@ public: // we have to provide a separate version for C strings as otherwise they // would be converted to bool and not to wxString as expected! +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING bool Write(const wxString& key, const char *value) { return Write(key, wxString(value)); } bool Write(const wxString& key, const unsigned char *value) { return Write(key, wxString(value)); } +#endif bool Write(const wxString& key, const wchar_t *value) { return Write(key, wxString(value)); } diff --git a/include/wx/control.h b/include/wx/control.h index 3500aa5253..21dc74a9c1 100644 --- a/include/wx/control.h +++ b/include/wx/control.h @@ -42,7 +42,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxControlNameStr); + const wxString& name = wxASCII_STR(wxControlNameStr)); // get the control alignment (left/right/centre, top/bottom/centre) int GetAlignment() const { return m_windowStyle & wxALIGN_MASK; } diff --git a/include/wx/datetime.h b/include/wx/datetime.h index 417de85ffa..8c5bfbd09a 100644 --- a/include/wx/datetime.h +++ b/include/wx/datetime.h @@ -955,7 +955,7 @@ public: bool ParseFormat(const wxString& date, wxString::const_iterator *end) { - return ParseFormat(date, wxDefaultDateTimeFormat, wxDefaultDateTime, end); + return ParseFormat(date, wxASCII_STR(wxDefaultDateTimeFormat), wxDefaultDateTime, end); } // parse a string containing date, time or both in ISO 8601 format @@ -1000,7 +1000,7 @@ public: // argument corresponds to the preferred date and time representation // for the current locale) and returns the string containing the // resulting text representation - wxString Format(const wxString& format = wxDefaultDateTimeFormat, + wxString Format(const wxString& format = wxASCII_STR(wxDefaultDateTimeFormat), const TimeZone& tz = Local) const; // preferred date representation for the current locale wxString FormatDate() const { return Format(wxS("%x")); } @@ -1035,7 +1035,7 @@ public: } wxAnyStrPtr ParseFormat(const wxString& date, - const wxString& format = wxDefaultDateTimeFormat, + const wxString& format = wxASCII_STR(wxDefaultDateTimeFormat), const wxDateTime& dateDef = wxDefaultDateTime) { wxString::const_iterator end; @@ -1084,14 +1084,14 @@ public: const wchar_t* ParseRfc822Date(const wchar_t* date); void ParseFormat(const wxCStrData& date, - const wxString& format = wxDefaultDateTimeFormat, + const wxString& format = wxASCII_STR(wxDefaultDateTimeFormat), const wxDateTime& dateDef = wxDefaultDateTime) { ParseFormat(wxString(date), format, dateDef); } const char* ParseFormat(const char* date, - const wxString& format = wxDefaultDateTimeFormat, + const wxString& format = wxASCII_STR(wxDefaultDateTimeFormat), const wxDateTime& dateDef = wxDefaultDateTime); const wchar_t* ParseFormat(const wchar_t* date, - const wxString& format = wxDefaultDateTimeFormat, + const wxString& format = wxASCII_STR(wxDefaultDateTimeFormat), const wxDateTime& dateDef = wxDefaultDateTime); void ParseDateTime(const wxCStrData& datetime) @@ -1337,7 +1337,7 @@ public: // resulting text representation. Notice that only some of format // specifiers valid for wxDateTime are valid for wxTimeSpan: hours, // minutes and seconds make sense, but not "PM/AM" string for example. - wxString Format(const wxString& format = wxDefaultTimeSpanFormat) const; + wxString Format(const wxString& format = wxASCII_STR(wxDefaultTimeSpanFormat)) const; // implementation // ------------------------------------------------------------------------ diff --git a/include/wx/dfb/nonownedwnd.h b/include/wx/dfb/nonownedwnd.h index a4e8dcc7bc..c586ab354e 100644 --- a/include/wx/dfb/nonownedwnd.h +++ b/include/wx/dfb/nonownedwnd.h @@ -38,7 +38,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) { Init(); @@ -50,7 +50,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr); + const wxString& name = wxASCII_STR(wxPanelNameStr)); virtual ~wxNonOwnedWindow(); diff --git a/include/wx/dfb/toplevel.h b/include/wx/dfb/toplevel.h index abf06e449e..c662de77ff 100644 --- a/include/wx/dfb/toplevel.h +++ b/include/wx/dfb/toplevel.h @@ -25,7 +25,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Init(); @@ -38,7 +38,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); // implement base class pure virtuals virtual void Maximize(bool maximize = true); diff --git a/include/wx/dfb/window.h b/include/wx/dfb/window.h index 98800bbb5c..ccd7df176a 100644 --- a/include/wx/dfb/window.h +++ b/include/wx/dfb/window.h @@ -39,7 +39,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) { Init(); Create(parent, id, pos, size, style, name); @@ -52,7 +52,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr); + const wxString& name = wxASCII_STR(wxPanelNameStr)); // implement base class (pure) virtual methods // ------------------------------------------- diff --git a/include/wx/dirdlg.h b/include/wx/dirdlg.h index fba5f4d6e4..01360699f2 100644 --- a/include/wx/dirdlg.h +++ b/include/wx/dirdlg.h @@ -56,12 +56,12 @@ class WXDLLIMPEXP_CORE wxDirDialogBase : public wxDialog public: wxDirDialogBase() {} wxDirDialogBase(wxWindow *parent, - const wxString& title = wxDirSelectorPromptStr, + const wxString& title = wxASCII_STR(wxDirSelectorPromptStr), const wxString& defaultPath = wxEmptyString, long style = wxDD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, - const wxString& name = wxDirDialogNameStr) + const wxString& name = wxASCII_STR(wxDirDialogNameStr)) { Create(parent, title, defaultPath, style, pos, sz, name); } @@ -70,12 +70,12 @@ public: bool Create(wxWindow *parent, - const wxString& title = wxDirSelectorPromptStr, + const wxString& title = wxASCII_STR(wxDirSelectorPromptStr), const wxString& defaultPath = wxEmptyString, long style = wxDD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, - const wxString& name = wxDirDialogNameStr) + const wxString& name = wxASCII_STR(wxDirDialogNameStr)) { if (!wxDialog::Create(parent, wxID_ANY, title, pos, sz, style, name)) return false; @@ -136,7 +136,7 @@ protected: // ---------------------------------------------------------------------------- WXDLLIMPEXP_CORE wxString -wxDirSelector(const wxString& message = wxDirSelectorPromptStr, +wxDirSelector(const wxString& message = wxASCII_STR(wxDirSelectorPromptStr), const wxString& defaultPath = wxEmptyString, long style = wxDD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, diff --git a/include/wx/docmdi.h b/include/wx/docmdi.h index 4ffd2e7509..38093793c3 100644 --- a/include/wx/docmdi.h +++ b/include/wx/docmdi.h @@ -41,7 +41,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) : wxDocMDIParentFrameBase(manager, parent, id, title, pos, size, style, name) { @@ -72,7 +72,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) : wxDocMDIChildFrameBase(doc, view, parent, id, title, pos, size, style, name) { diff --git a/include/wx/docview.h b/include/wx/docview.h index 1770170c09..c969da7fe3 100644 --- a/include/wx/docview.h +++ b/include/wx/docview.h @@ -691,7 +691,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Create(doc, view, parent, id, title, pos, size, style, name); } @@ -704,7 +704,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { if ( !wxDocChildFrameAnyBase::Create(doc, view, this) ) return false; @@ -767,7 +767,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) : wxDocChildFrameBase(doc, view, parent, id, title, pos, size, style, name) { @@ -781,7 +781,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { return wxDocChildFrameBase::Create ( @@ -845,7 +845,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) : wxDocParentFrameAnyBase(this) { Create(manager, frame, id, title, pos, size, style, name); @@ -858,7 +858,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { m_docManager = manager; @@ -920,7 +920,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) : wxDocParentFrameBase(manager, parent, id, title, pos, size, style, name) { @@ -933,7 +933,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { return wxDocParentFrameBase::Create(manager, parent, id, title, diff --git a/include/wx/dvrenderers.h b/include/wx/dvrenderers.h index 54eaa455e0..85fcea0023 100644 --- a/include/wx/dvrenderers.h +++ b/include/wx/dvrenderers.h @@ -300,7 +300,7 @@ class WXDLLIMPEXP_CORE wxDataViewCustomRendererBase public: // Constructor must specify the usual renderer parameters which we simply // pass to the base class - wxDataViewCustomRendererBase(const wxString& varianttype = "string", + wxDataViewCustomRendererBase(const wxString& varianttype = wxASCII_STR("string"), wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int align = wxDVR_DEFAULT_ALIGNMENT) : wxDataViewCustomRendererRealBase(varianttype, mode, align) diff --git a/include/wx/editlbox.h b/include/wx/editlbox.h index 9b78874fa6..5ad53fda05 100644 --- a/include/wx/editlbox.h +++ b/include/wx/editlbox.h @@ -41,7 +41,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxEL_DEFAULT_STYLE, - const wxString& name = wxEditableListBoxNameStr) + const wxString& name = wxASCII_STR(wxEditableListBoxNameStr)) { Init(); Create(parent, id, label, pos, size, style, name); @@ -52,7 +52,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxEL_DEFAULT_STYLE, - const wxString& name = wxEditableListBoxNameStr); + const wxString& name = wxASCII_STR(wxEditableListBoxNameStr)); void SetStrings(const wxArrayString& strings); void GetStrings(wxArrayString& strings) const; diff --git a/include/wx/filedlg.h b/include/wx/filedlg.h index da0cb96c13..8689cc99cd 100644 --- a/include/wx/filedlg.h +++ b/include/wx/filedlg.h @@ -68,14 +68,14 @@ public: wxFileDialogBase () { Init(); } wxFileDialogBase(wxWindow *parent, - const wxString& message = wxFileSelectorPromptStr, + const wxString& message = wxASCII_STR(wxFileSelectorPromptStr), const wxString& defaultDir = wxEmptyString, const wxString& defaultFile = wxEmptyString, - const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + const wxString& wildCard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), long style = wxFD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, - const wxString& name = wxFileDialogNameStr) + const wxString& name = wxASCII_STR(wxFileDialogNameStr)) { Init(); Create(parent, message, defaultDir, defaultFile, wildCard, style, pos, sz, name); @@ -85,14 +85,14 @@ public: bool Create(wxWindow *parent, - const wxString& message = wxFileSelectorPromptStr, + const wxString& message = wxASCII_STR(wxFileSelectorPromptStr), const wxString& defaultDir = wxEmptyString, const wxString& defaultFile = wxEmptyString, - const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + const wxString& wildCard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), long style = wxFD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, - const wxString& name = wxFileDialogNameStr); + const wxString& name = wxASCII_STR(wxFileDialogNameStr)); bool HasFdFlag(int flag) const { return HasFlag(flag); } @@ -197,22 +197,22 @@ private: // File selector - backward compatibility WXDLLIMPEXP_CORE wxString -wxFileSelector(const wxString& message = wxFileSelectorPromptStr, +wxFileSelector(const wxString& message = wxASCII_STR(wxFileSelectorPromptStr), const wxString& default_path = wxEmptyString, const wxString& default_filename = wxEmptyString, const wxString& default_extension = wxEmptyString, - const wxString& wildcard = wxFileSelectorDefaultWildcardStr, + const wxString& wildcard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), int flags = 0, wxWindow *parent = NULL, int x = wxDefaultCoord, int y = wxDefaultCoord); // An extended version of wxFileSelector WXDLLIMPEXP_CORE wxString -wxFileSelectorEx(const wxString& message = wxFileSelectorPromptStr, +wxFileSelectorEx(const wxString& message = wxASCII_STR(wxFileSelectorPromptStr), const wxString& default_path = wxEmptyString, const wxString& default_filename = wxEmptyString, int *indexDefaultExtension = NULL, - const wxString& wildcard = wxFileSelectorDefaultWildcardStr, + const wxString& wildcard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), int flags = 0, wxWindow *parent = NULL, int x = wxDefaultCoord, int y = wxDefaultCoord); diff --git a/include/wx/filename.h b/include/wx/filename.h index 6fdd706400..9063b81ad2 100644 --- a/include/wx/filename.h +++ b/include/wx/filename.h @@ -406,7 +406,7 @@ public: // fn.ReplaceEnvVariable("OPENWINHOME"); // // now fn.GetFullPath() == "$OPENWINHOME/lib/someFile" bool ReplaceEnvVariable(const wxString& envname, - const wxString& replacementFmtString = "$%s", + const wxString& replacementFmtString = wxS("$%s"), wxPathFormat format = wxPATH_NATIVE); // replaces, if present in the path, the home directory for the given user @@ -575,12 +575,12 @@ public: // returns the size in a human readable form wxString - GetHumanReadableSize(const wxString& nullsize = wxGetTranslation("Not available"), + GetHumanReadableSize(const wxString& nullsize = wxGetTranslation(wxASCII_STR("Not available")), int precision = 1, wxSizeConvention conv = wxSIZE_CONV_TRADITIONAL) const; static wxString GetHumanReadableSize(const wxULongLong& sz, - const wxString& nullsize = wxGetTranslation("Not available"), + const wxString& nullsize = wxGetTranslation(wxASCII_STR("Not available")), int precision = 1, wxSizeConvention conv = wxSIZE_CONV_TRADITIONAL); #endif // wxUSE_LONGLONG diff --git a/include/wx/filepicker.h b/include/wx/filepicker.h index f573971526..527e5282de 100644 --- a/include/wx/filepicker.h +++ b/include/wx/filepicker.h @@ -235,13 +235,13 @@ public: wxFilePickerCtrl(wxWindow *parent, wxWindowID id, const wxString& path = wxEmptyString, - const wxString& message = wxFileSelectorPromptStr, - const wxString& wildcard = wxFileSelectorDefaultWildcardStr, + const wxString& message = wxASCII_STR(wxFileSelectorPromptStr), + const wxString& wildcard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxFLP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxFilePickerCtrlNameStr) + const wxString& name = wxASCII_STR(wxFilePickerCtrlNameStr)) { Create(parent, id, path, message, wildcard, pos, size, style, validator, name); @@ -250,13 +250,13 @@ public: bool Create(wxWindow *parent, wxWindowID id, const wxString& path = wxEmptyString, - const wxString& message = wxFileSelectorPromptStr, - const wxString& wildcard = wxFileSelectorDefaultWildcardStr, + const wxString& message = wxASCII_STR(wxFileSelectorPromptStr), + const wxString& wildcard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxFLP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxFilePickerCtrlNameStr); + const wxString& name = wxASCII_STR(wxFilePickerCtrlNameStr)); void SetFileName(const wxFileName &filename) { SetPath(filename.GetFullPath()); } @@ -339,24 +339,24 @@ public: wxDirPickerCtrl(wxWindow *parent, wxWindowID id, const wxString& path = wxEmptyString, - const wxString& message = wxDirSelectorPromptStr, + const wxString& message = wxASCII_STR(wxDirSelectorPromptStr), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDIRP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxDirPickerCtrlNameStr) + const wxString& name = wxASCII_STR(wxDirPickerCtrlNameStr)) { Create(parent, id, path, message, pos, size, style, validator, name); } bool Create(wxWindow *parent, wxWindowID id, const wxString& path = wxEmptyString, - const wxString& message = wxDirSelectorPromptStr, + const wxString& message = wxASCII_STR(wxDirSelectorPromptStr), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDIRP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxDirPickerCtrlNameStr); + const wxString& name = wxASCII_STR(wxDirPickerCtrlNameStr)); void SetDirName(const wxFileName &dirname) { SetPath(dirname.GetPath()); } diff --git a/include/wx/fontpicker.h b/include/wx/fontpicker.h index 323ab8df40..d4bdfd3022 100644 --- a/include/wx/fontpicker.h +++ b/include/wx/fontpicker.h @@ -117,7 +117,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxFNTP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxFontPickerCtrlNameStr) + const wxString& name = wxASCII_STR(wxFontPickerCtrlNameStr)) : m_nMinPointSize(wxFNTP_MINPOINT_SIZE), m_nMaxPointSize(wxFNTP_MAXPOINT_SIZE) { Create(parent, id, initial, pos, size, style, validator, name); @@ -130,7 +130,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxFNTP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxFontPickerCtrlNameStr); + const wxString& name = wxASCII_STR(wxFontPickerCtrlNameStr)); public: // public API diff --git a/include/wx/frame.h b/include/wx/frame.h index 4c606c34c7..c202f57527 100644 --- a/include/wx/frame.h +++ b/include/wx/frame.h @@ -66,7 +66,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); // frame state // ----------- @@ -109,7 +109,7 @@ public: virtual wxStatusBar* CreateStatusBar(int number = 1, long style = wxSTB_DEFAULT_STYLE, wxWindowID winid = 0, - const wxString& name = wxStatusLineNameStr); + const wxString& name = wxASCII_STR(wxStatusLineNameStr)); // return a new status bar virtual wxStatusBar *OnCreateStatusBar(int number, long style, @@ -139,7 +139,7 @@ public: // create main toolbar bycalling OnCreateToolBar() virtual wxToolBar* CreateToolBar(long style = -1, wxWindowID winid = wxID_ANY, - const wxString& name = wxToolBarNameStr); + const wxString& name = wxASCII_STR(wxToolBarNameStr)); // return a new toolbar virtual wxToolBar *OnCreateToolBar(long style, wxWindowID winid, diff --git a/include/wx/fswatcher.h b/include/wx/fswatcher.h index 388fbc9c0f..a9a9d8342c 100644 --- a/include/wx/fswatcher.h +++ b/include/wx/fswatcher.h @@ -373,7 +373,7 @@ protected: wxFileName path_copy = wxFileName(path); if ( !path_copy.Normalize() ) { - wxFAIL_MSG(wxString::Format("Unable to normalize path '%s'", + wxFAIL_MSG(wxString::Format(wxASCII_STR("Unable to normalize path '%s'"), path.GetFullPath())); return wxEmptyString; } diff --git a/include/wx/gauge.h b/include/wx/gauge.h index e365d48505..6e642cee0a 100644 --- a/include/wx/gauge.h +++ b/include/wx/gauge.h @@ -66,7 +66,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr); + const wxString& name = wxASCII_STR(wxGaugeNameStr)); // determinate mode API diff --git a/include/wx/generic/animate.h b/include/wx/generic/animate.h index 54487b21ee..46413e01dd 100644 --- a/include/wx/generic/animate.h +++ b/include/wx/generic/animate.h @@ -28,7 +28,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxAC_DEFAULT_STYLE, - const wxString& name = wxAnimationCtrlNameStr) + const wxString& name = wxASCII_STR(wxAnimationCtrlNameStr)) { Init(); @@ -42,7 +42,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxAC_DEFAULT_STYLE, - const wxString& name = wxAnimationCtrlNameStr); + const wxString& name = wxASCII_STR(wxAnimationCtrlNameStr)); ~wxGenericAnimationCtrl(); diff --git a/include/wx/generic/bmpcbox.h b/include/wx/generic/bmpcbox.h index 4630a29a72..90a6ba4351 100644 --- a/include/wx/generic/bmpcbox.h +++ b/include/wx/generic/bmpcbox.h @@ -41,7 +41,7 @@ public: const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxBitmapComboBoxNameStr) + const wxString& name = wxASCII_STR(wxBitmapComboBoxNameStr)) : wxOwnerDrawnComboBox(), wxBitmapComboBoxBase() { @@ -59,7 +59,7 @@ public: const wxArrayString& choices, long style, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxBitmapComboBoxNameStr); + const wxString& name = wxASCII_STR(wxBitmapComboBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -70,7 +70,7 @@ public: const wxString choices[], long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxBitmapComboBoxNameStr); + const wxString& name = wxASCII_STR(wxBitmapComboBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -80,7 +80,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxBitmapComboBoxNameStr); + const wxString& name = wxASCII_STR(wxBitmapComboBoxNameStr)); virtual ~wxBitmapComboBox(); diff --git a/include/wx/generic/buttonbar.h b/include/wx/generic/buttonbar.h index 7a96d4adbe..24de813d57 100644 --- a/include/wx/generic/buttonbar.h +++ b/include/wx/generic/buttonbar.h @@ -31,7 +31,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxToolBarNameStr) + const wxString& name = wxASCII_STR(wxToolBarNameStr)) { Init(); @@ -43,7 +43,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxToolBarNameStr ); + const wxString& name = wxASCII_STR(wxToolBarNameStr) ); virtual ~wxButtonToolBar(); diff --git a/include/wx/generic/calctrlg.h b/include/wx/generic/calctrlg.h index 0299b38a3c..50134959e7 100644 --- a/include/wx/generic/calctrlg.h +++ b/include/wx/generic/calctrlg.h @@ -34,7 +34,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAL_SHOW_HOLIDAYS, - const wxString& name = wxCalendarNameStr); + const wxString& name = wxASCII_STR(wxCalendarNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -42,7 +42,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAL_SHOW_HOLIDAYS, - const wxString& name = wxCalendarNameStr); + const wxString& name = wxASCII_STR(wxCalendarNameStr)); virtual ~wxGenericCalendarCtrl(); diff --git a/include/wx/generic/clrpickerg.h b/include/wx/generic/clrpickerg.h index 275c0494a6..9f8327b422 100644 --- a/include/wx/generic/clrpickerg.h +++ b/include/wx/generic/clrpickerg.h @@ -33,7 +33,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxCLRBTN_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxColourPickerWidgetNameStr) + const wxString& name = wxASCII_STR(wxColourPickerWidgetNameStr)) { Create(parent, id, col, pos, size, style, validator, name); } @@ -59,7 +59,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxCLRBTN_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxColourPickerWidgetNameStr); + const wxString& name = wxASCII_STR(wxColourPickerWidgetNameStr)); void OnButtonClick(wxCommandEvent &); diff --git a/include/wx/generic/collheaderctrl.h b/include/wx/generic/collheaderctrl.h index b2dd3582c2..0fbddf7db9 100644 --- a/include/wx/generic/collheaderctrl.h +++ b/include/wx/generic/collheaderctrl.h @@ -23,7 +23,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxBORDER_NONE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCollapsibleHeaderCtrlNameStr) + const wxString& name = wxASCII_STR(wxCollapsibleHeaderCtrlNameStr)) { Init(); @@ -37,7 +37,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxBORDER_NONE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCollapsibleHeaderCtrlNameStr); + const wxString& name = wxASCII_STR(wxCollapsibleHeaderCtrlNameStr)); virtual void SetCollapsed(bool collapsed = true) wxOVERRIDE; diff --git a/include/wx/generic/collpaneg.h b/include/wx/generic/collpaneg.h index 7ea14bb26c..d45bde12bc 100644 --- a/include/wx/generic/collpaneg.h +++ b/include/wx/generic/collpaneg.h @@ -33,7 +33,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxCP_DEFAULT_STYLE, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxCollapsiblePaneNameStr) + const wxString& name = wxASCII_STR(wxCollapsiblePaneNameStr)) { Init(); @@ -49,7 +49,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxCP_DEFAULT_STYLE, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxCollapsiblePaneNameStr); + const wxString& name = wxASCII_STR(wxCollapsiblePaneNameStr)); // public wxCollapsiblePane API virtual void Collapse(bool collapse = true) wxOVERRIDE; diff --git a/include/wx/generic/combo.h b/include/wx/generic/combo.h index 9b0cf9e7b5..3733b3215d 100644 --- a/include/wx/generic/combo.h +++ b/include/wx/generic/combo.h @@ -48,7 +48,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr) + const wxString& name = wxASCII_STR(wxComboBoxNameStr)) { Init(); @@ -62,7 +62,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); + const wxString& name = wxASCII_STR(wxComboBoxNameStr)); virtual ~wxGenericComboCtrl(); @@ -131,7 +131,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr) + const wxString& name = wxASCII_STR(wxComboBoxNameStr)) : wxGenericComboCtrl() { (void)Create(parent, id, value, pos, size, style, validator, name); diff --git a/include/wx/generic/dataview.h b/include/wx/generic/dataview.h index 12ee1ce1db..d15991e810 100644 --- a/include/wx/generic/dataview.h +++ b/include/wx/generic/dataview.h @@ -202,7 +202,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxDataViewCtrlNameStr ) + const wxString& name = wxASCII_STR(wxDataViewCtrlNameStr) ) : wxScrollHelper(this) { Create(parent, id, pos, size, style, validator, name); @@ -216,7 +216,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxDataViewCtrlNameStr); + const wxString& name = wxASCII_STR(wxDataViewCtrlNameStr)); virtual bool AssociateModel( wxDataViewModel *model ) wxOVERRIDE; diff --git a/include/wx/generic/dirctrlg.h b/include/wx/generic/dirctrlg.h index 8804fb44ac..35bb3063d4 100644 --- a/include/wx/generic/dirctrlg.h +++ b/include/wx/generic/dirctrlg.h @@ -83,26 +83,26 @@ class WXDLLIMPEXP_CORE wxGenericDirCtrl: public wxControl public: wxGenericDirCtrl(); wxGenericDirCtrl(wxWindow *parent, wxWindowID id = wxID_ANY, - const wxString &dir = wxDirDialogDefaultFolderStr, + const wxString &dir = wxASCII_STR(wxDirDialogDefaultFolderStr), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDIRCTRL_DEFAULT_STYLE, const wxString& filter = wxEmptyString, int defaultFilter = 0, - const wxString& name = wxTreeCtrlNameStr ) + const wxString& name = wxASCII_STR(wxTreeCtrlNameStr) ) { Init(); Create(parent, id, dir, pos, size, style, filter, defaultFilter, name); } bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, - const wxString &dir = wxDirDialogDefaultFolderStr, + const wxString &dir = wxASCII_STR(wxDirDialogDefaultFolderStr), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDIRCTRL_DEFAULT_STYLE, const wxString& filter = wxEmptyString, int defaultFilter = 0, - const wxString& name = wxTreeCtrlNameStr ); + const wxString& name = wxASCII_STR(wxTreeCtrlNameStr) ); virtual void Init(); diff --git a/include/wx/generic/dirdlgg.h b/include/wx/generic/dirdlgg.h index 85038afe23..5656ef5bd2 100644 --- a/include/wx/generic/dirdlgg.h +++ b/include/wx/generic/dirdlgg.h @@ -38,20 +38,20 @@ public: wxGenericDirDialog() : wxDirDialogBase() { } wxGenericDirDialog(wxWindow* parent, - const wxString& title = wxDirSelectorPromptStr, + const wxString& title = wxASCII_STR(wxDirSelectorPromptStr), const wxString& defaultPath = wxEmptyString, long style = wxDD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize,//Size(450, 550), - const wxString& name = wxDirDialogNameStr); + const wxString& name = wxASCII_STR(wxDirDialogNameStr)); bool Create(wxWindow* parent, - const wxString& title = wxDirSelectorPromptStr, + const wxString& title = wxASCII_STR(wxDirSelectorPromptStr), const wxString& defaultPath = wxEmptyString, long style = wxDD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize,//Size(450, 550), - const wxString& name = wxDirDialogNameStr); + const wxString& name = wxASCII_STR(wxDirDialogNameStr)); //// Accessors void SetPath(const wxString& path) wxOVERRIDE; diff --git a/include/wx/generic/filectrlg.h b/include/wx/generic/filectrlg.h index c7bb9ddf4a..76ca57eb73 100644 --- a/include/wx/generic/filectrlg.h +++ b/include/wx/generic/filectrlg.h @@ -195,11 +195,11 @@ public: wxWindowID id, const wxString& defaultDirectory = wxEmptyString, const wxString& defaultFilename = wxEmptyString, - const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + const wxString& wildCard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), long style = wxFC_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const wxString& name = wxFileCtrlNameStr ) + const wxString& name = wxASCII_STR(wxFileCtrlNameStr) ) { m_ignoreChanges = false; Create(parent, id, defaultDirectory, defaultFilename, wildCard, @@ -212,11 +212,11 @@ public: wxWindowID id, const wxString& defaultDirectory = wxEmptyString, const wxString& defaultFileName = wxEmptyString, - const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + const wxString& wildCard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), long style = wxFC_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const wxString& name = wxFileCtrlNameStr ); + const wxString& name = wxASCII_STR(wxFileCtrlNameStr) ); virtual void SetWildcard( const wxString& wildCard ) wxOVERRIDE; virtual void SetFilterIndex( int filterindex ) wxOVERRIDE; diff --git a/include/wx/generic/filedlgg.h b/include/wx/generic/filedlgg.h index 29ea5d4d36..9ec1b51c56 100644 --- a/include/wx/generic/filedlgg.h +++ b/include/wx/generic/filedlgg.h @@ -37,25 +37,25 @@ public: wxGenericFileDialog() : wxFileDialogBase() { Init(); } wxGenericFileDialog(wxWindow *parent, - const wxString& message = wxFileSelectorPromptStr, + const wxString& message = wxASCII_STR(wxFileSelectorPromptStr), const wxString& defaultDir = wxEmptyString, const wxString& defaultFile = wxEmptyString, - const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + const wxString& wildCard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), long style = wxFD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, - const wxString& name = wxFileDialogNameStr, + const wxString& name = wxASCII_STR(wxFileDialogNameStr), bool bypassGenericImpl = false ); bool Create( wxWindow *parent, - const wxString& message = wxFileSelectorPromptStr, + const wxString& message = wxASCII_STR(wxFileSelectorPromptStr), const wxString& defaultDir = wxEmptyString, const wxString& defaultFile = wxEmptyString, - const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + const wxString& wildCard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), long style = wxFD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, - const wxString& name = wxFileDialogNameStr, + const wxString& name = wxASCII_STR(wxFileDialogNameStr), bool bypassGenericImpl = false ); virtual ~wxGenericFileDialog(); @@ -143,10 +143,10 @@ public: wxFileDialog() {} wxFileDialog(wxWindow *parent, - const wxString& message = wxFileSelectorPromptStr, + const wxString& message = wxASCII_STR(wxFileSelectorPromptStr), const wxString& defaultDir = wxEmptyString, const wxString& defaultFile = wxEmptyString, - const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + const wxString& wildCard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), long style = 0, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize) diff --git a/include/wx/generic/filepickerg.h b/include/wx/generic/filepickerg.h index cf4782f8d7..762dc4fb7a 100644 --- a/include/wx/generic/filepickerg.h +++ b/include/wx/generic/filepickerg.h @@ -31,15 +31,15 @@ public: wxGenericFileDirButton() { Init(); } wxGenericFileDirButton(wxWindow *parent, wxWindowID id, - const wxString& label = wxFilePickerWidgetLabel, + const wxString& label = wxASCII_STR(wxFilePickerWidgetLabel), const wxString& path = wxEmptyString, - const wxString &message = wxFileSelectorPromptStr, - const wxString &wildcard = wxFileSelectorDefaultWildcardStr, + const wxString &message = wxASCII_STR(wxFileSelectorPromptStr), + const wxString &wildcard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxFilePickerWidgetNameStr) + const wxString& name = wxASCII_STR(wxFilePickerWidgetNameStr)) { Init(); Create(parent, id, label, path, message, wildcard, @@ -62,15 +62,15 @@ public: // overridable public: bool Create(wxWindow *parent, wxWindowID id, - const wxString& label = wxFilePickerWidgetLabel, + const wxString& label = wxASCII_STR(wxFilePickerWidgetLabel), const wxString& path = wxEmptyString, - const wxString &message = wxFileSelectorPromptStr, - const wxString &wildcard = wxFileSelectorDefaultWildcardStr, + const wxString &message = wxASCII_STR(wxFileSelectorPromptStr), + const wxString &wildcard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxFilePickerWidgetNameStr); + const wxString& name = wxASCII_STR(wxFilePickerWidgetNameStr)); // event handler for the click void OnButtonClick(wxCommandEvent &); @@ -104,15 +104,15 @@ public: wxGenericFileButton() {} wxGenericFileButton(wxWindow *parent, wxWindowID id, - const wxString& label = wxFilePickerWidgetLabel, + const wxString& label = wxASCII_STR(wxFilePickerWidgetLabel), const wxString& path = wxEmptyString, - const wxString &message = wxFileSelectorPromptStr, - const wxString &wildcard = wxFileSelectorDefaultWildcardStr, + const wxString &message = wxASCII_STR(wxFileSelectorPromptStr), + const wxString &wildcard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxFILEBTN_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxFilePickerWidgetNameStr) + const wxString& name = wxASCII_STR(wxFilePickerWidgetNameStr)) { Create(parent, id, label, path, message, wildcard, pos, size, style, validator, name); @@ -172,14 +172,14 @@ public: wxGenericDirButton() {} wxGenericDirButton(wxWindow *parent, wxWindowID id, - const wxString& label = wxDirPickerWidgetLabel, + const wxString& label = wxASCII_STR(wxDirPickerWidgetLabel), const wxString& path = wxEmptyString, - const wxString &message = wxDirSelectorPromptStr, + const wxString &message = wxASCII_STR(wxDirSelectorPromptStr), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDIRBTN_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxDirPickerWidgetNameStr) + const wxString& name = wxASCII_STR(wxDirPickerWidgetNameStr)) { Create(parent, id, label, path, message, wxEmptyString, pos, size, style, validator, name); diff --git a/include/wx/generic/fontpickerg.h b/include/wx/generic/fontpickerg.h index 04662c64d5..2273d1d3bf 100644 --- a/include/wx/generic/fontpickerg.h +++ b/include/wx/generic/fontpickerg.h @@ -30,7 +30,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxFONTBTN_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxFontPickerWidgetNameStr) + const wxString& name = wxASCII_STR(wxFontPickerWidgetNameStr)) { Create(parent, id, initial, pos, size, style, validator, name); } @@ -62,7 +62,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxFONTBTN_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxFontPickerWidgetNameStr); + const wxString& name = wxASCII_STR(wxFontPickerWidgetNameStr)); void OnButtonClick(wxCommandEvent &); diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h index 5f081ab92b..935180d8cf 100644 --- a/include/wx/generic/grid.h +++ b/include/wx/generic/grid.h @@ -1480,7 +1480,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxWANTS_CHARS, - const wxString& name = wxGridNameStr) + const wxString& name = wxASCII_STR(wxGridNameStr)) { Init(); @@ -1492,7 +1492,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxWANTS_CHARS, - const wxString& name = wxGridNameStr); + const wxString& name = wxASCII_STR(wxGridNameStr)); virtual ~wxGrid(); @@ -2354,7 +2354,7 @@ public: wxGrid( wxWindow *parent, int x, int y, int w = wxDefaultCoord, int h = wxDefaultCoord, long style = wxWANTS_CHARS, - const wxString& name = wxPanelNameStr ) + const wxString& name = wxASCII_STR(wxPanelNameStr) ) { Init(); Create(parent, wxID_ANY, wxPoint(x, y), wxSize(w, h), style, name); diff --git a/include/wx/generic/gridctrl.h b/include/wx/generic/gridctrl.h index 167201132c..d55edddfd3 100644 --- a/include/wx/generic/gridctrl.h +++ b/include/wx/generic/gridctrl.h @@ -217,8 +217,8 @@ protected: class WXDLLIMPEXP_ADV wxGridCellDateTimeRenderer : public wxGridCellDateRenderer { public: - wxGridCellDateTimeRenderer(const wxString& outformat = wxDefaultDateTimeFormat, - const wxString& informat = wxDefaultDateTimeFormat); + wxGridCellDateTimeRenderer(const wxString& outformat = wxASCII_STR(wxDefaultDateTimeFormat), + const wxString& informat = wxASCII_STR(wxDefaultDateTimeFormat)); wxGridCellDateTimeRenderer(const wxGridCellDateTimeRenderer& other) : wxGridCellDateRenderer(other), diff --git a/include/wx/generic/headerctrlg.h b/include/wx/generic/headerctrlg.h index 249917adf2..77da772496 100644 --- a/include/wx/generic/headerctrlg.h +++ b/include/wx/generic/headerctrlg.h @@ -31,7 +31,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHD_DEFAULT_STYLE, - const wxString& name = wxHeaderCtrlNameStr) + const wxString& name = wxASCII_STR(wxHeaderCtrlNameStr)) { Init(); @@ -43,7 +43,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHD_DEFAULT_STYLE, - const wxString& name = wxHeaderCtrlNameStr); + const wxString& name = wxASCII_STR(wxHeaderCtrlNameStr)); virtual ~wxHeaderCtrl(); diff --git a/include/wx/generic/hyperlink.h b/include/wx/generic/hyperlink.h index df452db301..0c238e1029 100644 --- a/include/wx/generic/hyperlink.h +++ b/include/wx/generic/hyperlink.h @@ -28,7 +28,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHL_DEFAULT_STYLE, - const wxString& name = wxHyperlinkCtrlNameStr) + const wxString& name = wxASCII_STR(wxHyperlinkCtrlNameStr)) { Init(); (void) Create(parent, id, label, url, pos, size, style, name); @@ -41,7 +41,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHL_DEFAULT_STYLE, - const wxString& name = wxHyperlinkCtrlNameStr); + const wxString& name = wxASCII_STR(wxHyperlinkCtrlNameStr)); // get/set diff --git a/include/wx/generic/listctrl.h b/include/wx/generic/listctrl.h index f1ab86bb64..60e034f1af 100644 --- a/include/wx/generic/listctrl.h +++ b/include/wx/generic/listctrl.h @@ -46,7 +46,7 @@ public: const wxSize &size = wxDefaultSize, long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, - const wxString &name = wxListCtrlNameStr) + const wxString &name = wxASCII_STR(wxListCtrlNameStr)) : wxScrollHelper(this) { Create(parent, winid, pos, size, style, validator, name); @@ -62,7 +62,7 @@ public: const wxSize &size = wxDefaultSize, long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, - const wxString &name = wxListCtrlNameStr); + const wxString &name = wxASCII_STR(wxListCtrlNameStr)); bool GetColumn( int col, wxListItem& item ) const wxOVERRIDE; bool SetColumn( int col, const wxListItem& item ) wxOVERRIDE; @@ -258,7 +258,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxLC_ICON, const wxValidator &validator = wxDefaultValidator, - const wxString &name = wxListCtrlNameStr) + const wxString &name = wxASCII_STR(wxListCtrlNameStr)) : wxGenericListCtrl(parent, winid, pos, size, style, validator, name) { } diff --git a/include/wx/generic/mdig.h b/include/wx/generic/mdig.h index 7bc835d281..cb3a12db90 100644 --- a/include/wx/generic/mdig.h +++ b/include/wx/generic/mdig.h @@ -48,7 +48,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Init(); @@ -61,7 +61,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); virtual ~wxGenericMDIParentFrame(); @@ -142,7 +142,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Init(); @@ -155,7 +155,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); virtual ~wxGenericMDIChildFrame(); diff --git a/include/wx/generic/msgdlgg.h b/include/wx/generic/msgdlgg.h index a5c3c115bd..e85744a3f6 100644 --- a/include/wx/generic/msgdlgg.h +++ b/include/wx/generic/msgdlgg.h @@ -18,7 +18,7 @@ class WXDLLIMPEXP_CORE wxGenericMessageDialog : public wxMessageDialogBase public: wxGenericMessageDialog(wxWindow *parent, const wxString& message, - const wxString& caption = wxMessageBoxCaptionStr, + const wxString& caption = wxASCII_STR(wxMessageBoxCaptionStr), long style = wxOK|wxCENTRE, const wxPoint& pos = wxDefaultPosition); diff --git a/include/wx/generic/notebook.h b/include/wx/generic/notebook.h index 807baebe2e..40ff917c0d 100644 --- a/include/wx/generic/notebook.h +++ b/include/wx/generic/notebook.h @@ -42,14 +42,14 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxNotebookNameStr); + const wxString& name = wxASCII_STR(wxNotebookNameStr)); // Create() function bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxNotebookNameStr); + const wxString& name = wxASCII_STR(wxNotebookNameStr)); // dtor virtual ~wxNotebook(); diff --git a/include/wx/generic/panelg.h b/include/wx/generic/panelg.h index 5c02cb35d8..61124e0397 100644 --- a/include/wx/generic/panelg.h +++ b/include/wx/generic/panelg.h @@ -24,7 +24,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL | wxNO_BORDER, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) { Create(parent, winid, pos, size, style, name); } @@ -34,7 +34,7 @@ public: wxPanel(wxWindow *parent, int x, int y, int width, int height, long style = wxTAB_TRAVERSAL | wxNO_BORDER, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) { Create(parent, wxID_ANY, wxPoint(x, y), wxSize(width, height), style, name); } diff --git a/include/wx/generic/private/grid.h b/include/wx/generic/private/grid.h index acf0b68207..1330bb1044 100644 --- a/include/wx/generic/private/grid.h +++ b/include/wx/generic/private/grid.h @@ -311,7 +311,7 @@ class WXDLLIMPEXP_ADV wxGridSubwindow : public wxWindow public: wxGridSubwindow(wxGrid *owner, int additionalStyle = 0, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) : wxWindow(owner, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE | additionalStyle, diff --git a/include/wx/generic/propdlg.h b/include/wx/generic/propdlg.h index eacc73e1b6..4dc1befce9 100644 --- a/include/wx/generic/propdlg.h +++ b/include/wx/generic/propdlg.h @@ -83,7 +83,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, - const wxString& name = wxDialogNameStr) + const wxString& name = wxASCII_STR(wxDialogNameStr)) { Init(); Create(parent, id, title, pos, sz, style, name); @@ -94,7 +94,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, - const wxString& name = wxDialogNameStr); + const wxString& name = wxASCII_STR(wxDialogNameStr)); //// Accessors diff --git a/include/wx/generic/richmsgdlgg.h b/include/wx/generic/richmsgdlgg.h index ae955d0af0..bf1d9d5721 100644 --- a/include/wx/generic/richmsgdlgg.h +++ b/include/wx/generic/richmsgdlgg.h @@ -20,7 +20,7 @@ class WXDLLIMPEXP_CORE wxGenericRichMessageDialog public: wxGenericRichMessageDialog(wxWindow *parent, const wxString& message, - const wxString& caption = wxMessageBoxCaptionStr, + const wxString& caption = wxASCII_STR(wxMessageBoxCaptionStr), long style = wxOK | wxCENTRE) : wxRichMessageDialogBase( parent, message, caption, style ), m_checkBox(NULL), diff --git a/include/wx/generic/spinctlg.h b/include/wx/generic/spinctlg.h index 252d278dc1..bcb589ef15 100644 --- a/include/wx/generic/spinctlg.h +++ b/include/wx/generic/spinctlg.h @@ -424,7 +424,7 @@ private: void Init() { m_digits = 0; - m_format = "%0.0f"; + m_format = wxASCII_STR("%0.0f"); } wxString m_format; diff --git a/include/wx/generic/srchctlg.h b/include/wx/generic/srchctlg.h index a123fcfab3..47acfb1242 100644 --- a/include/wx/generic/srchctlg.h +++ b/include/wx/generic/srchctlg.h @@ -34,7 +34,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSearchCtrlNameStr); + const wxString& name = wxASCII_STR(wxSearchCtrlNameStr)); virtual ~wxSearchCtrl(); @@ -44,7 +44,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSearchCtrlNameStr); + const wxString& name = wxASCII_STR(wxSearchCtrlNameStr)); #if wxUSE_MENUS // get/set search button menu diff --git a/include/wx/generic/statbmpg.h b/include/wx/generic/statbmpg.h index e915473420..abf7340878 100644 --- a/include/wx/generic/statbmpg.h +++ b/include/wx/generic/statbmpg.h @@ -22,7 +22,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBitmapNameStr) + const wxString& name = wxASCII_STR(wxStaticBitmapNameStr)) { Create(parent, id, bitmap, pos, size, style, name); } @@ -33,7 +33,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBitmapNameStr); + const wxString& name = wxASCII_STR(wxStaticBitmapNameStr)); virtual void SetBitmap(const wxBitmap& bitmap) wxOVERRIDE { diff --git a/include/wx/generic/statline.h b/include/wx/generic/statline.h index 5cd06f3714..39dfa09300 100644 --- a/include/wx/generic/statline.h +++ b/include/wx/generic/statline.h @@ -29,7 +29,7 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, - const wxString &name = wxStaticLineNameStr ) + const wxString &name = wxASCII_STR(wxStaticLineNameStr) ) { Create(parent, id, pos, size, style, name); } @@ -41,7 +41,7 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, - const wxString &name = wxStaticLineNameStr ); + const wxString &name = wxASCII_STR(wxStaticLineNameStr) ); // it's necessary to override this wxWindow function because we // will want to return the main widget for m_statbox diff --git a/include/wx/generic/stattextg.h b/include/wx/generic/stattextg.h index 84210423d4..6b98f6c064 100644 --- a/include/wx/generic/stattextg.h +++ b/include/wx/generic/stattextg.h @@ -29,7 +29,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticTextNameStr) + const wxString& name = wxASCII_STR(wxStaticTextNameStr)) { Init(); @@ -42,7 +42,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticTextNameStr); + const wxString& name = wxASCII_STR(wxStaticTextNameStr)); virtual ~wxGenericStaticText(); diff --git a/include/wx/generic/statusbr.h b/include/wx/generic/statusbr.h index 996012b07a..8a3d73d4f7 100644 --- a/include/wx/generic/statusbr.h +++ b/include/wx/generic/statusbr.h @@ -30,7 +30,7 @@ public: wxStatusBarGeneric(wxWindow *parent, wxWindowID winid = wxID_ANY, long style = wxSTB_DEFAULT_STYLE, - const wxString& name = wxStatusBarNameStr) + const wxString& name = wxASCII_STR(wxStatusBarNameStr)) { Init(); @@ -41,7 +41,7 @@ public: bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY, long style = wxSTB_DEFAULT_STYLE, - const wxString& name = wxStatusBarNameStr); + const wxString& name = wxASCII_STR(wxStatusBarNameStr)); // implement base class methods virtual void SetStatusWidths(int n, const int widths_field[]) wxOVERRIDE; diff --git a/include/wx/generic/tabg.h b/include/wx/generic/tabg.h index c9c4fe6021..f67870defd 100644 --- a/include/wx/generic/tabg.h +++ b/include/wx/generic/tabg.h @@ -276,7 +276,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long windowStyle = wxDEFAULT_DIALOG_STYLE, - const wxString& name = wxDialogNameStr); + const wxString& name = wxASCII_STR(wxDialogNameStr)); virtual ~wxTabbedDialog(); wxTabView *GetTabView() const { return m_tabView; } @@ -307,7 +307,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long windowStyle = 0, - const wxString& name = wxPanelNameStr); + const wxString& name = wxASCII_STR(wxPanelNameStr)); virtual ~wxTabbedPanel(); wxTabView *GetTabView() const { return m_tabView; } diff --git a/include/wx/generic/textdlgg.h b/include/wx/generic/textdlgg.h index 9aee847083..7d9d61ea98 100644 --- a/include/wx/generic/textdlgg.h +++ b/include/wx/generic/textdlgg.h @@ -44,7 +44,7 @@ public: wxTextEntryDialog(wxWindow *parent, const wxString& message, - const wxString& caption = wxGetTextFromUserPromptStr, + const wxString& caption = wxASCII_STR(wxGetTextFromUserPromptStr), const wxString& value = wxEmptyString, long style = wxTextEntryDialogStyle, const wxPoint& pos = wxDefaultPosition) @@ -54,7 +54,7 @@ public: bool Create(wxWindow *parent, const wxString& message, - const wxString& caption = wxGetTextFromUserPromptStr, + const wxString& caption = wxASCII_STR(wxGetTextFromUserPromptStr), const wxString& value = wxEmptyString, long style = wxTextEntryDialogStyle, const wxPoint& pos = wxDefaultPosition); @@ -102,7 +102,7 @@ public: wxPasswordEntryDialog() { } wxPasswordEntryDialog(wxWindow *parent, const wxString& message, - const wxString& caption = wxGetPasswordFromUserPromptStr, + const wxString& caption = wxASCII_STR(wxGetPasswordFromUserPromptStr), const wxString& value = wxEmptyString, long style = wxTextEntryDialogStyle, const wxPoint& pos = wxDefaultPosition) @@ -112,7 +112,7 @@ public: bool Create(wxWindow *parent, const wxString& message, - const wxString& caption = wxGetPasswordFromUserPromptStr, + const wxString& caption = wxASCII_STR(wxGetPasswordFromUserPromptStr), const wxString& value = wxEmptyString, long style = wxTextEntryDialogStyle, const wxPoint& pos = wxDefaultPosition); @@ -129,7 +129,7 @@ private: WXDLLIMPEXP_CORE wxString wxGetTextFromUser(const wxString& message, - const wxString& caption = wxGetTextFromUserPromptStr, + const wxString& caption = wxASCII_STR(wxGetTextFromUserPromptStr), const wxString& default_value = wxEmptyString, wxWindow *parent = NULL, wxCoord x = wxDefaultCoord, @@ -138,7 +138,7 @@ WXDLLIMPEXP_CORE wxString WXDLLIMPEXP_CORE wxString wxGetPasswordFromUser(const wxString& message, - const wxString& caption = wxGetPasswordFromUserPromptStr, + const wxString& caption = wxASCII_STR(wxGetPasswordFromUserPromptStr), const wxString& default_value = wxEmptyString, wxWindow *parent = NULL, wxCoord x = wxDefaultCoord, diff --git a/include/wx/generic/treectlg.h b/include/wx/generic/treectlg.h index 2388eedc9c..fb492d6a7c 100644 --- a/include/wx/generic/treectlg.h +++ b/include/wx/generic/treectlg.h @@ -48,7 +48,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxTR_DEFAULT_STYLE, const wxValidator &validator = wxDefaultValidator, - const wxString& name = wxTreeCtrlNameStr) + const wxString& name = wxASCII_STR(wxTreeCtrlNameStr)) : wxTreeCtrlBase(), wxScrollHelper(this) { @@ -63,7 +63,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxTR_DEFAULT_STYLE, const wxValidator &validator = wxDefaultValidator, - const wxString& name = wxTreeCtrlNameStr); + const wxString& name = wxASCII_STR(wxTreeCtrlNameStr)); // implement base class pure virtuals // ---------------------------------- @@ -390,7 +390,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxTR_DEFAULT_STYLE, const wxValidator &validator = wxDefaultValidator, - const wxString& name = wxTreeCtrlNameStr) + const wxString& name = wxASCII_STR(wxTreeCtrlNameStr)) : wxGenericTreeCtrl(parent, id, pos, size, style, validator, name) { } diff --git a/include/wx/gtk/animate.h b/include/wx/gtk/animate.h index 6b8ab3ac9b..c1fc33155e 100644 --- a/include/wx/gtk/animate.h +++ b/include/wx/gtk/animate.h @@ -31,7 +31,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxAC_DEFAULT_STYLE, - const wxString& name = wxAnimationCtrlNameStr) + const wxString& name = wxASCII_STR(wxAnimationCtrlNameStr)) { Init(); @@ -43,7 +43,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxAC_DEFAULT_STYLE, - const wxString& name = wxAnimationCtrlNameStr); + const wxString& name = wxASCII_STR(wxAnimationCtrlNameStr)); ~wxAnimationCtrl(); diff --git a/include/wx/gtk/bmpbuttn.h b/include/wx/gtk/bmpbuttn.h index 70b4d4326d..1748c5e5e1 100644 --- a/include/wx/gtk/bmpbuttn.h +++ b/include/wx/gtk/bmpbuttn.h @@ -25,7 +25,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) + const wxString& name = wxASCII_STR(wxButtonNameStr)) { Create(parent, id, bitmap, pos, size, style, validator, name); } @@ -37,7 +37,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); + const wxString& name = wxASCII_STR(wxButtonNameStr)); private: wxDECLARE_DYNAMIC_CLASS(wxBitmapButton); diff --git a/include/wx/gtk/bmpcbox.h b/include/wx/gtk/bmpcbox.h index 57b464aa81..7b19fb31ce 100644 --- a/include/wx/gtk/bmpcbox.h +++ b/include/wx/gtk/bmpcbox.h @@ -37,7 +37,7 @@ public: const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxBitmapComboBoxNameStr) + const wxString& name = wxASCII_STR(wxBitmapComboBoxNameStr)) : wxComboBox(), wxBitmapComboBoxBase() { @@ -55,7 +55,7 @@ public: const wxArrayString& choices, long style, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxBitmapComboBoxNameStr); + const wxString& name = wxASCII_STR(wxBitmapComboBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -66,7 +66,7 @@ public: const wxString choices[], long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxBitmapComboBoxNameStr); + const wxString& name = wxASCII_STR(wxBitmapComboBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -76,7 +76,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxBitmapComboBoxNameStr); + const wxString& name = wxASCII_STR(wxBitmapComboBoxNameStr)); virtual ~wxBitmapComboBox(); diff --git a/include/wx/gtk/button.h b/include/wx/gtk/button.h index 47e43b011e..b8e8128d71 100644 --- a/include/wx/gtk/button.h +++ b/include/wx/gtk/button.h @@ -22,7 +22,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) + const wxString& name = wxASCII_STR(wxButtonNameStr)) { Create(parent, id, label, pos, size, style, validator, name); } @@ -32,7 +32,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); + const wxString& name = wxASCII_STR(wxButtonNameStr)); virtual wxWindow *SetDefault() wxOVERRIDE; virtual void SetLabel( const wxString &label ) wxOVERRIDE; diff --git a/include/wx/gtk/calctrl.h b/include/wx/gtk/calctrl.h index 81be1cd638..5682cee257 100644 --- a/include/wx/gtk/calctrl.h +++ b/include/wx/gtk/calctrl.h @@ -19,7 +19,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAL_SHOW_HOLIDAYS, - const wxString& name = wxCalendarNameStr) + const wxString& name = wxASCII_STR(wxCalendarNameStr)) { Create(parent, id, date, pos, size, style, name); } @@ -30,7 +30,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAL_SHOW_HOLIDAYS, - const wxString& name = wxCalendarNameStr); + const wxString& name = wxASCII_STR(wxCalendarNameStr)); virtual ~wxGtkCalendarCtrl() {} diff --git a/include/wx/gtk/checkbox.h b/include/wx/gtk/checkbox.h index e16bc4f3ff..e20b834c8a 100644 --- a/include/wx/gtk/checkbox.h +++ b/include/wx/gtk/checkbox.h @@ -22,7 +22,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr) + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)) { Create(parent, id, label, pos, size, style, validator, name); } @@ -33,7 +33,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr ); + const wxString& name = wxASCII_STR(wxCheckBoxNameStr) ); void SetValue( bool state ) wxOVERRIDE; bool GetValue() const wxOVERRIDE; diff --git a/include/wx/gtk/checklst.h b/include/wx/gtk/checklst.h index a12eb180da..6f9a2645f7 100644 --- a/include/wx/gtk/checklst.h +++ b/include/wx/gtk/checklst.h @@ -25,14 +25,14 @@ public: const wxString *choices = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); wxCheckListBox(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); virtual bool IsChecked(unsigned int index) const wxOVERRIDE; virtual void Check(unsigned int index, bool check = true) wxOVERRIDE; diff --git a/include/wx/gtk/choice.h b/include/wx/gtk/choice.h index c594624812..ed8a514877 100644 --- a/include/wx/gtk/choice.h +++ b/include/wx/gtk/choice.h @@ -31,7 +31,7 @@ public: int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr ) + const wxString& name = wxASCII_STR(wxChoiceNameStr) ) { Init(); Create(parent, id, pos, size, n, choices, style, validator, name); @@ -42,7 +42,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr ) + const wxString& name = wxASCII_STR(wxChoiceNameStr) ) { Init(); Create(parent, id, pos, size, choices, style, validator, name); @@ -54,14 +54,14 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr ); + const wxString& name = wxASCII_STR(wxChoiceNameStr) ); bool Create( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr ); + const wxString& name = wxASCII_STR(wxChoiceNameStr) ); int GetSelection() const wxOVERRIDE; void SetSelection(int n) wxOVERRIDE; diff --git a/include/wx/gtk/clrpicker.h b/include/wx/gtk/clrpicker.h index b9894b5309..395fb9ffdc 100644 --- a/include/wx/gtk/clrpicker.h +++ b/include/wx/gtk/clrpicker.h @@ -29,7 +29,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxCLRBTN_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxColourPickerWidgetNameStr) + const wxString& name = wxASCII_STR(wxColourPickerWidgetNameStr)) : m_topParent(NULL) { Create(parent, id, initial, pos, size, style, validator, name); @@ -42,7 +42,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxCLRBTN_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxColourPickerWidgetNameStr); + const wxString& name = wxASCII_STR(wxColourPickerWidgetNameStr)); virtual ~wxColourButton(); diff --git a/include/wx/gtk/collpane.h b/include/wx/gtk/collpane.h index 3942e5b4c8..053b9b5573 100644 --- a/include/wx/gtk/collpane.h +++ b/include/wx/gtk/collpane.h @@ -27,7 +27,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxCP_DEFAULT_STYLE, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxCollapsiblePaneNameStr) + const wxString& name = wxASCII_STR(wxCollapsiblePaneNameStr)) { Init(); @@ -41,7 +41,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxCP_DEFAULT_STYLE, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxCollapsiblePaneNameStr); + const wxString& name = wxASCII_STR(wxCollapsiblePaneNameStr)); virtual void Collapse(bool collapse = true) wxOVERRIDE; virtual bool IsCollapsed() const wxOVERRIDE; diff --git a/include/wx/gtk/combobox.h b/include/wx/gtk/combobox.h index 1daf836a4a..982caa183b 100644 --- a/include/wx/gtk/combobox.h +++ b/include/wx/gtk/combobox.h @@ -35,7 +35,7 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr) + const wxString& name = wxASCII_STR(wxComboBoxNameStr)) : wxChoice(), wxTextEntry() { Init(); @@ -49,7 +49,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr) + const wxString& name = wxASCII_STR(wxComboBoxNameStr)) : wxChoice(), wxTextEntry() { Init(); @@ -64,7 +64,7 @@ public: int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); + const wxString& name = wxASCII_STR(wxComboBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxString& value, const wxPoint& pos, @@ -72,7 +72,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); + const wxString& name = wxASCII_STR(wxComboBoxNameStr)); // Set/GetSelection() from wxTextEntry and wxChoice diff --git a/include/wx/gtk/control.h b/include/wx/gtk/control.h index 2890f6ccaa..fcfe03d169 100644 --- a/include/wx/gtk/control.h +++ b/include/wx/gtk/control.h @@ -26,7 +26,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxControlNameStr) + const wxString& name = wxASCII_STR(wxControlNameStr)) { Create(parent, id, pos, size, style, validator, name); } @@ -35,7 +35,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxControlNameStr); + const wxString& name = wxASCII_STR(wxControlNameStr)); virtual wxVisualAttributes GetDefaultAttributes() const wxOVERRIDE; #ifdef __WXGTK3__ diff --git a/include/wx/gtk/dataform.h b/include/wx/gtk/dataform.h index 5df97d8b85..9389a99765 100644 --- a/include/wx/gtk/dataform.h +++ b/include/wx/gtk/dataform.h @@ -24,7 +24,9 @@ public: // we have to provide all the overloads to allow using strings instead of // data formats (as a lot of existing code does) wxDataFormat( const wxString& id ) { InitFromString(id); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxDataFormat( const char *id ) { InitFromString(id); } +#endif wxDataFormat( const wchar_t *id ) { InitFromString(id); } wxDataFormat( const wxCStrData& id ) { InitFromString(id); } diff --git a/include/wx/gtk/dataview.h b/include/wx/gtk/dataview.h index 6c51aab27a..ae2d2f0165 100644 --- a/include/wx/gtk/dataview.h +++ b/include/wx/gtk/dataview.h @@ -112,7 +112,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxDataViewCtrlNameStr ) + const wxString& name = wxASCII_STR(wxDataViewCtrlNameStr) ) { Init(); @@ -123,7 +123,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxDataViewCtrlNameStr); + const wxString& name = wxASCII_STR(wxDataViewCtrlNameStr)); virtual ~wxDataViewCtrl(); diff --git a/include/wx/gtk/dialog.h b/include/wx/gtk/dialog.h index b64a0dc510..29f2fb5fd7 100644 --- a/include/wx/gtk/dialog.h +++ b/include/wx/gtk/dialog.h @@ -25,13 +25,13 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, - const wxString &name = wxDialogNameStr ); + const wxString &name = wxASCII_STR(wxDialogNameStr) ); bool Create( wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, - const wxString &name = wxDialogNameStr ); + const wxString &name = wxASCII_STR(wxDialogNameStr) ); virtual ~wxDialog(); virtual bool Show( bool show = true ) wxOVERRIDE; diff --git a/include/wx/gtk/dirdlg.h b/include/wx/gtk/dirdlg.h index e8029a21c7..e25e0b293d 100644 --- a/include/wx/gtk/dirdlg.h +++ b/include/wx/gtk/dirdlg.h @@ -19,19 +19,19 @@ public: wxDirDialog() { } wxDirDialog(wxWindow *parent, - const wxString& message = wxDirSelectorPromptStr, + const wxString& message = wxASCII_STR(wxDirSelectorPromptStr), const wxString& defaultPath = wxEmptyString, long style = wxDD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const wxString& name = wxDirDialogNameStr); + const wxString& name = wxASCII_STR(wxDirDialogNameStr)); bool Create(wxWindow *parent, - const wxString& message = wxDirSelectorPromptStr, + const wxString& message = wxASCII_STR(wxDirSelectorPromptStr), const wxString& defaultPath = wxEmptyString, long style = wxDD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const wxString& name = wxDirDialogNameStr); + const wxString& name = wxASCII_STR(wxDirDialogNameStr)); virtual ~wxDirDialog() { } diff --git a/include/wx/gtk/filectrl.h b/include/wx/gtk/filectrl.h index b2fad39cb6..870c5753cc 100644 --- a/include/wx/gtk/filectrl.h +++ b/include/wx/gtk/filectrl.h @@ -77,11 +77,11 @@ public: wxWindowID id, const wxString& defaultDirectory = wxEmptyString, const wxString& defaultFilename = wxEmptyString, - const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + const wxString& wildCard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), long style = wxFC_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const wxString& name = wxFileCtrlNameStr ) + const wxString& name = wxASCII_STR(wxFileCtrlNameStr) ) { Init(); Create( parent, id, defaultDirectory, defaultFilename, wildCard, style, pos, size, name ); @@ -93,11 +93,11 @@ public: wxWindowID id, const wxString& defaultDirectory = wxEmptyString, const wxString& defaultFileName = wxEmptyString, - const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + const wxString& wildCard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), long style = wxFC_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const wxString& name = wxFileCtrlNameStr ); + const wxString& name = wxASCII_STR(wxFileCtrlNameStr) ); virtual void SetWildcard( const wxString& wildCard ) wxOVERRIDE; virtual void SetFilterIndex( int filterIndex ) wxOVERRIDE; diff --git a/include/wx/gtk/filedlg.h b/include/wx/gtk/filedlg.h index 5db235f5c4..9e3644493b 100644 --- a/include/wx/gtk/filedlg.h +++ b/include/wx/gtk/filedlg.h @@ -21,23 +21,23 @@ public: wxFileDialog() { } wxFileDialog(wxWindow *parent, - const wxString& message = wxFileSelectorPromptStr, + const wxString& message = wxASCII_STR(wxFileSelectorPromptStr), const wxString& defaultDir = wxEmptyString, const wxString& defaultFile = wxEmptyString, - const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + const wxString& wildCard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), long style = wxFD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, - const wxString& name = wxFileDialogNameStr); + const wxString& name = wxASCII_STR(wxFileDialogNameStr)); bool Create(wxWindow *parent, - const wxString& message = wxFileSelectorPromptStr, + const wxString& message = wxASCII_STR(wxFileSelectorPromptStr), const wxString& defaultDir = wxEmptyString, const wxString& defaultFile = wxEmptyString, - const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + const wxString& wildCard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), long style = wxFD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, - const wxString& name = wxFileDialogNameStr); + const wxString& name = wxASCII_STR(wxFileDialogNameStr)); virtual ~wxFileDialog(); virtual wxString GetPath() const wxOVERRIDE; diff --git a/include/wx/gtk/filepicker.h b/include/wx/gtk/filepicker.h index e6948e7105..b2ab35c2a8 100644 --- a/include/wx/gtk/filepicker.h +++ b/include/wx/gtk/filepicker.h @@ -56,15 +56,15 @@ public: wxFileButton() { Init(); } wxFileButton(wxWindow *parent, wxWindowID id, - const wxString& label = wxFilePickerWidgetLabel, + const wxString& label = wxASCII_STR(wxFilePickerWidgetLabel), const wxString &path = wxEmptyString, - const wxString &message = wxFileSelectorPromptStr, - const wxString &wildcard = wxFileSelectorDefaultWildcardStr, + const wxString &message = wxASCII_STR(wxFileSelectorPromptStr), + const wxString &wildcard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxFILEBTN_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxFilePickerWidgetNameStr) + const wxString& name = wxASCII_STR(wxFilePickerWidgetNameStr)) { Init(); m_pickerStyle = style; @@ -79,15 +79,15 @@ public: // overrides bool Create(wxWindow *parent, wxWindowID id, - const wxString& label = wxFilePickerWidgetLabel, + const wxString& label = wxASCII_STR(wxFilePickerWidgetLabel), const wxString &path = wxEmptyString, - const wxString &message = wxFileSelectorPromptStr, - const wxString &wildcard = wxFileSelectorDefaultWildcardStr, + const wxString &message = wxASCII_STR(wxFileSelectorPromptStr), + const wxString &wildcard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxFilePickerWidgetNameStr); + const wxString& name = wxASCII_STR(wxFilePickerWidgetNameStr)); // event handler for the click void OnDialogOK(wxCommandEvent &); @@ -121,14 +121,14 @@ public: wxDirButton() { Init(); } wxDirButton(wxWindow *parent, wxWindowID id, - const wxString& label = wxFilePickerWidgetLabel, + const wxString& label = wxASCII_STR(wxFilePickerWidgetLabel), const wxString &path = wxEmptyString, - const wxString &message = wxFileSelectorPromptStr, + const wxString &message = wxASCII_STR(wxFileSelectorPromptStr), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDIRBTN_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxFilePickerWidgetNameStr) + const wxString& name = wxASCII_STR(wxFilePickerWidgetNameStr)) { Init(); @@ -145,15 +145,15 @@ public: // overrides bool Create(wxWindow *parent, wxWindowID id, - const wxString& label = wxFilePickerWidgetLabel, + const wxString& label = wxASCII_STR(wxFilePickerWidgetLabel), const wxString &path = wxEmptyString, - const wxString &message = wxFileSelectorPromptStr, - const wxString &wildcard = wxFileSelectorDefaultWildcardStr, + const wxString &message = wxASCII_STR(wxFileSelectorPromptStr), + const wxString &wildcard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxFilePickerWidgetNameStr); + const wxString& name = wxASCII_STR(wxFilePickerWidgetNameStr)); // GtkFileChooserButton does not support GTK_FILE_CHOOSER_CREATE_FOLDER diff --git a/include/wx/gtk/fontpicker.h b/include/wx/gtk/fontpicker.h index ce56da14d0..46d1304f71 100644 --- a/include/wx/gtk/fontpicker.h +++ b/include/wx/gtk/fontpicker.h @@ -29,7 +29,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxFONTBTN_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxFontPickerWidgetNameStr) + const wxString& name = wxASCII_STR(wxFontPickerWidgetNameStr)) { Init(); @@ -43,7 +43,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxFONTBTN_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxFontPickerWidgetNameStr); + const wxString& name = wxASCII_STR(wxFontPickerWidgetNameStr)); virtual wxColour GetSelectedColour() const wxOVERRIDE { return m_selectedColour; } diff --git a/include/wx/gtk/frame.h b/include/wx/gtk/frame.h index 878ba99732..dce878b590 100644 --- a/include/wx/gtk/frame.h +++ b/include/wx/gtk/frame.h @@ -24,7 +24,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Init(); @@ -37,7 +37,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); #if wxUSE_STATUSBAR void SetStatusBar(wxStatusBar *statbar) wxOVERRIDE; diff --git a/include/wx/gtk/gauge.h b/include/wx/gtk/gauge.h index 7e138e7ed2..cad2bc6934 100644 --- a/include/wx/gtk/gauge.h +++ b/include/wx/gtk/gauge.h @@ -25,7 +25,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr ) + const wxString& name = wxASCII_STR(wxGaugeNameStr) ) { Init(); @@ -38,7 +38,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr ); + const wxString& name = wxASCII_STR(wxGaugeNameStr) ); // implement base class virtual methods void SetRange(int range) wxOVERRIDE; diff --git a/include/wx/gtk/hyperlink.h b/include/wx/gtk/hyperlink.h index d7748ce159..b8776e15b2 100644 --- a/include/wx/gtk/hyperlink.h +++ b/include/wx/gtk/hyperlink.h @@ -28,7 +28,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHL_DEFAULT_STYLE, - const wxString& name = wxHyperlinkCtrlNameStr); + const wxString& name = wxASCII_STR(wxHyperlinkCtrlNameStr)); virtual ~wxHyperlinkCtrl(); @@ -39,7 +39,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHL_DEFAULT_STYLE, - const wxString& name = wxHyperlinkCtrlNameStr); + const wxString& name = wxASCII_STR(wxHyperlinkCtrlNameStr)); // get/set diff --git a/include/wx/gtk/listbox.h b/include/wx/gtk/listbox.h index de55c6a418..e597bd283e 100644 --- a/include/wx/gtk/listbox.h +++ b/include/wx/gtk/listbox.h @@ -30,7 +30,7 @@ public: int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr ) + const wxString& name = wxASCII_STR(wxListBoxNameStr) ) { Init(); Create(parent, id, pos, size, n, choices, style, validator, name); @@ -41,7 +41,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr ) + const wxString& name = wxASCII_STR(wxListBoxNameStr) ) { Init(); Create(parent, id, pos, size, choices, style, validator, name); @@ -54,14 +54,14 @@ public: int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); virtual unsigned int GetCount() const wxOVERRIDE; virtual wxString GetString(unsigned int n) const wxOVERRIDE; diff --git a/include/wx/gtk/mdi.h b/include/wx/gtk/mdi.h index bf34285176..69f372cf62 100644 --- a/include/wx/gtk/mdi.h +++ b/include/wx/gtk/mdi.h @@ -32,7 +32,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Init(); @@ -45,7 +45,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); // we don't store the active child in m_currentChild unlike the base class // version so override this method to find it dynamically @@ -89,7 +89,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Init(); @@ -102,7 +102,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); virtual ~wxMDIChildFrame(); diff --git a/include/wx/gtk/minifram.h b/include/wx/gtk/minifram.h index 14803ef375..318af566a1 100644 --- a/include/wx/gtk/minifram.h +++ b/include/wx/gtk/minifram.h @@ -28,7 +28,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION | wxRESIZE_BORDER, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Create(parent, id, title, pos, size, style, name); } @@ -40,7 +40,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION | wxRESIZE_BORDER, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); virtual void SetTitle( const wxString &title ) wxOVERRIDE; diff --git a/include/wx/gtk/msgdlg.h b/include/wx/gtk/msgdlg.h index 5a55f32a50..e0ad8cca45 100644 --- a/include/wx/gtk/msgdlg.h +++ b/include/wx/gtk/msgdlg.h @@ -15,7 +15,7 @@ class WXDLLIMPEXP_CORE wxMessageDialog : public wxMessageDialogBase { public: wxMessageDialog(wxWindow *parent, const wxString& message, - const wxString& caption = wxMessageBoxCaptionStr, + const wxString& caption = wxASCII_STR(wxMessageBoxCaptionStr), long style = wxOK|wxCENTRE, const wxPoint& pos = wxDefaultPosition); diff --git a/include/wx/gtk/notebook.h b/include/wx/gtk/notebook.h index 395927cc69..65cecbce8f 100644 --- a/include/wx/gtk/notebook.h +++ b/include/wx/gtk/notebook.h @@ -34,14 +34,14 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxNotebookNameStr); + const wxString& name = wxASCII_STR(wxNotebookNameStr)); // Create() function bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxNotebookNameStr); + const wxString& name = wxASCII_STR(wxNotebookNameStr)); // dtor virtual ~wxNotebook(); diff --git a/include/wx/gtk/private/addremovectrl.h b/include/wx/gtk/private/addremovectrl.h index a790c6e674..c9771a134d 100644 --- a/include/wx/gtk/private/addremovectrl.h +++ b/include/wx/gtk/private/addremovectrl.h @@ -68,7 +68,7 @@ private: // GTK UI guidelines recommend using "symbolic" versions of the icons // for these buttons, so try them first but fall back to the normal // ones if symbolic theme is not installed. - wxBitmap bmp = wxArtProvider::GetBitmap(name + "-symbolic", wxART_MENU); + wxBitmap bmp = wxArtProvider::GetBitmap(name + wxASCII_STR("-symbolic"), wxART_MENU); if ( !bmp.IsOk() ) bmp = wxArtProvider::GetBitmap(name, wxART_MENU); return bmp; diff --git a/include/wx/gtk/radiobox.h b/include/wx/gtk/radiobox.h index f38f82a599..e915770079 100644 --- a/include/wx/gtk/radiobox.h +++ b/include/wx/gtk/radiobox.h @@ -38,7 +38,7 @@ public: int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr) + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)) { Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name ); } @@ -52,7 +52,7 @@ public: int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr) + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)) { Create( parent, id, title, pos, size, choices, majorDim, style, val, name ); } @@ -67,7 +67,7 @@ public: int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr); + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxString& title, @@ -77,7 +77,7 @@ public: int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr); + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)); virtual ~wxRadioBox(); diff --git a/include/wx/gtk/radiobut.h b/include/wx/gtk/radiobut.h index 7ef6a6a162..cf6492a623 100644 --- a/include/wx/gtk/radiobut.h +++ b/include/wx/gtk/radiobut.h @@ -24,7 +24,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRadioButtonNameStr ) + const wxString& name = wxASCII_STR(wxRadioButtonNameStr) ) { Create( parent, id, label, pos, size, style, validator, name ); } @@ -36,7 +36,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRadioButtonNameStr ); + const wxString& name = wxASCII_STR(wxRadioButtonNameStr) ); virtual void SetLabel(const wxString& label) wxOVERRIDE; virtual void SetValue(bool val); diff --git a/include/wx/gtk/scrolbar.h b/include/wx/gtk/scrolbar.h index ceac3fd209..442a153b0d 100644 --- a/include/wx/gtk/scrolbar.h +++ b/include/wx/gtk/scrolbar.h @@ -22,7 +22,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSB_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr ) + const wxString& name = wxASCII_STR(wxScrollBarNameStr) ) { Create( parent, id, pos, size, style, validator, name ); } @@ -31,7 +31,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSB_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr ); + const wxString& name = wxASCII_STR(wxScrollBarNameStr) ); virtual ~wxScrollBar(); int GetThumbPosition() const wxOVERRIDE; int GetThumbSize() const wxOVERRIDE; diff --git a/include/wx/gtk/slider.h b/include/wx/gtk/slider.h index 94132f9833..0a34fcf729 100644 --- a/include/wx/gtk/slider.h +++ b/include/wx/gtk/slider.h @@ -24,7 +24,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr) + const wxString& name = wxASCII_STR(wxSliderNameStr)) { Create( parent, id, value, minValue, maxValue, pos, size, style, validator, name ); @@ -38,7 +38,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr); + const wxString& name = wxASCII_STR(wxSliderNameStr)); // implement the base class pure virtuals virtual int GetValue() const wxOVERRIDE; diff --git a/include/wx/gtk/srchctrl.h b/include/wx/gtk/srchctrl.h index d106896769..f4531c3571 100644 --- a/include/wx/gtk/srchctrl.h +++ b/include/wx/gtk/srchctrl.h @@ -32,7 +32,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSearchCtrlNameStr) + const wxString& name = wxASCII_STR(wxSearchCtrlNameStr)) : wxSearchCtrlBase() { Init(); @@ -47,7 +47,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSearchCtrlNameStr); + const wxString& name = wxASCII_STR(wxSearchCtrlNameStr)); #if wxUSE_MENUS // get/set search button menu diff --git a/include/wx/gtk/statbmp.h b/include/wx/gtk/statbmp.h index e79255ee3a..28b116134c 100644 --- a/include/wx/gtk/statbmp.h +++ b/include/wx/gtk/statbmp.h @@ -25,14 +25,14 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBitmapNameStr ); + const wxString& name = wxASCII_STR(wxStaticBitmapNameStr)); bool Create( wxWindow *parent, wxWindowID id, const wxBitmap& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBitmapNameStr); + const wxString& name = wxASCII_STR(wxStaticBitmapNameStr)); virtual void SetIcon(const wxIcon& icon) wxOVERRIDE { SetBitmap( icon ); } virtual void SetBitmap( const wxBitmap& bitmap ) wxOVERRIDE; diff --git a/include/wx/gtk/statbox.h b/include/wx/gtk/statbox.h index cce262cbae..563f1cc4be 100644 --- a/include/wx/gtk/statbox.h +++ b/include/wx/gtk/statbox.h @@ -26,7 +26,7 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0, - const wxString &name = wxStaticBoxNameStr ) + const wxString &name = wxASCII_STR(wxStaticBoxNameStr) ) { Create( parent, id, label, pos, size, style, name ); } @@ -37,7 +37,7 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0, - const wxString &name = wxStaticBoxNameStr ) + const wxString &name = wxASCII_STR(wxStaticBoxNameStr) ) { Create( parent, id, label, pos, size, style, name ); } @@ -48,7 +48,7 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0, - const wxString &name = wxStaticBoxNameStr ) + const wxString &name = wxASCII_STR(wxStaticBoxNameStr) ) { return DoCreate( parent, id, &label, NULL, pos, size, style, name ); } @@ -59,7 +59,7 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0, - const wxString &name = wxStaticBoxNameStr ) + const wxString &name = wxASCII_STR(wxStaticBoxNameStr) ) { return DoCreate( parent, id, NULL, label, pos, size, style, name ); } diff --git a/include/wx/gtk/statline.h b/include/wx/gtk/statline.h index 97501d609a..ad28abaa0b 100644 --- a/include/wx/gtk/statline.h +++ b/include/wx/gtk/statline.h @@ -26,13 +26,13 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxLI_HORIZONTAL, - const wxString &name = wxStaticLineNameStr); + const wxString &name = wxASCII_STR(wxStaticLineNameStr)); bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxLI_HORIZONTAL, - const wxString &name = wxStaticLineNameStr); + const wxString &name = wxASCII_STR(wxStaticLineNameStr)); static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); diff --git a/include/wx/gtk/stattext.h b/include/wx/gtk/stattext.h index 37f2939c47..6763447b5e 100644 --- a/include/wx/gtk/stattext.h +++ b/include/wx/gtk/stattext.h @@ -23,7 +23,7 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0, - const wxString &name = wxStaticTextNameStr ); + const wxString &name = wxASCII_STR(wxStaticTextNameStr) ); bool Create(wxWindow *parent, wxWindowID id, @@ -31,7 +31,7 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0, - const wxString &name = wxStaticTextNameStr ); + const wxString &name = wxASCII_STR(wxStaticTextNameStr) ); void SetLabel( const wxString &label ) wxOVERRIDE; diff --git a/include/wx/gtk/textctrl.h b/include/wx/gtk/textctrl.h index b343fc9b1a..13bf1a36a5 100644 --- a/include/wx/gtk/textctrl.h +++ b/include/wx/gtk/textctrl.h @@ -27,7 +27,7 @@ public: const wxSize &size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString &name = wxTextCtrlNameStr); + const wxString &name = wxASCII_STR(wxTextCtrlNameStr)); virtual ~wxTextCtrl(); @@ -38,7 +38,7 @@ public: const wxSize &size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString &name = wxTextCtrlNameStr); + const wxString &name = wxASCII_STR(wxTextCtrlNameStr)); // implement base class pure virtuals // ---------------------------------- diff --git a/include/wx/gtk/tglbtn.h b/include/wx/gtk/tglbtn.h index 40869c8b2e..ec36c0fe46 100644 --- a/include/wx/gtk/tglbtn.h +++ b/include/wx/gtk/tglbtn.h @@ -30,7 +30,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr) + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)) { Create(parent, id, label, pos, size, style, validator, name); } @@ -42,7 +42,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)); // Get/set the value void SetValue(bool state) wxOVERRIDE; @@ -90,7 +90,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr) + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)) { Create(parent, id, label, pos, size, style, validator, name); } @@ -102,7 +102,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)); // deprecated synonym for SetBitmapLabel() wxDEPRECATED_INLINE( void SetLabel(const wxBitmap& bitmap), diff --git a/include/wx/gtk/toolbar.h b/include/wx/gtk/toolbar.h index 8ad323b5f0..4ef2756009 100644 --- a/include/wx/gtk/toolbar.h +++ b/include/wx/gtk/toolbar.h @@ -25,7 +25,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTB_DEFAULT_STYLE, - const wxString& name = wxToolBarNameStr ) + const wxString& name = wxASCII_STR(wxToolBarNameStr) ) { Init(); @@ -37,7 +37,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTB_DEFAULT_STYLE, - const wxString& name = wxToolBarNameStr ); + const wxString& name = wxASCII_STR(wxToolBarNameStr) ); virtual ~wxToolBar(); diff --git a/include/wx/gtk/toplevel.h b/include/wx/gtk/toplevel.h index 19227ffa3f..8f0ad658b1 100644 --- a/include/wx/gtk/toplevel.h +++ b/include/wx/gtk/toplevel.h @@ -27,7 +27,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Init(); @@ -40,7 +40,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); virtual ~wxTopLevelWindowGTK(); diff --git a/include/wx/gtk/webview_webkit.h b/include/wx/gtk/webview_webkit.h index f71bc72d82..acabc88e94 100644 --- a/include/wx/gtk/webview_webkit.h +++ b/include/wx/gtk/webview_webkit.h @@ -37,7 +37,7 @@ public: const wxString& url = wxWebViewDefaultURLStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxWebViewNameStr) + const wxString& name = wxASCII_STR(wxWebViewNameStr)) { Create(parent, id, url, pos, size, style, name); } @@ -47,7 +47,7 @@ public: const wxString& url = wxWebViewDefaultURLStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxWebViewNameStr) wxOVERRIDE; + const wxString& name = wxASCII_STR(wxWebViewNameStr)) wxOVERRIDE; virtual ~wxWebViewWebKit(); @@ -195,7 +195,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxWebViewNameStr) wxOVERRIDE + const wxString& name = wxASCII_STR(wxWebViewNameStr)) wxOVERRIDE { return new wxWebViewWebKit(parent, id, url, pos, size, style, name); } }; diff --git a/include/wx/gtk/window.h b/include/wx/gtk/window.h index 16c755c413..9ca1202da1 100644 --- a/include/wx/gtk/window.h +++ b/include/wx/gtk/window.h @@ -49,13 +49,13 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr); + const wxString& name = wxASCII_STR(wxPanelNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr); + const wxString& name = wxASCII_STR(wxPanelNameStr)); virtual ~wxWindowGTK(); // implement base class (pure) virtual methods diff --git a/include/wx/gtk1/bmpbuttn.h b/include/wx/gtk1/bmpbuttn.h index d1674e5813..5627930a05 100644 --- a/include/wx/gtk1/bmpbuttn.h +++ b/include/wx/gtk1/bmpbuttn.h @@ -26,7 +26,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) + const wxString& name = wxASCII_STR(wxButtonNameStr)) { Init(); @@ -40,7 +40,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); + const wxString& name = wxASCII_STR(wxButtonNameStr)); void SetLabel( const wxString &label ); virtual void SetLabel( const wxBitmap& bitmap ) { SetBitmapLabel(bitmap); } diff --git a/include/wx/gtk1/button.h b/include/wx/gtk1/button.h index eddce05960..fb7162e43e 100644 --- a/include/wx/gtk1/button.h +++ b/include/wx/gtk1/button.h @@ -26,7 +26,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) + const wxString& name = wxASCII_STR(wxButtonNameStr)) { Create(parent, id, label, pos, size, style, validator, name); } @@ -38,7 +38,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); + const wxString& name = wxASCII_STR(wxButtonNameStr)); virtual wxWindow *SetDefault(); virtual void SetLabel( const wxString &label ); diff --git a/include/wx/gtk1/checkbox.h b/include/wx/gtk1/checkbox.h index 61e3daa31e..d0bba6282a 100644 --- a/include/wx/gtk1/checkbox.h +++ b/include/wx/gtk1/checkbox.h @@ -21,7 +21,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr) + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)) { Create(parent, id, label, pos, size, style, validator, name); } @@ -32,7 +32,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr ); + const wxString& name = wxASCII_STR(wxCheckBoxNameStr) ); void SetValue( bool state ); bool GetValue() const; diff --git a/include/wx/gtk1/checklst.h b/include/wx/gtk1/checklst.h index 3607ad5dc1..de5f538034 100644 --- a/include/wx/gtk1/checklst.h +++ b/include/wx/gtk1/checklst.h @@ -38,14 +38,14 @@ public: const wxString *choices = (const wxString *)NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); wxCheckListBox(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); bool IsChecked(unsigned int index) const; void Check(unsigned int index, bool check = true); diff --git a/include/wx/gtk1/choice.h b/include/wx/gtk1/choice.h index cedff268cc..5703e3e202 100644 --- a/include/wx/gtk1/choice.h +++ b/include/wx/gtk1/choice.h @@ -26,7 +26,7 @@ public: int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr ) + const wxString& name = wxASCII_STR(wxChoiceNameStr) ) { m_strings = NULL; @@ -38,7 +38,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr ) + const wxString& name = wxASCII_STR(wxChoiceNameStr) ) { m_strings = NULL; @@ -51,14 +51,14 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr ); + const wxString& name = wxASCII_STR(wxChoiceNameStr) ); bool Create( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr ); + const wxString& name = wxASCII_STR(wxChoiceNameStr) ); // implement base class pure virtuals void DoDeleteOneItem(unsigned int n); diff --git a/include/wx/gtk1/combobox.h b/include/wx/gtk1/combobox.h index 8c54feb568..0008c2c01e 100644 --- a/include/wx/gtk1/combobox.h +++ b/include/wx/gtk1/combobox.h @@ -45,7 +45,7 @@ public: int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr) + const wxString& name = wxASCII_STR(wxComboBoxNameStr)) { Create(parent, id, value, pos, size, n, choices, style, validator, name); } @@ -56,7 +56,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr) + const wxString& name = wxASCII_STR(wxComboBoxNameStr)) { Create(parent, id, value, pos, size, choices, style, validator, name); } @@ -70,7 +70,7 @@ public: int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); + const wxString& name = wxASCII_STR(wxComboBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxString& value, const wxPoint& pos, @@ -78,7 +78,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); + const wxString& name = wxASCII_STR(wxComboBoxNameStr)); void DoClear(); void DoDeleteOneItem(unsigned int n); diff --git a/include/wx/gtk1/control.h b/include/wx/gtk1/control.h index 2f526a533e..1cf85a23f7 100644 --- a/include/wx/gtk1/control.h +++ b/include/wx/gtk1/control.h @@ -42,7 +42,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxControlNameStr) + const wxString& name = wxASCII_STR(wxControlNameStr)) { Create(parent, id, pos, size, style, validator, name); } @@ -51,7 +51,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxControlNameStr); + const wxString& name = wxASCII_STR(wxControlNameStr)); virtual void SetLabel( const wxString &label ); virtual wxString GetLabel() const; diff --git a/include/wx/gtk1/dialog.h b/include/wx/gtk1/dialog.h index d4d068ea40..153c9e2c96 100644 --- a/include/wx/gtk1/dialog.h +++ b/include/wx/gtk1/dialog.h @@ -23,13 +23,13 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, - const wxString &name = wxDialogNameStr ); + const wxString &name = wxASCII_STR(wxDialogNameStr) ); bool Create( wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, - const wxString &name = wxDialogNameStr ); + const wxString &name = wxASCII_STR(wxDialogNameStr) ); virtual ~wxDialog() {} void OnApply( wxCommandEvent &event ); diff --git a/include/wx/gtk1/filedlg.h b/include/wx/gtk1/filedlg.h index 1acbfa6ed1..8a13d8444e 100644 --- a/include/wx/gtk1/filedlg.h +++ b/include/wx/gtk1/filedlg.h @@ -21,14 +21,14 @@ public: wxFileDialog() { } wxFileDialog(wxWindow *parent, - const wxString& message = wxFileSelectorPromptStr, + const wxString& message = wxASCII_STR(wxFileSelectorPromptStr), const wxString& defaultDir = wxEmptyString, const wxString& defaultFile = wxEmptyString, - const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + const wxString& wildCard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), long style = wxFD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, - const wxString& name = wxFileDialogNameStr); + const wxString& name = wxASCII_STR(wxFileDialogNameStr)); virtual ~wxFileDialog(); diff --git a/include/wx/gtk1/frame.h b/include/wx/gtk1/frame.h index 8d6914525e..94787f8a9e 100644 --- a/include/wx/gtk1/frame.h +++ b/include/wx/gtk1/frame.h @@ -35,7 +35,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Init(); @@ -48,7 +48,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); #if wxUSE_STATUSBAR virtual void PositionStatusBar(); @@ -56,7 +56,7 @@ public: virtual wxStatusBar* CreateStatusBar(int number = 1, long style = wxSTB_DEFAULT_STYLE, wxWindowID id = 0, - const wxString& name = wxStatusLineNameStr); + const wxString& name = wxASCII_STR(wxStatusLineNameStr)); void SetStatusBar(wxStatusBar *statbar); #endif // wxUSE_STATUSBAR @@ -64,7 +64,7 @@ public: #if wxUSE_TOOLBAR virtual wxToolBar* CreateToolBar(long style = -1, wxWindowID id = -1, - const wxString& name = wxToolBarNameStr); + const wxString& name = wxASCII_STR(wxToolBarNameStr)); void SetToolBar(wxToolBar *toolbar); #endif // wxUSE_TOOLBAR diff --git a/include/wx/gtk1/gauge.h b/include/wx/gtk1/gauge.h index 89c9baff76..2f0cf907f9 100644 --- a/include/wx/gtk1/gauge.h +++ b/include/wx/gtk1/gauge.h @@ -25,7 +25,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr ) + const wxString& name = wxASCII_STR(wxGaugeNameStr) ) { Init(); @@ -38,7 +38,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr ); + const wxString& name = wxASCII_STR(wxGaugeNameStr) ); void SetRange( int r ); void SetValue( int pos ); diff --git a/include/wx/gtk1/listbox.h b/include/wx/gtk1/listbox.h index 407108b5ff..7428d95c93 100644 --- a/include/wx/gtk1/listbox.h +++ b/include/wx/gtk1/listbox.h @@ -30,7 +30,7 @@ public: int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr ) + const wxString& name = wxASCII_STR(wxListBoxNameStr) ) { #if wxUSE_CHECKLISTBOX m_hasCheckBoxes = false; @@ -43,7 +43,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr ) + const wxString& name = wxASCII_STR(wxListBoxNameStr) ) { #if wxUSE_CHECKLISTBOX m_hasCheckBoxes = false; @@ -58,14 +58,14 @@ public: int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); // implement base class pure virtuals virtual void DoClear(); diff --git a/include/wx/gtk1/mdi.h b/include/wx/gtk1/mdi.h index 304d12089e..e752b6591d 100644 --- a/include/wx/gtk1/mdi.h +++ b/include/wx/gtk1/mdi.h @@ -32,7 +32,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Init(); @@ -45,7 +45,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); // we don't store the active child in m_currentChild unlike the base class // version so override this method to find it dynamically @@ -86,7 +86,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Init(); @@ -99,7 +99,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); virtual ~wxMDIChildFrame(); diff --git a/include/wx/gtk1/minifram.h b/include/wx/gtk1/minifram.h index 8e422a5583..bfc31fe7d2 100644 --- a/include/wx/gtk1/minifram.h +++ b/include/wx/gtk1/minifram.h @@ -38,7 +38,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Create(parent, id, title, pos, size, style, name); } @@ -49,7 +49,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); virtual void SetTitle( const wxString &title ); // implementation diff --git a/include/wx/gtk1/notebook.h b/include/wx/gtk1/notebook.h index 72bddce086..35696bdf9a 100644 --- a/include/wx/gtk1/notebook.h +++ b/include/wx/gtk1/notebook.h @@ -34,14 +34,14 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxNotebookNameStr); + const wxString& name = wxASCII_STR(wxNotebookNameStr)); // Create() function bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxNotebookNameStr); + const wxString& name = wxASCII_STR(wxNotebookNameStr)); // dtor virtual ~wxNotebook(); diff --git a/include/wx/gtk1/private/addremovectrl.h b/include/wx/gtk1/private/addremovectrl.h index bce4061df5..3e25f6e88f 100644 --- a/include/wx/gtk1/private/addremovectrl.h +++ b/include/wx/gtk1/private/addremovectrl.h @@ -68,7 +68,7 @@ private: // GTK UI guidelines recommend using "symbolic" versions of the icons // for these buttons, so try them first but fall back to the normal // ones if symbolic theme is not installed. - wxBitmap bmp = wxArtProvider::GetBitmap(name + "-symbolic", wxART_MENU); + wxBitmap bmp = wxArtProvider::GetBitmap(name + wxASCII_STR("-symbolic"), wxART_MENU); if ( !bmp.IsOk() ) bmp = wxArtProvider::GetBitmap(name, wxART_MENU); return bmp; diff --git a/include/wx/gtk1/radiobox.h b/include/wx/gtk1/radiobox.h index edcd231196..5198e41c73 100644 --- a/include/wx/gtk1/radiobox.h +++ b/include/wx/gtk1/radiobox.h @@ -31,7 +31,7 @@ public: int majorDim = 1, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr) + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)) { Init(); @@ -47,7 +47,7 @@ public: int majorDim = 1, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr) + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)) { Init(); @@ -64,7 +64,7 @@ public: int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr); + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxString& title, @@ -74,7 +74,7 @@ public: int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr); + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)); virtual ~wxRadioBox(); diff --git a/include/wx/gtk1/radiobut.h b/include/wx/gtk1/radiobut.h index f3cbde2024..d958079729 100644 --- a/include/wx/gtk1/radiobut.h +++ b/include/wx/gtk1/radiobut.h @@ -24,7 +24,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRadioButtonNameStr ) + const wxString& name = wxASCII_STR(wxRadioButtonNameStr) ) { Create( parent, id, label, pos, size, style, validator, name ); } @@ -36,7 +36,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRadioButtonNameStr ); + const wxString& name = wxASCII_STR(wxRadioButtonNameStr) ); virtual void SetLabel(const wxString& label); virtual void SetValue(bool val); diff --git a/include/wx/gtk1/scrolbar.h b/include/wx/gtk1/scrolbar.h index ac26af5712..fb22b34a8c 100644 --- a/include/wx/gtk1/scrolbar.h +++ b/include/wx/gtk1/scrolbar.h @@ -31,7 +31,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSB_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr ) + const wxString& name = wxASCII_STR(wxScrollBarNameStr) ) { Create( parent, id, pos, size, style, validator, name ); } @@ -40,7 +40,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSB_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr ); + const wxString& name = wxASCII_STR(wxScrollBarNameStr) ); virtual ~wxScrollBar(); int GetThumbPosition() const; int GetThumbSize() const; diff --git a/include/wx/gtk1/slider.h b/include/wx/gtk1/slider.h index c4852c55aa..4fb4e507f3 100644 --- a/include/wx/gtk1/slider.h +++ b/include/wx/gtk1/slider.h @@ -24,7 +24,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr) + const wxString& name = wxASCII_STR(wxSliderNameStr)) { Create( parent, id, value, minValue, maxValue, pos, size, style, validator, name ); @@ -37,7 +37,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr); + const wxString& name = wxASCII_STR(wxSliderNameStr)); // implement the base class pure virtuals virtual int GetValue() const; diff --git a/include/wx/gtk1/statbmp.h b/include/wx/gtk1/statbmp.h index ed3f1315c5..3c9eaad0d2 100644 --- a/include/wx/gtk1/statbmp.h +++ b/include/wx/gtk1/statbmp.h @@ -25,14 +25,14 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBitmapNameStr ); + const wxString& name = wxASCII_STR(wxStaticBitmapNameStr) ); bool Create( wxWindow *parent, wxWindowID id, const wxBitmap& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBitmapNameStr); + const wxString& name = wxASCII_STR(wxStaticBitmapNameStr)); virtual void SetIcon(const wxIcon& icon) { SetBitmap( icon ); } virtual void SetBitmap( const wxBitmap& bitmap ); diff --git a/include/wx/gtk1/statbox.h b/include/wx/gtk1/statbox.h index f94890ce9f..c3e881ae29 100644 --- a/include/wx/gtk1/statbox.h +++ b/include/wx/gtk1/statbox.h @@ -23,14 +23,14 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0, - const wxString &name = wxStaticBoxNameStr ); + const wxString &name = wxASCII_STR(wxStaticBoxNameStr) ); bool Create( wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0, - const wxString &name = wxStaticBoxNameStr ); + const wxString &name = wxASCII_STR(wxStaticBoxNameStr) ); virtual void SetLabel( const wxString &label ); diff --git a/include/wx/gtk1/statline.h b/include/wx/gtk1/statline.h index 8759194cb5..29e8b7fd53 100644 --- a/include/wx/gtk1/statline.h +++ b/include/wx/gtk1/statline.h @@ -26,13 +26,13 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxLI_HORIZONTAL, - const wxString &name = wxStaticLineNameStr); + const wxString &name = wxASCII_STR(wxStaticLineNameStr)); bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxLI_HORIZONTAL, - const wxString &name = wxStaticLineNameStr); + const wxString &name = wxASCII_STR(wxStaticLineNameStr)); static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); diff --git a/include/wx/gtk1/stattext.h b/include/wx/gtk1/stattext.h index cb35e6bfcf..66941c6bb0 100644 --- a/include/wx/gtk1/stattext.h +++ b/include/wx/gtk1/stattext.h @@ -23,7 +23,7 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0, - const wxString &name = wxStaticTextNameStr ); + const wxString &name = wxASCII_STR(wxStaticTextNameStr) ); bool Create(wxWindow *parent, wxWindowID id, @@ -31,7 +31,7 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0, - const wxString &name = wxStaticTextNameStr ); + const wxString &name = wxASCII_STR(wxStaticTextNameStr) ); virtual wxString GetLabel() const; virtual void SetLabel( const wxString &label ); diff --git a/include/wx/gtk1/textctrl.h b/include/wx/gtk1/textctrl.h index cfc6eaf87b..e7b63006ad 100644 --- a/include/wx/gtk1/textctrl.h +++ b/include/wx/gtk1/textctrl.h @@ -25,7 +25,7 @@ public: const wxSize &size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString &name = wxTextCtrlNameStr); + const wxString &name = wxASCII_STR(wxTextCtrlNameStr)); virtual ~wxTextCtrl(); @@ -36,7 +36,7 @@ public: const wxSize &size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString &name = wxTextCtrlNameStr); + const wxString &name = wxASCII_STR(wxTextCtrlNameStr)); // implement base class pure virtuals // ---------------------------------- diff --git a/include/wx/gtk1/tglbtn.h b/include/wx/gtk1/tglbtn.h index aa0aa8c019..4e243dd11b 100644 --- a/include/wx/gtk1/tglbtn.h +++ b/include/wx/gtk1/tglbtn.h @@ -37,7 +37,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr) + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)) { Create(parent, id, label, pos, size, style, validator, name); } @@ -49,7 +49,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)); // Get/set the value void SetValue(bool state); @@ -94,7 +94,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr) + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)) { Create(parent, id, label, pos, size, style, validator, name); } @@ -106,7 +106,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)); // Get/set the value void SetValue(bool state); diff --git a/include/wx/gtk1/toolbar.h b/include/wx/gtk1/toolbar.h index 0e25d1cb94..ab23653354 100644 --- a/include/wx/gtk1/toolbar.h +++ b/include/wx/gtk1/toolbar.h @@ -25,7 +25,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxToolBarNameStr ) + const wxString& name = wxASCII_STR(wxToolBarNameStr) ) { Init(); @@ -37,7 +37,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxToolBarNameStr ); + const wxString& name = wxASCII_STR(wxToolBarNameStr) ); virtual ~wxToolBar(); diff --git a/include/wx/gtk1/toplevel.h b/include/wx/gtk1/toplevel.h index 90fa3d8508..df43ae9eb4 100644 --- a/include/wx/gtk1/toplevel.h +++ b/include/wx/gtk1/toplevel.h @@ -24,7 +24,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Init(); @@ -37,7 +37,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); virtual ~wxTopLevelWindowGTK(); diff --git a/include/wx/gtk1/treectrl.h b/include/wx/gtk1/treectrl.h index a18cc6d9a2..d5843336b6 100644 --- a/include/wx/gtk1/treectrl.h +++ b/include/wx/gtk1/treectrl.h @@ -129,7 +129,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT, const wxValidator& validator = wxDefaultValidator, - const wxString& name = "wxTreeCtrl") { + const wxString& name = wxASCII_STR("wxTreeCtrl")) { Create(parent, id, pos, size, style, validator, name); } @@ -140,7 +140,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT, const wxValidator& validator = wxDefaultValidator, - const wxString& name = "wxTreeCtrl"); + const wxString& name = wxASCII_STR("wxTreeCtrl")); // accessors // --------- diff --git a/include/wx/gtk1/window.h b/include/wx/gtk1/window.h index 76316e11f2..c945cc2f95 100644 --- a/include/wx/gtk1/window.h +++ b/include/wx/gtk1/window.h @@ -37,13 +37,13 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr); + const wxString& name = wxASCII_STR(wxPanelNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr); + const wxString& name = wxASCII_STR(wxPanelNameStr)); virtual ~wxWindowGTK(); // implement base class (pure) virtual methods diff --git a/include/wx/headerctrl.h b/include/wx/headerctrl.h index 8d677eec67..3216890f99 100644 --- a/include/wx/headerctrl.h +++ b/include/wx/headerctrl.h @@ -62,14 +62,14 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHD_DEFAULT_STYLE, - const wxString& name = wxHeaderCtrlNameStr); + const wxString& name = wxASCII_STR(wxHeaderCtrlNameStr)); bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHD_DEFAULT_STYLE, - const wxString& name = wxHeaderCtrlNameStr); + const wxString& name = wxASCII_STR(wxHeaderCtrlNameStr)); */ // column-related methods @@ -273,7 +273,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHD_DEFAULT_STYLE, - const wxString& name = wxHeaderCtrlNameStr) + const wxString& name = wxASCII_STR(wxHeaderCtrlNameStr)) { Init(); diff --git a/include/wx/html/webkit.h b/include/wx/html/webkit.h index f8558a3141..94f0bfb05f 100644 --- a/include/wx/html/webkit.h +++ b/include/wx/html/webkit.h @@ -37,7 +37,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxWebKitCtrlNameStr) + const wxString& name = wxASCII_STR(wxWebKitCtrlNameStr)) { Create(parent, winID, strURL, pos, size, style, validator, name); } @@ -47,7 +47,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxWebKitCtrlNameStr); + const wxString& name = wxASCII_STR(wxWebKitCtrlNameStr)); virtual ~wxWebKitCtrl(); void LoadURL(const wxString &url); diff --git a/include/wx/htmllbox.h b/include/wx/htmllbox.h index e936699bbe..7f69404903 100644 --- a/include/wx/htmllbox.h +++ b/include/wx/htmllbox.h @@ -11,6 +11,8 @@ #ifndef _WX_HTMLLBOX_H_ #define _WX_HTMLLBOX_H_ +#if wxUSE_HTML + #include "wx/vlbox.h" // base class #include "wx/html/htmlwin.h" #include "wx/ctrlsub.h" @@ -49,7 +51,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxHtmlListBoxNameStr); + const wxString& name = wxASCII_STR(wxHtmlListBoxNameStr)); // really creates the control and sets the initial number of items in it // (which may be changed later with SetItemCount()) @@ -62,7 +64,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxHtmlListBoxNameStr); + const wxString& name = wxASCII_STR(wxHtmlListBoxNameStr)); // destructor cleans up whatever resources we use virtual ~wxHtmlListBox(); @@ -215,7 +217,7 @@ public: int n = 0, const wxString choices[] = NULL, long style = wxHLB_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSimpleHtmlListBoxNameStr) + const wxString& name = wxASCII_STR(wxSimpleHtmlListBoxNameStr)) { Create(parent, id, pos, size, n, choices, style, validator, name); } @@ -227,7 +229,7 @@ public: const wxArrayString& choices, long style = wxHLB_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSimpleHtmlListBoxNameStr) + const wxString& name = wxASCII_STR(wxSimpleHtmlListBoxNameStr)) { Create(parent, id, pos, size, choices, style, validator, name); } @@ -238,14 +240,14 @@ public: int n = 0, const wxString choices[] = NULL, long style = wxHLB_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSimpleHtmlListBoxNameStr); + const wxString& name = wxASCII_STR(wxSimpleHtmlListBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = wxHLB_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSimpleHtmlListBoxNameStr); + const wxString& name = wxASCII_STR(wxSimpleHtmlListBoxNameStr)); virtual ~wxSimpleHtmlListBox(); @@ -320,5 +322,7 @@ protected: wxDECLARE_NO_COPY_CLASS(wxSimpleHtmlListBox); }; +#endif // wxUSE_HTML + #endif // _WX_HTMLLBOX_H_ diff --git a/include/wx/hyperlink.h b/include/wx/hyperlink.h index 072c05efd3..999f7d9740 100644 --- a/include/wx/hyperlink.h +++ b/include/wx/hyperlink.h @@ -157,7 +157,7 @@ typedef void (wxEvtHandler::*wxHyperlinkEventFunction)(wxHyperlinkEvent&); const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHL_DEFAULT_STYLE, - const wxString& name = wxHyperlinkCtrlNameStr) + const wxString& name = wxASCII_STR(wxHyperlinkCtrlNameStr)) : wxGenericHyperlinkCtrl(parent, id, label, url, pos, size, style, name) { diff --git a/include/wx/list.h b/include/wx/list.h index ee55b58e9c..866e2fb2bc 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -338,8 +338,10 @@ public: { m_key.integer = i; } wxListKey(const wxString& s) : m_keyType(wxKEY_STRING) { m_key.string = new wxString(s); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxListKey(const char *s) : m_keyType(wxKEY_STRING) { m_key.string = new wxString(s); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxListKey(const wchar_t *s) : m_keyType(wxKEY_STRING) { m_key.string = new wxString(s); } diff --git a/include/wx/listctrl.h b/include/wx/listctrl.h index dfb87816da..09a713c322 100644 --- a/include/wx/listctrl.h +++ b/include/wx/listctrl.h @@ -49,7 +49,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxLC_REPORT, const wxValidator& validator = wxDefaultValidator, - const wxString &name = wxListCtrlNameStr) + const wxString &name = wxASCII_STR(wxListCtrlNameStr)) { Create(parent, winid, pos, size, style, validator, name); } diff --git a/include/wx/log.h b/include/wx/log.h index b15199a2cd..3b506dd777 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -86,8 +86,8 @@ class WXDLLIMPEXP_FWD_BASE wxObject; #endif // wxUSE_LOG_TRACE // wxLOG_COMPONENT identifies the component which generated the log record and -// can be #define'd to a user-defined value when compiling the user code to use -// component-based filtering (see wxLog::SetComponentLevel()) +// can be #define'd to a user-defined value (ASCII only) when compiling the +// user code to use component-based filtering (see wxLog::SetComponentLevel()) #ifndef wxLOG_COMPONENT // this is a variable and not a macro in order to allow the user code to // just #define wxLOG_COMPONENT without #undef'ining it first @@ -205,7 +205,7 @@ public: const char *func; // the name of the component which generated this message, may be NULL if - // not set (i.e. wxLOG_COMPONENT not defined) + // not set (i.e. wxLOG_COMPONENT not defined). It must be in ASCII. const char *component; // time of record generation @@ -288,7 +288,7 @@ private: ExtraData *m_data; }; -#define wxLOG_KEY_TRACE_MASK "wx.trace_mask" +#define wxLOG_KEY_TRACE_MASK wxASCII_STR("wx.trace_mask") // ---------------------------------------------------------------------------- // log record: a unit of log output @@ -804,7 +804,7 @@ public: // change the new log target void SetLog(wxLog *logger); - // this can be used to temporarily disable (and then re-enable) passing + // this can be used to temporarily disable (and then reenable) passing // messages to the old logger (by default we do pass them) void PassMessages(bool bDoPass) { m_bPassMessages = bDoPass; } @@ -925,7 +925,7 @@ public: { // remember that fatal errors can't be disabled if ( m_level == wxLOG_FatalError || - wxLog::IsLevelEnabled(m_level, m_info.component) ) + wxLog::IsLevelEnabled(m_level, wxASCII_STR(m_info.component)) ) DoCallOnLog(format, argptr); } @@ -1054,7 +1054,7 @@ private: void DoLogAtLevel(wxLogLevel level, const wxChar *format, ...) { - if ( !wxLog::IsLevelEnabled(level, m_info.component) ) + if ( !wxLog::IsLevelEnabled(level, wxASCII_STR(m_info.component)) ) return; va_list argptr; @@ -1123,7 +1123,7 @@ private: void DoLogAtLevelUtf8(wxLogLevel level, const char *format, ...) { - if ( !wxLog::IsLevelEnabled(level, m_info.component) ) + if ( !wxLog::IsLevelEnabled(level, wxASCII_STR(m_info.component)) ) return; va_list argptr; @@ -1253,7 +1253,7 @@ WXDLLIMPEXP_BASE wxString wxSysErrorMsgStr(unsigned long nErrCode = 0); // Macro evaluating to true if logging at the given level is enabled. #define wxLOG_IS_ENABLED(level) \ - wxLog::IsLevelEnabled(wxLOG_##level, wxLOG_COMPONENT) + wxLog::IsLevelEnabled(wxLOG_##level, wxASCII_STR(wxLOG_COMPONENT)) // Macro used to define most of the actual wxLogXXX() macros: just calls // wxLogger::Log(), if logging at the specified level is enabled. diff --git a/include/wx/mdi.h b/include/wx/mdi.h index 2ebc216fa8..75eeaf44b3 100644 --- a/include/wx/mdi.h +++ b/include/wx/mdi.h @@ -50,7 +50,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); */ #if wxUSE_MENUS @@ -157,7 +157,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); And setting m_mdiParent to parent parameter. */ diff --git a/include/wx/mimetype.h b/include/wx/mimetype.h index 0ee1952911..efa807d7bf 100644 --- a/include/wx/mimetype.h +++ b/include/wx/mimetype.h @@ -138,11 +138,15 @@ public: // Do not use, it's used by the ctor only. struct CtorString { +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING CtorString(const char *str) : m_str(str) {} +#endif CtorString(const wchar_t *str) : m_str(str) {} CtorString(const wxString& str) : m_str(str) {} CtorString(const wxCStrData& str) : m_str(str) {} +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING CtorString(const wxScopedCharBuffer& str) : m_str(str) {} +#endif CtorString(const wxScopedWCharBuffer& str) : m_str(str) {} operator const wxString*() const { return &m_str; } diff --git a/include/wx/module.h b/include/wx/module.h index 2fc8559dd8..993f765e0f 100644 --- a/include/wx/module.h +++ b/include/wx/module.h @@ -74,10 +74,10 @@ protected: } // same as the version above except it will look up wxClassInfo by name on - // its own + // its own. Note that className must be ASCII void AddDependency(const char *className) { - m_namedDependencies.Add(className); + m_namedDependencies.Add(wxASCII_STR(className)); } diff --git a/include/wx/motif/bmpbuttn.h b/include/wx/motif/bmpbuttn.h index 3ef6ea7865..ec6ae884fc 100644 --- a/include/wx/motif/bmpbuttn.h +++ b/include/wx/motif/bmpbuttn.h @@ -24,7 +24,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) + const wxString& name = wxASCII_STR(wxButtonNameStr)) { Create(parent, id, bitmap, pos, size, style, validator, name); } @@ -33,7 +33,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); + const wxString& name = wxASCII_STR(wxButtonNameStr)); // Implementation virtual void ChangeBackgroundColour(); diff --git a/include/wx/motif/button.h b/include/wx/motif/button.h index 423ea0b90f..aacd066dc4 100644 --- a/include/wx/motif/button.h +++ b/include/wx/motif/button.h @@ -22,7 +22,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) + const wxString& name = wxASCII_STR(wxButtonNameStr)) { Create(parent, id, label, pos, size, style, validator, name); } @@ -32,7 +32,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); + const wxString& name = wxASCII_STR(wxButtonNameStr)); virtual wxWindow *SetDefault(); virtual void Command(wxCommandEvent& event); diff --git a/include/wx/motif/checkbox.h b/include/wx/motif/checkbox.h index 6ef7405e4e..c951c686ca 100644 --- a/include/wx/motif/checkbox.h +++ b/include/wx/motif/checkbox.h @@ -22,7 +22,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr) + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)) { Init(); @@ -33,7 +33,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)); virtual void SetValue(bool); virtual bool GetValue() const ; virtual void Command(wxCommandEvent& event); diff --git a/include/wx/motif/checklst.h b/include/wx/motif/checklst.h index 7bead5be47..34323c3575 100644 --- a/include/wx/motif/checklst.h +++ b/include/wx/motif/checklst.h @@ -28,7 +28,7 @@ public: const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); wxCheckListBox(wxWindow *parent, wxWindowID id, const wxPoint& pos, @@ -36,7 +36,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, @@ -44,7 +44,7 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, @@ -52,7 +52,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); // items may be checked bool IsChecked(unsigned int uiIndex) const; diff --git a/include/wx/motif/choice.h b/include/wx/motif/choice.h index 3d27fe4707..305ff0e586 100644 --- a/include/wx/motif/choice.h +++ b/include/wx/motif/choice.h @@ -35,7 +35,7 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr) + const wxString& name = wxASCII_STR(wxChoiceNameStr)) { Init(); Create(parent, id, pos, size, n, choices, style, validator, name); @@ -47,7 +47,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr) + const wxString& name = wxASCII_STR(wxChoiceNameStr)) { Init(); Create(parent, id, pos, size, choices, style, validator, name); @@ -59,7 +59,7 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr); + const wxString& name = wxASCII_STR(wxChoiceNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, @@ -67,7 +67,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr); + const wxString& name = wxASCII_STR(wxChoiceNameStr)); // implementation of wxControlWithItems virtual unsigned int GetCount() const; diff --git a/include/wx/motif/combobox.h b/include/wx/motif/combobox.h index 7179a01dc0..cae4d10c97 100644 --- a/include/wx/motif/combobox.h +++ b/include/wx/motif/combobox.h @@ -29,7 +29,7 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr) + const wxString& name = wxASCII_STR(wxComboBoxNameStr)) { m_inSetSelection = false; Create(parent, id, value, pos, size, n, choices, @@ -43,7 +43,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr) + const wxString& name = wxASCII_STR(wxComboBoxNameStr)) { m_inSetSelection = false; Create(parent, id, value, pos, size, choices, @@ -57,7 +57,7 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); + const wxString& name = wxASCII_STR(wxComboBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxString& value, @@ -66,7 +66,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); + const wxString& name = wxASCII_STR(wxComboBoxNameStr)); // See wxComboBoxBase discussion of IsEmpty(). bool IsListEmpty() const { return wxItemContainer::IsEmpty(); } diff --git a/include/wx/motif/control.h b/include/wx/motif/control.h index 248f092017..4ad4979d65 100644 --- a/include/wx/motif/control.h +++ b/include/wx/motif/control.h @@ -28,7 +28,7 @@ public: const wxSize &size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString &name = wxControlNameStr ) + const wxString &name = wxASCII_STR(wxControlNameStr) ) { Create(parent, id, pos, size, style, validator, name); } @@ -37,7 +37,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxControlNameStr); + const wxString& name = wxASCII_STR(wxControlNameStr)); // simulates the event, returns true if the event was processed virtual void Command(wxCommandEvent& WXUNUSED(event)) { } diff --git a/include/wx/motif/dialog.h b/include/wx/motif/dialog.h index 600179c553..2895525ef1 100644 --- a/include/wx/motif/dialog.h +++ b/include/wx/motif/dialog.h @@ -24,7 +24,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, - const wxString& name = wxDialogNameStr) + const wxString& name = wxASCII_STR(wxDialogNameStr)) { Create(parent, id, title, pos, size, style, name); } @@ -34,7 +34,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, - const wxString& name = wxDialogNameStr); + const wxString& name = wxASCII_STR(wxDialogNameStr)); virtual ~wxDialog(); diff --git a/include/wx/motif/filedlg.h b/include/wx/motif/filedlg.h index 83f24d769e..6cc86bfe00 100644 --- a/include/wx/motif/filedlg.h +++ b/include/wx/motif/filedlg.h @@ -26,14 +26,14 @@ public: public: wxFileDialog(wxWindow *parent, - const wxString& message = wxFileSelectorPromptStr, + const wxString& message = wxASCII_STR(wxFileSelectorPromptStr), const wxString& defaultDir = wxEmptyString, const wxString& defaultFile = wxEmptyString, - const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + const wxString& wildCard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), long style = wxFD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, - const wxString& name = wxFileDialogNameStr); + const wxString& name = wxASCII_STR(wxFileDialogNameStr)); virtual int ShowModal(); }; diff --git a/include/wx/motif/frame.h b/include/wx/motif/frame.h index 78239dc598..a002647e07 100644 --- a/include/wx/motif/frame.h +++ b/include/wx/motif/frame.h @@ -21,7 +21,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Init(); @@ -34,7 +34,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); virtual ~wxFrame(); @@ -57,7 +57,7 @@ public: #if wxUSE_TOOLBAR virtual wxToolBar* CreateToolBar(long style = -1, wxWindowID id = wxID_ANY, - const wxString& name = wxToolBarNameStr); + const wxString& name = wxASCII_STR(wxToolBarNameStr)); virtual void SetToolBar(wxToolBar *toolbar); virtual void PositionToolBar(); #endif // wxUSE_TOOLBAR diff --git a/include/wx/motif/gauge.h b/include/wx/motif/gauge.h index 6089ea9af0..2a23b51091 100644 --- a/include/wx/motif/gauge.h +++ b/include/wx/motif/gauge.h @@ -25,7 +25,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr) + const wxString& name = wxASCII_STR(wxGaugeNameStr)) { Create(parent, id, range, pos, size, style, validator, name); } @@ -36,7 +36,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr); + const wxString& name = wxASCII_STR(wxGaugeNameStr)); void SetRange(int r); void SetValue(int pos); diff --git a/include/wx/motif/listbox.h b/include/wx/motif/listbox.h index 96aa3d3466..a14075adf5 100644 --- a/include/wx/motif/listbox.h +++ b/include/wx/motif/listbox.h @@ -30,7 +30,7 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr) + const wxString& name = wxASCII_STR(wxListBoxNameStr)) { Create(parent, id, pos, size, n, choices, style, validator, name); } @@ -41,7 +41,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr) + const wxString& name = wxASCII_STR(wxListBoxNameStr)) { Create(parent, id, pos, size, choices, style, validator, name); } @@ -52,7 +52,7 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, @@ -60,7 +60,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); // implementation of wxControlWithItems virtual unsigned int GetCount() const; diff --git a/include/wx/motif/minifram.h b/include/wx/motif/minifram.h index 50197cf0d4..6cc31c6659 100644 --- a/include/wx/motif/minifram.h +++ b/include/wx/motif/minifram.h @@ -27,7 +27,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE|wxTINY_CAPTION, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { // Use wxFrame constructor in absence of more specific code. Create(parent, id, title, pos, size, style, name); diff --git a/include/wx/motif/msgdlg.h b/include/wx/motif/msgdlg.h index 0a5a73aef2..e6774cc54c 100644 --- a/include/wx/motif/msgdlg.h +++ b/include/wx/motif/msgdlg.h @@ -21,7 +21,7 @@ class WXDLLIMPEXP_CORE wxMessageDialog : public wxMessageDialogBase public: wxMessageDialog(wxWindow *parent, const wxString& message, - const wxString& caption = wxMessageBoxCaptionStr, + const wxString& caption = wxASCII_STR(wxMessageBoxCaptionStr), long style = wxOK | wxCENTRE, const wxPoint& WXUNUSED(pos) = wxDefaultPosition) : wxMessageDialogBase(parent, message, caption, style) diff --git a/include/wx/motif/radiobox.h b/include/wx/motif/radiobox.h index a2ad8d7b23..79cb25fa54 100644 --- a/include/wx/motif/radiobox.h +++ b/include/wx/motif/radiobox.h @@ -31,7 +31,7 @@ public: int n = 0, const wxString choices[] = NULL, int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr) + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)) { Init(); @@ -45,7 +45,7 @@ public: const wxArrayString& choices, int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr) + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)) { Init(); @@ -61,7 +61,7 @@ public: int n = 0, const wxString choices[] = NULL, int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr); + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos, @@ -69,7 +69,7 @@ public: const wxArrayString& choices, int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr); + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)); // Enabling virtual bool Enable(bool enable = true); diff --git a/include/wx/motif/radiobut.h b/include/wx/motif/radiobut.h index fdaa2ee0b9..43414438a7 100644 --- a/include/wx/motif/radiobut.h +++ b/include/wx/motif/radiobut.h @@ -23,7 +23,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRadioButtonNameStr) + const wxString& name = wxASCII_STR(wxRadioButtonNameStr)) { Create(parent, id, label, pos, size, style, validator, name); } @@ -33,7 +33,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRadioButtonNameStr); + const wxString& name = wxASCII_STR(wxRadioButtonNameStr)); virtual void SetValue(bool val); virtual bool GetValue() const ; diff --git a/include/wx/motif/scrolbar.h b/include/wx/motif/scrolbar.h index 2881124ce7..69ee968a9b 100644 --- a/include/wx/motif/scrolbar.h +++ b/include/wx/motif/scrolbar.h @@ -25,7 +25,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSB_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr) + const wxString& name = wxASCII_STR(wxScrollBarNameStr)) { Create(parent, id, pos, size, style, validator, name); } @@ -34,7 +34,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSB_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr); + const wxString& name = wxASCII_STR(wxScrollBarNameStr)); int GetThumbPosition() const ; inline int GetThumbSize() const { return m_pageSize; } diff --git a/include/wx/motif/slider.h b/include/wx/motif/slider.h index 8d36cb1263..75cd3f4a98 100644 --- a/include/wx/motif/slider.h +++ b/include/wx/motif/slider.h @@ -27,7 +27,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr) + const wxString& name = wxASCII_STR(wxSliderNameStr)) { Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name); } @@ -40,7 +40,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr); + const wxString& name = wxASCII_STR(wxSliderNameStr)); virtual int GetValue() const ; virtual void SetValue(int); diff --git a/include/wx/motif/spinbutt.h b/include/wx/motif/spinbutt.h index 0934abab5a..02268e7d70 100644 --- a/include/wx/motif/spinbutt.h +++ b/include/wx/motif/spinbutt.h @@ -25,7 +25,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_VERTICAL, - const wxString& name = "wxSpinButton") + const wxString& name = wxASCII_STR("wxSpinButton")) : m_up( 0 ), m_down( 0 ), m_pos( 0 ) @@ -39,7 +39,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_VERTICAL, - const wxString& name = "wxSpinButton"); + const wxString& name = wxASCII_STR("wxSpinButton")); // accessors int GetValue() const; diff --git a/include/wx/motif/statbmp.h b/include/wx/motif/statbmp.h index a597a040ab..f63fadab50 100644 --- a/include/wx/motif/statbmp.h +++ b/include/wx/motif/statbmp.h @@ -27,7 +27,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBitmapNameStr) + const wxString& name = wxASCII_STR(wxStaticBitmapNameStr)) { Create(parent, id, label, pos, size, style, name); } @@ -37,7 +37,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBitmapNameStr); + const wxString& name = wxASCII_STR(wxStaticBitmapNameStr)); virtual void SetBitmap(const wxBitmap& bitmap); diff --git a/include/wx/motif/statbox.h b/include/wx/motif/statbox.h index 13dc048db5..accc15c11f 100644 --- a/include/wx/motif/statbox.h +++ b/include/wx/motif/statbox.h @@ -23,7 +23,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBoxNameStr) + const wxString& name = wxASCII_STR(wxStaticBoxNameStr)) { Create(parent, id, label, pos, size, style, name); } @@ -35,7 +35,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBoxNameStr); + const wxString& name = wxASCII_STR(wxStaticBoxNameStr)); virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event)) { diff --git a/include/wx/motif/stattext.h b/include/wx/motif/stattext.h index 2e6ce08699..e8255a2110 100644 --- a/include/wx/motif/stattext.h +++ b/include/wx/motif/stattext.h @@ -23,7 +23,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticTextNameStr) + const wxString& name = wxASCII_STR(wxStaticTextNameStr)) { Create(parent, id, label, pos, size, style, name); } @@ -33,7 +33,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticTextNameStr); + const wxString& name = wxASCII_STR(wxStaticTextNameStr)); // implementation // -------------- diff --git a/include/wx/motif/textctrl.h b/include/wx/motif/textctrl.h index a4ea8ed42d..cc516213f4 100644 --- a/include/wx/motif/textctrl.h +++ b/include/wx/motif/textctrl.h @@ -26,7 +26,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxTextCtrlNameStr) + const wxString& name = wxASCII_STR(wxTextCtrlNameStr)) { Create(parent, id, value, pos, size, style, validator, name); } @@ -36,7 +36,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxTextCtrlNameStr); + const wxString& name = wxASCII_STR(wxTextCtrlNameStr)); // accessors // --------- diff --git a/include/wx/motif/tglbtn.h b/include/wx/motif/tglbtn.h index 7a9c908b0a..2dcf2e8438 100644 --- a/include/wx/motif/tglbtn.h +++ b/include/wx/motif/tglbtn.h @@ -23,7 +23,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr ) + const wxString& name = wxASCII_STR(wxCheckBoxNameStr) ) { Init(); @@ -35,7 +35,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& val = wxDefaultValidator, - const wxString &name = wxCheckBoxNameStr ); + const wxString &name = wxASCII_STR(wxCheckBoxNameStr) ); protected: virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } diff --git a/include/wx/motif/toolbar.h b/include/wx/motif/toolbar.h index b55f72ac82..5f4d3da9bd 100644 --- a/include/wx/motif/toolbar.h +++ b/include/wx/motif/toolbar.h @@ -22,7 +22,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTB_DEFAULT_STYLE, - const wxString& name = wxToolBarNameStr) + const wxString& name = wxASCII_STR(wxToolBarNameStr)) { Init(); @@ -34,7 +34,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTB_DEFAULT_STYLE, - const wxString& name = wxToolBarNameStr); + const wxString& name = wxASCII_STR(wxToolBarNameStr)); virtual ~wxToolBar(); diff --git a/include/wx/motif/toplevel.h b/include/wx/motif/toplevel.h index 5c9f28eb07..f8cbc680e3 100644 --- a/include/wx/motif/toplevel.h +++ b/include/wx/motif/toplevel.h @@ -20,7 +20,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr ) + const wxString& name = wxASCII_STR(wxFrameNameStr) ) { Init(); @@ -32,7 +32,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr ); + const wxString& name = wxASCII_STR(wxFrameNameStr) ); virtual ~wxTopLevelWindowMotif(); diff --git a/include/wx/motif/window.h b/include/wx/motif/window.h index d780c0c241..6029e297ac 100644 --- a/include/wx/motif/window.h +++ b/include/wx/motif/window.h @@ -30,7 +30,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) { Init(); Create(parent, id, pos, size, style, name); @@ -43,7 +43,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr); + const wxString& name = wxASCII_STR(wxPanelNameStr)); // implement base class pure virtuals virtual void SetLabel(const wxString& label); diff --git a/include/wx/msgdlg.h b/include/wx/msgdlg.h index 28e53d320b..3606e0e416 100644 --- a/include/wx/msgdlg.h +++ b/include/wx/msgdlg.h @@ -45,10 +45,12 @@ public: { } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING ButtonLabel(const char *label) : m_label(label), m_stockId(wxID_NONE) { } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING ButtonLabel(const wchar_t *label) : m_label(label), m_stockId(wxID_NONE) @@ -240,7 +242,7 @@ protected: { wxString msg = m_message; if ( !m_extendedMessage.empty() ) - msg << "\n\n" << m_extendedMessage; + msg << wxASCII_STR("\n\n") << m_extendedMessage; return msg; } @@ -314,7 +316,7 @@ private: // ---------------------------------------------------------------------------- int WXDLLIMPEXP_CORE wxMessageBox(const wxString& message, - const wxString& caption = wxMessageBoxCaptionStr, + const wxString& caption = wxASCII_STR(wxMessageBoxCaptionStr), long style = wxOK | wxCENTRE, wxWindow *parent = NULL, int x = wxDefaultCoord, int y = wxDefaultCoord); diff --git a/include/wx/msw/bmpbuttn.h b/include/wx/msw/bmpbuttn.h index ce4e20fed2..983db43b85 100644 --- a/include/wx/msw/bmpbuttn.h +++ b/include/wx/msw/bmpbuttn.h @@ -27,7 +27,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) + const wxString& name = wxASCII_STR(wxButtonNameStr)) { Create(parent, id, bitmap, pos, size, style, validator, name); } @@ -39,7 +39,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); + const wxString& name = wxASCII_STR(wxButtonNameStr)); protected: wxDECLARE_EVENT_TABLE(); diff --git a/include/wx/msw/bmpcbox.h b/include/wx/msw/bmpcbox.h index d71fc8d728..ef7d462b4d 100644 --- a/include/wx/msw/bmpcbox.h +++ b/include/wx/msw/bmpcbox.h @@ -38,7 +38,7 @@ public: const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxBitmapComboBoxNameStr) + const wxString& name = wxASCII_STR(wxBitmapComboBoxNameStr)) : wxComboBox(), wxBitmapComboBoxBase() { @@ -56,7 +56,7 @@ public: const wxArrayString& choices, long style, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxBitmapComboBoxNameStr); + const wxString& name = wxASCII_STR(wxBitmapComboBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -67,7 +67,7 @@ public: const wxString choices[], long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxBitmapComboBoxNameStr); + const wxString& name = wxASCII_STR(wxBitmapComboBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -77,7 +77,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxBitmapComboBoxNameStr); + const wxString& name = wxASCII_STR(wxBitmapComboBoxNameStr)); virtual ~wxBitmapComboBox(); diff --git a/include/wx/msw/button.h b/include/wx/msw/button.h index 980a9b4cad..20d62b7d84 100644 --- a/include/wx/msw/button.h +++ b/include/wx/msw/button.h @@ -26,7 +26,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) + const wxString& name = wxASCII_STR(wxButtonNameStr)) { Init(); @@ -40,7 +40,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); + const wxString& name = wxASCII_STR(wxButtonNameStr)); virtual ~wxButton(); diff --git a/include/wx/msw/calctrl.h b/include/wx/msw/calctrl.h index e455205a71..1f15b1b617 100644 --- a/include/wx/msw/calctrl.h +++ b/include/wx/msw/calctrl.h @@ -19,7 +19,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAL_SHOW_HOLIDAYS, - const wxString& name = wxCalendarNameStr) + const wxString& name = wxASCII_STR(wxCalendarNameStr)) { Init(); @@ -32,7 +32,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAL_SHOW_HOLIDAYS, - const wxString& name = wxCalendarNameStr); + const wxString& name = wxASCII_STR(wxCalendarNameStr)); virtual bool SetDate(const wxDateTime& date) wxOVERRIDE; virtual wxDateTime GetDate() const wxOVERRIDE; diff --git a/include/wx/msw/checkbox.h b/include/wx/msw/checkbox.h index e8d042a1d6..b4cc0bf37f 100644 --- a/include/wx/msw/checkbox.h +++ b/include/wx/msw/checkbox.h @@ -25,7 +25,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr) + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)) { Create(parent, id, label, pos, size, style, validator, name); } @@ -37,7 +37,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)); virtual void SetValue(bool value) wxOVERRIDE; virtual bool GetValue() const wxOVERRIDE; diff --git a/include/wx/msw/checklst.h b/include/wx/msw/checklst.h index 91180c6a3e..e00797787b 100644 --- a/include/wx/msw/checklst.h +++ b/include/wx/msw/checklst.h @@ -30,14 +30,14 @@ public: const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); wxCheckListBox(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, @@ -45,14 +45,14 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); // items may be checked virtual bool IsChecked(unsigned int uiIndex) const wxOVERRIDE; diff --git a/include/wx/msw/choice.h b/include/wx/msw/choice.h index e331c0946d..6c8badd69f 100644 --- a/include/wx/msw/choice.h +++ b/include/wx/msw/choice.h @@ -31,7 +31,7 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr) + const wxString& name = wxASCII_STR(wxChoiceNameStr)) { Init(); Create(parent, id, pos, size, n, choices, style, validator, name); @@ -44,7 +44,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr) + const wxString& name = wxASCII_STR(wxChoiceNameStr)) { Init(); Create(parent, id, pos, size, choices, style, validator, name); @@ -57,7 +57,7 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr); + const wxString& name = wxASCII_STR(wxChoiceNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, @@ -65,7 +65,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr); + const wxString& name = wxASCII_STR(wxChoiceNameStr)); virtual bool Show(bool show = true) wxOVERRIDE; diff --git a/include/wx/msw/combo.h b/include/wx/msw/combo.h index 0bd10d8f62..f96222f875 100644 --- a/include/wx/msw/combo.h +++ b/include/wx/msw/combo.h @@ -45,7 +45,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr) + const wxString& name = wxASCII_STR(wxComboBoxNameStr)) : wxComboCtrlBase() { Init(); @@ -60,7 +60,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); + const wxString& name = wxASCII_STR(wxComboBoxNameStr)); virtual ~wxComboCtrl(); diff --git a/include/wx/msw/combobox.h b/include/wx/msw/combobox.h index 1e0a6e6182..3114d41b0d 100644 --- a/include/wx/msw/combobox.h +++ b/include/wx/msw/combobox.h @@ -33,7 +33,7 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr) + const wxString& name = wxASCII_STR(wxComboBoxNameStr)) { Init(); Create(parent, id, value, pos, size, n, choices, style, validator, name); @@ -47,7 +47,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr) + const wxString& name = wxASCII_STR(wxComboBoxNameStr)) { Init(); @@ -63,7 +63,7 @@ public: const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); + const wxString& name = wxASCII_STR(wxComboBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxString& value, @@ -72,7 +72,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); + const wxString& name = wxASCII_STR(wxComboBoxNameStr)); // See wxComboBoxBase discussion of IsEmpty(). bool IsListEmpty() const { return wxItemContainer::IsEmpty(); } diff --git a/include/wx/msw/commandlinkbutton.h b/include/wx/msw/commandlinkbutton.h index f338a1f998..8930e33127 100644 --- a/include/wx/msw/commandlinkbutton.h +++ b/include/wx/msw/commandlinkbutton.h @@ -31,7 +31,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) + const wxString& name = wxASCII_STR(wxButtonNameStr)) : wxGenericCommandLinkButton() { Create(parent, id, mainLabel, note, pos, size, style, validator, name); @@ -45,7 +45,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); + const wxString& name = wxASCII_STR(wxButtonNameStr)); // overridden base class methods // ----------------------------- diff --git a/include/wx/msw/control.h b/include/wx/msw/control.h index cf754e9ffe..346c2174b7 100644 --- a/include/wx/msw/control.h +++ b/include/wx/msw/control.h @@ -23,7 +23,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxControlNameStr) + const wxString& name = wxASCII_STR(wxControlNameStr)) { Create(parent, id, pos, size, style, validator, name); } @@ -32,7 +32,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxControlNameStr); + const wxString& name = wxASCII_STR(wxControlNameStr)); // Simulates an event diff --git a/include/wx/msw/dialog.h b/include/wx/msw/dialog.h index 12a4651375..ce9e534e02 100644 --- a/include/wx/msw/dialog.h +++ b/include/wx/msw/dialog.h @@ -29,7 +29,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, - const wxString& name = wxDialogNameStr) + const wxString& name = wxASCII_STR(wxDialogNameStr)) { Init(); @@ -41,7 +41,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, - const wxString& name = wxDialogNameStr); + const wxString& name = wxASCII_STR(wxDialogNameStr)); virtual ~wxDialog(); diff --git a/include/wx/msw/dirdlg.h b/include/wx/msw/dirdlg.h index b99ff5b4f8..e17af4b65c 100644 --- a/include/wx/msw/dirdlg.h +++ b/include/wx/msw/dirdlg.h @@ -15,12 +15,12 @@ class WXDLLIMPEXP_CORE wxDirDialog : public wxDirDialogBase { public: wxDirDialog(wxWindow *parent, - const wxString& message = wxDirSelectorPromptStr, + const wxString& message = wxASCII_STR(wxDirSelectorPromptStr), const wxString& defaultPath = wxEmptyString, long style = wxDD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const wxString& name = wxDirDialogNameStr); + const wxString& name = wxASCII_STR(wxDirDialogNameStr)); void SetPath(const wxString& path) wxOVERRIDE; diff --git a/include/wx/msw/filedlg.h b/include/wx/msw/filedlg.h index a83192b6e9..37a9aca01a 100644 --- a/include/wx/msw/filedlg.h +++ b/include/wx/msw/filedlg.h @@ -19,14 +19,14 @@ class WXDLLIMPEXP_CORE wxFileDialog: public wxFileDialogBase { public: wxFileDialog(wxWindow *parent, - const wxString& message = wxFileSelectorPromptStr, + const wxString& message = wxASCII_STR(wxFileSelectorPromptStr), const wxString& defaultDir = wxEmptyString, const wxString& defaultFile = wxEmptyString, - const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + const wxString& wildCard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), long style = wxFD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, - const wxString& name = wxFileDialogNameStr); + const wxString& name = wxASCII_STR(wxFileDialogNameStr)); virtual void GetPaths(wxArrayString& paths) const wxOVERRIDE; virtual void GetFilenames(wxArrayString& files) const wxOVERRIDE; diff --git a/include/wx/msw/frame.h b/include/wx/msw/frame.h index 13cb625b8d..afee10d7df 100644 --- a/include/wx/msw/frame.h +++ b/include/wx/msw/frame.h @@ -26,7 +26,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Init(); @@ -39,7 +39,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); virtual ~wxFrame(); // implement base class pure virtuals @@ -55,7 +55,7 @@ public: #if wxUSE_TOOLBAR virtual wxToolBar* CreateToolBar(long style = -1, wxWindowID id = wxID_ANY, - const wxString& name = wxToolBarNameStr) wxOVERRIDE; + const wxString& name = wxASCII_STR(wxToolBarNameStr)) wxOVERRIDE; #endif // wxUSE_TOOLBAR // Status bar @@ -63,7 +63,7 @@ public: virtual wxStatusBar* OnCreateStatusBar(int number = 1, long style = wxSTB_DEFAULT_STYLE, wxWindowID id = 0, - const wxString& name = wxStatusLineNameStr) wxOVERRIDE; + const wxString& name = wxASCII_STR(wxStatusLineNameStr)) wxOVERRIDE; // Hint to tell framework which status bar to use: the default is to use // native one for the platforms which support it (Win32), the generic one diff --git a/include/wx/msw/gauge.h b/include/wx/msw/gauge.h index 3fb4434272..bd12b0192f 100644 --- a/include/wx/msw/gauge.h +++ b/include/wx/msw/gauge.h @@ -28,7 +28,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr) + const wxString& name = wxASCII_STR(wxGaugeNameStr)) { (void)Create(parent, id, range, pos, size, style, validator, name); } @@ -42,7 +42,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr); + const wxString& name = wxASCII_STR(wxGaugeNameStr)); // set gauge range/value virtual void SetRange(int range) wxOVERRIDE; diff --git a/include/wx/msw/headerctrl.h b/include/wx/msw/headerctrl.h index 80d042eee9..b099ccd412 100644 --- a/include/wx/msw/headerctrl.h +++ b/include/wx/msw/headerctrl.h @@ -31,7 +31,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHD_DEFAULT_STYLE, - const wxString& name = wxHeaderCtrlNameStr) + const wxString& name = wxASCII_STR(wxHeaderCtrlNameStr)) { Init(); @@ -43,7 +43,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHD_DEFAULT_STYLE, - const wxString& name = wxHeaderCtrlNameStr); + const wxString& name = wxASCII_STR(wxHeaderCtrlNameStr)); // Window style handling. virtual void SetWindowStyleFlag(long style) wxOVERRIDE; diff --git a/include/wx/msw/hyperlink.h b/include/wx/msw/hyperlink.h index 8a06771099..fe54820774 100644 --- a/include/wx/msw/hyperlink.h +++ b/include/wx/msw/hyperlink.h @@ -29,7 +29,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHL_DEFAULT_STYLE, - const wxString& name = wxHyperlinkCtrlNameStr) + const wxString& name = wxASCII_STR(wxHyperlinkCtrlNameStr)) { (void)Create(parent, id, label, url, pos, size, style, name); } @@ -41,7 +41,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHL_DEFAULT_STYLE, - const wxString& name = wxHyperlinkCtrlNameStr); + const wxString& name = wxASCII_STR(wxHyperlinkCtrlNameStr)); // overridden base class methods diff --git a/include/wx/msw/listbox.h b/include/wx/msw/listbox.h index 78e310b306..88eff303a1 100644 --- a/include/wx/msw/listbox.h +++ b/include/wx/msw/listbox.h @@ -44,7 +44,7 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr) + const wxString& name = wxASCII_STR(wxListBoxNameStr)) { Init(); @@ -56,7 +56,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr) + const wxString& name = wxASCII_STR(wxListBoxNameStr)) { Init(); @@ -69,14 +69,14 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); virtual ~wxListBox(); diff --git a/include/wx/msw/listctrl.h b/include/wx/msw/listctrl.h index bafac8bc09..64bac9ca90 100644 --- a/include/wx/msw/listctrl.h +++ b/include/wx/msw/listctrl.h @@ -87,7 +87,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListCtrlNameStr) + const wxString& name = wxASCII_STR(wxListCtrlNameStr)) { Init(); @@ -102,7 +102,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListCtrlNameStr); + const wxString& name = wxASCII_STR(wxListCtrlNameStr)); // Attributes diff --git a/include/wx/msw/mdi.h b/include/wx/msw/mdi.h index c0fd25282b..209fdd5277 100644 --- a/include/wx/msw/mdi.h +++ b/include/wx/msw/mdi.h @@ -30,7 +30,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Init(); @@ -45,7 +45,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); // override/implement base class [pure] virtual methods // ---------------------------------------------------- @@ -182,7 +182,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Init(); @@ -195,7 +195,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); virtual ~wxMDIChildFrame(); diff --git a/include/wx/msw/minifram.h b/include/wx/msw/minifram.h index c6d86c99da..fe72023b2e 100644 --- a/include/wx/msw/minifram.h +++ b/include/wx/msw/minifram.h @@ -24,7 +24,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION | wxCLIP_CHILDREN | wxRESIZE_BORDER, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { return wxFrame::Create(parent, id, title, pos, size, style | @@ -38,7 +38,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION | wxCLIP_CHILDREN | wxRESIZE_BORDER, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Create(parent, id, title, pos, size, style, name); } diff --git a/include/wx/msw/msgdlg.h b/include/wx/msw/msgdlg.h index 67c81091ba..8996ee9c1b 100644 --- a/include/wx/msw/msgdlg.h +++ b/include/wx/msw/msgdlg.h @@ -16,7 +16,7 @@ class WXDLLIMPEXP_CORE wxMessageDialog : public wxMessageDialogBase public: wxMessageDialog(wxWindow *parent, const wxString& message, - const wxString& caption = wxMessageBoxCaptionStr, + const wxString& caption = wxASCII_STR(wxMessageBoxCaptionStr), long style = wxOK|wxCENTRE, const wxPoint& WXUNUSED(pos) = wxDefaultPosition) : wxMessageDialogBase(parent, message, caption, style) diff --git a/include/wx/msw/notebook.h b/include/wx/msw/notebook.h index 316f1d0338..b6a05ce637 100644 --- a/include/wx/msw/notebook.h +++ b/include/wx/msw/notebook.h @@ -35,14 +35,14 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxNotebookNameStr); + const wxString& name = wxASCII_STR(wxNotebookNameStr)); // Create() function bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxNotebookNameStr); + const wxString& name = wxASCII_STR(wxNotebookNameStr)); virtual ~wxNotebook(); // accessors diff --git a/include/wx/msw/ole/dataform.h b/include/wx/msw/ole/dataform.h index b86ac09bb3..af239eb3ec 100644 --- a/include/wx/msw/ole/dataform.h +++ b/include/wx/msw/ole/dataform.h @@ -27,7 +27,9 @@ public: // wxString don't apply when we already rely on implicit conversion of a, // for example, "char *" string to wxDataFormat, and existing code does it wxDataFormat(const wxString& format) { SetId(format); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxDataFormat(const char *format) { SetId(format); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxDataFormat(const wchar_t *format) { SetId(format); } wxDataFormat(const wxCStrData& format) { SetId(format); } diff --git a/include/wx/msw/panel.h b/include/wx/msw/panel.h index 86ba5ec6de..0a1b980473 100644 --- a/include/wx/msw/panel.h +++ b/include/wx/msw/panel.h @@ -26,7 +26,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL | wxNO_BORDER, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) { Create(parent, winid, pos, size, style, name); } @@ -36,7 +36,7 @@ public: wxPanel(wxWindow *parent, int x, int y, int width, int height, long style = wxTAB_TRAVERSAL | wxNO_BORDER, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) { Create(parent, wxID_ANY, wxPoint(x, y), wxSize(width, height), style, name); } diff --git a/include/wx/msw/radiobox.h b/include/wx/msw/radiobox.h index 1564093a19..6c46e7e16b 100644 --- a/include/wx/msw/radiobox.h +++ b/include/wx/msw/radiobox.h @@ -33,7 +33,7 @@ public: int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr) + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)) { Init(); @@ -50,7 +50,7 @@ public: int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr) + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)) { Init(); @@ -69,7 +69,7 @@ public: int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr); + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxString& title, @@ -79,7 +79,7 @@ public: int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr); + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)); // implement the radiobox interface virtual void SetSelection(int n) wxOVERRIDE; diff --git a/include/wx/msw/radiobut.h b/include/wx/msw/radiobut.h index a9621cdff2..a568316edf 100644 --- a/include/wx/msw/radiobut.h +++ b/include/wx/msw/radiobut.h @@ -26,7 +26,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRadioButtonNameStr) + const wxString& name = wxASCII_STR(wxRadioButtonNameStr)) { Init(); @@ -40,7 +40,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRadioButtonNameStr); + const wxString& name = wxASCII_STR(wxRadioButtonNameStr)); // implement the radio button interface virtual void SetValue(bool value); diff --git a/include/wx/msw/richmsgdlg.h b/include/wx/msw/richmsgdlg.h index a1fb60e808..2e24328c2c 100644 --- a/include/wx/msw/richmsgdlg.h +++ b/include/wx/msw/richmsgdlg.h @@ -15,7 +15,7 @@ class WXDLLIMPEXP_CORE wxRichMessageDialog : public wxGenericRichMessageDialog public: wxRichMessageDialog(wxWindow *parent, const wxString& message, - const wxString& caption = wxMessageBoxCaptionStr, + const wxString& caption = wxASCII_STR(wxMessageBoxCaptionStr), long style = wxOK | wxCENTRE) : wxGenericRichMessageDialog(parent, message, caption, style) { } diff --git a/include/wx/msw/scrolbar.h b/include/wx/msw/scrolbar.h index e313f09594..2e8c9aff81 100644 --- a/include/wx/msw/scrolbar.h +++ b/include/wx/msw/scrolbar.h @@ -23,7 +23,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSB_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr) + const wxString& name = wxASCII_STR(wxScrollBarNameStr)) { Create(parent, id, pos, size, style, validator, name); } @@ -32,7 +32,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSB_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr); + const wxString& name = wxASCII_STR(wxScrollBarNameStr)); int GetThumbPosition() const wxOVERRIDE; int GetThumbSize() const wxOVERRIDE { return m_pageSize; } diff --git a/include/wx/msw/slider.h b/include/wx/msw/slider.h index 57495d1568..7aaad33bd5 100644 --- a/include/wx/msw/slider.h +++ b/include/wx/msw/slider.h @@ -28,7 +28,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr) + const wxString& name = wxASCII_STR(wxSliderNameStr)) { Init(); @@ -44,7 +44,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr); + const wxString& name = wxASCII_STR(wxSliderNameStr)); virtual ~wxSlider(); diff --git a/include/wx/msw/statbmp.h b/include/wx/msw/statbmp.h index fb437c9206..990483d06a 100644 --- a/include/wx/msw/statbmp.h +++ b/include/wx/msw/statbmp.h @@ -29,7 +29,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBitmapNameStr) + const wxString& name = wxASCII_STR(wxStaticBitmapNameStr)) { Init(); @@ -42,7 +42,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBitmapNameStr); + const wxString& name = wxASCII_STR(wxStaticBitmapNameStr)); virtual ~wxStaticBitmap() { Free(); } diff --git a/include/wx/msw/statbox.h b/include/wx/msw/statbox.h index 294f1519ae..4b9bc2b565 100644 --- a/include/wx/msw/statbox.h +++ b/include/wx/msw/statbox.h @@ -27,7 +27,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBoxNameStr) + const wxString& name = wxASCII_STR(wxStaticBoxNameStr)) : wxCompositeWindowSettersOnly() { Create(parent, id, label, pos, size, style, name); @@ -38,7 +38,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString &name = wxStaticBoxNameStr) + const wxString &name = wxASCII_STR(wxStaticBoxNameStr)) : wxCompositeWindowSettersOnly() { Create(parent, id, label, pos, size, style, name); @@ -49,14 +49,14 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBoxNameStr); + const wxString& name = wxASCII_STR(wxStaticBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, wxWindow* label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBoxNameStr); + const wxString& name = wxASCII_STR(wxStaticBoxNameStr)); /// Implementation only virtual void GetBordersForSizer(int *borderTop, int *borderOther) const wxOVERRIDE; diff --git a/include/wx/msw/statline.h b/include/wx/msw/statline.h index 2ca5f594e2..e90dd61d39 100644 --- a/include/wx/msw/statline.h +++ b/include/wx/msw/statline.h @@ -25,7 +25,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxLI_HORIZONTAL, - const wxString &name = wxStaticLineNameStr ) + const wxString &name = wxASCII_STR(wxStaticLineNameStr) ) { Create(parent, id, pos, size, style, name); } @@ -35,7 +35,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxLI_HORIZONTAL, - const wxString &name = wxStaticLineNameStr ); + const wxString &name = wxASCII_STR(wxStaticLineNameStr) ); // overridden base class virtuals virtual bool AcceptsFocus() const wxOVERRIDE { return false; } diff --git a/include/wx/msw/stattext.h b/include/wx/msw/stattext.h index 9c9f0fb227..82687f2ea7 100644 --- a/include/wx/msw/stattext.h +++ b/include/wx/msw/stattext.h @@ -22,7 +22,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticTextNameStr) + const wxString& name = wxASCII_STR(wxStaticTextNameStr)) { Create(parent, id, label, pos, size, style, name); } @@ -33,7 +33,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticTextNameStr); + const wxString& name = wxASCII_STR(wxStaticTextNameStr)); // override some methods to resize the window properly virtual void SetLabel(const wxString& label) wxOVERRIDE; diff --git a/include/wx/msw/statusbar.h b/include/wx/msw/statusbar.h index a503a8c1e4..bc554e9ee6 100644 --- a/include/wx/msw/statusbar.h +++ b/include/wx/msw/statusbar.h @@ -26,7 +26,7 @@ public: wxStatusBar(wxWindow *parent, wxWindowID id = wxID_ANY, long style = wxSTB_DEFAULT_STYLE, - const wxString& name = wxStatusBarNameStr) + const wxString& name = wxASCII_STR(wxStatusBarNameStr)) { m_pDC = NULL; (void)Create(parent, id, style, name); @@ -35,7 +35,7 @@ public: bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, long style = wxSTB_DEFAULT_STYLE, - const wxString& name = wxStatusBarNameStr); + const wxString& name = wxASCII_STR(wxStatusBarNameStr)); virtual ~wxStatusBar(); diff --git a/include/wx/msw/textctrl.h b/include/wx/msw/textctrl.h index b173df4575..7a804e2617 100644 --- a/include/wx/msw/textctrl.h +++ b/include/wx/msw/textctrl.h @@ -24,7 +24,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxTextCtrlNameStr) + const wxString& name = wxASCII_STR(wxTextCtrlNameStr)) { Init(); @@ -38,7 +38,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxTextCtrlNameStr); + const wxString& name = wxASCII_STR(wxTextCtrlNameStr)); // overridden wxTextEntry methods // ------------------------------ diff --git a/include/wx/msw/tglbtn.h b/include/wx/msw/tglbtn.h index d04d50fa79..b9658ad106 100644 --- a/include/wx/msw/tglbtn.h +++ b/include/wx/msw/tglbtn.h @@ -26,7 +26,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr) + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)) { Create(parent, id, label, pos, size, style, validator, name); } @@ -38,7 +38,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)); virtual void SetValue(bool value) wxOVERRIDE; virtual bool GetValue() const wxOVERRIDE; @@ -82,7 +82,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr) + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)) { Create(parent, id, label, pos, size, style, validator, name); } @@ -94,7 +94,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)); // deprecated synonym for SetBitmapLabel() wxDEPRECATED_INLINE( void SetLabel(const wxBitmap& bitmap), diff --git a/include/wx/msw/toolbar.h b/include/wx/msw/toolbar.h index 1fa4a5260b..f01cd4e856 100644 --- a/include/wx/msw/toolbar.h +++ b/include/wx/msw/toolbar.h @@ -27,7 +27,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTB_DEFAULT_STYLE, - const wxString& name = wxToolBarNameStr) + const wxString& name = wxASCII_STR(wxToolBarNameStr)) { Init(); @@ -39,7 +39,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTB_DEFAULT_STYLE, - const wxString& name = wxToolBarNameStr); + const wxString& name = wxASCII_STR(wxToolBarNameStr)); virtual ~wxToolBar(); diff --git a/include/wx/msw/toplevel.h b/include/wx/msw/toplevel.h index 5412de421e..3b52341376 100644 --- a/include/wx/msw/toplevel.h +++ b/include/wx/msw/toplevel.h @@ -29,7 +29,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Init(); @@ -42,7 +42,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); virtual ~wxTopLevelWindowMSW(); diff --git a/include/wx/msw/treectrl.h b/include/wx/msw/treectrl.h index 11a654429d..0e62b89197 100644 --- a/include/wx/msw/treectrl.h +++ b/include/wx/msw/treectrl.h @@ -53,7 +53,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxTreeCtrlNameStr) + const wxString& name = wxASCII_STR(wxTreeCtrlNameStr)) { Create(parent, id, pos, size, style, validator, name); } @@ -65,7 +65,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxTreeCtrlNameStr); + const wxString& name = wxASCII_STR(wxTreeCtrlNameStr)); // implement base class pure virtuals // ---------------------------------- diff --git a/include/wx/msw/webview_ie.h b/include/wx/msw/webview_ie.h index eb843f68a3..a7fb5e3171 100644 --- a/include/wx/msw/webview_ie.h +++ b/include/wx/msw/webview_ie.h @@ -55,7 +55,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxWebViewNameStr) + const wxString& name = wxASCII_STR(wxWebViewNameStr)) { Create(parent, id, url, pos, size, style, name); } @@ -68,7 +68,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxWebViewNameStr) wxOVERRIDE; + const wxString& name = wxASCII_STR(wxWebViewNameStr)) wxOVERRIDE; virtual void LoadURL(const wxString& url) wxOVERRIDE; virtual void LoadHistoryItem(wxSharedPtr item) wxOVERRIDE; @@ -190,7 +190,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxWebViewNameStr) wxOVERRIDE + const wxString& name = wxASCII_STR(wxWebViewNameStr)) wxOVERRIDE { return new wxWebViewIE(parent, id, url, pos, size, style, name); } }; diff --git a/include/wx/msw/window.h b/include/wx/msw/window.h index 47203237f1..7f2f5c9575 100644 --- a/include/wx/msw/window.h +++ b/include/wx/msw/window.h @@ -39,7 +39,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) { Init(); Create(parent, id, pos, size, style, name); @@ -52,7 +52,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) { return CreateUsingMSWClass(GetMSWClassName(style), parent, id, pos, size, style, name); @@ -68,7 +68,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr); + const wxString& name = wxASCII_STR(wxPanelNameStr)); // implement base class pure virtuals virtual void SetLabel(const wxString& label) wxOVERRIDE; diff --git a/include/wx/odcombo.h b/include/wx/odcombo.h index 7895179c32..d147cd49b0 100644 --- a/include/wx/odcombo.h +++ b/include/wx/odcombo.h @@ -251,7 +251,7 @@ public: const wxString choices[], long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr) + const wxString& name = wxASCII_STR(wxComboBoxNameStr)) { Init(); @@ -266,7 +266,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); + const wxString& name = wxASCII_STR(wxComboBoxNameStr)); wxOwnerDrawnComboBox(wxWindow *parent, wxWindowID id, @@ -276,7 +276,7 @@ public: const wxArrayString& choices = wxArrayString(), long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); + const wxString& name = wxASCII_STR(wxComboBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -287,7 +287,7 @@ public: const wxString choices[], long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); + const wxString& name = wxASCII_STR(wxComboBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -297,7 +297,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); + const wxString& name = wxASCII_STR(wxComboBoxNameStr)); virtual ~wxOwnerDrawnComboBox(); diff --git a/include/wx/osx/bmpbuttn.h b/include/wx/osx/bmpbuttn.h index fb2a62ae28..8d060516f9 100644 --- a/include/wx/osx/bmpbuttn.h +++ b/include/wx/osx/bmpbuttn.h @@ -26,7 +26,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) + const wxString& name = wxASCII_STR(wxButtonNameStr)) { Create(parent, id, bitmap, pos, size, style, validator, name); } @@ -35,7 +35,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); + const wxString& name = wxASCII_STR(wxButtonNameStr)); protected: diff --git a/include/wx/osx/button.h b/include/wx/osx/button.h index cf20fbcb56..162ad27507 100644 --- a/include/wx/osx/button.h +++ b/include/wx/osx/button.h @@ -26,7 +26,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) + const wxString& name = wxASCII_STR(wxButtonNameStr)) { Create(parent, id, label, pos, size, style, validator, name); } @@ -38,7 +38,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); + const wxString& name = wxASCII_STR(wxButtonNameStr)); virtual void SetLabel(const wxString& label) wxOVERRIDE; virtual wxWindow *SetDefault() wxOVERRIDE; diff --git a/include/wx/osx/checkbox.h b/include/wx/osx/checkbox.h index 9734b60413..87bae724a8 100644 --- a/include/wx/osx/checkbox.h +++ b/include/wx/osx/checkbox.h @@ -20,7 +20,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr) + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)) { Create(parent, id, label, pos, size, style, validator, name); } @@ -29,7 +29,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)); virtual void SetValue(bool) wxOVERRIDE; virtual bool GetValue() const wxOVERRIDE; @@ -60,7 +60,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr) + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)) { Create(parent, id, label, pos, size, style, validator, name); } @@ -69,7 +69,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)); virtual void SetValue(bool) wxOVERRIDE; virtual bool GetValue() const wxOVERRIDE; virtual void SetLabel(const wxBitmap *bitmap); diff --git a/include/wx/osx/checklst.h b/include/wx/osx/checklst.h index 3039639a54..5c085c6828 100644 --- a/include/wx/osx/checklst.h +++ b/include/wx/osx/checklst.h @@ -25,7 +25,7 @@ public: const wxString *choices = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr) + const wxString& name = wxASCII_STR(wxListBoxNameStr)) { Init(); @@ -38,7 +38,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr) + const wxString& name = wxASCII_STR(wxListBoxNameStr)) { Init(); @@ -53,7 +53,7 @@ public: const wxString *choices = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, @@ -61,7 +61,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); // items may be checked bool IsChecked(unsigned int uiIndex) const wxOVERRIDE; diff --git a/include/wx/osx/choice.h b/include/wx/osx/choice.h index ca3984a6d5..37486f8a7c 100644 --- a/include/wx/osx/choice.h +++ b/include/wx/osx/choice.h @@ -36,7 +36,7 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr) + const wxString& name = wxASCII_STR(wxChoiceNameStr)) { Create(parent, id, pos, size, n, choices, style, validator, name); } @@ -46,7 +46,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr) + const wxString& name = wxASCII_STR(wxChoiceNameStr)) { Create(parent, id, pos, size, choices, style, validator, name); } @@ -57,14 +57,14 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr); + const wxString& name = wxASCII_STR(wxChoiceNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr); + const wxString& name = wxASCII_STR(wxChoiceNameStr)); virtual unsigned int GetCount() const wxOVERRIDE; virtual int GetSelection() const wxOVERRIDE; diff --git a/include/wx/osx/combobox.h b/include/wx/osx/combobox.h index 3d00efd9b8..7ee424fff0 100644 --- a/include/wx/osx/combobox.h +++ b/include/wx/osx/combobox.h @@ -47,7 +47,7 @@ class WXDLLIMPEXP_CORE wxComboBox : int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr) + const wxString& name = wxASCII_STR(wxComboBoxNameStr)) { Create(parent, id, value, pos, size, n, choices, style, validator, name); } @@ -59,7 +59,7 @@ class WXDLLIMPEXP_CORE wxComboBox : const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr) + const wxString& name = wxASCII_STR(wxComboBoxNameStr)) { Create(parent, id, value, pos, size, choices, style, validator, name); } @@ -71,7 +71,7 @@ class WXDLLIMPEXP_CORE wxComboBox : int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); + const wxString& name = wxASCII_STR(wxComboBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxString& value, @@ -80,7 +80,7 @@ class WXDLLIMPEXP_CORE wxComboBox : const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); + const wxString& name = wxASCII_STR(wxComboBoxNameStr)); virtual int GetSelection() const wxOVERRIDE; virtual void GetSelection(long *from, long *to) const wxOVERRIDE; diff --git a/include/wx/osx/control.h b/include/wx/osx/control.h index e259e928e7..f520ddac5e 100644 --- a/include/wx/osx/control.h +++ b/include/wx/osx/control.h @@ -24,7 +24,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxControlNameStr) + const wxString& name = wxASCII_STR(wxControlNameStr)) { Create(parent, winid, pos, size, style, validator, name); } @@ -33,7 +33,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxControlNameStr); + const wxString& name = wxASCII_STR(wxControlNameStr)); // Simulates an event virtual void Command(wxCommandEvent& event) wxOVERRIDE { ProcessCommand(event); } diff --git a/include/wx/osx/dataview.h b/include/wx/osx/dataview.h index 836581e2a8..a7a58d6f54 100644 --- a/include/wx/osx/dataview.h +++ b/include/wx/osx/dataview.h @@ -134,7 +134,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxDataViewCtrlNameStr ) + const wxString& name = wxASCII_STR(wxDataViewCtrlNameStr) ) { Init(); Create(parent, winid, pos, size, style, validator, name); @@ -148,7 +148,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxDataViewCtrlNameStr); + const wxString& name = wxASCII_STR(wxDataViewCtrlNameStr)); virtual wxWindow* GetMainWindow() // not used for the native implementation { diff --git a/include/wx/osx/dialog.h b/include/wx/osx/dialog.h index 2e0c7a847f..7abbc7493a 100644 --- a/include/wx/osx/dialog.h +++ b/include/wx/osx/dialog.h @@ -30,7 +30,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, - const wxString& name = wxDialogNameStr) + const wxString& name = wxASCII_STR(wxDialogNameStr)) { Init(); Create(parent, id, title, pos, size, style, name); @@ -41,7 +41,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, - const wxString& name = wxDialogNameStr); + const wxString& name = wxASCII_STR(wxDialogNameStr)); virtual ~wxDialog(); diff --git a/include/wx/osx/dirdlg.h b/include/wx/osx/dirdlg.h index 66646c8a4f..f8ab61110c 100644 --- a/include/wx/osx/dirdlg.h +++ b/include/wx/osx/dirdlg.h @@ -21,12 +21,12 @@ public: wxDirDialog() { Init(); } wxDirDialog(wxWindow *parent, - const wxString& message = wxDirSelectorPromptStr, + const wxString& message = wxASCII_STR(wxDirSelectorPromptStr), const wxString& defaultPath = wxT(""), long style = wxDD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const wxString& name = wxDirDialogNameStr) + const wxString& name = wxASCII_STR(wxDirDialogNameStr)) { Init(); @@ -34,12 +34,12 @@ public: } void Create(wxWindow *parent, - const wxString& message = wxDirSelectorPromptStr, + const wxString& message = wxASCII_STR(wxDirSelectorPromptStr), const wxString& defaultPath = wxT(""), long style = wxDD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const wxString& name = wxDirDialogNameStr); + const wxString& name = wxASCII_STR(wxDirDialogNameStr)); #if wxOSX_USE_COCOA ~wxDirDialog(); diff --git a/include/wx/osx/filedlg.h b/include/wx/osx/filedlg.h index 38295ac8a5..9278239bfc 100644 --- a/include/wx/osx/filedlg.h +++ b/include/wx/osx/filedlg.h @@ -32,14 +32,14 @@ protected: public: wxFileDialog() { Init(); } wxFileDialog(wxWindow *parent, - const wxString& message = wxFileSelectorPromptStr, + const wxString& message = wxASCII_STR(wxFileSelectorPromptStr), const wxString& defaultDir = wxEmptyString, const wxString& defaultFile = wxEmptyString, - const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + const wxString& wildCard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), long style = wxFD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, - const wxString& name = wxFileDialogNameStr) + const wxString& name = wxASCII_STR(wxFileDialogNameStr)) { Init(); @@ -47,14 +47,14 @@ public: } void Create(wxWindow *parent, - const wxString& message = wxFileSelectorPromptStr, + const wxString& message = wxASCII_STR(wxFileSelectorPromptStr), const wxString& defaultDir = wxEmptyString, const wxString& defaultFile = wxEmptyString, - const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + const wxString& wildCard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), long style = wxFD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, - const wxString& name = wxFileDialogNameStr); + const wxString& name = wxASCII_STR(wxFileDialogNameStr)); #if wxOSX_USE_COCOA ~wxFileDialog(); diff --git a/include/wx/osx/frame.h b/include/wx/osx/frame.h index 4ced3174c9..155e7ccf3a 100644 --- a/include/wx/osx/frame.h +++ b/include/wx/osx/frame.h @@ -28,7 +28,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Create(parent, id, title, pos, size, style, name); } @@ -39,7 +39,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); // implementation only from now on // ------------------------------- @@ -60,7 +60,7 @@ public: #if wxUSE_TOOLBAR virtual wxToolBar* CreateToolBar(long style = -1, wxWindowID id = -1, - const wxString& name = wxToolBarNameStr) wxOVERRIDE; + const wxString& name = wxASCII_STR(wxToolBarNameStr)) wxOVERRIDE; virtual void SetToolBar(wxToolBar *toolbar) wxOVERRIDE; #endif // wxUSE_TOOLBAR @@ -70,7 +70,7 @@ public: virtual wxStatusBar* OnCreateStatusBar(int number = 1, long style = wxSTB_DEFAULT_STYLE, wxWindowID id = 0, - const wxString& name = wxStatusLineNameStr) wxOVERRIDE; + const wxString& name = wxASCII_STR(wxStatusLineNameStr)) wxOVERRIDE; #endif // wxUSE_STATUSBAR void PositionBars(); diff --git a/include/wx/osx/gauge.h b/include/wx/osx/gauge.h index c4d22dbfa1..fe012ad03d 100644 --- a/include/wx/osx/gauge.h +++ b/include/wx/osx/gauge.h @@ -25,7 +25,7 @@ class WXDLLIMPEXP_CORE wxGauge: public wxGaugeBase const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr) + const wxString& name = wxASCII_STR(wxGaugeNameStr)) { Create(parent, id, range, pos, size, style, validator, name); } @@ -36,7 +36,7 @@ class WXDLLIMPEXP_CORE wxGauge: public wxGaugeBase const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr); + const wxString& name = wxASCII_STR(wxGaugeNameStr)); // set gauge range/value virtual void SetRange(int range) wxOVERRIDE; diff --git a/include/wx/osx/listbox.h b/include/wx/osx/listbox.h index 3581f5611e..5e8949e700 100644 --- a/include/wx/osx/listbox.h +++ b/include/wx/osx/listbox.h @@ -49,7 +49,7 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr) + const wxString& name = wxASCII_STR(wxListBoxNameStr)) { Create(parent, winid, pos, size, n, choices, style, validator, name); } @@ -62,7 +62,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr) + const wxString& name = wxASCII_STR(wxListBoxNameStr)) { Create(parent, winid, pos, size, choices, style, validator, name); } @@ -76,7 +76,7 @@ public: const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); bool Create( wxWindow *parent, @@ -86,7 +86,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); virtual ~wxListBox(); diff --git a/include/wx/osx/mdi.h b/include/wx/osx/mdi.h index ad6d5cc5fe..9557380612 100644 --- a/include/wx/osx/mdi.h +++ b/include/wx/osx/mdi.h @@ -22,7 +22,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Init(); Create(parent, id, title, pos, size, style, name); @@ -34,7 +34,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); virtual ~wxMDIParentFrame(); @@ -102,7 +102,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Init() ; Create(parent, id, title, pos, size, style, name); @@ -114,7 +114,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); virtual ~wxMDIChildFrame(); diff --git a/include/wx/osx/minifram.h b/include/wx/osx/minifram.h index a4180f975e..5b06f33b13 100644 --- a/include/wx/osx/minifram.h +++ b/include/wx/osx/minifram.h @@ -27,7 +27,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION | wxRESIZE_BORDER | wxTINY_CAPTION, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { // Use wxFrame constructor in absence of more specific code. Create(parent, id, title, pos, size, style | wxFRAME_TOOL_WINDOW | wxFRAME_FLOAT_ON_PARENT , name); diff --git a/include/wx/osx/msgdlg.h b/include/wx/osx/msgdlg.h index 1374ebda85..e82e1c8e5e 100644 --- a/include/wx/osx/msgdlg.h +++ b/include/wx/osx/msgdlg.h @@ -17,7 +17,7 @@ class WXDLLIMPEXP_CORE wxMessageDialog : public wxMessageDialogBase public: wxMessageDialog(wxWindow *parent, const wxString& message, - const wxString& caption = wxMessageBoxCaptionStr, + const wxString& caption = wxASCII_STR(wxMessageBoxCaptionStr), long style = wxOK|wxCENTRE, const wxPoint& pos = wxDefaultPosition); diff --git a/include/wx/osx/nonownedwnd.h b/include/wx/osx/nonownedwnd.h index af2c7bf3ed..48dc9fac3f 100644 --- a/include/wx/osx/nonownedwnd.h +++ b/include/wx/osx/nonownedwnd.h @@ -42,7 +42,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) { Init(); @@ -54,7 +54,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr); + const wxString& name = wxASCII_STR(wxPanelNameStr)); bool Create(wxWindow *parent, WXWindow nativeWindow); diff --git a/include/wx/osx/notebook.h b/include/wx/osx/notebook.h index c8e706f080..13eca4415f 100644 --- a/include/wx/osx/notebook.h +++ b/include/wx/osx/notebook.h @@ -40,7 +40,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxNotebookNameStr) + const wxString& name = wxASCII_STR(wxNotebookNameStr)) { Create( parent, id, pos, size, style, name ); } // Create() function bool Create(wxWindow *parent, @@ -48,7 +48,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxNotebookNameStr); + const wxString& name = wxASCII_STR(wxNotebookNameStr)); // dtor virtual ~wxNotebook(); diff --git a/include/wx/osx/radiobox.h b/include/wx/osx/radiobox.h index c147241dbe..9f710cc3f8 100644 --- a/include/wx/osx/radiobox.h +++ b/include/wx/osx/radiobox.h @@ -28,7 +28,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, int n = 0, const wxString choices[] = NULL, int majorDim = 0, long style = wxRA_SPECIFY_COLS, - const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr) + const wxValidator& val = wxDefaultValidator, const wxString& name = wxASCII_STR(wxRadioBoxNameStr)) { Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name); } @@ -37,7 +37,7 @@ public: const wxArrayString& choices, int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr) + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)) { Create(parent, id, title, pos, size, choices, majorDim, style, val, name); @@ -47,13 +47,13 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, int n = 0, const wxString choices[] = NULL, int majorDim = 0, long style = wxRA_SPECIFY_COLS, - const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr); + const wxValidator& val = wxDefaultValidator, const wxString& name = wxASCII_STR(wxRadioBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr); + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)); // Enabling virtual bool Enable(bool enable = true) wxOVERRIDE; diff --git a/include/wx/osx/radiobut.h b/include/wx/osx/radiobut.h index 73291b8d02..e968d80acd 100644 --- a/include/wx/osx/radiobut.h +++ b/include/wx/osx/radiobut.h @@ -22,7 +22,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRadioButtonNameStr) + const wxString& name = wxASCII_STR(wxRadioButtonNameStr)) { Create(parent, id, label, pos, size, style, validator, name); } @@ -33,7 +33,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRadioButtonNameStr); + const wxString& name = wxASCII_STR(wxRadioButtonNameStr)); virtual void SetValue(bool val); virtual bool GetValue() const ; diff --git a/include/wx/osx/scrolbar.h b/include/wx/osx/scrolbar.h index fdfc105d97..1142ec0064 100644 --- a/include/wx/osx/scrolbar.h +++ b/include/wx/osx/scrolbar.h @@ -24,7 +24,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSB_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr) + const wxString& name = wxASCII_STR(wxScrollBarNameStr)) { Create(parent, id, pos, size, style, validator, name); } @@ -34,7 +34,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSB_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr); + const wxString& name = wxASCII_STR(wxScrollBarNameStr)); virtual int GetThumbPosition() const wxOVERRIDE; virtual int GetThumbSize() const wxOVERRIDE { return m_viewSize; } diff --git a/include/wx/osx/slider.h b/include/wx/osx/slider.h index 848da62e72..70915e44bb 100644 --- a/include/wx/osx/slider.h +++ b/include/wx/osx/slider.h @@ -28,7 +28,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr) + const wxString& name = wxASCII_STR(wxSliderNameStr)) { Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name); } @@ -41,7 +41,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr); + const wxString& name = wxASCII_STR(wxSliderNameStr)); virtual int GetValue() const wxOVERRIDE; virtual void SetValue(int) wxOVERRIDE; diff --git a/include/wx/osx/srchctrl.h b/include/wx/osx/srchctrl.h index 2bef62b75e..1fdc12cd4a 100644 --- a/include/wx/osx/srchctrl.h +++ b/include/wx/osx/srchctrl.h @@ -27,7 +27,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSearchCtrlNameStr); + const wxString& name = wxASCII_STR(wxSearchCtrlNameStr)); virtual ~wxSearchCtrl(); @@ -37,7 +37,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSearchCtrlNameStr); + const wxString& name = wxASCII_STR(wxSearchCtrlNameStr)); #if wxUSE_MENUS // get/set search button menu diff --git a/include/wx/osx/statbmp.h b/include/wx/osx/statbmp.h index 4ba4e069d0..93d5cf836e 100644 --- a/include/wx/osx/statbmp.h +++ b/include/wx/osx/statbmp.h @@ -13,7 +13,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBitmapNameStr) + const wxString& name = wxASCII_STR(wxStaticBitmapNameStr)) { Create(parent, id, bitmap, pos, size, style, name); } @@ -24,7 +24,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBitmapNameStr); + const wxString& name = wxASCII_STR(wxStaticBitmapNameStr)); virtual void SetBitmap(const wxBitmap& bitmap) wxOVERRIDE; diff --git a/include/wx/osx/statbox.h b/include/wx/osx/statbox.h index 364c478fd2..6c0422b9a8 100644 --- a/include/wx/osx/statbox.h +++ b/include/wx/osx/statbox.h @@ -22,7 +22,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBoxNameStr) + const wxString& name = wxASCII_STR(wxStaticBoxNameStr)) { Create(parent, id, label, pos, size, style, name); } @@ -32,7 +32,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBoxNameStr); + const wxString& name = wxASCII_STR(wxStaticBoxNameStr)); virtual void Command(wxCommandEvent& WXUNUSED(event)) wxOVERRIDE {} virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {} diff --git a/include/wx/osx/statline.h b/include/wx/osx/statline.h index 204c8759bc..6401a77fed 100644 --- a/include/wx/osx/statline.h +++ b/include/wx/osx/statline.h @@ -27,7 +27,7 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, - const wxString &name = wxStaticLineNameStr ) + const wxString &name = wxASCII_STR(wxStaticLineNameStr) ) : m_statbox(NULL) { Create(parent, id, pos, size, style, name); @@ -38,7 +38,7 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, - const wxString &name = wxStaticLineNameStr ); + const wxString &name = wxASCII_STR(wxStaticLineNameStr) ); // it's necessary to override this wxWindow function because we // will want to return the main widget for m_statbox diff --git a/include/wx/osx/stattext.h b/include/wx/osx/stattext.h index 87136c1861..89146a18df 100644 --- a/include/wx/osx/stattext.h +++ b/include/wx/osx/stattext.h @@ -21,7 +21,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticTextNameStr) + const wxString& name = wxASCII_STR(wxStaticTextNameStr)) { Create(parent, id, label, pos, size, style, name); } @@ -31,7 +31,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticTextNameStr); + const wxString& name = wxASCII_STR(wxStaticTextNameStr)); // accessors void SetLabel( const wxString &str ) wxOVERRIDE; diff --git a/include/wx/osx/statusbr.h b/include/wx/osx/statusbr.h index d94c87de37..9b6e84e56a 100644 --- a/include/wx/osx/statusbr.h +++ b/include/wx/osx/statusbr.h @@ -18,13 +18,13 @@ public: wxStatusBarMac(); wxStatusBarMac(wxWindow *parent, wxWindowID id = wxID_ANY, long style = wxSTB_DEFAULT_STYLE, - const wxString& name = wxStatusBarNameStr); + const wxString& name = wxASCII_STR(wxStatusBarNameStr)); virtual ~wxStatusBarMac(); bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, long style = wxSTB_DEFAULT_STYLE, - const wxString& name = wxStatusBarNameStr); + const wxString& name = wxASCII_STR(wxStatusBarNameStr)); // Implementation virtual void MacHiliteChanged() wxOVERRIDE; diff --git a/include/wx/osx/textctrl.h b/include/wx/osx/textctrl.h index 4afe69def4..d3bb9ce057 100644 --- a/include/wx/osx/textctrl.h +++ b/include/wx/osx/textctrl.h @@ -40,7 +40,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxTextCtrlNameStr) + const wxString& name = wxASCII_STR(wxTextCtrlNameStr)) { Init(); Create(parent, id, value, pos, size, style, validator, name); @@ -55,7 +55,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxTextCtrlNameStr); + const wxString& name = wxASCII_STR(wxTextCtrlNameStr)); // accessors // --------- diff --git a/include/wx/osx/tglbtn.h b/include/wx/osx/tglbtn.h index 8f7697b334..3099c5cd5d 100644 --- a/include/wx/osx/tglbtn.h +++ b/include/wx/osx/tglbtn.h @@ -23,7 +23,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr) + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)) { Create(parent, id, label, pos, size, style, validator, name); } @@ -35,7 +35,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)); virtual void SetValue(bool value) wxOVERRIDE; virtual bool GetValue() const wxOVERRIDE; @@ -63,7 +63,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr) + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)) { Create(parent, id, label, pos, size, style, validator, name); } @@ -75,7 +75,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)); private: wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapToggleButton); diff --git a/include/wx/osx/toolbar.h b/include/wx/osx/toolbar.h index 52febf14a3..983d1ec49b 100644 --- a/include/wx/osx/toolbar.h +++ b/include/wx/osx/toolbar.h @@ -29,7 +29,7 @@ public: wxToolBar(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTB_DEFAULT_STYLE, - const wxString& name = wxToolBarNameStr) + const wxString& name = wxASCII_STR(wxToolBarNameStr)) { Init(); Create(parent, id, pos, size, style, name); @@ -38,7 +38,7 @@ public: bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTB_DEFAULT_STYLE, - const wxString& name = wxToolBarNameStr); + const wxString& name = wxASCII_STR(wxToolBarNameStr)); virtual void SetWindowStyleFlag(long style) wxOVERRIDE; diff --git a/include/wx/osx/toplevel.h b/include/wx/osx/toplevel.h index c54528d97a..bde2671a14 100644 --- a/include/wx/osx/toplevel.h +++ b/include/wx/osx/toplevel.h @@ -27,7 +27,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Init(); @@ -42,7 +42,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); bool Create(wxWindow *parent, WXWindow nativeWindow); diff --git a/include/wx/osx/webview_webkit.h b/include/wx/osx/webview_webkit.h index 96a57a1708..d7c8a91e5f 100644 --- a/include/wx/osx/webview_webkit.h +++ b/include/wx/osx/webview_webkit.h @@ -33,19 +33,19 @@ public: wxWebViewWebKit() {} wxWebViewWebKit(wxWindow *parent, wxWindowID winID = wxID_ANY, - const wxString& strURL = wxWebViewDefaultURLStr, + const wxString& strURL = wxASCII_STR(wxWebViewDefaultURLStr), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxWebViewNameStr) + const wxString& name = wxASCII_STR(wxWebViewNameStr)) { Create(parent, winID, strURL, pos, size, style, name); } bool Create(wxWindow *parent, wxWindowID winID = wxID_ANY, - const wxString& strURL = wxWebViewDefaultURLStr, + const wxString& strURL = wxASCII_STR(wxWebViewDefaultURLStr), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxWebViewNameStr) wxOVERRIDE; + const wxString& name = wxASCII_STR(wxWebViewNameStr)) wxOVERRIDE; virtual ~wxWebViewWebKit(); virtual bool CanGoBack() const wxOVERRIDE; @@ -181,7 +181,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxWebViewNameStr) + const wxString& name = wxASCII_STR(wxWebViewNameStr)) { return new wxWebViewWebKit(parent, id, url, pos, size, style, name); } }; diff --git a/include/wx/osx/window.h b/include/wx/osx/window.h index 2b14153541..19cd7d21d7 100644 --- a/include/wx/osx/window.h +++ b/include/wx/osx/window.h @@ -40,7 +40,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr ); + const wxString& name = wxASCII_STR(wxPanelNameStr) ); virtual ~wxWindowMac(); @@ -49,7 +49,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr ); + const wxString& name = wxASCII_STR(wxPanelNameStr) ); virtual void SendSizeEvent(int flags = 0) wxOVERRIDE; diff --git a/include/wx/panel.h b/include/wx/panel.h index e11db6728b..d07724ae7b 100644 --- a/include/wx/panel.h +++ b/include/wx/panel.h @@ -39,7 +39,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL | wxNO_BORDER, - const wxString& name = wxPanelNameStr); + const wxString& name = wxASCII_STR(wxPanelNameStr)); */ // Pseudo ctor @@ -48,7 +48,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL | wxNO_BORDER, - const wxString& name = wxPanelNameStr); + const wxString& name = wxASCII_STR(wxPanelNameStr)); // implementation from now on diff --git a/include/wx/persist/dataview.h b/include/wx/persist/dataview.h index ee10c02480..e673eedac6 100644 --- a/include/wx/persist/dataview.h +++ b/include/wx/persist/dataview.h @@ -58,8 +58,8 @@ public: const wxString columnPrefix = MakeColumnPrefix(column); // Save the column attributes. - SaveValue(columnPrefix + wxPERSIST_DVC_HIDDEN, column->IsHidden()); - SaveValue(columnPrefix + wxPERSIST_DVC_POS, + SaveValue(columnPrefix + wxASCII_STR(wxPERSIST_DVC_HIDDEN), column->IsHidden()); + SaveValue(columnPrefix + wxASCII_STR(wxPERSIST_DVC_POS), control->GetColumnPosition(column)); // We take special care to save only the specified width instead of @@ -69,7 +69,7 @@ public: // entire control width. const int width = column->WXGetSpecifiedWidth(); if ( width > 0 ) - SaveValue(columnPrefix + wxPERSIST_DVC_WIDTH, width); + SaveValue(columnPrefix + wxASCII_STR(wxPERSIST_DVC_WIDTH), width); // Check if this column is the current sort key. if ( column->IsSortKey() ) @@ -84,8 +84,8 @@ public: // Save the sort key and direction if there is a valid sort. if ( sortColumn ) { - SaveValue(wxPERSIST_DVC_SORT_KEY, sortColumn->GetTitle()); - SaveValue(wxPERSIST_DVC_SORT_ASC, + SaveValue(wxASCII_STR(wxPERSIST_DVC_SORT_KEY), sortColumn->GetTitle()); + SaveValue(wxASCII_STR(wxPERSIST_DVC_SORT_ASC), sortColumn->IsSortOrderAscending()); } } @@ -105,12 +105,12 @@ public: // Restore column hidden status. bool hidden; - if ( RestoreValue(columnPrefix + wxPERSIST_DVC_HIDDEN, &hidden) ) + if ( RestoreValue(columnPrefix + wxASCII_STR(wxPERSIST_DVC_HIDDEN), &hidden) ) column->SetHidden(hidden); // Restore the column width. int width; - if ( RestoreValue(columnPrefix + wxPERSIST_DVC_WIDTH, &width) ) + if ( RestoreValue(columnPrefix + wxASCII_STR(wxPERSIST_DVC_WIDTH), &width) ) column->SetWidth(width); // TODO: Set the column's view position. @@ -120,13 +120,13 @@ public: // criteria. wxString sortColumn; if ( control->GetModel() && - RestoreValue(wxPERSIST_DVC_SORT_KEY, &sortColumn) && + RestoreValue(wxASCII_STR(wxPERSIST_DVC_SORT_KEY), &sortColumn) && !sortColumn.empty() ) { bool sortAsc = true; if ( wxDataViewColumn* column = GetColumnByTitle(control, sortColumn) ) { - RestoreValue(wxPERSIST_DVC_SORT_ASC, &sortAsc); + RestoreValue(wxASCII_STR(wxPERSIST_DVC_SORT_ASC), &sortAsc); column->SetSortOrder(sortAsc); // Resort the control based on the new sort criteria. @@ -139,14 +139,14 @@ public: virtual wxString GetKind() const wxOVERRIDE { - return wxPERSIST_DVC_KIND; + return wxASCII_STR(wxPERSIST_DVC_KIND); } private: // Return a (slash-terminated) prefix for the column-specific entries. static wxString MakeColumnPrefix(const wxDataViewColumn* column) { - return wxString::Format("/Columns/%s/", column->GetTitle()); + return wxString::Format(wxASCII_STR("/Columns/%s/"), column->GetTitle()); } // Return the column with the given title or NULL. diff --git a/include/wx/persist/toplevel.h b/include/wx/persist/toplevel.h index c1bec8667a..5fd78c2864 100644 --- a/include/wx/persist/toplevel.h +++ b/include/wx/persist/toplevel.h @@ -51,7 +51,7 @@ public: return tlw->RestoreToGeometry(*this); } - virtual wxString GetKind() const wxOVERRIDE { return wxPERSIST_TLW_KIND; } + virtual wxString GetKind() const wxOVERRIDE { return wxASCII_STR(wxPERSIST_TLW_KIND); } private: virtual bool SaveField(const wxString& name, int value) const wxOVERRIDE diff --git a/include/wx/persist/treebook.h b/include/wx/persist/treebook.h index 9a38296879..f3026642f4 100644 --- a/include/wx/persist/treebook.h +++ b/include/wx/persist/treebook.h @@ -51,7 +51,7 @@ public: if ( !expanded.empty() ) expanded += wxPERSIST_TREEBOOK_EXPANDED_SEP; - expanded += wxString::Format("%u", static_cast(n)); + expanded += wxString::Format(wxASCII_STR("%u"), static_cast(n)); } } diff --git a/include/wx/pickerbase.h b/include/wx/pickerbase.h index fc63379b90..a4af0a629c 100644 --- a/include/wx/pickerbase.h +++ b/include/wx/pickerbase.h @@ -50,7 +50,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); + const wxString& name = wxASCII_STR(wxButtonNameStr)); public: // public API diff --git a/include/wx/private/jsscriptwrapper.h b/include/wx/private/jsscriptwrapper.h index e235ea46d3..7a904b1707 100644 --- a/include/wx/private/jsscriptwrapper.h +++ b/include/wx/private/jsscriptwrapper.h @@ -34,7 +34,7 @@ public: // Note that we use a different name for it for each call to // RunScript() (which creates a new wxJSScriptWrapper every time) to // avoid any possible conflict between different calls. - m_outputVarName = wxString::Format("__wxOut%i", (*runScriptCount)++); + m_outputVarName = wxString::Format(wxASCII_STR("__wxOut%i"), (*runScriptCount)++); // Adds one escape level. const char *charsNeededToBeEscaped = "\\\"\n\r\v\t\b\f"; @@ -79,8 +79,8 @@ public: { return wxString::Format ( - "try { var %s = eval(\"%s\"); true; } " - "catch (e) { e.name + \": \" + e.message; }", + wxASCII_STR("try { var %s = eval(\"%s\"); true; } " + "catch (e) { e.name + \": \" + e.message; }"), m_outputVarName, m_escapedCode ); @@ -93,9 +93,9 @@ public: #if wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && defined(__WXOSX__) return wxString::Format ( - "if (typeof %s == 'object') JSON.stringify(%s);" + wxASCII_STR("if (typeof %s == 'object') JSON.stringify(%s);" "else if (typeof %s == 'undefined') 'undefined';" - "else %s;", + "else %s;"), m_outputVarName, m_outputVarName, m_outputVarName, @@ -104,7 +104,7 @@ public: #elif wxUSE_WEBVIEW && wxUSE_WEBVIEW_IE return wxString::Format ( - "try {" + wxASCII_STR("try {" "(%s == null || typeof %s != 'object') ? String(%s)" ": JSON.stringify(%s);" "}" @@ -165,7 +165,7 @@ public: "__wx$stringifyJSON(%s);" "}" "catch (e) { e.name + \": \" + e.message; }" - "}", + "}"), m_outputVarName, m_outputVarName, m_outputVarName, @@ -183,7 +183,7 @@ public: // we executed be garbage-collected. wxString GetCleanUpCode() const { - return wxString::Format("%s = undefined;", m_outputVarName); + return wxString::Format(wxASCII_STR("%s = undefined;"), m_outputVarName); } private: diff --git a/include/wx/private/wxprintf.h b/include/wx/private/wxprintf.h index 40ba87eef0..241a50308a 100644 --- a/include/wx/private/wxprintf.h +++ b/include/wx/private/wxprintf.h @@ -855,10 +855,10 @@ struct wxPrintfConvSpecParser wxFAIL_MSG ( wxString::Format - ( + (wxASCII_STR( "Format string \"%s\" uses both positional " "parameters and '*' but this is not currently " - "supported by this implementation, sorry.", + "supported by this implementation, sorry."), fmt ) ); @@ -929,11 +929,11 @@ struct wxPrintfConvSpecParser wxFAIL_MSG ( wxString::Format - ( + (wxASCII_STR( "wxVsnprintf() currently supports only %d arguments, " "but format string \"%s\" defines more of them.\n" "You need to change wxMAX_SVNPRINTF_ARGUMENTS and " - "recompile if more are really needed.", + "recompile if more are really needed."), fmt, wxMAX_SVNPRINTF_ARGUMENTS ) ); diff --git a/include/wx/prntbase.h b/include/wx/prntbase.h index 1056e27d0e..b82f967516 100644 --- a/include/wx/prntbase.h +++ b/include/wx/prntbase.h @@ -400,11 +400,11 @@ class WXDLLIMPEXP_CORE wxPreviewFrame: public wxFrame public: wxPreviewFrame(wxPrintPreviewBase *preview, wxWindow *parent, - const wxString& title = wxGetTranslation("Print Preview"), + const wxString& title = wxGetTranslation(wxASCII_STR("Print Preview")), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxFRAME_FLOAT_ON_PARENT, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); virtual ~wxPreviewFrame(); // Either Initialize() or InitializeWithModality() must be called before diff --git a/include/wx/propgrid/manager.h b/include/wx/propgrid/manager.h index 2723bdb628..aaed57dd97 100644 --- a/include/wx/propgrid/manager.h +++ b/include/wx/propgrid/manager.h @@ -184,7 +184,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxPGMAN_DEFAULT_STYLE, - const wxString& name = wxPropertyGridManagerNameStr ); + const wxString& name = wxASCII_STR(wxPropertyGridManagerNameStr) ); // Destructor. virtual ~wxPropertyGridManager(); @@ -228,7 +228,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxPGMAN_DEFAULT_STYLE, - const wxString& name = wxPropertyGridManagerNameStr ); + const wxString& name = wxASCII_STR(wxPropertyGridManagerNameStr) ); // Enables or disables (shows/hides) categories according to parameter // enable. diff --git a/include/wx/propgrid/propgrid.h b/include/wx/propgrid/propgrid.h index fced0e19d2..7a34b8f4f1 100644 --- a/include/wx/propgrid/propgrid.h +++ b/include/wx/propgrid/propgrid.h @@ -672,7 +672,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxPG_DEFAULT_STYLE, - const wxString& name = wxPropertyGridNameStr ); + const wxString& name = wxASCII_STR(wxPropertyGridNameStr) ); // Destructor virtual ~wxPropertyGrid(); @@ -741,7 +741,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxPG_DEFAULT_STYLE, - const wxString& name = wxPropertyGridNameStr ); + const wxString& name = wxASCII_STR(wxPropertyGridNameStr) ); // Call when editor widget's contents is modified. // For example, this is called when changes text in wxTextCtrl (used in diff --git a/include/wx/protocol/log.h b/include/wx/protocol/log.h index df373b928f..fa3481b718 100644 --- a/include/wx/protocol/log.h +++ b/include/wx/protocol/log.h @@ -32,12 +32,12 @@ public: // Called by wxProtocol-derived classes to actually log something virtual void LogRequest(const wxString& str) { - DoLogString("==> " + str); + DoLogString(wxASCII_STR("==> ") + str); } virtual void LogResponse(const wxString& str) { - DoLogString("<== " + str); + DoLogString(wxASCII_STR("<== ") + str); } protected: diff --git a/include/wx/qt/bmpbuttn.h b/include/wx/qt/bmpbuttn.h index 85f5afdecd..27f5a353a9 100644 --- a/include/wx/qt/bmpbuttn.h +++ b/include/wx/qt/bmpbuttn.h @@ -20,7 +20,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); + const wxString& name = wxASCII_STR(wxButtonNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -29,7 +29,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); + const wxString& name = wxASCII_STR(wxButtonNameStr)); protected: wxDECLARE_DYNAMIC_CLASS(wxBitmapButton); diff --git a/include/wx/qt/button.h b/include/wx/qt/button.h index 3560267734..06cfb10876 100644 --- a/include/wx/qt/button.h +++ b/include/wx/qt/button.h @@ -20,14 +20,14 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); + const wxString& name = wxASCII_STR(wxButtonNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxString& label = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); + const wxString& name = wxASCII_STR(wxButtonNameStr)); virtual wxWindow *SetDefault() wxOVERRIDE; diff --git a/include/wx/qt/calctrl.h b/include/wx/qt/calctrl.h index abdf32c31e..dde92af2a3 100644 --- a/include/wx/qt/calctrl.h +++ b/include/wx/qt/calctrl.h @@ -23,7 +23,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAL_SHOW_HOLIDAYS, - const wxString& name = wxCalendarNameStr) + const wxString& name = wxASCII_STR(wxCalendarNameStr)) { Init(); Create(parent, id, date, pos, size, style, name); @@ -37,7 +37,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAL_SHOW_HOLIDAYS, - const wxString& name = wxCalendarNameStr); + const wxString& name = wxASCII_STR(wxCalendarNameStr)); virtual bool SetDate(const wxDateTime& date) wxOVERRIDE; virtual wxDateTime GetDate() const wxOVERRIDE; diff --git a/include/wx/qt/checkbox.h b/include/wx/qt/checkbox.h index ad59788c36..2f0500fed6 100644 --- a/include/wx/qt/checkbox.h +++ b/include/wx/qt/checkbox.h @@ -18,7 +18,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -27,7 +27,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr ); + const wxString& name = wxASCII_STR(wxCheckBoxNameStr) ); virtual void SetValue(bool value) wxOVERRIDE; virtual bool GetValue() const wxOVERRIDE; diff --git a/include/wx/qt/checklst.h b/include/wx/qt/checklst.h index 243225acf1..a0bdbda805 100644 --- a/include/wx/qt/checklst.h +++ b/include/wx/qt/checklst.h @@ -19,14 +19,14 @@ public: const wxString *choices = (const wxString *)NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); wxCheckListBox(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); virtual ~wxCheckListBox(); @@ -37,14 +37,14 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); virtual bool IsChecked(unsigned int item) const wxOVERRIDE; virtual void Check(unsigned int item, bool check = true) wxOVERRIDE; diff --git a/include/wx/qt/choice.h b/include/wx/qt/choice.h index 5e8b1b7888..267d3410d9 100644 --- a/include/wx/qt/choice.h +++ b/include/wx/qt/choice.h @@ -21,7 +21,7 @@ public: int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr ); + const wxString& name = wxASCII_STR(wxChoiceNameStr) ); wxChoice( wxWindow *parent, wxWindowID id, const wxPoint& pos, @@ -29,7 +29,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr ); + const wxString& name = wxASCII_STR(wxChoiceNameStr) ); bool Create( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, @@ -37,7 +37,7 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr ); + const wxString& name = wxASCII_STR(wxChoiceNameStr) ); bool Create( wxWindow *parent, wxWindowID id, const wxPoint& pos, @@ -45,7 +45,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr ); + const wxString& name = wxASCII_STR(wxChoiceNameStr) ); virtual wxSize DoGetBestSize() const wxOVERRIDE; diff --git a/include/wx/qt/clrpicker.h b/include/wx/qt/clrpicker.h index c3a9ea3096..d73c133ff7 100644 --- a/include/wx/qt/clrpicker.h +++ b/include/wx/qt/clrpicker.h @@ -30,7 +30,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxCLRBTN_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxColourPickerWidgetNameStr); + const wxString& name = wxASCII_STR(wxColourPickerWidgetNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -39,7 +39,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxCLRBTN_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxColourPickerWidgetNameStr); + const wxString& name = wxASCII_STR(wxColourPickerWidgetNameStr)); protected: virtual void UpdateColour() wxOVERRIDE; diff --git a/include/wx/qt/combobox.h b/include/wx/qt/combobox.h index d0f60b6863..c8a596a251 100644 --- a/include/wx/qt/combobox.h +++ b/include/wx/qt/combobox.h @@ -24,7 +24,7 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); + const wxString& name = wxASCII_STR(wxComboBoxNameStr)); wxComboBox(wxWindow *parent, wxWindowID id, const wxString& value, @@ -33,7 +33,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); + const wxString& name = wxASCII_STR(wxComboBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxString& value = wxEmptyString, @@ -42,7 +42,7 @@ public: int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); + const wxString& name = wxASCII_STR(wxComboBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxString& value, const wxPoint& pos, @@ -50,7 +50,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); + const wxString& name = wxASCII_STR(wxComboBoxNameStr)); virtual void SetSelection(int n) wxOVERRIDE; virtual void SetSelection(long from, long to) wxOVERRIDE; diff --git a/include/wx/qt/control.h b/include/wx/qt/control.h index 189a2b0932..38c45f43aa 100644 --- a/include/wx/qt/control.h +++ b/include/wx/qt/control.h @@ -16,13 +16,13 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxControlNameStr); + const wxString& name = wxASCII_STR(wxControlNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxControlNameStr); + const wxString& name = wxASCII_STR(wxControlNameStr)); virtual wxSize DoGetBestSize() const wxOVERRIDE; diff --git a/include/wx/qt/dialog.h b/include/wx/qt/dialog.h index 7a478bf9ff..e5a5572c82 100644 --- a/include/wx/qt/dialog.h +++ b/include/wx/qt/dialog.h @@ -20,7 +20,7 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, - const wxString &name = wxDialogNameStr ); + const wxString &name = wxASCII_STR(wxDialogNameStr) ); virtual ~wxDialog(); @@ -29,7 +29,7 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, - const wxString &name = wxDialogNameStr ); + const wxString &name = wxASCII_STR(wxDialogNameStr) ); virtual int ShowModal() wxOVERRIDE; virtual void EndModal(int retCode) wxOVERRIDE; diff --git a/include/wx/qt/dirdlg.h b/include/wx/qt/dirdlg.h index 17d8dfc8fb..7f47474d14 100644 --- a/include/wx/qt/dirdlg.h +++ b/include/wx/qt/dirdlg.h @@ -16,20 +16,20 @@ public: wxDirDialog() { } wxDirDialog(wxWindow *parent, - const wxString& message = wxDirSelectorPromptStr, + const wxString& message = wxASCII_STR(wxDirSelectorPromptStr), const wxString& defaultPath = wxEmptyString, long style = wxDD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const wxString& name = wxDirDialogNameStr); + const wxString& name = wxASCII_STR(wxDirDialogNameStr)); bool Create(wxWindow *parent, - const wxString& message = wxDirSelectorPromptStr, + const wxString& message = wxASCII_STR(wxDirSelectorPromptStr), const wxString& defaultPath = wxEmptyString, long style = wxDD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const wxString& name = wxDirDialogNameStr); + const wxString& name = wxASCII_STR(wxDirDialogNameStr)); public: // overrides from wxGenericDirDialog diff --git a/include/wx/qt/filedlg.h b/include/wx/qt/filedlg.h index 4c907aea83..cc48f71839 100644 --- a/include/wx/qt/filedlg.h +++ b/include/wx/qt/filedlg.h @@ -15,23 +15,23 @@ class WXDLLIMPEXP_CORE wxFileDialog : public wxFileDialogBase public: wxFileDialog() { } wxFileDialog(wxWindow *parent, - const wxString& message = wxFileSelectorPromptStr, + const wxString& message = wxASCII_STR(wxFileSelectorPromptStr), const wxString& defaultDir = wxEmptyString, const wxString& defaultFile = wxEmptyString, - const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + const wxString& wildCard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), long style = wxFD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, - const wxString& name = wxFileDialogNameStr); + const wxString& name = wxASCII_STR(wxFileDialogNameStr)); bool Create(wxWindow *parent, - const wxString& message = wxFileSelectorPromptStr, + const wxString& message = wxASCII_STR(wxFileSelectorPromptStr), const wxString& defaultDir = wxEmptyString, const wxString& defaultFile = wxEmptyString, - const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + const wxString& wildCard = wxASCII_STR(wxFileSelectorDefaultWildcardStr), long style = wxFD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, - const wxString& name = wxFileDialogNameStr); + const wxString& name = wxASCII_STR(wxFileDialogNameStr)); virtual wxString GetPath() const wxOVERRIDE; virtual void GetPaths(wxArrayString& paths) const wxOVERRIDE; diff --git a/include/wx/qt/frame.h b/include/wx/qt/frame.h index f640911a46..fa674d93b8 100644 --- a/include/wx/qt/frame.h +++ b/include/wx/qt/frame.h @@ -26,7 +26,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Init(); @@ -40,7 +40,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); virtual void SetMenuBar(wxMenuBar *menubar) wxOVERRIDE; virtual void SetStatusBar(wxStatusBar *statusBar ) wxOVERRIDE; diff --git a/include/wx/qt/gauge.h b/include/wx/qt/gauge.h index a3e6d39db1..810bcea227 100644 --- a/include/wx/qt/gauge.h +++ b/include/wx/qt/gauge.h @@ -22,7 +22,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr); + const wxString& name = wxASCII_STR(wxGaugeNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -31,7 +31,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr); + const wxString& name = wxASCII_STR(wxGaugeNameStr)); virtual QWidget *GetHandle() const wxOVERRIDE; diff --git a/include/wx/qt/listbox.h b/include/wx/qt/listbox.h index 3108bb62f8..2cdc98f29a 100644 --- a/include/wx/qt/listbox.h +++ b/include/wx/qt/listbox.h @@ -22,7 +22,7 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); wxListBox(wxWindow *parent, wxWindowID id, const wxPoint& pos, @@ -30,7 +30,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); virtual ~wxListBox(); @@ -40,14 +40,14 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); virtual bool IsSelected(int n) const wxOVERRIDE; virtual int GetSelections(wxArrayInt& aSelections) const wxOVERRIDE; diff --git a/include/wx/qt/listctrl.h b/include/wx/qt/listctrl.h index 23a672dbf7..ae529b503a 100644 --- a/include/wx/qt/listctrl.h +++ b/include/wx/qt/listctrl.h @@ -27,7 +27,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListCtrlNameStr); + const wxString& name = wxASCII_STR(wxListCtrlNameStr)); bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, @@ -35,7 +35,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListCtrlNameStr); + const wxString& name = wxASCII_STR(wxListCtrlNameStr)); virtual ~wxListCtrl(); diff --git a/include/wx/qt/mdi.h b/include/wx/qt/mdi.h index 37448988a0..80756fdc0d 100644 --- a/include/wx/qt/mdi.h +++ b/include/wx/qt/mdi.h @@ -18,7 +18,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -26,7 +26,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); // override/implement base class [pure] virtual methods // ---------------------------------------------------- @@ -54,7 +54,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); bool Create(wxMDIParentFrame *parent, wxWindowID id, @@ -62,7 +62,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); virtual void Activate() wxOVERRIDE; diff --git a/include/wx/qt/minifram.h b/include/wx/qt/minifram.h index 0c10e5a634..c18b7edfe5 100644 --- a/include/wx/qt/minifram.h +++ b/include/wx/qt/minifram.h @@ -22,7 +22,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION | wxCLIP_CHILDREN | wxRESIZE_BORDER, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { return wxFrame::Create(parent, id, title, pos, size, style | wxFRAME_TOOL_WINDOW | wxFRAME_NO_TASKBAR, @@ -35,7 +35,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION | wxCLIP_CHILDREN | wxRESIZE_BORDER, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Create(parent, id, title, pos, size, style, name); } diff --git a/include/wx/qt/msgdlg.h b/include/wx/qt/msgdlg.h index 513d50a0d5..63e96464fe 100644 --- a/include/wx/qt/msgdlg.h +++ b/include/wx/qt/msgdlg.h @@ -16,7 +16,7 @@ class WXDLLIMPEXP_CORE wxMessageDialog : public wxMessageDialogBase { public: wxMessageDialog(wxWindow *parent, const wxString& message, - const wxString& caption = wxMessageBoxCaptionStr, + const wxString& caption = wxASCII_STR(wxMessageBoxCaptionStr), long style = wxOK|wxCENTRE, const wxPoint& pos = wxDefaultPosition); virtual ~wxMessageDialog(); diff --git a/include/wx/qt/notebook.h b/include/wx/qt/notebook.h index 7b580b0245..35e5db5ec8 100644 --- a/include/wx/qt/notebook.h +++ b/include/wx/qt/notebook.h @@ -19,14 +19,14 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxNotebookNameStr); + const wxString& name = wxASCII_STR(wxNotebookNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxNotebookNameStr); + const wxString& name = wxASCII_STR(wxNotebookNameStr)); virtual void SetPadding(const wxSize& padding) wxOVERRIDE; virtual void SetTabSize(const wxSize& sz) wxOVERRIDE; diff --git a/include/wx/qt/radiobox.h b/include/wx/qt/radiobox.h index 43ca8284ba..1c56331666 100644 --- a/include/wx/qt/radiobox.h +++ b/include/wx/qt/radiobox.h @@ -26,7 +26,7 @@ public: int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr); + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)); wxRadioBox(wxWindow *parent, wxWindowID id, @@ -37,7 +37,7 @@ public: int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr); + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -48,7 +48,7 @@ public: int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr); + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -59,7 +59,7 @@ public: int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr); + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)); using wxWindowBase::Show; using wxWindowBase::Enable; diff --git a/include/wx/qt/radiobut.h b/include/wx/qt/radiobut.h index 104d262e2d..5a1ab5ad14 100644 --- a/include/wx/qt/radiobut.h +++ b/include/wx/qt/radiobut.h @@ -21,7 +21,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRadioButtonNameStr ); + const wxString& name = wxASCII_STR(wxRadioButtonNameStr) ); bool Create( wxWindow *parent, wxWindowID id, @@ -30,7 +30,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRadioButtonNameStr ); + const wxString& name = wxASCII_STR(wxRadioButtonNameStr) ); virtual void SetValue(bool value); virtual bool GetValue() const; diff --git a/include/wx/qt/scrolbar.h b/include/wx/qt/scrolbar.h index 87d7b7f90c..3f90caf087 100644 --- a/include/wx/qt/scrolbar.h +++ b/include/wx/qt/scrolbar.h @@ -23,14 +23,14 @@ public: const wxSize& size = wxDefaultSize, long style = wxSB_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr ); + const wxString& name = wxASCII_STR(wxScrollBarNameStr) ); bool Create( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSB_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr ); + const wxString& name = wxASCII_STR(wxScrollBarNameStr) ); virtual int GetThumbPosition() const wxOVERRIDE; virtual int GetThumbSize() const wxOVERRIDE; diff --git a/include/wx/qt/slider.h b/include/wx/qt/slider.h index 823df0a0bc..5b6eeedaa1 100644 --- a/include/wx/qt/slider.h +++ b/include/wx/qt/slider.h @@ -21,7 +21,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr); + const wxString& name = wxASCII_STR(wxSliderNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -30,7 +30,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr); + const wxString& name = wxASCII_STR(wxSliderNameStr)); virtual int GetValue() const wxOVERRIDE; virtual void SetValue(int value) wxOVERRIDE; diff --git a/include/wx/qt/statbmp.h b/include/wx/qt/statbmp.h index cf57a3aef4..d4210c5ff6 100644 --- a/include/wx/qt/statbmp.h +++ b/include/wx/qt/statbmp.h @@ -20,7 +20,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBitmapNameStr ); + const wxString& name = wxASCII_STR(wxStaticBitmapNameStr) ); bool Create( wxWindow *parent, wxWindowID id, @@ -28,7 +28,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBitmapNameStr); + const wxString& name = wxASCII_STR(wxStaticBitmapNameStr)); virtual void SetIcon(const wxIcon& icon) wxOVERRIDE; virtual void SetBitmap(const wxBitmap& bitmap) wxOVERRIDE; diff --git a/include/wx/qt/statbox.h b/include/wx/qt/statbox.h index ab3dfdee01..bec283f6d0 100644 --- a/include/wx/qt/statbox.h +++ b/include/wx/qt/statbox.h @@ -20,14 +20,14 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBoxNameStr); + const wxString& name = wxASCII_STR(wxStaticBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBoxNameStr); + const wxString& name = wxASCII_STR(wxStaticBoxNameStr)); virtual void GetBordersForSizer(int *borderTop, int *borderOther) const wxOVERRIDE; diff --git a/include/wx/qt/statline.h b/include/wx/qt/statline.h index 728815a1f9..bab0b6bb09 100644 --- a/include/wx/qt/statline.h +++ b/include/wx/qt/statline.h @@ -20,14 +20,14 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxLI_HORIZONTAL, - const wxString &name = wxStaticLineNameStr ); + const wxString &name = wxASCII_STR(wxStaticLineNameStr) ); bool Create( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxLI_HORIZONTAL, - const wxString &name = wxStaticLineNameStr ); + const wxString &name = wxASCII_STR(wxStaticLineNameStr) ); virtual QWidget *GetHandle() const wxOVERRIDE; diff --git a/include/wx/qt/stattext.h b/include/wx/qt/stattext.h index 5a19698191..c17202c85f 100644 --- a/include/wx/qt/stattext.h +++ b/include/wx/qt/stattext.h @@ -20,7 +20,7 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0, - const wxString &name = wxStaticTextNameStr ); + const wxString &name = wxASCII_STR(wxStaticTextNameStr) ); bool Create(wxWindow *parent, wxWindowID id, @@ -28,7 +28,7 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0, - const wxString &name = wxStaticTextNameStr ); + const wxString &name = wxASCII_STR(wxStaticTextNameStr) ); virtual void SetLabel(const wxString& label) wxOVERRIDE; diff --git a/include/wx/qt/statusbar.h b/include/wx/qt/statusbar.h index eeb094746c..710bf4f768 100644 --- a/include/wx/qt/statusbar.h +++ b/include/wx/qt/statusbar.h @@ -21,11 +21,11 @@ public: wxStatusBar(); wxStatusBar(wxWindow *parent, wxWindowID winid = wxID_ANY, long style = wxSTB_DEFAULT_STYLE, - const wxString& name = wxStatusBarNameStr); + const wxString& name = wxASCII_STR(wxStatusBarNameStr)); bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY, long style = wxSTB_DEFAULT_STYLE, - const wxString& name = wxStatusBarNameStr); + const wxString& name = wxASCII_STR(wxStatusBarNameStr)); virtual bool GetFieldRect(int i, wxRect& rect) const wxOVERRIDE; virtual void SetMinHeight(int height) wxOVERRIDE; diff --git a/include/wx/qt/textctrl.h b/include/wx/qt/textctrl.h index b28fe0e5fe..48a2e1c8b4 100644 --- a/include/wx/qt/textctrl.h +++ b/include/wx/qt/textctrl.h @@ -22,7 +22,7 @@ public: const wxSize &size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString &name = wxTextCtrlNameStr); + const wxString &name = wxASCII_STR(wxTextCtrlNameStr)); virtual ~wxTextCtrl(); @@ -33,7 +33,7 @@ public: const wxSize &size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString &name = wxTextCtrlNameStr); + const wxString &name = wxASCII_STR(wxTextCtrlNameStr)); virtual int GetLineLength(long lineNo) const wxOVERRIDE; virtual wxString GetLineText(long lineNo) const wxOVERRIDE; diff --git a/include/wx/qt/tglbtn.h b/include/wx/qt/tglbtn.h index 2bb47042ae..3d1d7a64d0 100644 --- a/include/wx/qt/tglbtn.h +++ b/include/wx/qt/tglbtn.h @@ -22,7 +22,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -30,7 +30,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)); virtual void SetValue(bool state) wxOVERRIDE; virtual bool GetValue() const wxOVERRIDE; @@ -56,7 +56,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -64,7 +64,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)); private: diff --git a/include/wx/qt/toolbar.h b/include/wx/qt/toolbar.h index 6b3c38e42a..7ae8a8af4a 100644 --- a/include/wx/qt/toolbar.h +++ b/include/wx/qt/toolbar.h @@ -22,7 +22,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTB_DEFAULT_STYLE | wxNO_BORDER, - const wxString& name = wxToolBarNameStr) + const wxString& name = wxASCII_STR(wxToolBarNameStr)) { Init(); @@ -36,7 +36,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTB_DEFAULT_STYLE | wxNO_BORDER, - const wxString& name = wxToolBarNameStr); + const wxString& name = wxASCII_STR(wxToolBarNameStr)); virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const wxOVERRIDE; diff --git a/include/wx/qt/toplevel.h b/include/wx/qt/toplevel.h index 8e5f7f6208..32fb5802e5 100644 --- a/include/wx/qt/toplevel.h +++ b/include/wx/qt/toplevel.h @@ -19,7 +19,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -27,7 +27,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); virtual bool Show(bool show = true) wxOVERRIDE; virtual void Maximize(bool maximize = true) wxOVERRIDE; diff --git a/include/wx/qt/treectrl.h b/include/wx/qt/treectrl.h index 3db3838f7d..473f2c1f09 100644 --- a/include/wx/qt/treectrl.h +++ b/include/wx/qt/treectrl.h @@ -19,7 +19,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxTreeCtrlNameStr); + const wxString& name = wxASCII_STR(wxTreeCtrlNameStr)); virtual ~wxTreeCtrl(); @@ -28,7 +28,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxTreeCtrlNameStr); + const wxString& name = wxASCII_STR(wxTreeCtrlNameStr)); virtual unsigned int GetCount() const wxOVERRIDE; diff --git a/include/wx/qt/window.h b/include/wx/qt/window.h index ea29c549a5..a426af9f67 100644 --- a/include/wx/qt/window.h +++ b/include/wx/qt/window.h @@ -64,14 +64,14 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr); + const wxString& name = wxASCII_STR(wxPanelNameStr)); bool Create(wxWindowQt *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr); + const wxString& name = wxASCII_STR(wxPanelNameStr)); // Used by all window classes in the widget creation process. void PostCreation( bool generic = true ); diff --git a/include/wx/rearrangectrl.h b/include/wx/rearrangectrl.h index 06d8e58968..5e2f5f9977 100644 --- a/include/wx/rearrangectrl.h +++ b/include/wx/rearrangectrl.h @@ -60,7 +60,7 @@ public: const wxArrayString& items, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRearrangeListNameStr) + const wxString& name = wxASCII_STR(wxRearrangeListNameStr)) { Create(parent, id, pos, size, order, items, style, validator, name); } @@ -75,7 +75,7 @@ public: const wxArrayString& items, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRearrangeListNameStr); + const wxString& name = wxASCII_STR(wxRearrangeListNameStr)); // items order @@ -141,7 +141,7 @@ public: const wxArrayString& items, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRearrangeListNameStr) + const wxString& name = wxASCII_STR(wxRearrangeListNameStr)) { Init(); @@ -156,7 +156,7 @@ public: const wxArrayString& items, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRearrangeListNameStr); + const wxString& name = wxASCII_STR(wxRearrangeListNameStr)); // get the underlying listbox wxRearrangeList *GetList() const { return m_list; } @@ -195,7 +195,7 @@ public: const wxArrayInt& order, const wxArrayString& items, const wxPoint& pos = wxDefaultPosition, - const wxString& name = wxRearrangeDialogNameStr) + const wxString& name = wxASCII_STR(wxRearrangeDialogNameStr)) { Init(); @@ -208,7 +208,7 @@ public: const wxArrayInt& order, const wxArrayString& items, const wxPoint& pos = wxDefaultPosition, - const wxString& name = wxRearrangeDialogNameStr); + const wxString& name = wxASCII_STR(wxRearrangeDialogNameStr)); // methods for the dialog customization diff --git a/include/wx/ribbon/control.h b/include/wx/ribbon/control.h index 120ae7dee0..4fd3e50509 100644 --- a/include/wx/ribbon/control.h +++ b/include/wx/ribbon/control.h @@ -30,7 +30,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxControlNameStr) + const wxString& name = wxASCII_STR(wxControlNameStr)) { Init(); @@ -41,7 +41,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxControlNameStr); + const wxString& name = wxASCII_STR(wxControlNameStr)); virtual void SetArtProvider(wxRibbonArtProvider* art); wxRibbonArtProvider* GetArtProvider() const {return m_art;} diff --git a/include/wx/richmsgdlg.h b/include/wx/richmsgdlg.h index 53812e0e6d..817d6c3fdb 100644 --- a/include/wx/richmsgdlg.h +++ b/include/wx/richmsgdlg.h @@ -86,7 +86,7 @@ private: public: wxRichMessageDialog( wxWindow *parent, const wxString& message, - const wxString& caption = wxMessageBoxCaptionStr, + const wxString& caption = wxASCII_STR(wxMessageBoxCaptionStr), long style = wxOK | wxCENTRE ) : wxGenericRichMessageDialog( parent, message, caption, style ) { } diff --git a/include/wx/richtext/richtextctrl.h b/include/wx/richtext/richtextctrl.h index 075f10df2a..5701f6da43 100644 --- a/include/wx/richtext/richtextctrl.h +++ b/include/wx/richtext/richtextctrl.h @@ -251,7 +251,7 @@ public: @see Create(), wxValidator */ wxRichTextCtrl( wxWindow* parent, wxWindowID id = -1, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxRE_MULTILINE, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxTextCtrlNameStr); + long style = wxRE_MULTILINE, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxASCII_STR(wxTextCtrlNameStr)); /** Destructor. @@ -264,7 +264,7 @@ public: Creates the underlying window. */ bool Create( wxWindow* parent, wxWindowID id = -1, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxRE_MULTILINE, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxTextCtrlNameStr ); + long style = wxRE_MULTILINE, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxASCII_STR(wxTextCtrlNameStr) ); /** Initialises the members of the control. diff --git a/include/wx/richtext/richtextstyledlg.h b/include/wx/richtext/richtextstyledlg.h index 26444d0cd9..cf45582cd5 100644 --- a/include/wx/richtext/richtextstyledlg.h +++ b/include/wx/richtext/richtextstyledlg.h @@ -45,7 +45,7 @@ class WXDLLIMPEXP_FWD_CORE wxCheckBox; */ #define SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_STYLE wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX -#define SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_TITLE wxGetTranslation("Style Organiser") +#define SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_TITLE wxGetTranslation(wxASCII_STR("Style Organiser")) #define SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_IDNAME ID_RICHTEXTSTYLEORGANISERDIALOG #define SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_SIZE wxSize(400, 300) #define SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_POSITION wxDefaultPosition diff --git a/include/wx/richtext/richtextsymboldlg.h b/include/wx/richtext/richtextsymboldlg.h index 8c966545df..0096e51361 100644 --- a/include/wx/richtext/richtextsymboldlg.h +++ b/include/wx/richtext/richtextsymboldlg.h @@ -205,7 +205,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) { Init(); @@ -221,7 +221,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr); + const wxString& name = wxASCII_STR(wxPanelNameStr)); // dtor does some internal cleanup virtual ~wxSymbolListCtrl(); diff --git a/include/wx/scrolbar.h b/include/wx/scrolbar.h index 7ab55524b0..9bd54be58a 100644 --- a/include/wx/scrolbar.h +++ b/include/wx/scrolbar.h @@ -38,7 +38,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSB_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr); + const wxString& name = wxASCII_STR(wxScrollBarNameStr)); */ // accessors diff --git a/include/wx/scrolwin.h b/include/wx/scrolwin.h index bc3c90723c..f4ac9b802f 100644 --- a/include/wx/scrolwin.h +++ b/include/wx/scrolwin.h @@ -432,7 +432,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxScrolledWindowStyle, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) : wxScrollHelper(this) { Create(parent, winid, pos, size, style, name); @@ -443,7 +443,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxScrolledWindowStyle, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) { m_targetWindow = this; @@ -500,7 +500,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxScrolledWindowStyle, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) : wxScrolled(parent, winid, pos, size, style, name) {} wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxScrolledWindow); diff --git a/include/wx/strconv.h b/include/wx/strconv.h index 8474876500..c1b070d36a 100644 --- a/include/wx/strconv.h +++ b/include/wx/strconv.h @@ -719,5 +719,19 @@ extern WXDLLIMPEXP_DATA_BASE(wxMBConv *) wxConvUI; #define wxSafeConvertWX2MB(s) (s) #endif // Unicode/ANSI +// Macro that indicates the default encoding for converting C strings +// to wxString. It provides a default value for a const wxMBConv& +// parameter (i.e. wxConvLibc) unless wxNO_IMPLICIT_WXSTRING_ENCODING +// is defined. +// +// Intended use: +// wxString(const char *data, ..., +// const wxMBConv &conv wxSTRING_DEFAULT_CONV_ARG); +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING +#define wxSTRING_DEFAULT_CONV_ARG = wxConvLibc +#else +#define wxSTRING_DEFAULT_CONV_ARG +#endif + #endif // _WX_STRCONV_H_ diff --git a/include/wx/string.h b/include/wx/string.h index fe6394dbe5..eb54eb24c7 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -81,6 +81,19 @@ class WXDLLIMPEXP_FWD_BASE wxString; #define WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER 1 #endif +// enforce consistency among encoding-related macros +#ifdef wxNO_IMPLICIT_WXSTRING_ENCODING + +#ifndef wxNO_UNSAFE_WXSTRING_CONV +#define wxNO_UNSAFE_WXSTRING_CONV +#endif + +#if wxUSE_UTF8_LOCALE_ONLY +#error wxNO_IMPLICIT_WXSTRING_ENCODING cannot be used in UTF-8 only builds +#endif + +#endif + namespace wxPrivate { template struct wxStringAsBufHelper; @@ -90,6 +103,9 @@ namespace wxPrivate // macros // --------------------------------------------------------------------------- +// Shorthand for instantiating ASCII strings +#define wxASCII_STR(s) wxString::FromAscii(s) + // These macros are not used by wxWidgets itself any longer and are only // preserved for compatibility with the user code that might be still using // them. Do _not_ use them in the new code, just use const_cast<> instead. @@ -143,7 +159,9 @@ private: public: // Ctor constructs the object from char literal; they are needed to make // operator?: compile and they intentionally take char*, not const char* +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline wxCStrData(char *buf); +#endif inline wxCStrData(wchar_t *buf); inline wxCStrData(const wxCStrData& data); @@ -161,6 +179,7 @@ public: inline const wchar_t* AsWChar() const; operator const wchar_t*() const { return AsWChar(); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline const char* AsChar() const; const unsigned char* AsUnsignedChar() const { return (const unsigned char *) AsChar(); } @@ -174,6 +193,7 @@ public: { return wxScopedCharBuffer::CreateNonOwned(AsChar()); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING const wxScopedWCharBuffer AsWCharBuf() const { @@ -300,9 +320,16 @@ private: // these methods are not implemented - there is _no_ conversion from int to // string, you're doing something wrong if the compiler wants to call it! // - // try `s << i' or `s.Printf("%d", i)' instead + // try `s << i' or `s.Printf(wxASCII_STR("%d"), i)' instead wxString(int); +#ifdef wxNO_IMPLICIT_WXSTRING_ENCODING + // These constructors are disabled because the encoding must be explicit + explicit wxString(const char *psz); + explicit wxString(const char *psz, size_t nLength); + explicit wxString(const unsigned char *psz); + explicit wxString(const unsigned char *psz, size_t nLength); +#endif // buffer for holding temporary substring when using any of the methods // that take (char*,size_t) or (wchar_t*,size_t) arguments: @@ -358,22 +385,24 @@ private: static const SubstrBufFromWC ImplStr(const wchar_t* str, size_t n) { return SubstrBufFromWC(str, (str && n == npos) ? wxWcslen(str) : n); } static wxScopedWCharBuffer ImplStr(const char* str, - const wxMBConv& conv = wxConvLibc) + const wxMBConv& conv wxSTRING_DEFAULT_CONV_ARG) { return ConvertStr(str, npos, conv).data; } static SubstrBufFromMB ImplStr(const char* str, size_t n, - const wxMBConv& conv = wxConvLibc) + const wxMBConv& conv wxSTRING_DEFAULT_CONV_ARG) { return ConvertStr(str, n, conv); } #else static const char* ImplStr(const char* str, - const wxMBConv& WXUNUSED(conv) = wxConvLibc) + const wxMBConv& WXUNUSED(conv) wxSTRING_DEFAULT_CONV_ARG) { return str ? str : ""; } static const SubstrBufFromMB ImplStr(const char* str, size_t n, - const wxMBConv& WXUNUSED(conv) = wxConvLibc) + const wxMBConv& WXUNUSED(conv) wxSTRING_DEFAULT_CONV_ARG) { return SubstrBufFromMB(str, (str && n == npos) ? wxStrlen(str) : n); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING static wxScopedCharBuffer ImplStr(const wchar_t* str) { return ConvertStr(str, npos, wxConvLibc).data; } static SubstrBufFromWC ImplStr(const wchar_t* str, size_t n) { return ConvertStr(str, n, wxConvLibc); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING #endif // translates position index in wxString to/from index in underlying @@ -396,10 +425,10 @@ private: #else // wxUSE_UNICODE_UTF8 static wxScopedCharBuffer ImplStr(const char* str, - const wxMBConv& conv = wxConvLibc) + const wxMBConv& conv wxSTRING_DEFAULT_CONV_ARG) { return ConvertStr(str, npos, conv).data; } static SubstrBufFromMB ImplStr(const char* str, size_t n, - const wxMBConv& conv = wxConvLibc) + const wxMBConv& conv wxSTRING_DEFAULT_CONV_ARG) { return ConvertStr(str, n, conv); } static wxScopedCharBuffer ImplStr(const wchar_t* str) @@ -1128,13 +1157,17 @@ public: wxString(size_t nRepeat, wchar_t ch) { assign(nRepeat, ch); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING // ctors from char* strings: wxString(const char *psz) : m_impl(ImplStr(psz)) {} +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString(const char *psz, const wxMBConv& conv) : m_impl(ImplStr(psz, conv)) {} +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString(const char *psz, size_t nLength) { assign(psz, nLength); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString(const char *psz, const wxMBConv& conv, size_t nLength) { SubstrBufFromMB str(ImplStr(psz, nLength, conv)); @@ -1142,12 +1175,16 @@ public: } // and unsigned char*: +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString(const unsigned char *psz) : m_impl(ImplStr((const char*)psz)) {} +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString(const unsigned char *psz, const wxMBConv& conv) : m_impl(ImplStr((const char*)psz, conv)) {} +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString(const unsigned char *psz, size_t nLength) { assign((const char*)psz, nLength); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString(const unsigned char *psz, const wxMBConv& conv, size_t nLength) { SubstrBufFromMB str(ImplStr((const char*)psz, nLength, conv)); @@ -1164,8 +1201,10 @@ public: wxString(const wchar_t *pwz, const wxMBConv& WXUNUSED(conv), size_t nLength) { assign(pwz, nLength); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString(const wxScopedCharBuffer& buf) { assign(buf.data(), buf.length()); } +#endif wxString(const wxScopedWCharBuffer& buf) { assign(buf.data(), buf.length()); } @@ -1214,6 +1253,7 @@ public: { assign(str.c_str(), str.length()); } #endif +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING #if !wxUSE_UNICODE // ANSI build // FIXME-UTF8: do this in UTF8 build #if wxUSE_UTF8_LOCALE_ONLY, too wxString(const std::string& str) : m_impl(str) {} @@ -1221,6 +1261,7 @@ public: wxString(const std::string& str) { assign(str.c_str(), str.length()); } #endif +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING #endif // wxUSE_STD_STRING // Also always provide explicit conversions to std::[w]string in any case, @@ -1261,7 +1302,7 @@ public: #else // wxStringImpl is either not std::string or needs conversion #define wxStringToStdStringRetType std::string - std::string ToStdString(const wxMBConv& conv = wxConvLibc) const + std::string ToStdString(const wxMBConv& conv wxSTRING_DEFAULT_CONV_ARG) const { wxScopedCharBuffer buf(mb_str(conv)); return std::string(buf.data(), buf.length()); @@ -1553,7 +1594,7 @@ public: // conversion to *non-const* multibyte or widestring buffer; modifying // returned buffer won't affect the string, these methods are only useful // for passing values to const-incorrect functions - wxWritableCharBuffer char_str(const wxMBConv& conv = wxConvLibc) const + wxWritableCharBuffer char_str(const wxMBConv& conv wxSTRING_DEFAULT_CONV_ARG) const { return mb_str(conv); } wxWritableWCharBuffer wchar_str() const { return wc_str(); } @@ -1767,7 +1808,7 @@ public: return AsCharBuf(conv); } #else // !wxUSE_UTF8_LOCALE_ONLY - const wxScopedCharBuffer mb_str(const wxMBConv& conv = wxConvLibc) const + const wxScopedCharBuffer mb_str(const wxMBConv& conv wxSTRING_DEFAULT_CONV_ARG) const { return AsCharBuf(conv); } @@ -1799,11 +1840,13 @@ public: const wxWX2MBbuf mbc_str() const { return mb_str(); } - const wxScopedWCharBuffer wc_str(const wxMBConv& conv = wxConvLibc) const + const wxScopedWCharBuffer wc_str(const wxMBConv& conv wxSTRING_DEFAULT_CONV_ARG) const { return AsWCharBuf(conv); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING const wxScopedCharBuffer fn_str() const { return wxConvFile.cWC2WX( wc_str( wxConvLibc ) ); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING #endif // Unicode/ANSI #if wxUSE_UNICODE_UTF8 @@ -1855,6 +1898,7 @@ public: // from a C string - STL probably will crash on NULL, // so we need to compensate in that case #if wxUSE_STL_BASED_WXSTRING +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& operator=(const char *psz) { wxSTRING_INVALIDATE_CACHE(); @@ -1866,6 +1910,7 @@ public: return *this; } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& operator=(const wchar_t *pwz) { @@ -1879,6 +1924,7 @@ public: return *this; } #else // !wxUSE_STL_BASED_WXSTRING +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& operator=(const char *psz) { wxSTRING_INVALIDATE_CACHE(); @@ -1887,6 +1933,7 @@ public: return *this; } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& operator=(const wchar_t *pwz) { @@ -1898,15 +1945,19 @@ public: } #endif // wxUSE_STL_BASED_WXSTRING/!wxUSE_STL_BASED_WXSTRING +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& operator=(const unsigned char *psz) { return operator=((const char*)psz); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING // from wxScopedWCharBuffer wxString& operator=(const wxScopedWCharBuffer& s) { return assign(s); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING // from wxScopedCharBuffer wxString& operator=(const wxScopedCharBuffer& s) { return assign(s); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING // string concatenation // in place concatenation @@ -1927,8 +1978,10 @@ public: return *this; } // string += C string +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& operator<<(const char *psz) { append(psz); return *this; } +#endif wxString& operator<<(const wchar_t *pwz) { append(pwz); return *this; } wxString& operator<<(const wxCStrData& psz) @@ -1943,8 +1996,10 @@ public: // string += buffer (i.e. from wxGetString) wxString& operator<<(const wxScopedWCharBuffer& s) { return append(s); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& operator<<(const wxScopedCharBuffer& s) { return append(s); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING // string += C string wxString& Append(const wxString& s) @@ -1956,24 +2011,32 @@ public: append(s); return *this; } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& Append(const char* psz) { append(psz); return *this; } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& Append(const wchar_t* pwz) { append(pwz); return *this; } wxString& Append(const wxCStrData& psz) { append(psz); return *this; } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& Append(const wxScopedCharBuffer& psz) { append(psz); return *this; } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& Append(const wxScopedWCharBuffer& psz) { append(psz); return *this; } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& Append(const char* psz, size_t nLen) { append(psz, nLen); return *this; } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& Append(const wchar_t* pwz, size_t nLen) { append(pwz, nLen); return *this; } wxString& Append(const wxCStrData& psz, size_t nLen) { append(psz, nLen); return *this; } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& Append(const wxScopedCharBuffer& psz, size_t nLen) { append(psz, nLen); return *this; } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& Append(const wxScopedWCharBuffer& psz, size_t nLen) { append(psz, nLen); return *this; } // append count copies of given character @@ -2001,13 +2064,17 @@ public: // char with a string friend wxString WXDLLIMPEXP_BASE operator+(wxUniChar ch, const wxString& string); // string with C string +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING friend wxString WXDLLIMPEXP_BASE operator+(const wxString& string, const char *psz); +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING friend wxString WXDLLIMPEXP_BASE operator+(const wxString& string, const wchar_t *pwz); // C string with string +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING friend wxString WXDLLIMPEXP_BASE operator+(const char *psz, const wxString& string); +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING friend wxString WXDLLIMPEXP_BASE operator+(const wchar_t *pwz, const wxString& string); @@ -2028,12 +2095,12 @@ public: // insert a long long if they exist and aren't longs wxString& operator<<(wxLongLong_t ll) { - return (*this) << Format("%" wxLongLongFmtSpec "d", ll); + return (*this) << Format(wxASCII_STR("%" wxLongLongFmtSpec "d"), ll); } // insert an unsigned long long wxString& operator<<(wxULongLong_t ull) { - return (*this) << Format("%" wxLongLongFmtSpec "u" , ull); + return (*this) << Format(wxASCII_STR("%" wxLongLongFmtSpec "u") , ull); } #endif // wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG // insert a float into string @@ -2045,16 +2112,20 @@ public: // string comparison // case-sensitive comparison (returns a value < 0, = 0 or > 0) +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING int Cmp(const char *psz) const { return compare(psz); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING int Cmp(const wchar_t *pwz) const { return compare(pwz); } int Cmp(const wxString& s) const { return compare(s); } int Cmp(const wxCStrData& s) const { return compare(s); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING int Cmp(const wxScopedCharBuffer& s) const { return compare(s); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING int Cmp(const wxScopedWCharBuffer& s) const { return compare(s); } // same as Cmp() but not case-sensitive @@ -2071,15 +2142,19 @@ public: #endif return (compareWithCase ? Cmp(str) : CmpNoCase(str)) == 0; } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING bool IsSameAs(const char *str, bool compareWithCase = true) const { return (compareWithCase ? Cmp(str) : CmpNoCase(str)) == 0; } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING bool IsSameAs(const wchar_t *str, bool compareWithCase = true) const { return (compareWithCase ? Cmp(str) : CmpNoCase(str)) == 0; } bool IsSameAs(const wxCStrData& str, bool compareWithCase = true) const { return IsSameAs(str.AsString(), compareWithCase); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING bool IsSameAs(const wxScopedCharBuffer& str, bool compareWithCase = true) const { return IsSameAs(str.data(), compareWithCase); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING bool IsSameAs(const wxScopedWCharBuffer& str, bool compareWithCase = true) const { return IsSameAs(str.data(), compareWithCase); } // comparison with a single character: returns true if equal @@ -2176,11 +2251,13 @@ public: const size_type idx = find(sub); return (idx == npos) ? wxNOT_FOUND : (int)idx; } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING int Find(const char *sub) const // like strstr { const size_type idx = find(sub); return (idx == npos) ? wxNOT_FOUND : (int)idx; } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING int Find(const wchar_t *sub) const // like strstr { const size_type idx = find(sub); @@ -2189,8 +2266,10 @@ public: int Find(const wxCStrData& sub) const { return Find(sub.AsString()); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING int Find(const wxScopedCharBuffer& sub) const { return Find(sub.data()); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING int Find(const wxScopedWCharBuffer& sub) const { return Find(sub.data()); } @@ -2335,11 +2414,13 @@ public: #if WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER // the 2 overloads below are for compatibility with the existing code using // pointers instead of iterators +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString(const char *first, const char *last) { SubstrBufFromMB str(ImplStr(first, last - first)); m_impl.assign(str.data, str.len); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString(const wchar_t *first, const wchar_t *last) { SubstrBufFromWC str(ImplStr(first, last - first)); @@ -2376,6 +2457,7 @@ public: } // append first n (or all if n == npos) characters of sz +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& append(const char *sz) { wxSTRING_INVALIDATE_CACHED_LENGTH(); @@ -2383,6 +2465,7 @@ public: m_impl.append(ImplStr(sz)); return *this; } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& append(const wchar_t *sz) { @@ -2392,6 +2475,7 @@ public: return *this; } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& append(const char *sz, size_t n) { wxSTRING_INVALIDATE_CACHED_LENGTH(); @@ -2400,6 +2484,7 @@ public: m_impl.append(str.data, str.len); return *this; } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& append(const wchar_t *sz, size_t n) { wxSTRING_UPDATE_CACHED_LENGTH(n); @@ -2411,14 +2496,18 @@ public: wxString& append(const wxCStrData& str) { return append(str.AsString()); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& append(const wxScopedCharBuffer& str) { return append(str.data(), str.length()); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& append(const wxScopedWCharBuffer& str) { return append(str.data(), str.length()); } wxString& append(const wxCStrData& str, size_t n) { return append(str.AsString(), 0, n); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& append(const wxScopedCharBuffer& str, size_t n) { return append(str.data(), n); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& append(const wxScopedWCharBuffer& str, size_t n) { return append(str.data(), n); } @@ -2459,8 +2548,10 @@ public: return *this; } #if WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& append(const char *first, const char *last) { return append(first, last - first); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& append(const wchar_t *first, const wchar_t *last) { return append(first, last - first); } wxString& append(const wxCStrData& first, const wxCStrData& last) @@ -2513,6 +2604,7 @@ public: } // same as `= first n (or all if n == npos) characters of sz' +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& assign(const char *sz) { wxSTRING_INVALIDATE_CACHE(); @@ -2521,6 +2613,7 @@ public: return *this; } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& assign(const wchar_t *sz) { @@ -2531,6 +2624,7 @@ public: return *this; } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& assign(const char *sz, size_t n) { wxSTRING_INVALIDATE_CACHE(); @@ -2540,6 +2634,7 @@ public: return *this; } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& assign(const wchar_t *sz, size_t n) { @@ -2553,8 +2648,10 @@ public: wxString& assign(const wxCStrData& str) { return assign(str.AsString()); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& assign(const wxScopedCharBuffer& str) { return assign(str.data(), str.length()); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& assign(const wxScopedCharBuffer& buf, const wxMBConv& conv) { SubstrBufFromMB str(ImplStr(buf.data(), buf.length(), conv)); @@ -2566,8 +2663,10 @@ public: { return assign(str.data(), str.length()); } wxString& assign(const wxCStrData& str, size_t len) { return assign(str.AsString(), len); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& assign(const wxScopedCharBuffer& str, size_t len) { return assign(str.data(), len); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& assign(const wxScopedWCharBuffer& str, size_t len) { return assign(str.data(), len); } @@ -2603,8 +2702,10 @@ public: return *this; } #if WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& assign(const char *first, const char *last) { return assign(first, last - first); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& assign(const wchar_t *first, const wchar_t *last) { return assign(first, last - first); } wxString& assign(const wxCStrData& first, const wxCStrData& last) @@ -2613,12 +2714,16 @@ public: // string comparison int compare(const wxString& str) const; +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING int compare(const char* sz) const; +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING int compare(const wchar_t* sz) const; int compare(const wxCStrData& str) const { return compare(str.AsString()); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING int compare(const wxScopedCharBuffer& str) const { return compare(str.data()); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING int compare(const wxScopedWCharBuffer& str) const { return compare(str.data()); } // comparison with a substring @@ -2627,8 +2732,10 @@ public: int compare(size_t nStart, size_t nLen, const wxString& str, size_t nStart2, size_t nLen2) const; // substring comparison with first nCount characters of sz +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING int compare(size_t nStart, size_t nLen, const char* sz, size_t nCount = npos) const; +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING int compare(size_t nStart, size_t nLen, const wchar_t* sz, size_t nCount = npos) const; @@ -2648,6 +2755,7 @@ public: } // insert first n (or all if n == npos) characters of sz +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& insert(size_t nPos, const char *sz) { wxSTRING_INVALIDATE_CACHE(); @@ -2656,6 +2764,7 @@ public: return *this; } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& insert(size_t nPos, const wchar_t *sz) { @@ -2664,6 +2773,7 @@ public: m_impl.insert(PosToImpl(nPos), ImplStr(sz)); return *this; } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& insert(size_t nPos, const char *sz, size_t n) { wxSTRING_UPDATE_CACHED_LENGTH(n); @@ -2673,6 +2783,7 @@ public: return *this; } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& insert(size_t nPos, const wchar_t *sz, size_t n) { @@ -2719,8 +2830,10 @@ public: } #if WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING void insert(iterator it, const char *first, const char *last) { insert(it - begin(), first, last - first); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING void insert(iterator it, const wchar_t *first, const wchar_t *last) { insert(it - begin(), first, last - first); } void insert(iterator it, const wxCStrData& first, const wxCStrData& last) @@ -2772,6 +2885,7 @@ public: } // replaces the substring of length nLen starting at nStart +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& replace(size_t nStart, size_t nLen, const char* sz) { wxSTRING_INVALIDATE_CACHE(); @@ -2782,6 +2896,7 @@ public: return *this; } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& replace(size_t nStart, size_t nLen, const wchar_t* sz) { @@ -2840,6 +2955,7 @@ public: } // replaces the substring with first nCount chars of sz +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& replace(size_t nStart, size_t nLen, const char* sz, size_t nCount) { @@ -2854,6 +2970,7 @@ public: return *this; } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& replace(size_t nStart, size_t nLen, const wchar_t* sz, size_t nCount) @@ -2882,6 +2999,7 @@ public: return *this; } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& replace(iterator first, iterator last, const char* s) { wxSTRING_INVALIDATE_CACHE(); @@ -2890,6 +3008,7 @@ public: return *this; } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& replace(iterator first, iterator last, const wchar_t* s) { @@ -2900,6 +3019,7 @@ public: return *this; } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& replace(iterator first, iterator last, const char* s, size_type n) { wxSTRING_INVALIDATE_CACHE(); @@ -2909,6 +3029,7 @@ public: return *this; } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& replace(iterator first, iterator last, const wchar_t* s, size_type n) { @@ -2952,9 +3073,11 @@ public: return *this; } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& replace(iterator first, iterator last, const char *first1, const char *last1) { replace(first, last, first1, last1 - first1); return *this; } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& replace(iterator first, iterator last, const wchar_t *first1, const wchar_t *last1) { replace(first, last, first1, last1 - first1); return *this; } @@ -2978,18 +3101,22 @@ public: { return PosFromImpl(m_impl.find(str.m_impl, PosToImpl(nStart))); } // find first n characters of sz +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find(const char* sz, size_t nStart = 0, size_t n = npos) const { SubstrBufFromMB str(ImplStr(sz, n)); return PosFromImpl(m_impl.find(str.data, PosToImpl(nStart), str.len)); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find(const wchar_t* sz, size_t nStart = 0, size_t n = npos) const { SubstrBufFromWC str(ImplStr(sz, n)); return PosFromImpl(m_impl.find(str.data, PosToImpl(nStart), str.len)); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find(const wxScopedCharBuffer& s, size_t nStart = 0, size_t n = npos) const { return find(s.data(), nStart, n); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find(const wxScopedWCharBuffer& s, size_t nStart = 0, size_t n = npos) const { return find(s.data(), nStart, n); } size_t find(const wxCStrData& s, size_t nStart = 0, size_t n = npos) const @@ -3021,18 +3148,22 @@ public: { return PosFromImpl(m_impl.rfind(str.m_impl, PosToImpl(nStart))); } // as find, but from the end +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t rfind(const char* sz, size_t nStart = npos, size_t n = npos) const { SubstrBufFromMB str(ImplStr(sz, n)); return PosFromImpl(m_impl.rfind(str.data, PosToImpl(nStart), str.len)); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t rfind(const wchar_t* sz, size_t nStart = npos, size_t n = npos) const { SubstrBufFromWC str(ImplStr(sz, n)); return PosFromImpl(m_impl.rfind(str.data, PosToImpl(nStart), str.len)); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t rfind(const wxScopedCharBuffer& s, size_t nStart = npos, size_t n = npos) const { return rfind(s.data(), nStart, n); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t rfind(const wxScopedWCharBuffer& s, size_t nStart = npos, size_t n = npos) const { return rfind(s.data(), nStart, n); } size_t rfind(const wxCStrData& s, size_t nStart = npos, size_t n = npos) const @@ -3063,12 +3194,16 @@ public: // should we care? Probably not. size_t find_first_of(const wxString& str, size_t nStart = 0) const { return m_impl.find_first_of(str.m_impl, nStart); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_first_of(const char* sz, size_t nStart = 0) const { return m_impl.find_first_of(ImplStr(sz), nStart); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_first_of(const wchar_t* sz, size_t nStart = 0) const { return m_impl.find_first_of(ImplStr(sz), nStart); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_first_of(const char* sz, size_t nStart, size_t n) const { return m_impl.find_first_of(ImplStr(sz), nStart, n); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_first_of(const wchar_t* sz, size_t nStart, size_t n) const { return m_impl.find_first_of(ImplStr(sz), nStart, n); } size_t find_first_of(wxUniChar c, size_t nStart = 0) const @@ -3076,12 +3211,16 @@ public: size_t find_last_of(const wxString& str, size_t nStart = npos) const { return m_impl.find_last_of(str.m_impl, nStart); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_last_of(const char* sz, size_t nStart = npos) const { return m_impl.find_last_of(ImplStr(sz), nStart); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_last_of(const wchar_t* sz, size_t nStart = npos) const { return m_impl.find_last_of(ImplStr(sz), nStart); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_last_of(const char* sz, size_t nStart, size_t n) const { return m_impl.find_last_of(ImplStr(sz), nStart, n); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_last_of(const wchar_t* sz, size_t nStart, size_t n) const { return m_impl.find_last_of(ImplStr(sz), nStart, n); } size_t find_last_of(wxUniChar c, size_t nStart = npos) const @@ -3089,12 +3228,16 @@ public: size_t find_first_not_of(const wxString& str, size_t nStart = 0) const { return m_impl.find_first_not_of(str.m_impl, nStart); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_first_not_of(const char* sz, size_t nStart = 0) const { return m_impl.find_first_not_of(ImplStr(sz), nStart); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_first_not_of(const wchar_t* sz, size_t nStart = 0) const { return m_impl.find_first_not_of(ImplStr(sz), nStart); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_first_not_of(const char* sz, size_t nStart, size_t n) const { return m_impl.find_first_not_of(ImplStr(sz), nStart, n); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_first_not_of(const wchar_t* sz, size_t nStart, size_t n) const { return m_impl.find_first_not_of(ImplStr(sz), nStart, n); } size_t find_first_not_of(wxUniChar c, size_t nStart = 0) const @@ -3102,12 +3245,16 @@ public: size_t find_last_not_of(const wxString& str, size_t nStart = npos) const { return m_impl.find_last_not_of(str.m_impl, nStart); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_last_not_of(const char* sz, size_t nStart = npos) const { return m_impl.find_last_not_of(ImplStr(sz), nStart); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_last_not_of(const wchar_t* sz, size_t nStart = npos) const { return m_impl.find_last_not_of(ImplStr(sz), nStart); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_last_not_of(const char* sz, size_t nStart, size_t n) const { return m_impl.find_last_not_of(ImplStr(sz), nStart, n); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_last_not_of(const wchar_t* sz, size_t nStart, size_t n) const { return m_impl.find_last_not_of(ImplStr(sz), nStart, n); } size_t find_last_not_of(wxUniChar c, size_t nStart = npos) const @@ -3124,9 +3271,13 @@ public: { return find_first_of(str.mb_str(), nStart); } #endif // same as above +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_first_of(const char* sz, size_t nStart = 0) const; +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_first_of(const wchar_t* sz, size_t nStart = 0) const; +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_first_of(const char* sz, size_t nStart, size_t n) const; +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_first_of(const wchar_t* sz, size_t nStart, size_t n) const; // same as find(char, size_t) size_t find_first_of(wxUniChar c, size_t nStart = 0) const @@ -3139,9 +3290,13 @@ public: { return find_last_of(str.mb_str(), nStart); } #endif // same as above +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_last_of (const char* sz, size_t nStart = npos) const; +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_last_of (const wchar_t* sz, size_t nStart = npos) const; +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_last_of(const char* sz, size_t nStart, size_t n) const; +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_last_of(const wchar_t* sz, size_t nStart, size_t n) const; // same as above size_t find_last_of(wxUniChar c, size_t nStart = npos) const @@ -3157,9 +3312,13 @@ public: { return find_first_not_of(str.mb_str(), nStart); } #endif // same as above +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_first_not_of(const char* sz, size_t nStart = 0) const; +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_first_not_of(const wchar_t* sz, size_t nStart = 0) const; +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_first_not_of(const char* sz, size_t nStart, size_t n) const; +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_first_not_of(const wchar_t* sz, size_t nStart, size_t n) const; // same as above size_t find_first_not_of(wxUniChar ch, size_t nStart = 0) const; @@ -3171,9 +3330,13 @@ public: { return find_last_not_of(str.mb_str(), nStart); } #endif // same as above +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_last_not_of(const char* sz, size_t nStart = npos) const; +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_last_not_of(const wchar_t* sz, size_t nStart = npos) const; +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_last_not_of(const char* sz, size_t nStart, size_t n) const; +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_last_not_of(const wchar_t* sz, size_t nStart, size_t n) const; // same as above size_t find_last_not_of(wxUniChar ch, size_t nStart = npos) const; @@ -3217,67 +3380,87 @@ public: // and additional overloads for the versions taking strings: size_t find_first_of(const wxCStrData& sz, size_t nStart = 0) const { return find_first_of(sz.AsString(), nStart); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_first_of(const wxScopedCharBuffer& sz, size_t nStart = 0) const { return find_first_of(sz.data(), nStart); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_first_of(const wxScopedWCharBuffer& sz, size_t nStart = 0) const { return find_first_of(sz.data(), nStart); } size_t find_first_of(const wxCStrData& sz, size_t nStart, size_t n) const { return find_first_of(sz.AsWChar(), nStart, n); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_first_of(const wxScopedCharBuffer& sz, size_t nStart, size_t n) const { return find_first_of(sz.data(), nStart, n); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_first_of(const wxScopedWCharBuffer& sz, size_t nStart, size_t n) const { return find_first_of(sz.data(), nStart, n); } size_t find_last_of(const wxCStrData& sz, size_t nStart = 0) const { return find_last_of(sz.AsString(), nStart); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_last_of(const wxScopedCharBuffer& sz, size_t nStart = 0) const { return find_last_of(sz.data(), nStart); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_last_of(const wxScopedWCharBuffer& sz, size_t nStart = 0) const { return find_last_of(sz.data(), nStart); } size_t find_last_of(const wxCStrData& sz, size_t nStart, size_t n) const { return find_last_of(sz.AsWChar(), nStart, n); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_last_of(const wxScopedCharBuffer& sz, size_t nStart, size_t n) const { return find_last_of(sz.data(), nStart, n); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_last_of(const wxScopedWCharBuffer& sz, size_t nStart, size_t n) const { return find_last_of(sz.data(), nStart, n); } size_t find_first_not_of(const wxCStrData& sz, size_t nStart = 0) const { return find_first_not_of(sz.AsString(), nStart); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_first_not_of(const wxScopedCharBuffer& sz, size_t nStart = 0) const { return find_first_not_of(sz.data(), nStart); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_first_not_of(const wxScopedWCharBuffer& sz, size_t nStart = 0) const { return find_first_not_of(sz.data(), nStart); } size_t find_first_not_of(const wxCStrData& sz, size_t nStart, size_t n) const { return find_first_not_of(sz.AsWChar(), nStart, n); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_first_not_of(const wxScopedCharBuffer& sz, size_t nStart, size_t n) const { return find_first_not_of(sz.data(), nStart, n); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_first_not_of(const wxScopedWCharBuffer& sz, size_t nStart, size_t n) const { return find_first_not_of(sz.data(), nStart, n); } size_t find_last_not_of(const wxCStrData& sz, size_t nStart = 0) const { return find_last_not_of(sz.AsString(), nStart); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_last_not_of(const wxScopedCharBuffer& sz, size_t nStart = 0) const { return find_last_not_of(sz.data(), nStart); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_last_not_of(const wxScopedWCharBuffer& sz, size_t nStart = 0) const { return find_last_not_of(sz.data(), nStart); } size_t find_last_not_of(const wxCStrData& sz, size_t nStart, size_t n) const { return find_last_not_of(sz.AsWChar(), nStart, n); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_last_not_of(const wxScopedCharBuffer& sz, size_t nStart, size_t n) const { return find_last_not_of(sz.data(), nStart, n); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING size_t find_last_not_of(const wxScopedWCharBuffer& sz, size_t nStart, size_t n) const { return find_last_not_of(sz.data(), nStart, n); } bool starts_with(const wxString &str) const { return StartsWith(str); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING bool starts_with(const char *sz) const { return StartsWith(sz); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING bool starts_with(const wchar_t *sz) const { return StartsWith(sz); } bool ends_with(const wxString &str) const { return EndsWith(str); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING bool ends_with(const char *sz) const { return EndsWith(sz); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING bool ends_with(const wchar_t *sz) const { return EndsWith(sz); } @@ -3290,6 +3473,7 @@ public: return *this; } // string += C string +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& operator+=(const char *psz) { wxSTRING_INVALIDATE_CACHED_LENGTH(); @@ -3297,6 +3481,7 @@ public: m_impl += ImplStr(psz); return *this; } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& operator+=(const wchar_t *pwz) { wxSTRING_INVALIDATE_CACHED_LENGTH(); @@ -3311,8 +3496,10 @@ public: m_impl += s.AsString().m_impl; return *this; } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString& operator+=(const wxScopedCharBuffer& s) { return append(s); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString& operator+=(const wxScopedWCharBuffer& s) { return append(s); } // string += char @@ -3524,9 +3711,13 @@ inline wxString::const_reverse_iterator operator+(ptrdiff_t n, wxString::const_r // here as friend ones are not injected in the enclosing namespace and without // them the code fails to compile with conforming compilers such as xlC or g++4 wxString WXDLLIMPEXP_BASE operator+(const wxString& string1, const wxString& string2); +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString WXDLLIMPEXP_BASE operator+(const wxString& string, const char *psz); +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString WXDLLIMPEXP_BASE operator+(const wxString& string, const wchar_t *pwz); +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxString WXDLLIMPEXP_BASE operator+(const char *psz, const wxString& string); +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxString WXDLLIMPEXP_BASE operator+(const wchar_t *pwz, const wxString& string); wxString WXDLLIMPEXP_BASE operator+(const wxString& string, wxUniChar ch); @@ -3562,7 +3753,7 @@ struct wxStringAsBufHelper { static wxScopedCharBuffer Get(const wxString& s, size_t *len) { - wxScopedCharBuffer buf(s.mb_str()); + wxScopedCharBuffer buf(s.mb_str(wxConvUTF8)); if ( len ) *len = buf ? strlen(buf) : 0; return buf; @@ -3869,7 +4060,9 @@ public: #define wxCMP_WXCHAR_STRING(p, s, op) 0 op s.Cmp(p) wxDEFINE_ALL_COMPARISONS(const wchar_t *, const wxString&, wxCMP_WXCHAR_STRING) +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxDEFINE_ALL_COMPARISONS(const char *, const wxString&, wxCMP_WXCHAR_STRING) +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING #undef wxCMP_WXCHAR_STRING @@ -3904,6 +4097,7 @@ inline bool operator!=(const wxString& s1, const wxScopedWCharBuffer& s2) inline bool operator!=(const wxScopedWCharBuffer& s1, const wxString& s2) { return (s2.Cmp((const wchar_t *)s1) != 0); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline bool operator==(const wxString& s1, const wxScopedCharBuffer& s2) { return (s1.Cmp((const char *)s2) == 0); } inline bool operator==(const wxScopedCharBuffer& s1, const wxString& s2) @@ -3912,16 +4106,19 @@ inline bool operator!=(const wxString& s1, const wxScopedCharBuffer& s2) { return (s1.Cmp((const char *)s2) != 0); } inline bool operator!=(const wxScopedCharBuffer& s1, const wxString& s2) { return (s2.Cmp((const char *)s1) != 0); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING inline wxString operator+(const wxString& string, const wxScopedWCharBuffer& buf) { return string + (const wchar_t *)buf; } inline wxString operator+(const wxScopedWCharBuffer& buf, const wxString& string) { return (const wchar_t *)buf + string; } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline wxString operator+(const wxString& string, const wxScopedCharBuffer& buf) { return string + (const char *)buf; } inline wxString operator+(const wxScopedCharBuffer& buf, const wxString& string) { return (const char *)buf + string; } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING // comparison with char inline bool operator==(const wxUniChar& c, const wxString& s) { return s.IsSameAs(c); } @@ -3980,7 +4177,9 @@ inline bool wxString::iterator::operator>=(const const_iterator& i) const #define wxCMP_WCHAR_CSTRDATA(p, s, op) p op s.AsWChar() wxDEFINE_ALL_COMPARISONS(const wchar_t *, const wxCStrData&, wxCMP_WCHAR_CSTRDATA) +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxDEFINE_ALL_COMPARISONS(const char *, const wxCStrData&, wxCMP_CHAR_CSTRDATA) +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING #undef wxCMP_CHAR_CSTRDATA #undef wxCMP_WCHAR_CSTRDATA @@ -4029,7 +4228,9 @@ namespace std WXDLLIMPEXP_BASE wxSTD ostream& operator<<(wxSTD ostream&, const wxString&); WXDLLIMPEXP_BASE wxSTD ostream& operator<<(wxSTD ostream&, const wxCStrData&); +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING WXDLLIMPEXP_BASE wxSTD ostream& operator<<(wxSTD ostream&, const wxScopedCharBuffer&); +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING WXDLLIMPEXP_BASE wxSTD ostream& operator<<(wxSTD ostream&, const wxScopedWCharBuffer&); #if wxUSE_UNICODE && defined(HAVE_WOSTREAM) @@ -4046,8 +4247,10 @@ WXDLLIMPEXP_BASE wxSTD wostream& operator<<(wxSTD wostream&, const wxScopedWChar // wxCStrData implementation // --------------------------------------------------------------------------- +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline wxCStrData::wxCStrData(char *buf) : m_str(new wxString(buf)), m_offset(0), m_owned(true) {} +#endif inline wxCStrData::wxCStrData(wchar_t *buf) : m_str(new wxString(buf)), m_offset(0), m_owned(true) {} @@ -4100,6 +4303,7 @@ inline const wchar_t* wxCStrData::AsWChar() const return p + m_offset; } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline const char* wxCStrData::AsChar() const { #if wxUSE_UNICODE && !wxUSE_UTF8_LOCALE_ONLY @@ -4112,6 +4316,7 @@ inline const char* wxCStrData::AsChar() const return p + m_offset; } +#endif inline wxString wxCStrData::AsString() const { @@ -4149,12 +4354,14 @@ inline wxUniChar wxCStrData::operator[](size_t n) const // more wxCStrData operators // ---------------------------------------------------------------------------- +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING // we need to define those to allow "size_t pos = p - s.c_str()" where p is // some pointer into the string inline size_t operator-(const char *p, const wxCStrData& cs) { return p - cs.AsChar(); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING inline size_t operator-(const wchar_t *p, const wxCStrData& cs) { @@ -4165,11 +4372,13 @@ inline size_t operator-(const wchar_t *p, const wxCStrData& cs) // implementation of wx[W]CharBuffer inline methods using wxCStrData // ---------------------------------------------------------------------------- +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING // FIXME-UTF8: move this to buffer.h inline wxCharBuffer::wxCharBuffer(const wxCStrData& cstr) : wxCharTypeBufferBase(cstr.AsCharBuf()) { } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING inline wxWCharBuffer::wxWCharBuffer(const wxCStrData& cstr) : wxCharTypeBufferBase(cstr.AsWCharBuf()) diff --git a/include/wx/strvararg.h b/include/wx/strvararg.h index 82cb94536f..3a363a3dee 100644 --- a/include/wx/strvararg.h +++ b/include/wx/strvararg.h @@ -133,16 +133,20 @@ class WXDLLIMPEXP_FWD_BASE wxString; class WXDLLIMPEXP_BASE wxFormatString { public: +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxFormatString(const char *str) : m_char(wxScopedCharBuffer::CreateNonOwned(str)), m_str(NULL), m_cstr(NULL) {} +#endif wxFormatString(const wchar_t *str) : m_wchar(wxScopedWCharBuffer::CreateNonOwned(str)), m_str(NULL), m_cstr(NULL) {} wxFormatString(const wxString& str) : m_str(&str), m_cstr(NULL) {} wxFormatString(const wxCStrData& str) : m_str(NULL), m_cstr(&str) {} +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxFormatString(const wxScopedCharBuffer& str) : m_char(str), m_str(NULL), m_cstr(NULL) {} +#endif wxFormatString(const wxScopedWCharBuffer& str) : m_wchar(str), m_str(NULL), m_cstr(NULL) {} @@ -201,7 +205,7 @@ public: // to other InputAsXXX() methods wxString InputAsString() const; -#if !wxUSE_UNICODE_WCHAR +#if !wxUSE_UNICODE_WCHAR && !defined wxNO_IMPLICIT_WXSTRING_ENCODING operator const char*() const { return const_cast(this)->AsChar(); } private: @@ -212,7 +216,7 @@ private: const char* InputAsChar(); const char* AsChar(); wxScopedCharBuffer m_convertedChar; -#endif // !wxUSE_UNICODE_WCHAR +#endif // !wxUSE_UNICODE_WCHAR && !defined wx_NO_IMPLICIT_WXSTRING_ENCODING #if wxUSE_UNICODE && !wxUSE_UTF8_LOCALE_ONLY public: @@ -284,7 +288,12 @@ struct wxFormatStringArgumentFinder template<> struct wxFormatStringArgumentFinder - : public wxFormatStringArgumentFinder {}; + : public wxFormatStringArgumentFinder { +#ifdef wxNO_IMPLICIT_WXSTRING_ENCODING +private: + wxFormatStringArgumentFinder(); // Disabled +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING +}; template<> struct wxFormatStringArgumentFinder @@ -292,7 +301,12 @@ struct wxFormatStringArgumentFinder template<> struct wxFormatStringArgumentFinder - : public wxFormatStringArgumentFinder {}; + : public wxFormatStringArgumentFinder { +#ifdef wxNO_IMPLICIT_WXSTRING_ENCODING +private: + wxFormatStringArgumentFinder(); // Disabled +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING +}; template<> struct wxFormatStringArgumentFinder @@ -387,6 +401,13 @@ struct wxFormatStringSpecifier enum { value = arg }; \ }; +#define wxDISABLED_FORMAT_STRING_SPECIFIER(T) \ + template<> struct wxFormatStringSpecifier \ + { \ + private: \ + wxFormatStringSpecifier(); /* Disabled */ \ + }; + wxFORMAT_STRING_SPECIFIER(bool, wxFormatString::Arg_Int) wxFORMAT_STRING_SPECIFIER(int, wxFormatString::Arg_Int) wxFORMAT_STRING_SPECIFIER(unsigned int, wxFormatString::Arg_Int) @@ -406,18 +427,27 @@ wxFORMAT_STRING_SPECIFIER(long double, wxFormatString::Arg_LongDouble) wxFORMAT_STRING_SPECIFIER(wchar_t, wxFormatString::Arg_Char | wxFormatString::Arg_Int) #endif -#if !wxUSE_UNICODE +#if !wxUSE_UNICODE && !defined wxNO_IMPLICIT_WXSTRING_ENCODING wxFORMAT_STRING_SPECIFIER(char, wxFormatString::Arg_Char | wxFormatString::Arg_Int) wxFORMAT_STRING_SPECIFIER(signed char, wxFormatString::Arg_Char | wxFormatString::Arg_Int) wxFORMAT_STRING_SPECIFIER(unsigned char, wxFormatString::Arg_Char | wxFormatString::Arg_Int) #endif +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxFORMAT_STRING_SPECIFIER(char*, wxFormatString::Arg_String) wxFORMAT_STRING_SPECIFIER(unsigned char*, wxFormatString::Arg_String) wxFORMAT_STRING_SPECIFIER(signed char*, wxFormatString::Arg_String) wxFORMAT_STRING_SPECIFIER(const char*, wxFormatString::Arg_String) wxFORMAT_STRING_SPECIFIER(const unsigned char*, wxFormatString::Arg_String) wxFORMAT_STRING_SPECIFIER(const signed char*, wxFormatString::Arg_String) +#else // wxNO_IMPLICIT_WXSTRING_ENCODING +wxDISABLED_FORMAT_STRING_SPECIFIER(char*) +wxDISABLED_FORMAT_STRING_SPECIFIER(unsigned char*) +wxDISABLED_FORMAT_STRING_SPECIFIER(signed char*) +wxDISABLED_FORMAT_STRING_SPECIFIER(const char*) +wxDISABLED_FORMAT_STRING_SPECIFIER(const unsigned char*) +wxDISABLED_FORMAT_STRING_SPECIFIER(const signed char*) +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxFORMAT_STRING_SPECIFIER(wchar_t*, wxFormatString::Arg_String) wxFORMAT_STRING_SPECIFIER(const wchar_t*, wxFormatString::Arg_String) @@ -430,6 +460,7 @@ wxFORMAT_STRING_SPECIFIER(std::nullptr_t, wxFormatString::Arg_Pointer) #endif #undef wxFORMAT_STRING_SPECIFIER +#undef wxDISABLED_FORMAT_STRING_SPECIFIER // Converts an argument passed to wxPrint etc. into standard form expected, @@ -571,6 +602,7 @@ struct WXDLLIMPEXP_BASE wxArgNormalizerWchar // char* for wchar_t Unicode build or UTF8): #if wxUSE_UNICODE_WCHAR +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING template<> struct wxArgNormalizerWchar : public wxArgNormalizerWithBuffer @@ -579,6 +611,7 @@ struct wxArgNormalizerWchar const wxFormatString *fmt, unsigned index) : wxArgNormalizerWithBuffer(wxConvLibc.cMB2WC(s), fmt, index) {} }; +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING #elif wxUSE_UNICODE_UTF8 @@ -591,6 +624,7 @@ struct wxArgNormalizerUtf8 : wxArgNormalizerWithBuffer(wxConvUTF8.cWC2MB(s), fmt, index) {} }; +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING template<> struct wxArgNormalizerUtf8 : public wxArgNormalizerWithBuffer @@ -616,9 +650,10 @@ struct wxArgNormalizerUtf8 } } }; +#endif // UTF-8 build needs conversion to wchar_t* too: -#if !wxUSE_UTF8_LOCALE_ONLY +#if !wxUSE_UTF8_LOCALE_ONLY && !defined wxNO_IMPLICIT_WXSTRING_ENCODING template<> struct wxArgNormalizerWchar : public wxArgNormalizerWithBuffer @@ -627,10 +662,11 @@ struct wxArgNormalizerWchar const wxFormatString *fmt, unsigned index) : wxArgNormalizerWithBuffer(wxConvLibc.cMB2WC(s), fmt, index) {} }; -#endif // !wxUSE_UTF8_LOCALE_ONLY +#endif // !wxUSE_UTF8_LOCALE_ONLY && !defined wxNO_IMPLICIT_WXSTRING_ENCODING #else // ANSI - FIXME-UTF8 +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING template<> struct wxArgNormalizerWchar : public wxArgNormalizerWithBuffer @@ -639,10 +675,56 @@ struct wxArgNormalizerWchar const wxFormatString *fmt, unsigned index) : wxArgNormalizerWithBuffer(wxConvLibc.cWC2MB(s), fmt, index) {} }; +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING #endif // wxUSE_UNICODE_WCHAR/wxUSE_UNICODE_UTF8/ANSI +#ifdef wxNO_IMPLICIT_WXSTRING_ENCODING +// wxArgNormalizer specializations that cannot be instanced +template<> +struct wxArgNormalizer { +private: + wxArgNormalizer(const char*, const wxFormatString *, + unsigned); + const char *get() const; +}; +template<> +struct wxArgNormalizer { +private: + wxArgNormalizer(const char*, const wxFormatString *, unsigned); + char *get() const; +}; +template<> +struct wxArgNormalizer { +private: + wxArgNormalizer(const std::string&, + const wxFormatString *, unsigned); + std::string get() const; +}; +template<> +struct wxArgNormalizer { +private: + wxArgNormalizer(std::string&, + const wxFormatString *, unsigned); + std::string get() const; +}; +template<> +struct wxArgNormalizer { +private: + wxArgNormalizer(wxCharBuffer&, + const wxFormatString *, unsigned); + std::string get() const; +}; +template<> +struct wxArgNormalizer { +private: + wxArgNormalizer(wxScopedCharBuffer&, + const wxFormatString *, unsigned); + std::string get() const; +}; +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING + // this macro is used to implement specialization that are exactly same as // some other specialization, i.e. to "forward" the implementation (e.g. for // T=wxString and T=const wxString&). Note that the ctor takes BaseT argument, @@ -675,16 +757,22 @@ WX_ARG_NORMALIZER_FORWARD(wxString, const wxString&); WX_ARG_NORMALIZER_FORWARD(wxCStrData, const wxCStrData&); // versions for passing non-const pointers: +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING WX_ARG_NORMALIZER_FORWARD(char*, const char*); +#endif WX_ARG_NORMALIZER_FORWARD(wchar_t*, const wchar_t*); // versions for passing wx[W]CharBuffer: +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING WX_ARG_NORMALIZER_FORWARD(wxScopedCharBuffer, const char*); WX_ARG_NORMALIZER_FORWARD(const wxScopedCharBuffer&, const char*); +#endif WX_ARG_NORMALIZER_FORWARD(wxScopedWCharBuffer, const wchar_t*); WX_ARG_NORMALIZER_FORWARD(const wxScopedWCharBuffer&, const wchar_t*); +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING WX_ARG_NORMALIZER_FORWARD(wxCharBuffer, const char*); WX_ARG_NORMALIZER_FORWARD(const wxCharBuffer&, const char*); +#endif WX_ARG_NORMALIZER_FORWARD(wxWCharBuffer, const wchar_t*); WX_ARG_NORMALIZER_FORWARD(const wxWCharBuffer&, const wchar_t*); @@ -694,6 +782,7 @@ WX_ARG_NORMALIZER_FORWARD(const wxWCharBuffer&, const wchar_t*); #include "wx/stringimpl.h" #if !wxUSE_UTF8_LOCALE_ONLY +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING template<> struct wxArgNormalizerWchar : public wxArgNormalizerWchar @@ -702,6 +791,7 @@ struct wxArgNormalizerWchar const wxFormatString *fmt, unsigned index) : wxArgNormalizerWchar(s.c_str(), fmt, index) {} }; +#endif // NO_IMPLICIT_WXSTRING_ENCODING template<> struct wxArgNormalizerWchar @@ -714,6 +804,7 @@ struct wxArgNormalizerWchar #endif // !wxUSE_UTF8_LOCALE_ONLY #if wxUSE_UNICODE_UTF8 +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING template<> struct wxArgNormalizerUtf8 : public wxArgNormalizerUtf8 @@ -722,6 +813,7 @@ struct wxArgNormalizerUtf8 const wxFormatString *fmt, unsigned index) : wxArgNormalizerUtf8(s.c_str(), fmt, index) {} }; +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING template<> struct wxArgNormalizerUtf8 @@ -733,7 +825,9 @@ struct wxArgNormalizerUtf8 }; #endif // wxUSE_UNICODE_UTF8 +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING WX_ARG_NORMALIZER_FORWARD(std::string, const std::string&); +#endif WX_ARG_NORMALIZER_FORWARD(wxStdWideString, const wxStdWideString&); #endif // wxUSE_STD_STRING diff --git a/include/wx/testing.h b/include/wx/testing.h index 6f55d106ee..f97ed66793 100644 --- a/include/wx/testing.h +++ b/include/wx/testing.h @@ -51,7 +51,8 @@ wxGetDialogClassDescription(const wxClassInfo *ci, const std::type_info& ti) // than a readable but useless "wxDialog". if ( ci == wxCLASSINFO(wxDialog) ) { - return wxString::Format("dialog of type \"%s\"", ti.name()); + return wxString::Format(wxASCII_STR("dialog of type \"%s\""), + wxASCII_STR(ti.name())); } // We consider that an unmangled name is clear enough to be used on its own. @@ -247,23 +248,23 @@ protected: { case wxID_YES: case wxID_NO: - details = "wxYES_NO style"; + details = wxASCII_STR("wxYES_NO style"); break; case wxID_CANCEL: - details = "wxCANCEL style"; + details = wxASCII_STR("wxCANCEL style"); break; case wxID_OK: - details = "wxOK style"; + details = wxASCII_STR("wxOK style"); break; default: - details.Printf("a button with ID=%d", m_id); + details.Printf(wxASCII_STR("a button with ID=%d"), m_id); break; } - return "wxMessageDialog with " + details; + return wxASCII_STR("wxMessageDialog with ") + details; } }; @@ -336,7 +337,7 @@ public: ( wxString::Format ( - "Expected %s was not shown.", + wxASCII_STR("Expected %s was not shown."), expect->GetDescription() ) ); @@ -369,7 +370,7 @@ protected: ( wxString::Format ( - "%s was shown unexpectedly, expected %s.", + wxASCII_STR("%s was shown unexpectedly, expected %s."), DescribeUnexpectedDialog(dlg), expect->GetDescription() ) @@ -383,7 +384,7 @@ protected: ( wxString::Format ( - "%s was shown unexpectedly.", + wxASCII_STR("%s was shown unexpectedly."), DescribeUnexpectedDialog(dlg) ) ); @@ -402,14 +403,14 @@ protected: { return wxString::Format ( - "A message box \"%s\"", + wxASCII_STR("A message box \"%s\""), msgdlg->GetMessage() ); } return wxString::Format ( - "A %s with title \"%s\"", + wxASCII_STR("A %s with title \"%s\""), wxGetDialogClassDescription(dlg->GetClassInfo(), typeid(*dlg)), dlg->GetTitle() ); diff --git a/include/wx/toplevel.h b/include/wx/toplevel.h index 0089481189..5632aff027 100644 --- a/include/wx/toplevel.h +++ b/include/wx/toplevel.h @@ -394,7 +394,7 @@ protected: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) : wxTopLevelWindowNative(parent, winid, title, pos, size, style, name) { diff --git a/include/wx/translation.h b/include/wx/translation.h index df43a6def8..f877ed0a83 100644 --- a/include/wx/translation.h +++ b/include/wx/translation.h @@ -35,7 +35,11 @@ // --keyword="_" --keyword="wxPLURAL:1,2" options // to extract the strings from the sources) #ifndef WXINTL_NO_GETTEXT_MACRO +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING #define _(s) wxGetTranslation((s)) +#else + #define _(s) wxGetTranslation(wxASCII_STR(s)) +#endif #define wxPLURAL(sing, plur, n) wxGetTranslation((sing), (plur), n) #endif @@ -43,8 +47,13 @@ // them, you need to also add // --keyword="wxGETTEXT_IN_CONTEXT:1c,2" --keyword="wxGETTEXT_IN_CONTEXT_PLURAL:1c,2,3" // options to xgettext invocation. +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING #define wxGETTEXT_IN_CONTEXT(c, s) \ wxGetTranslation((s), wxString(), c) +#else +#define wxGETTEXT_IN_CONTEXT(c, s) \ + wxGetTranslation(wxASCII_STR(s), wxString(), c) +#endif #define wxGETTEXT_IN_CONTEXT_PLURAL(c, sing, plur, n) \ wxGetTranslation((sing), (plur), n, wxString(), c) @@ -143,7 +152,7 @@ public: // find best translation language for given domain wxString GetBestTranslation(const wxString& domain, wxLanguage msgIdLanguage); wxString GetBestTranslation(const wxString& domain, - const wxString& msgIdLanguage = "en"); + const wxString& msgIdLanguage = wxASCII_STR("en")); // add standard wxWidgets catalog ("wxstd") bool AddStdCatalog(); @@ -244,7 +253,7 @@ public: protected: // returns resource type to use for translations - virtual wxString GetResourceType() const { return "MOFILE"; } + virtual wxString GetResourceType() const { return wxASCII_STR("MOFILE"); } // returns module to load resources from virtual WXHINSTANCE GetModule() const { return NULL; } @@ -291,13 +300,44 @@ inline const wxString& wxGetTranslation(const wxString& str1, : wxTranslations::GetUntranslatedString(str2); } +#ifdef wxNO_IMPLICIT_WXSTRING_ENCODING + +/* + * It must always be possible to call wxGetTranslation() with const + * char* arguments. + */ +inline const wxString& wxGetTranslation(const char *str, + const char *domain = "", + const char *context = "") { + const wxMBConv &conv = wxConvWhateverWorks; + return wxGetTranslation(wxString(str, conv), wxString(domain, conv), + wxString(context, conv)); +} + +inline const wxString& wxGetTranslation(const char *str1, + const char *str2, + unsigned n, + const char *domain = "", + const char *context = "") { + const wxMBConv &conv = wxConvWhateverWorks; + return wxGetTranslation(wxString(str1, conv), wxString(str2, conv), n, + wxString(domain, conv), + wxString(context, conv)); +} + +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING + #else // !wxUSE_INTL // the macros should still be defined - otherwise compilation would fail #if !defined(WXINTL_NO_GETTEXT_MACRO) #if !defined(_) +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING #define _(s) (s) +#else + #define _(s) wxASCII_STR(s) +#endif #endif #define wxPLURAL(sing, plur, n) ((n) == 1 ? (sing) : (plur)) #define wxGETTEXT_IN_CONTEXT(c, s) (s) diff --git a/include/wx/treelist.h b/include/wx/treelist.h index 68d15ca733..5680c31547 100644 --- a/include/wx/treelist.h +++ b/include/wx/treelist.h @@ -131,7 +131,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTL_DEFAULT_STYLE, - const wxString& name = wxTreeListCtrlNameStr) + const wxString& name = wxASCII_STR(wxTreeListCtrlNameStr)) { Init(); @@ -143,7 +143,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTL_DEFAULT_STYLE, - const wxString& name = wxTreeListCtrlNameStr); + const wxString& name = wxASCII_STR(wxTreeListCtrlNameStr)); virtual ~wxTreeListCtrl(); diff --git a/include/wx/univ/bmpbuttn.h b/include/wx/univ/bmpbuttn.h index ebb3a619e7..6c37b78193 100644 --- a/include/wx/univ/bmpbuttn.h +++ b/include/wx/univ/bmpbuttn.h @@ -23,7 +23,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) + const wxString& name = wxASCII_STR(wxButtonNameStr)) { Create(parent, id, bitmap, pos, size, style, validator, name); } @@ -35,7 +35,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); + const wxString& name = wxASCII_STR(wxButtonNameStr)); virtual void SetMargins(int x, int y) wxOVERRIDE { diff --git a/include/wx/univ/button.h b/include/wx/univ/button.h index 16a58b1d7c..14684580da 100644 --- a/include/wx/univ/button.h +++ b/include/wx/univ/button.h @@ -38,7 +38,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) + const wxString& name = wxASCII_STR(wxButtonNameStr)) { Init(); @@ -52,7 +52,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) + const wxString& name = wxASCII_STR(wxButtonNameStr)) { Init(); @@ -66,7 +66,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) + const wxString& name = wxASCII_STR(wxButtonNameStr)) { return Create(parent, id, wxNullBitmap, label, pos, size, style, validator, name); @@ -80,7 +80,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr); + const wxString& name = wxASCII_STR(wxButtonNameStr)); virtual ~wxButton(); diff --git a/include/wx/univ/checkbox.h b/include/wx/univ/checkbox.h index 8e4a8fa028..f1b4c79bb2 100644 --- a/include/wx/univ/checkbox.h +++ b/include/wx/univ/checkbox.h @@ -58,7 +58,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr) + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)) { Init(); @@ -72,7 +72,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)); // implement the checkbox interface virtual void SetValue(bool value) wxOVERRIDE; diff --git a/include/wx/univ/checklst.h b/include/wx/univ/checklst.h index 7b20f37eee..f93be1eaa7 100644 --- a/include/wx/univ/checklst.h +++ b/include/wx/univ/checklst.h @@ -35,7 +35,7 @@ public: const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr) + const wxString& name = wxASCII_STR(wxListBoxNameStr)) { Init(); @@ -48,7 +48,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -58,7 +58,7 @@ public: const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, @@ -66,7 +66,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); // implement check list box methods virtual bool IsChecked(unsigned int item) const wxOVERRIDE; diff --git a/include/wx/univ/choice.h b/include/wx/univ/choice.h index b1b5f90337..512e317e3d 100644 --- a/include/wx/univ/choice.h +++ b/include/wx/univ/choice.h @@ -25,7 +25,7 @@ public: int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr) + const wxString& name = wxASCII_STR(wxChoiceNameStr)) { Create(parent, id, pos, size, n, choices, style, validator, name); } @@ -35,7 +35,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr); + const wxString& name = wxASCII_STR(wxChoiceNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, @@ -43,14 +43,14 @@ public: int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr); + const wxString& name = wxASCII_STR(wxChoiceNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxChoiceNameStr); + const wxString& name = wxASCII_STR(wxChoiceNameStr)); private: void OnComboBox(wxCommandEvent &event); diff --git a/include/wx/univ/combobox.h b/include/wx/univ/combobox.h index 2eff8cfb6c..22a7f1665f 100644 --- a/include/wx/univ/combobox.h +++ b/include/wx/univ/combobox.h @@ -49,7 +49,7 @@ public: const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr) + const wxString& name = wxASCII_STR(wxComboBoxNameStr)) { Init(); @@ -64,7 +64,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); + const wxString& name = wxASCII_STR(wxComboBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -75,7 +75,7 @@ public: const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); + const wxString& name = wxASCII_STR(wxComboBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxString& value, @@ -84,7 +84,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); + const wxString& name = wxASCII_STR(wxComboBoxNameStr)); virtual ~wxComboBox(); diff --git a/include/wx/univ/control.h b/include/wx/univ/control.h index f6e228c51b..8a623da0ed 100644 --- a/include/wx/univ/control.h +++ b/include/wx/univ/control.h @@ -47,7 +47,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxControlNameStr) + const wxString& name = wxASCII_STR(wxControlNameStr)) { Init(); @@ -59,7 +59,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxControlNameStr); + const wxString& name = wxASCII_STR(wxControlNameStr)); // this function will filter out '&' characters and will put the // accelerator char (the one immediately after '&') into m_chAccel diff --git a/include/wx/univ/dialog.h b/include/wx/univ/dialog.h index d73f8e5dc5..fa79b88ff4 100644 --- a/include/wx/univ/dialog.h +++ b/include/wx/univ/dialog.h @@ -26,7 +26,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, - const wxString& name = wxDialogNameStr) + const wxString& name = wxASCII_STR(wxDialogNameStr)) { Init(); Create(parent, id, title, pos, size, style, name); @@ -37,7 +37,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, - const wxString& name = wxDialogNameStr); + const wxString& name = wxASCII_STR(wxDialogNameStr)); virtual ~wxDialog(); diff --git a/include/wx/univ/frame.h b/include/wx/univ/frame.h index 2ba413bdc3..823e2d967d 100644 --- a/include/wx/univ/frame.h +++ b/include/wx/univ/frame.h @@ -25,7 +25,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Create(parent, id, title, pos, size, style, name); } @@ -36,7 +36,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); virtual wxPoint GetClientAreaOrigin() const wxOVERRIDE; virtual bool Enable(bool enable = true) wxOVERRIDE; @@ -45,14 +45,14 @@ public: virtual wxStatusBar* CreateStatusBar(int number = 1, long style = wxSTB_DEFAULT_STYLE, wxWindowID id = 0, - const wxString& name = wxStatusLineNameStr) wxOVERRIDE; + const wxString& name = wxASCII_STR(wxStatusLineNameStr)) wxOVERRIDE; #endif // wxUSE_STATUSBAR #if wxUSE_TOOLBAR // create main toolbar bycalling OnCreateToolBar() virtual wxToolBar* CreateToolBar(long style = -1, wxWindowID id = wxID_ANY, - const wxString& name = wxToolBarNameStr) wxOVERRIDE; + const wxString& name = wxASCII_STR(wxToolBarNameStr)) wxOVERRIDE; #endif // wxUSE_TOOLBAR virtual wxSize GetMinSize() const wxOVERRIDE; diff --git a/include/wx/univ/gauge.h b/include/wx/univ/gauge.h index 2784368a4e..a92ca332e4 100644 --- a/include/wx/univ/gauge.h +++ b/include/wx/univ/gauge.h @@ -27,7 +27,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr) + const wxString& name = wxASCII_STR(wxGaugeNameStr)) { Init(); @@ -41,7 +41,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxGaugeNameStr); + const wxString& name = wxASCII_STR(wxGaugeNameStr)); // implement base class virtuals virtual void SetRange(int range) wxOVERRIDE; diff --git a/include/wx/univ/listbox.h b/include/wx/univ/listbox.h index a3834cb82c..cbd2819bbe 100644 --- a/include/wx/univ/listbox.h +++ b/include/wx/univ/listbox.h @@ -59,7 +59,7 @@ public: int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr ) + const wxString& name = wxASCII_STR(wxListBoxNameStr) ) : wxScrollHelper(this) { Init(); @@ -73,7 +73,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr ); + const wxString& name = wxASCII_STR(wxListBoxNameStr) ); virtual ~wxListBox(); @@ -84,7 +84,7 @@ public: int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, @@ -92,7 +92,7 @@ public: const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxListBoxNameStr); + const wxString& name = wxASCII_STR(wxListBoxNameStr)); // implement the listbox interface defined by wxListBoxBase virtual void DoClear() wxOVERRIDE; diff --git a/include/wx/univ/notebook.h b/include/wx/univ/notebook.h index 0a2f8f7f95..f487118206 100644 --- a/include/wx/univ/notebook.h +++ b/include/wx/univ/notebook.h @@ -41,7 +41,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxNotebookNameStr) + const wxString& name = wxASCII_STR(wxNotebookNameStr)) { Init(); @@ -54,7 +54,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxNotebookNameStr); + const wxString& name = wxASCII_STR(wxNotebookNameStr)); // dtor virtual ~wxNotebook(); diff --git a/include/wx/univ/panel.h b/include/wx/univ/panel.h index 626a6c3577..175c26bb91 100644 --- a/include/wx/univ/panel.h +++ b/include/wx/univ/panel.h @@ -24,7 +24,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL | wxNO_BORDER, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) { Create(parent, winid, pos, size, style, name); } @@ -36,7 +36,7 @@ public: wxPanel(wxWindow *parent, int x, int y, int width, int height, long style = wxTAB_TRAVERSAL | wxNO_BORDER, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) { Create(parent, wxID_ANY, wxPoint(x, y), wxSize(width, height), style, name); } diff --git a/include/wx/univ/radiobox.h b/include/wx/univ/radiobox.h index 7c1a7d9750..db67828f00 100644 --- a/include/wx/univ/radiobox.h +++ b/include/wx/univ/radiobox.h @@ -38,7 +38,7 @@ public: int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr) + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)) { Init(); @@ -54,7 +54,7 @@ public: int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr); + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -65,7 +65,7 @@ public: int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr); + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)); bool Create(wxWindow *parent, wxWindowID id, const wxString& title, @@ -75,7 +75,7 @@ public: int majorDim = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr); + const wxString& name = wxASCII_STR(wxRadioBoxNameStr)); virtual ~wxRadioBox(); diff --git a/include/wx/univ/radiobut.h b/include/wx/univ/radiobut.h index ba5eb9a702..ae16aa25ce 100644 --- a/include/wx/univ/radiobut.h +++ b/include/wx/univ/radiobut.h @@ -30,7 +30,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRadioButtonNameStr) + const wxString& name = wxASCII_STR(wxRadioButtonNameStr)) { Init(); @@ -44,7 +44,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxRadioButtonNameStr); + const wxString& name = wxASCII_STR(wxRadioButtonNameStr)); // override some base class methods virtual void ChangeValue(bool value) wxOVERRIDE; diff --git a/include/wx/univ/scrolbar.h b/include/wx/univ/scrolbar.h index 7b15bc1be8..acc1d3a1cb 100644 --- a/include/wx/univ/scrolbar.h +++ b/include/wx/univ/scrolbar.h @@ -62,7 +62,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSB_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr); + const wxString& name = wxASCII_STR(wxScrollBarNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -70,7 +70,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSB_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxScrollBarNameStr); + const wxString& name = wxASCII_STR(wxScrollBarNameStr)); virtual ~wxScrollBar(); diff --git a/include/wx/univ/slider.h b/include/wx/univ/slider.h index f6384faf4f..1bc6c181bd 100644 --- a/include/wx/univ/slider.h +++ b/include/wx/univ/slider.h @@ -49,7 +49,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr); + const wxString& name = wxASCII_STR(wxSliderNameStr)); bool Create(wxWindow *parent, wxWindowID id, @@ -58,7 +58,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxSliderNameStr); + const wxString& name = wxASCII_STR(wxSliderNameStr)); // implement base class pure virtuals virtual int GetValue() const wxOVERRIDE; diff --git a/include/wx/univ/statbmp.h b/include/wx/univ/statbmp.h index 0515a4fed8..38d8a545d6 100644 --- a/include/wx/univ/statbmp.h +++ b/include/wx/univ/statbmp.h @@ -39,7 +39,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBitmapNameStr) + const wxString& name = wxASCII_STR(wxStaticBitmapNameStr)) { Create(parent, id, label, pos, size, style, name); } @@ -50,7 +50,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBitmapNameStr); + const wxString& name = wxASCII_STR(wxStaticBitmapNameStr)); virtual void SetBitmap(const wxBitmap& bitmap) wxOVERRIDE; virtual void SetIcon(const wxIcon& icon) wxOVERRIDE; diff --git a/include/wx/univ/statbox.h b/include/wx/univ/statbox.h index ac6d8e8365..6e54afb793 100644 --- a/include/wx/univ/statbox.h +++ b/include/wx/univ/statbox.h @@ -29,7 +29,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBoxNameStr) + const wxString& name = wxASCII_STR(wxStaticBoxNameStr)) { Create(parent, id, label, pos, size, style, name); } @@ -40,7 +40,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxStaticBoxNameStr); + const wxString& name = wxASCII_STR(wxStaticBoxNameStr)); // the origin of the static box is inside the border and under the label: // take account of this diff --git a/include/wx/univ/statline.h b/include/wx/univ/statline.h index 63d3a096c2..e67e43bbce 100644 --- a/include/wx/univ/statline.h +++ b/include/wx/univ/statline.h @@ -32,7 +32,7 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, - const wxString &name = wxStaticLineNameStr ) + const wxString &name = wxASCII_STR(wxStaticLineNameStr) ) { Create(parent, id, pos, size, style, name); } @@ -42,7 +42,7 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, - const wxString &name = wxStaticLineNameStr ); + const wxString &name = wxASCII_STR(wxStaticLineNameStr) ); protected: virtual void DoDraw(wxControlRenderer *renderer) wxOVERRIDE; diff --git a/include/wx/univ/stattext.h b/include/wx/univ/stattext.h index 54a0284c58..72e038b9e9 100644 --- a/include/wx/univ/stattext.h +++ b/include/wx/univ/stattext.h @@ -24,7 +24,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize) { - Create(parent, wxID_ANY, label, pos, size, 0, wxStaticTextNameStr); + Create(parent, wxID_ANY, label, pos, size, 0, wxASCII_STR(wxStaticTextNameStr)); } // full form @@ -34,7 +34,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString &name = wxStaticTextNameStr) + const wxString &name = wxASCII_STR(wxStaticTextNameStr)) { Create(parent, id, label, pos, size, style, name); } @@ -46,7 +46,7 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0, - const wxString &name = wxStaticTextNameStr); + const wxString &name = wxASCII_STR(wxStaticTextNameStr)); // implementation only from now on diff --git a/include/wx/univ/statusbr.h b/include/wx/univ/statusbr.h index fe39b05f38..a5f05bab25 100644 --- a/include/wx/univ/statusbr.h +++ b/include/wx/univ/statusbr.h @@ -26,7 +26,7 @@ public: wxStatusBarUniv(wxWindow *parent, wxWindowID id = wxID_ANY, long style = wxSTB_DEFAULT_STYLE, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) { Init(); @@ -36,7 +36,7 @@ public: bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, long style = wxSTB_DEFAULT_STYLE, - const wxString& name = wxPanelNameStr); + const wxString& name = wxASCII_STR(wxPanelNameStr)); // implement base class methods virtual void SetFieldsCount(int number = 1, const int *widths = NULL) wxOVERRIDE; diff --git a/include/wx/univ/textctrl.h b/include/wx/univ/textctrl.h index 0aa40a437d..3a15244a8b 100644 --- a/include/wx/univ/textctrl.h +++ b/include/wx/univ/textctrl.h @@ -81,7 +81,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxTextCtrlNameStr) + const wxString& name = wxASCII_STR(wxTextCtrlNameStr)) : wxScrollHelper(this) { Init(); @@ -96,7 +96,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxTextCtrlNameStr); + const wxString& name = wxASCII_STR(wxTextCtrlNameStr)); virtual ~wxTextCtrl(); diff --git a/include/wx/univ/tglbtn.h b/include/wx/univ/tglbtn.h index 21ef58f22a..a49adefea7 100644 --- a/include/wx/univ/tglbtn.h +++ b/include/wx/univ/tglbtn.h @@ -27,7 +27,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)); // Create the control bool Create(wxWindow *parent, @@ -37,7 +37,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr); + const wxString& name = wxASCII_STR(wxCheckBoxNameStr)); virtual bool IsPressed() const wxOVERRIDE { return m_isPressed || m_value; } diff --git a/include/wx/univ/toolbar.h b/include/wx/univ/toolbar.h index b393311e60..22ab99dd1c 100644 --- a/include/wx/univ/toolbar.h +++ b/include/wx/univ/toolbar.h @@ -40,7 +40,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxToolBarNameStr) + const wxString& name = wxASCII_STR(wxToolBarNameStr)) { Init(); @@ -52,7 +52,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxToolBarNameStr ); + const wxString& name = wxASCII_STR(wxToolBarNameStr) ); virtual ~wxToolBar(); diff --git a/include/wx/univ/toplevel.h b/include/wx/univ/toplevel.h index 94e1edf9ca..e2e8efc43e 100644 --- a/include/wx/univ/toplevel.h +++ b/include/wx/univ/toplevel.h @@ -99,7 +99,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Init(); @@ -112,7 +112,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); // wxUniv-specific methods: do [not] use native decorations for this (or // all) window(s) diff --git a/include/wx/univ/window.h b/include/wx/univ/window.h index f60ab83e27..b615c2a04f 100644 --- a/include/wx/univ/window.h +++ b/include/wx/univ/window.h @@ -62,7 +62,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) : wxWindowNative(parent, id, pos, size, style | wxCLIP_CHILDREN, name) { Init(); } @@ -71,7 +71,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr); + const wxString& name = wxASCII_STR(wxPanelNameStr)); virtual ~wxWindow(); diff --git a/include/wx/unix/private/fswatcher_kqueue.h b/include/wx/unix/private/fswatcher_kqueue.h index de3d489a38..940fda2cc2 100644 --- a/include/wx/unix/private/fswatcher_kqueue.h +++ b/include/wx/unix/private/fswatcher_kqueue.h @@ -34,7 +34,7 @@ public: wxDir dir(winfo.GetPath()); wxCHECK_RET( dir.IsOpened(), - wxString::Format("Unable to open dir '%s'", winfo.GetPath())); + wxString::Format(wxASCII_STR("Unable to open dir '%s'"), winfo.GetPath())); wxString filename; bool ret = dir.GetFirst(&filename); diff --git a/include/wx/variant.h b/include/wx/variant.h index 734d7f0dce..442dcd443a 100644 --- a/include/wx/variant.h +++ b/include/wx/variant.h @@ -216,8 +216,10 @@ public: wxVariant& operator=(const wxString& value); // these overloads are necessary to prevent the compiler from using bool // version instead of wxString one: +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxVariant& operator=(const char* value) { return *this = wxString(value); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxVariant& operator=(const wchar_t* value) { return *this = wxString(value); } wxVariant& operator=(const wxCStrData& value) @@ -230,6 +232,7 @@ public: wxString GetString() const; #if wxUSE_STD_STRING +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING wxVariant(const std::string& val, const wxString& name = wxEmptyString); bool operator==(const std::string& value) const { return operator==(wxString(value)); } @@ -238,6 +241,7 @@ public: wxVariant& operator=(const std::string& value) { return operator=(wxString(value)); } operator std::string() const { return (operator wxString()).ToStdString(); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING wxVariant(const wxStdWideString& val, const wxString& name = wxEmptyString); bool operator==(const wxStdWideString& value) const diff --git a/include/wx/vlbox.h b/include/wx/vlbox.h index 2bee9267a1..b7b149ead6 100644 --- a/include/wx/vlbox.h +++ b/include/wx/vlbox.h @@ -15,6 +15,7 @@ #include "wx/bitmap.h" class WXDLLIMPEXP_FWD_CORE wxSelectionStore; + extern WXDLLIMPEXP_DATA_CORE(const char) wxVListBoxNameStr[]; // ---------------------------------------------------------------------------- @@ -45,7 +46,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxVListBoxNameStr) + const wxString& name = wxASCII_STR(wxVListBoxNameStr)) { Init(); @@ -63,7 +64,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxVListBoxNameStr); + const wxString& name = wxASCII_STR(wxVListBoxNameStr)); // dtor does some internal cleanup (deletes m_selStore if any) virtual ~wxVListBox(); diff --git a/include/wx/vscroll.h b/include/wx/vscroll.h index 97f8edf17f..9ff74544a8 100644 --- a/include/wx/vscroll.h +++ b/include/wx/vscroll.h @@ -694,7 +694,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) : wxVarVScrollLegacyAdaptor(this) { (void)Create(parent, id, pos, size, style, name); @@ -709,7 +709,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) { return wxPanel::Create(parent, id, pos, size, style | wxVSCROLL, name); } @@ -770,7 +770,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) : wxVarHScrollHelper(this) { (void)Create(parent, id, pos, size, style, name); @@ -785,7 +785,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) { return wxPanel::Create(parent, id, pos, size, style | wxHSCROLL, name); } @@ -833,7 +833,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) : wxPanel(), wxVarHVScrollHelper(this) { @@ -849,7 +849,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) { return wxPanel::Create(parent, id, pos, size, style | wxVSCROLL | wxHSCROLL, name); diff --git a/include/wx/webview.h b/include/wx/webview.h index da045589b4..5fb30dc352 100644 --- a/include/wx/webview.h +++ b/include/wx/webview.h @@ -110,11 +110,11 @@ public: virtual wxWebView* Create() = 0; virtual wxWebView* Create(wxWindow* parent, wxWindowID id, - const wxString& url = wxWebViewDefaultURLStr, + const wxString& url = wxASCII_STR(wxWebViewDefaultURLStr), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxWebViewNameStr) = 0; + const wxString& name = wxASCII_STR(wxWebViewNameStr)) = 0; }; WX_DECLARE_STRING_HASH_MAP(wxSharedPtr, wxStringWebViewFactoryMap); @@ -132,23 +132,23 @@ public: virtual bool Create(wxWindow* parent, wxWindowID id, - const wxString& url = wxWebViewDefaultURLStr, + const wxString& url = wxASCII_STR(wxWebViewDefaultURLStr), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxWebViewNameStr) = 0; + const wxString& name = wxASCII_STR(wxWebViewNameStr)) = 0; // Factory methods allowing the use of custom factories registered with // RegisterFactory - static wxWebView* New(const wxString& backend = wxWebViewBackendDefault); + static wxWebView* New(const wxString& backend = wxASCII_STR(wxWebViewBackendDefault)); static wxWebView* New(wxWindow* parent, wxWindowID id, - const wxString& url = wxWebViewDefaultURLStr, + const wxString& url = wxASCII_STR(wxWebViewDefaultURLStr), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const wxString& backend = wxWebViewBackendDefault, + const wxString& backend = wxASCII_STR(wxWebViewBackendDefault), long style = 0, - const wxString& name = wxWebViewNameStr); + const wxString& name = wxASCII_STR(wxWebViewNameStr)); static void RegisterFactory(const wxString& backend, wxSharedPtr factory); diff --git a/include/wx/wfstream.h b/include/wx/wfstream.h index c2be68c006..7fea3d714f 100644 --- a/include/wx/wfstream.h +++ b/include/wx/wfstream.h @@ -186,7 +186,7 @@ private: class WXDLLIMPEXP_BASE wxFFileInputStream : public wxInputStream { public: - wxFFileInputStream(const wxString& fileName, const wxString& mode = "rb"); + wxFFileInputStream(const wxString& fileName, const wxString& mode = wxASCII_STR("rb")); wxFFileInputStream(wxFFile& file); wxFFileInputStream(FILE *file); virtual ~wxFFileInputStream(); @@ -216,7 +216,7 @@ protected: class WXDLLIMPEXP_BASE wxFFileOutputStream : public wxOutputStream { public: - wxFFileOutputStream(const wxString& fileName, const wxString& mode = "wb"); + wxFFileOutputStream(const wxString& fileName, const wxString& mode = wxASCII_STR("wb")); wxFFileOutputStream(wxFFile& file); wxFFileOutputStream(FILE *file); virtual ~wxFFileOutputStream(); @@ -249,7 +249,7 @@ class WXDLLIMPEXP_BASE wxFFileStream : public wxFFileInputStream, public wxFFileOutputStream { public: - wxFFileStream(const wxString& fileName, const wxString& mode = "w+b"); + wxFFileStream(const wxString& fileName, const wxString& mode = wxASCII_STR("w+b")); // override some virtual functions to resolve ambiguities, just as in // wxFileStream diff --git a/include/wx/window.h b/include/wx/window.h index 51104debd7..036ee1f924 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -1607,7 +1607,7 @@ protected: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxPanelNameStr); + const wxString& name = wxASCII_STR(wxPanelNameStr)); bool CreateBase(wxWindowBase *parent, wxWindowID winid, diff --git a/include/wx/wxcrt.h b/include/wx/wxcrt.h index 68f9fa85fc..6cf08f4fde 100644 --- a/include/wx/wxcrt.h +++ b/include/wx/wxcrt.h @@ -149,10 +149,12 @@ inline char* wxTmemset(char* szOut, char cIn, size_t len) WXDLLIMPEXP_BASE char* wxSetlocale(int category, const char *locale); inline char* wxSetlocale(int category, const wxScopedCharBuffer& locale) { return wxSetlocale(category, locale.data()); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline char* wxSetlocale(int category, const wxString& locale) { return wxSetlocale(category, locale.mb_str()); } inline char* wxSetlocale(int category, const wxCStrData& locale) { return wxSetlocale(category, locale.AsCharBuf()); } +#endif // ---------------------------------------------------------------------------- // string functions @@ -202,17 +204,21 @@ inline size_t wxStrnlen(const wchar_t *str, size_t maxlen) // inline wchar_t* wxStrdup(const wchar_t *s) { return wxStrdupW(s); } inline char* wxStrdup(const wxScopedCharBuffer& s) { return wxStrdup(s.data()); } inline wchar_t* wxStrdup(const wxScopedWCharBuffer& s) { return wxStrdup(s.data()); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline char* wxStrdup(const wxString& s) { return wxStrdup(s.mb_str()); } inline char* wxStrdup(const wxCStrData& s) { return wxStrdup(s.AsCharBuf()); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING inline char *wxStrcpy(char *dest, const char *src) { return wxCRT_StrcpyA(dest, src); } inline wchar_t *wxStrcpy(wchar_t *dest, const wchar_t *src) { return wxCRT_StrcpyW(dest, src); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline char *wxStrcpy(char *dest, const wxString& src) { return wxCRT_StrcpyA(dest, src.mb_str()); } inline char *wxStrcpy(char *dest, const wxCStrData& src) { return wxCRT_StrcpyA(dest, src.AsCharBuf()); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING inline char *wxStrcpy(char *dest, const wxScopedCharBuffer& src) { return wxCRT_StrcpyA(dest, src.data()); } inline wchar_t *wxStrcpy(wchar_t *dest, const wxString& src) @@ -221,19 +227,23 @@ inline wchar_t *wxStrcpy(wchar_t *dest, const wxCStrData& src) { return wxCRT_StrcpyW(dest, src.AsWCharBuf()); } inline wchar_t *wxStrcpy(wchar_t *dest, const wxScopedWCharBuffer& src) { return wxCRT_StrcpyW(dest, src.data()); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline char *wxStrcpy(char *dest, const wchar_t *src) { return wxCRT_StrcpyA(dest, wxConvLibc.cWC2MB(src)); } inline wchar_t *wxStrcpy(wchar_t *dest, const char *src) { return wxCRT_StrcpyW(dest, wxConvLibc.cMB2WC(src)); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING inline char *wxStrncpy(char *dest, const char *src, size_t n) { return wxCRT_StrncpyA(dest, src, n); } inline wchar_t *wxStrncpy(wchar_t *dest, const wchar_t *src, size_t n) { return wxCRT_StrncpyW(dest, src, n); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline char *wxStrncpy(char *dest, const wxString& src, size_t n) { return wxCRT_StrncpyA(dest, src.mb_str(), n); } inline char *wxStrncpy(char *dest, const wxCStrData& src, size_t n) { return wxCRT_StrncpyA(dest, src.AsCharBuf(), n); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING inline char *wxStrncpy(char *dest, const wxScopedCharBuffer& src, size_t n) { return wxCRT_StrncpyA(dest, src.data(), n); } inline wchar_t *wxStrncpy(wchar_t *dest, const wxString& src, size_t n) @@ -242,10 +252,12 @@ inline wchar_t *wxStrncpy(wchar_t *dest, const wxCStrData& src, size_t n) { return wxCRT_StrncpyW(dest, src.AsWCharBuf(), n); } inline wchar_t *wxStrncpy(wchar_t *dest, const wxScopedWCharBuffer& src, size_t n) { return wxCRT_StrncpyW(dest, src.data(), n); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline char *wxStrncpy(char *dest, const wchar_t *src, size_t n) { return wxCRT_StrncpyA(dest, wxConvLibc.cWC2MB(src), n); } inline wchar_t *wxStrncpy(wchar_t *dest, const char *src, size_t n) { return wxCRT_StrncpyW(dest, wxConvLibc.cMB2WC(src), n); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING // this is a function new in 2.9 so we don't care about backwards compatibility and // so don't need to support wchar_t/char overloads @@ -281,10 +293,12 @@ inline char *wxStrcat(char *dest, const char *src) { return wxCRT_StrcatA(dest, src); } inline wchar_t *wxStrcat(wchar_t *dest, const wchar_t *src) { return wxCRT_StrcatW(dest, src); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline char *wxStrcat(char *dest, const wxString& src) { return wxCRT_StrcatA(dest, src.mb_str()); } inline char *wxStrcat(char *dest, const wxCStrData& src) { return wxCRT_StrcatA(dest, src.AsCharBuf()); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING inline char *wxStrcat(char *dest, const wxScopedCharBuffer& src) { return wxCRT_StrcatA(dest, src.data()); } inline wchar_t *wxStrcat(wchar_t *dest, const wxString& src) @@ -293,19 +307,23 @@ inline wchar_t *wxStrcat(wchar_t *dest, const wxCStrData& src) { return wxCRT_StrcatW(dest, src.AsWCharBuf()); } inline wchar_t *wxStrcat(wchar_t *dest, const wxScopedWCharBuffer& src) { return wxCRT_StrcatW(dest, src.data()); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline char *wxStrcat(char *dest, const wchar_t *src) { return wxCRT_StrcatA(dest, wxConvLibc.cWC2MB(src)); } inline wchar_t *wxStrcat(wchar_t *dest, const char *src) { return wxCRT_StrcatW(dest, wxConvLibc.cMB2WC(src)); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING inline char *wxStrncat(char *dest, const char *src, size_t n) { return wxCRT_StrncatA(dest, src, n); } inline wchar_t *wxStrncat(wchar_t *dest, const wchar_t *src, size_t n) { return wxCRT_StrncatW(dest, src, n); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline char *wxStrncat(char *dest, const wxString& src, size_t n) { return wxCRT_StrncatA(dest, src.mb_str(), n); } inline char *wxStrncat(char *dest, const wxCStrData& src, size_t n) { return wxCRT_StrncatA(dest, src.AsCharBuf(), n); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING inline char *wxStrncat(char *dest, const wxScopedCharBuffer& src, size_t n) { return wxCRT_StrncatA(dest, src.data(), n); } inline wchar_t *wxStrncat(wchar_t *dest, const wxString& src, size_t n) @@ -314,10 +332,12 @@ inline wchar_t *wxStrncat(wchar_t *dest, const wxCStrData& src, size_t n) { return wxCRT_StrncatW(dest, src.AsWCharBuf(), n); } inline wchar_t *wxStrncat(wchar_t *dest, const wxScopedWCharBuffer& src, size_t n) { return wxCRT_StrncatW(dest, src.data(), n); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline char *wxStrncat(char *dest, const wchar_t *src, size_t n) { return wxCRT_StrncatA(dest, wxConvLibc.cWC2MB(src), n); } inline wchar_t *wxStrncat(wchar_t *dest, const char *src, size_t n) { return wxCRT_StrncatW(dest, wxConvLibc.cMB2WC(src), n); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING #define WX_STR_DECL(name, T1, T2) name(T1 s1, T2 s2) @@ -333,6 +353,7 @@ inline wchar_t *wxStrncat(wchar_t *dest, const char *src, size_t n) // forString - function to call when the *first* argument is wxString; // the second argument can be any string type, so this is // typically a template +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING #define WX_STR_FUNC_NO_INVERT(rettype, name, crtA, crtW, forString) \ inline rettype WX_STR_DECL(name, const char *, const char *) \ { return WX_STR_CALL(crtA, s1, s2); } \ @@ -395,9 +416,48 @@ inline wchar_t *wxStrncat(wchar_t *dest, const char *src, size_t n) { return WX_STR_CALL(forString, s1.AsString(), s2); } \ inline rettype WX_STR_DECL(name, const wxCStrData&, const wxCStrData&) \ { return WX_STR_CALL(forString, s1.AsString(), s2); } +#else // wxNO_IMPLICIT_WXSTRING_ENCODING +#define WX_STR_FUNC_NO_INVERT(rettype, name, crtA, crtW, forString) \ + inline rettype WX_STR_DECL(name, const char *, const char *) \ + { return WX_STR_CALL(crtA, s1, s2); } \ + \ + inline rettype WX_STR_DECL(name, const wchar_t *, const wchar_t *) \ + { return WX_STR_CALL(crtW, s1, s2); } \ + inline rettype WX_STR_DECL(name, const wchar_t *, const wxScopedWCharBuffer&) \ + { return WX_STR_CALL(crtW, s1, s2.data()); } \ + \ + inline rettype WX_STR_DECL(name, const wxScopedCharBuffer&, const char *) \ + { return WX_STR_CALL(crtA, s1.data(), s2); } \ + inline rettype WX_STR_DECL(name, const wxScopedCharBuffer&, const wxScopedCharBuffer&)\ + { return WX_STR_CALL(crtA, s1.data(), s2.data()); } \ + \ + inline rettype WX_STR_DECL(name, const wxScopedWCharBuffer&, const wchar_t *) \ + { return WX_STR_CALL(crtW, s1.data(), s2); } \ + inline rettype WX_STR_DECL(name, const wxScopedWCharBuffer&, const wxScopedWCharBuffer&) \ + { return WX_STR_CALL(crtW, s1.data(), s2.data()); } \ + \ + inline rettype WX_STR_DECL(name, const wxString&, const wchar_t*) \ + { return WX_STR_CALL(forString, s1, s2); } \ + inline rettype WX_STR_DECL(name, const wxString&, const wxScopedWCharBuffer&) \ + { return WX_STR_CALL(forString, s1, s2); } \ + inline rettype WX_STR_DECL(name, const wxString&, const wxString&) \ + { return WX_STR_CALL(forString, s1, s2); } \ + inline rettype WX_STR_DECL(name, const wxString&, const wxCStrData&) \ + { return WX_STR_CALL(forString, s1, s2); } \ + \ + inline rettype WX_STR_DECL(name, const wxCStrData&, const wchar_t*) \ + { return WX_STR_CALL(forString, s1.AsString(), s2); } \ + inline rettype WX_STR_DECL(name, const wxCStrData&, const wxScopedWCharBuffer&) \ + { return WX_STR_CALL(forString, s1.AsString(), s2); } \ + inline rettype WX_STR_DECL(name, const wxCStrData&, const wxString&) \ + { return WX_STR_CALL(forString, s1.AsString(), s2); } \ + inline rettype WX_STR_DECL(name, const wxCStrData&, const wxCStrData&) \ + { return WX_STR_CALL(forString, s1.AsString(), s2); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING // This defines strcmp-like function, i.e. one returning the result of // comparison; see WX_STR_FUNC_NO_INVERT for explanation of the arguments +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING #define WX_STRCMP_FUNC(name, crtA, crtW, forString) \ WX_STR_FUNC_NO_INVERT(int, name, crtA, crtW, forString) \ \ @@ -420,11 +480,26 @@ inline wchar_t *wxStrncat(wchar_t *dest, const char *src, size_t n) { return -WX_STR_CALL(forString, s2.AsString(), s1.data()); } \ inline int WX_STR_DECL(name, const wxScopedWCharBuffer&, const wxString&) \ { return -WX_STR_CALL(forString, s2, s1.data()); } +#else // wxNO_IMPLICIT_WXSTRING_ENCODING +#define WX_STRCMP_FUNC(name, crtA, crtW, forString) \ + WX_STR_FUNC_NO_INVERT(int, name, crtA, crtW, forString) \ + \ + inline int WX_STR_DECL(name, const wchar_t *, const wxCStrData&) \ + { return -WX_STR_CALL(forString, s2.AsString(), s1); } \ + inline int WX_STR_DECL(name, const wchar_t *, const wxString&) \ + { return -WX_STR_CALL(forString, s2, s1); } \ + \ + inline int WX_STR_DECL(name, const wxScopedWCharBuffer&, const wxCStrData&) \ + { return -WX_STR_CALL(forString, s2.AsString(), s1.data()); } \ + inline int WX_STR_DECL(name, const wxScopedWCharBuffer&, const wxString&) \ + { return -WX_STR_CALL(forString, s2, s1.data()); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING // This defines a string function that is *not* strcmp-like, i.e. doesn't // return the result of comparison and so if the second argument is a string, // it has to be converted to char* or wchar_t* +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING #define WX_STR_FUNC(rettype, name, crtA, crtW, forString) \ WX_STR_FUNC_NO_INVERT(rettype, name, crtA, crtW, forString) \ \ @@ -447,6 +522,20 @@ inline wchar_t *wxStrncat(wchar_t *dest, const char *src, size_t n) { return WX_STR_CALL(crtW, s1.data(), s2.AsWCharBuf()); } \ inline rettype WX_STR_DECL(name, const wxScopedWCharBuffer&, const wxString&) \ { return WX_STR_CALL(crtW, s1.data(), s2.wc_str()); } +#else // wxNO_IMPLICIT_WXSTRING_ENCODING +#define WX_STR_FUNC(rettype, name, crtA, crtW, forString) \ + WX_STR_FUNC_NO_INVERT(rettype, name, crtA, crtW, forString) \ + \ + inline rettype WX_STR_DECL(name, const wchar_t *, const wxCStrData&) \ + { return WX_STR_CALL(crtW, s1, s2.AsWCharBuf()); } \ + inline rettype WX_STR_DECL(name, const wchar_t *, const wxString&) \ + { return WX_STR_CALL(crtW, s1, s2.wc_str()); } \ + \ + inline rettype WX_STR_DECL(name, const wxScopedWCharBuffer&, const wxCStrData&) \ + { return WX_STR_CALL(crtW, s1.data(), s2.AsWCharBuf()); } \ + inline rettype WX_STR_DECL(name, const wxScopedWCharBuffer&, const wxString&) \ + { return WX_STR_CALL(crtW, s1.data(), s2.wc_str()); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING template inline int wxStrcmp_String(const wxString& s1, const T& s2) @@ -526,12 +615,16 @@ inline size_t wxStrxfrm(wchar_t *dest, const wchar_t *src, size_t n) template inline size_t wxStrxfrm(T *dest, const wxScopedCharTypeBuffer& src, size_t n) { return wxStrxfrm(dest, src.data(), n); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline size_t wxStrxfrm(char *dest, const wxString& src, size_t n) { return wxCRT_StrxfrmA(dest, src.mb_str(), n); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING inline size_t wxStrxfrm(wchar_t *dest, const wxString& src, size_t n) { return wxCRT_StrxfrmW(dest, src.wc_str(), n); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline size_t wxStrxfrm(char *dest, const wxCStrData& src, size_t n) { return wxCRT_StrxfrmA(dest, src.AsCharBuf(), n); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING inline size_t wxStrxfrm(wchar_t *dest, const wxCStrData& src, size_t n) { return wxCRT_StrxfrmW(dest, src.AsWCharBuf(), n); } @@ -544,12 +637,16 @@ inline wchar_t *wxStrtok(wchar_t *str, const wchar_t *delim, wchar_t **saveptr) template inline T *wxStrtok(T *str, const wxScopedCharTypeBuffer& delim, T **saveptr) { return wxStrtok(str, delim.data(), saveptr); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline char *wxStrtok(char *str, const wxCStrData& delim, char **saveptr) { return wxCRT_StrtokA(str, delim.AsCharBuf(), saveptr); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING inline wchar_t *wxStrtok(wchar_t *str, const wxCStrData& delim, wchar_t **saveptr) { return wxCRT_StrtokW(str, delim.AsWCharBuf(), saveptr); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline char *wxStrtok(char *str, const wxString& delim, char **saveptr) { return wxCRT_StrtokA(str, delim.mb_str(), saveptr); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING inline wchar_t *wxStrtok(wchar_t *str, const wxString& delim, wchar_t **saveptr) { return wxCRT_StrtokW(str, delim.wc_str(), saveptr); } @@ -557,23 +654,29 @@ inline const char *wxStrstr(const char *haystack, const char *needle) { return wxCRT_StrstrA(haystack, needle); } inline const wchar_t *wxStrstr(const wchar_t *haystack, const wchar_t *needle) { return wxCRT_StrstrW(haystack, needle); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline const char *wxStrstr(const char *haystack, const wxString& needle) { return wxCRT_StrstrA(haystack, needle.mb_str()); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING inline const wchar_t *wxStrstr(const wchar_t *haystack, const wxString& needle) { return wxCRT_StrstrW(haystack, needle.wc_str()); } // these functions return char* pointer into the non-temporary conversion buffer // used by c_str()'s implicit conversion to char*, for ANSI build compatibility +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline const char *wxStrstr(const wxString& haystack, const wxString& needle) { return wxCRT_StrstrA(haystack.c_str(), needle.mb_str()); } inline const char *wxStrstr(const wxCStrData& haystack, const wxString& needle) { return wxCRT_StrstrA(haystack, needle.mb_str()); } inline const char *wxStrstr(const wxCStrData& haystack, const wxCStrData& needle) { return wxCRT_StrstrA(haystack, needle.AsCharBuf()); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING // if 'needle' is char/wchar_t, then the same is probably wanted as return value +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline const char *wxStrstr(const wxString& haystack, const char *needle) { return wxCRT_StrstrA(haystack.c_str(), needle); } inline const char *wxStrstr(const wxCStrData& haystack, const char *needle) { return wxCRT_StrstrA(haystack, needle); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING inline const wchar_t *wxStrstr(const wxString& haystack, const wchar_t *needle) { return wxCRT_StrstrW(haystack.c_str(), needle); } inline const wchar_t *wxStrstr(const wxCStrData& haystack, const wchar_t *needle) @@ -623,6 +726,7 @@ inline const T* wxStrrchr(const wxScopedCharTypeBuffer& s, const wxUniCharRef { return wxStrrchr(s.data(), (T)c); } // these functions return char* pointer into the non-temporary conversion buffer // used by c_str()'s implicit conversion to char*, for ANSI build compatibility +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline const char* wxStrchr(const wxString& s, char c) { return wxCRT_StrchrA((const char*)s.c_str(), c); } inline const char* wxStrrchr(const wxString& s, char c) @@ -639,10 +743,12 @@ inline const char* wxStrchr(const wxString& s, const wxUniCharRef& uc) { char c; return uc.GetAsChar(&c) ? wxCRT_StrchrA(s.c_str(), c) : NULL; } inline const char* wxStrrchr(const wxString& s, const wxUniCharRef& uc) { char c; return uc.GetAsChar(&c) ? wxCRT_StrrchrA(s.c_str(), c) : NULL; } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING inline const wchar_t* wxStrchr(const wxString& s, wchar_t c) { return wxCRT_StrchrW((const wchar_t*)s.c_str(), c); } inline const wchar_t* wxStrrchr(const wxString& s, wchar_t c) { return wxCRT_StrrchrW((const wchar_t*)s.c_str(), c); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline const char* wxStrchr(const wxCStrData& s, char c) { return wxCRT_StrchrA(s.AsChar(), c); } inline const char* wxStrrchr(const wxCStrData& s, char c) @@ -659,6 +765,7 @@ inline const char* wxStrchr(const wxCStrData& s, const wxUniCharRef& uc) { char c; return uc.GetAsChar(&c) ? wxCRT_StrchrA(s, c) : NULL; } inline const char* wxStrrchr(const wxCStrData& s, const wxUniCharRef& uc) { char c; return uc.GetAsChar(&c) ? wxCRT_StrrchrA(s, c) : NULL; } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING inline const wchar_t* wxStrchr(const wxCStrData& s, wchar_t c) { return wxCRT_StrchrW(s.AsWChar(), c); } inline const wchar_t* wxStrrchr(const wxCStrData& s, wchar_t c) @@ -668,30 +775,38 @@ inline const char *wxStrpbrk(const char *s, const char *accept) { return wxCRT_StrpbrkA(s, accept); } inline const wchar_t *wxStrpbrk(const wchar_t *s, const wchar_t *accept) { return wxCRT_StrpbrkW(s, accept); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline const char *wxStrpbrk(const char *s, const wxString& accept) { return wxCRT_StrpbrkA(s, accept.mb_str()); } inline const char *wxStrpbrk(const char *s, const wxCStrData& accept) { return wxCRT_StrpbrkA(s, accept.AsCharBuf()); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING inline const wchar_t *wxStrpbrk(const wchar_t *s, const wxString& accept) { return wxCRT_StrpbrkW(s, accept.wc_str()); } inline const wchar_t *wxStrpbrk(const wchar_t *s, const wxCStrData& accept) { return wxCRT_StrpbrkW(s, accept.AsWCharBuf()); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline const char *wxStrpbrk(const wxString& s, const wxString& accept) { return wxCRT_StrpbrkA(s.c_str(), accept.mb_str()); } inline const char *wxStrpbrk(const wxString& s, const char *accept) { return wxCRT_StrpbrkA(s.c_str(), accept); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING inline const wchar_t *wxStrpbrk(const wxString& s, const wchar_t *accept) { return wxCRT_StrpbrkW(s.wc_str(), accept); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline const char *wxStrpbrk(const wxString& s, const wxCStrData& accept) { return wxCRT_StrpbrkA(s.c_str(), accept.AsCharBuf()); } inline const char *wxStrpbrk(const wxCStrData& s, const wxString& accept) { return wxCRT_StrpbrkA(s.AsChar(), accept.mb_str()); } inline const char *wxStrpbrk(const wxCStrData& s, const char *accept) { return wxCRT_StrpbrkA(s.AsChar(), accept); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING inline const wchar_t *wxStrpbrk(const wxCStrData& s, const wchar_t *accept) { return wxCRT_StrpbrkW(s.AsWChar(), accept); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline const char *wxStrpbrk(const wxCStrData& s, const wxCStrData& accept) { return wxCRT_StrpbrkA(s.AsChar(), accept.AsCharBuf()); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING template inline const T *wxStrpbrk(const S& s, const wxScopedCharTypeBuffer& accept) { return wxStrpbrk(s, accept.data()); } @@ -771,24 +886,29 @@ inline int wxUngetc(int c, FILE *stream) { return wxCRT_UngetcA(c, stream); } // ---------------------------------------------------------------------------- // stdlib.h functions +// +// We only use wxConvLibc here because if the string is non-ASCII, +// then it's fine for the conversion to yield empty string, as atoi() +// will return 0 for it, which is the correct thing to do in this +// case. // ---------------------------------------------------------------------------- #ifdef wxCRT_AtoiW inline int wxAtoi(const wxString& str) { return wxCRT_AtoiW(str.wc_str()); } #else -inline int wxAtoi(const wxString& str) { return wxCRT_AtoiA(str.mb_str()); } +inline int wxAtoi(const wxString& str) { return wxCRT_AtoiA(str.mb_str(wxConvLibc)); } #endif #ifdef wxCRT_AtolW inline long wxAtol(const wxString& str) { return wxCRT_AtolW(str.wc_str()); } #else -inline long wxAtol(const wxString& str) { return wxCRT_AtolA(str.mb_str()); } +inline long wxAtol(const wxString& str) { return wxCRT_AtolA(str.mb_str(wxConvLibc)); } #endif #ifdef wxCRT_AtofW inline double wxAtof(const wxString& str) { return wxCRT_AtofW(str.wc_str()); } #else -inline double wxAtof(const wxString& str) { return wxCRT_AtofA(str.mb_str()); } +inline double wxAtof(const wxString& str) { return wxCRT_AtofA(str.mb_str(wxConvLibc)); } #endif inline double wxStrtod(const char *nptr, char **endptr) @@ -913,15 +1033,17 @@ WX_STRTOX_FUNC(wxULongLong_t, wxStrtoull, wxCRT_StrtoullA, wxCRT_StrtoullW) // functions in their wide versions #ifdef wxCRT_SystemW inline int wxSystem(const wxString& str) { return wxCRT_SystemW(str.wc_str()); } -#else +#elif !defined wxNO_IMPLICIT_WXSTRING_ENCODING inline int wxSystem(const wxString& str) { return wxCRT_SystemA(str.mb_str()); } #endif #endif inline char* wxGetenv(const char *name) { return wxCRT_GetenvA(name); } inline wchar_t* wxGetenv(const wchar_t *name) { return wxCRT_GetenvW(name); } +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline char* wxGetenv(const wxString& name) { return wxCRT_GetenvA(name.mb_str()); } inline char* wxGetenv(const wxCStrData& name) { return wxCRT_GetenvA(name.AsCharBuf()); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING inline char* wxGetenv(const wxScopedCharBuffer& name) { return wxCRT_GetenvA(name.data()); } inline wchar_t* wxGetenv(const wxScopedWCharBuffer& name) { return wxCRT_GetenvW(name.data()); } @@ -929,9 +1051,11 @@ inline wchar_t* wxGetenv(const wxScopedWCharBuffer& name) { return wxCRT_GetenvW // time.h functions // ---------------------------------------------------------------------------- +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING inline size_t wxStrftime(char *s, size_t max, const wxString& format, const struct tm *tm) { return wxCRT_StrftimeA(s, max, format.mb_str(), tm); } +#endif // wxNO_IMPLICIT_WXSTRING_ENCODING inline size_t wxStrftime(wchar_t *s, size_t max, const wxString& format, const struct tm *tm) diff --git a/include/wx/wxcrtvararg.h b/include/wx/wxcrtvararg.h index 79a657123c..4d998df14f 100644 --- a/include/wx/wxcrtvararg.h +++ b/include/wx/wxcrtvararg.h @@ -280,14 +280,14 @@ WX_DEFINE_VARARG_FUNC_SANS_N0(int, wxPrintf, 1, (const wxFormatString&), wxCRT_PrintfNative, wxCRT_PrintfA) inline int wxPrintf(const wxFormatString& s) { - return wxPrintf("%s", s.InputAsString()); + return wxPrintf(wxASCII_STR("%s"), s.InputAsString()); } WX_DEFINE_VARARG_FUNC_SANS_N0(int, wxFprintf, 2, (FILE*, const wxFormatString&), wxCRT_FprintfNative, wxCRT_FprintfA) inline int wxFprintf(FILE *f, const wxFormatString& s) { - return wxFprintf(f, "%s", s.InputAsString()); + return wxFprintf(f, wxASCII_STR("%s"), s.InputAsString()); } // va_list versions of printf functions simply forward to the respective @@ -440,12 +440,16 @@ WX_DEFINE_SCANFUNC(wxSscanf, 2, (const wxScopedCharBuffer& str, const char *form wxCRT_SscanfA, (str.data(), format)) WX_DEFINE_SCANFUNC(wxSscanf, 2, (const wxScopedWCharBuffer& str, const wchar_t *format), wxCRT_SscanfW, (str.data(), wxScanfConvertFormatW(format))) +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING WX_DEFINE_SCANFUNC(wxSscanf, 2, (const wxString& str, const char *format), wxCRT_SscanfA, (str.mb_str(), format)) +#endif WX_DEFINE_SCANFUNC(wxSscanf, 2, (const wxString& str, const wchar_t *format), wxCRT_SscanfW, (str.wc_str(), wxScanfConvertFormatW(format))) +#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING WX_DEFINE_SCANFUNC(wxSscanf, 2, (const wxCStrData& str, const char *format), wxCRT_SscanfA, (str.AsCharBuf(), format)) +#endif WX_DEFINE_SCANFUNC(wxSscanf, 2, (const wxCStrData& str, const wchar_t *format), wxCRT_SscanfW, (str.AsWCharBuf(), wxScanfConvertFormatW(format))) diff --git a/include/wx/x11/minifram.h b/include/wx/x11/minifram.h index db88eea5a3..3e120dd177 100644 --- a/include/wx/x11/minifram.h +++ b/include/wx/x11/minifram.h @@ -27,7 +27,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE|wxTINY_CAPTION, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { // Use wxFrame constructor in absence of more specific code. Create(parent, id, title, pos, size, style, name); diff --git a/include/wx/x11/textctrl.h b/include/wx/x11/textctrl.h index 6d3a8e6e40..b624964a04 100644 --- a/include/wx/x11/textctrl.h +++ b/include/wx/x11/textctrl.h @@ -94,7 +94,7 @@ public: const wxSize &size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString &name = wxTextCtrlNameStr); + const wxString &name = wxASCII_STR(wxTextCtrlNameStr)); virtual ~wxTextCtrl(); bool Create(wxWindow *parent, @@ -104,7 +104,7 @@ public: const wxSize &size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString &name = wxTextCtrlNameStr); + const wxString &name = wxASCII_STR(wxTextCtrlNameStr)); // required for scrolling with wxScrollHelper // ------------------------------------------ diff --git a/include/wx/x11/toplevel.h b/include/wx/x11/toplevel.h index 0eec73778b..9f74c2de3a 100644 --- a/include/wx/x11/toplevel.h +++ b/include/wx/x11/toplevel.h @@ -27,7 +27,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + const wxString& name = wxASCII_STR(wxFrameNameStr)) { Init(); @@ -40,7 +40,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + const wxString& name = wxASCII_STR(wxFrameNameStr)); virtual ~wxTopLevelWindowX11(); diff --git a/include/wx/x11/window.h b/include/wx/x11/window.h index bfe6b3ffb7..8c46554fb0 100644 --- a/include/wx/x11/window.h +++ b/include/wx/x11/window.h @@ -30,7 +30,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr) + const wxString& name = wxASCII_STR(wxPanelNameStr)) { Init(); Create(parent, id, pos, size, style, name); @@ -43,7 +43,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPanelNameStr); + const wxString& name = wxASCII_STR(wxPanelNameStr)); virtual void Raise(); virtual void Lower(); diff --git a/include/wx/xrc/xmlres.h b/include/wx/xrc/xmlres.h index 9b74828fc2..8b4710b676 100644 --- a/include/wx/xrc/xmlres.h +++ b/include/wx/xrc/xmlres.h @@ -250,7 +250,7 @@ public: // wxWindow::NewControlId(). Otherwise value_if_not_found is used. // Macro XRCID(name) is provided for convenient use in event tables. static int GetXRCID(const wxString& str_id, int value_if_not_found = wxID_NONE) - { return DoGetXRCID(str_id.mb_str(), value_if_not_found); } + { return DoGetXRCID(str_id.utf8_str(), value_if_not_found); } // version for internal use only static int DoGetXRCID(const char *str_id, int value_if_not_found = wxID_NONE); diff --git a/samples/artprov/artbrows.cpp b/samples/artprov/artbrows.cpp index e9b464bb87..e6c3467cbd 100644 --- a/samples/artprov/artbrows.cpp +++ b/samples/artprov/artbrows.cpp @@ -28,7 +28,7 @@ #include "artbrows.h" #define ART_CLIENT(id) \ - choice->Append(#id, const_cast(static_cast(id))); + choice->Append(#id, new wxStringClientData(id)); #define ART_ICON(id) \ { \ int ind; \ @@ -38,7 +38,7 @@ else \ ind = 0; \ list->InsertItem(index, #id, ind); \ - list->SetItemPtrData(index, wxPtrToUInt(id)); \ + list->SetItemPtrData(index, wxPtrToUInt(new wxString(id))); \ index++; \ } @@ -227,9 +227,9 @@ void wxArtBrowserDialog::SetArtClient(const wxArtClient& client) void wxArtBrowserDialog::OnSelectItem(wxListEvent &event) { - const char *data = (const char*)event.GetData(); - m_currentArtId = wxString( data ); - SetArtBitmap(data, m_client, GetSelectedBitmapSize()); + const wxString *data = (const wxString*)event.GetData(); + m_currentArtId = *data; + SetArtBitmap(*data, m_client, GetSelectedBitmapSize()); } void wxArtBrowserDialog::OnChangeSize(wxCommandEvent& WXUNUSED(event)) @@ -239,8 +239,8 @@ void wxArtBrowserDialog::OnChangeSize(wxCommandEvent& WXUNUSED(event)) void wxArtBrowserDialog::OnChooseClient(wxCommandEvent &event) { - const char *data = (const char*)event.GetClientData(); - SetArtClient(data); + wxStringClientData *data = (wxStringClientData *)event.GetClientObject(); + SetArtClient(data->GetData()); } void wxArtBrowserDialog::SetArtBitmap(const wxArtID& id, const wxArtClient& client, const wxSize& size) diff --git a/samples/treelist/treelist.cpp b/samples/treelist/treelist.cpp index b8a43a4039..4bfdda799e 100644 --- a/samples/treelist/treelist.cpp +++ b/samples/treelist/treelist.cpp @@ -373,7 +373,7 @@ void MyFrame::InitImageList() m_imageList = new wxImageList(iconSize.x, iconSize.y); // The order should be the same as for the enum elements. - static const char* const icons[] = + static const wxString icons[] = { wxART_NORMAL_FILE, wxART_FOLDER, diff --git a/src/common/arttango.cpp b/src/common/arttango.cpp index 94db4628da..cbe4e932ff 100644 --- a/src/common/arttango.cpp +++ b/src/common/arttango.cpp @@ -129,7 +129,7 @@ wxTangoArtProvider::CreateBitmap(const wxArtID& id, static const struct BitmapEntry { - const char *id; + wxString id; const unsigned char *data16; size_t len16; const unsigned char *data24; diff --git a/src/generic/logg.cpp b/src/generic/logg.cpp index 36c832d389..e3cc635aac 100644 --- a/src/generic/logg.cpp +++ b/src/generic/logg.cpp @@ -808,7 +808,7 @@ void wxLogDialog::CreateDetailsControls(wxWindow *parent) wxImageList *imageList = new wxImageList(ICON_SIZE, ICON_SIZE); // order should be the same as in the switch below! - static const char* const icons[] = + static wxString const icons[] = { wxART_ERROR, wxART_WARNING, diff --git a/src/gtk/artgtk.cpp b/src/gtk/artgtk.cpp index b5fa77f9af..c4ecdd8b1c 100644 --- a/src/gtk/artgtk.cpp +++ b/src/gtk/artgtk.cpp @@ -58,7 +58,7 @@ namespace #define ART(wxId, stockId, unused) wxId, stockId, #endif -const char* const wxId2Gtk[] = { +const wxString wxId2Gtk[] = { ART(wxART_ERROR, GTK_STOCK_DIALOG_ERROR, "dialog-error") ART(wxART_INFORMATION, GTK_STOCK_DIALOG_INFO, "dialog-information") ART(wxART_WARNING, GTK_STOCK_DIALOG_WARNING, "dialog-warning") @@ -137,7 +137,7 @@ wxString wxArtIDToStock(const wxArtID& id) { if (id == wxId2Gtk[i]) { - ret = wxString::FromAscii(wxId2Gtk[i + 1]); + ret = wxId2Gtk[i + 1]; break; } } diff --git a/tests/Makefile.in b/tests/Makefile.in index fdedabd465..f203d05156 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -271,6 +271,20 @@ TEST_GUI_OBJECTS = \ test_gui_setsize.o \ test_gui_xrctest.o TEST_GUI_ODEP = $(_____pch_testprec_test_gui_testprec_h_gch___depname) +TEST_ALLHEADERS_CXXFLAGS = $(__test_allheaders_PCH_INC) $(WX_CPPFLAGS) \ + -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \ + -I$(srcdir) $(__DLLFLAG_p) -I$(srcdir)/../samples \ + -I$(top_srcdir)/3rdparty/catch/include $(WX_CXXFLAGS) $(SAMPLES_CXXFLAGS) \ + $(CPPFLAGS) $(CXXFLAGS) +TEST_ALLHEADERS_OBJECTS = \ + $(__test_allheaders___win32rc) \ + test_allheaders_asserthelper.o \ + test_allheaders_test.o \ + test_allheaders_allheaders.o \ + test_allheaders_testableframe.o +TEST_ALLHEADERS_ODEP = \ + $(_____pch_testprec_test_allheaders_testprec_h_gch___depname) ### Conditionally set variables: ### @@ -304,21 +318,12 @@ TEST_GUI_ODEP = $(_____pch_testprec_test_gui_testprec_h_gch___depname) @COND_SHARED_1_USE_GUI_1@ = \ @COND_SHARED_1_USE_GUI_1@ $(DLLPREFIX_MODULE)test_drawingplugin.$(SO_SUFFIX_MODULE) @COND_USE_GUI_1@__test_gui___depname = test_gui$(EXEEXT) -@COND_PLATFORM_WIN32_1@__WIN32_DPI_MANIFEST_p_2 = \ -@COND_PLATFORM_WIN32_1@ --define \ -@COND_PLATFORM_WIN32_1@ wxUSE_DPI_AWARE_MANIFEST=$(USE_DPI_AWARE_MANIFEST) -@COND_WXUNIV_1@__WXUNIV_DEFINE_p_6 = --define __WXUNIVERSAL__ -@COND_DEBUG_FLAG_0@__DEBUG_DEFINE_p_6 = --define wxDEBUG_LEVEL=0 -@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p_6 = --define wxNO_EXCEPTIONS -@COND_USE_RTTI_0@__RTTI_DEFINE_p_6 = --define wxNO_RTTI -@COND_USE_THREADS_0@__THREAD_DEFINE_p_6 = --define wxNO_THREADS -@COND_SHARED_1@__DLLFLAG_p_6 = --define WXUSINGDLL -@COND_TOOLKIT_MSW@__RCDEFDIR_p = --include-dir \ -@COND_TOOLKIT_MSW@ $(LIBDIRNAME)/wx/include/$(TOOLCHAIN_FULLNAME) @COND_PLATFORM_MACOSX_1_USE_GUI_1@__test_gui_app_Contents_PkgInfo___depname \ @COND_PLATFORM_MACOSX_1_USE_GUI_1@ = test_gui.app/Contents/PkgInfo @COND_PLATFORM_MACOSX_1_USE_GUI_1@__test_gui_bundle___depname \ @COND_PLATFORM_MACOSX_1_USE_GUI_1@ = test_gui_bundle +@COND_TOOLKIT_COCOA@____test_gui_BUNDLE_TGT_REF_DEP = \ +@COND_TOOLKIT_COCOA@ $(__test_gui_app_Contents_PkgInfo___depname) @COND_TOOLKIT_MAC@____test_gui_BUNDLE_TGT_REF_DEP = \ @COND_TOOLKIT_MAC@ $(__test_gui_app_Contents_PkgInfo___depname) @COND_TOOLKIT_OSX_CARBON@____test_gui_BUNDLE_TGT_REF_DEP \ @@ -327,20 +332,12 @@ TEST_GUI_ODEP = $(_____pch_testprec_test_gui_testprec_h_gch___depname) @COND_TOOLKIT_OSX_COCOA@ = $(__test_gui_app_Contents_PkgInfo___depname) @COND_TOOLKIT_OSX_IPHONE@____test_gui_BUNDLE_TGT_REF_DEP \ @COND_TOOLKIT_OSX_IPHONE@ = $(__test_gui_app_Contents_PkgInfo___depname) -@COND_TOOLKIT_COCOA@____test_gui_BUNDLE_TGT_REF_DEP = \ -@COND_TOOLKIT_COCOA@ $(__test_gui_app_Contents_PkgInfo___depname) @COND_PLATFORM_WIN32_1@__test_gui___win32rc = test_gui_sample_rc.o @COND_GCC_PCH_1@__test_gui_PCH_INC = -I./.pch/testprec_test_gui @COND_ICC_PCH_1@__test_gui_PCH_INC = $(ICC_PCH_USE_SWITCH) \ @COND_ICC_PCH_1@ ./.pch/testprec_test_gui/testprec.h.gch @COND_USE_PCH_1@_____pch_testprec_test_gui_testprec_h_gch___depname \ @COND_USE_PCH_1@ = ./.pch/testprec_test_gui/testprec.h.gch -COND_MONOLITHIC_0_USE_WEBVIEW_1___WXLIB_WEBVIEW_p = \ - -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview-$(WX_RELEASE)$(HOST_SUFFIX) -@COND_MONOLITHIC_0_USE_WEBVIEW_1@__WXLIB_WEBVIEW_p = $(COND_MONOLITHIC_0_USE_WEBVIEW_1___WXLIB_WEBVIEW_p) -COND_MONOLITHIC_0_USE_STC_1___WXLIB_STC_p = \ - -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc-$(WX_RELEASE)$(HOST_SUFFIX) -@COND_MONOLITHIC_0_USE_STC_1@__WXLIB_STC_p = $(COND_MONOLITHIC_0_USE_STC_1___WXLIB_STC_p) COND_MONOLITHIC_0___WXLIB_AUI_p = \ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui-$(WX_RELEASE)$(HOST_SUFFIX) @COND_MONOLITHIC_0@__WXLIB_AUI_p = $(COND_MONOLITHIC_0___WXLIB_AUI_p) @@ -356,21 +353,65 @@ COND_MONOLITHIC_0___WXLIB_XRC_p = \ COND_MONOLITHIC_0___WXLIB_HTML_p = \ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html-$(WX_RELEASE)$(HOST_SUFFIX) @COND_MONOLITHIC_0@__WXLIB_HTML_p = $(COND_MONOLITHIC_0___WXLIB_HTML_p) +@COND_USE_GUI_1@__test_allheaders___depname = test_allheaders$(EXEEXT) +@COND_PLATFORM_MACOSX_1_USE_GUI_1@__test_allheaders_app_Contents_PkgInfo___depname \ +@COND_PLATFORM_MACOSX_1_USE_GUI_1@ = test_allheaders.app/Contents/PkgInfo +@COND_PLATFORM_MACOSX_1_USE_GUI_1@__test_allheaders_bundle___depname \ +@COND_PLATFORM_MACOSX_1_USE_GUI_1@ = test_allheaders_bundle +@COND_TOOLKIT_COCOA@____test_allheaders_BUNDLE_TGT_REF_DEP \ +@COND_TOOLKIT_COCOA@ = $(__test_allheaders_app_Contents_PkgInfo___depname) +@COND_TOOLKIT_MAC@____test_allheaders_BUNDLE_TGT_REF_DEP \ +@COND_TOOLKIT_MAC@ = $(__test_allheaders_app_Contents_PkgInfo___depname) +@COND_TOOLKIT_OSX_CARBON@____test_allheaders_BUNDLE_TGT_REF_DEP \ +@COND_TOOLKIT_OSX_CARBON@ = \ +@COND_TOOLKIT_OSX_CARBON@ $(__test_allheaders_app_Contents_PkgInfo___depname) +@COND_TOOLKIT_OSX_COCOA@____test_allheaders_BUNDLE_TGT_REF_DEP \ +@COND_TOOLKIT_OSX_COCOA@ = \ +@COND_TOOLKIT_OSX_COCOA@ $(__test_allheaders_app_Contents_PkgInfo___depname) +@COND_TOOLKIT_OSX_IPHONE@____test_allheaders_BUNDLE_TGT_REF_DEP \ +@COND_TOOLKIT_OSX_IPHONE@ = \ +@COND_TOOLKIT_OSX_IPHONE@ $(__test_allheaders_app_Contents_PkgInfo___depname) +@COND_PLATFORM_WIN32_1@__test_allheaders___win32rc = \ +@COND_PLATFORM_WIN32_1@ test_allheaders_sample_rc.o +@COND_GCC_PCH_1@__test_allheaders_PCH_INC = \ +@COND_GCC_PCH_1@ -I./.pch/testprec_test_allheaders +@COND_ICC_PCH_1@__test_allheaders_PCH_INC = \ +@COND_ICC_PCH_1@ $(ICC_PCH_USE_SWITCH) \ +@COND_ICC_PCH_1@ ./.pch/testprec_test_allheaders/testprec.h.gch +@COND_USE_PCH_1@_____pch_testprec_test_allheaders_testprec_h_gch___depname \ +@COND_USE_PCH_1@ = ./.pch/testprec_test_allheaders/testprec.h.gch COND_MONOLITHIC_0___WXLIB_XML_p = \ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml-$(WX_RELEASE)$(HOST_SUFFIX) @COND_MONOLITHIC_0@__WXLIB_XML_p = $(COND_MONOLITHIC_0___WXLIB_XML_p) -COND_MONOLITHIC_0___WXLIB_NET_p = \ - -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net-$(WX_RELEASE)$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_NET_p = $(COND_MONOLITHIC_0___WXLIB_NET_p) +@COND_PLATFORM_WIN32_1@__WIN32_DPI_MANIFEST_p = \ +@COND_PLATFORM_WIN32_1@ --define \ +@COND_PLATFORM_WIN32_1@ wxUSE_DPI_AWARE_MANIFEST=$(USE_DPI_AWARE_MANIFEST) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ +@COND_WXUNIV_1@__WXUNIV_DEFINE_p_0 = --define __WXUNIVERSAL__ @COND_DEBUG_FLAG_0@__DEBUG_DEFINE_p = -DwxDEBUG_LEVEL=0 +@COND_DEBUG_FLAG_0@__DEBUG_DEFINE_p_0 = --define wxDEBUG_LEVEL=0 @COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS +@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p_0 = --define wxNO_EXCEPTIONS @COND_USE_RTTI_0@__RTTI_DEFINE_p = -DwxNO_RTTI +@COND_USE_RTTI_0@__RTTI_DEFINE_p_0 = --define wxNO_RTTI @COND_USE_THREADS_0@__THREAD_DEFINE_p = -DwxNO_THREADS +@COND_USE_THREADS_0@__THREAD_DEFINE_p_0 = --define wxNO_THREADS @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL +@COND_SHARED_1@__DLLFLAG_p_0 = --define WXUSINGDLL +@COND_TOOLKIT_MSW@__RCDEFDIR_p = --include-dir \ +@COND_TOOLKIT_MSW@ $(LIBDIRNAME)/wx/include/$(TOOLCHAIN_FULLNAME) +COND_MONOLITHIC_0_USE_WEBVIEW_1___WXLIB_WEBVIEW_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview-$(WX_RELEASE)$(HOST_SUFFIX) +@COND_MONOLITHIC_0_USE_WEBVIEW_1@__WXLIB_WEBVIEW_p = $(COND_MONOLITHIC_0_USE_WEBVIEW_1___WXLIB_WEBVIEW_p) +COND_MONOLITHIC_0_USE_STC_1___WXLIB_STC_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc-$(WX_RELEASE)$(HOST_SUFFIX) +@COND_MONOLITHIC_0_USE_STC_1@__WXLIB_STC_p = $(COND_MONOLITHIC_0_USE_STC_1___WXLIB_STC_p) COND_MONOLITHIC_0___WXLIB_CORE_p = \ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core-$(WX_RELEASE)$(HOST_SUFFIX) @COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_0___WXLIB_NET_p = \ + -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net-$(WX_RELEASE)$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_NET_p = $(COND_MONOLITHIC_0___WXLIB_NET_p) COND_MONOLITHIC_0___WXLIB_BASE_p = \ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX) @COND_MONOLITHIC_0@__WXLIB_BASE_p = $(COND_MONOLITHIC_0___WXLIB_BASE_p) @@ -399,7 +440,7 @@ COND_wxUSE_REGEX_builtin___LIB_REGEX_p = \ ### Targets: ### -all: test$(EXEEXT) $(__test_drawing___depname) $(__test_drawingplugin___depname) $(__test_gui___depname) $(__test_gui_bundle___depname) data data-images fr ja +all: test$(EXEEXT) $(__test_drawing___depname) $(__test_drawingplugin___depname) $(__test_gui___depname) $(__test_gui_bundle___depname) $(__test_allheaders___depname) $(__test_allheaders_bundle___depname) data data-images fr ja install: @@ -415,6 +456,8 @@ clean: rm -f $(DLLPREFIX_MODULE)test_drawingplugin.$(SO_SUFFIX_MODULE) rm -f test_gui$(EXEEXT) rm -rf test_gui.app + rm -f test_allheaders$(EXEEXT) + rm -rf test_allheaders.app distclean: clean rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile @@ -462,6 +505,34 @@ test$(EXEEXT): $(TEST_OBJECTS) @COND_USE_PCH_1@./.pch/testprec_test_gui/testprec.h.gch: @COND_USE_PCH_1@ $(BK_MAKE_PCH) ./.pch/testprec_test_gui/testprec.h.gch testprec.h $(CXX) $(TEST_GUI_CXXFLAGS) +@COND_USE_GUI_1@test_allheaders$(EXEEXT): $(TEST_ALLHEADERS_OBJECTS) $(__test_allheaders___win32rc) +@COND_USE_GUI_1@ $(CXX) -o $@ $(TEST_ALLHEADERS_OBJECTS) $(WX_LDFLAGS) -L$(LIBDIRNAME) $(SAMPLES_RPATH_FLAG) $(LDFLAGS) $(__WXLIB_WEBVIEW_p) $(__WXLIB_STC_p) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS) + +@COND_PLATFORM_MACOSX_1_USE_GUI_1@test_allheaders.app/Contents/PkgInfo: $(__test_allheaders___depname) $(top_srcdir)/src/osx/carbon/Info.plist.in $(top_srcdir)/src/osx/carbon/wxmac.icns +@COND_PLATFORM_MACOSX_1_USE_GUI_1@ mkdir -p test_allheaders.app/Contents +@COND_PLATFORM_MACOSX_1_USE_GUI_1@ mkdir -p test_allheaders.app/Contents/MacOS +@COND_PLATFORM_MACOSX_1_USE_GUI_1@ mkdir -p test_allheaders.app/Contents/Resources +@COND_PLATFORM_MACOSX_1_USE_GUI_1@ +@COND_PLATFORM_MACOSX_1_USE_GUI_1@ +@COND_PLATFORM_MACOSX_1_USE_GUI_1@ sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \ +@COND_PLATFORM_MACOSX_1_USE_GUI_1@ -e "s/EXECUTABLE/test_allheaders/" \ +@COND_PLATFORM_MACOSX_1_USE_GUI_1@ -e "s/VERSION/$(WX_VERSION)/" \ +@COND_PLATFORM_MACOSX_1_USE_GUI_1@ $(top_srcdir)/src/osx/carbon/Info.plist.in >test_allheaders.app/Contents/Info.plist +@COND_PLATFORM_MACOSX_1_USE_GUI_1@ +@COND_PLATFORM_MACOSX_1_USE_GUI_1@ +@COND_PLATFORM_MACOSX_1_USE_GUI_1@ /bin/echo "APPL????" >test_allheaders.app/Contents/PkgInfo +@COND_PLATFORM_MACOSX_1_USE_GUI_1@ +@COND_PLATFORM_MACOSX_1_USE_GUI_1@ +@COND_PLATFORM_MACOSX_1_USE_GUI_1@ ln -f test_allheaders$(EXEEXT) test_allheaders.app/Contents/MacOS/test_allheaders +@COND_PLATFORM_MACOSX_1_USE_GUI_1@ +@COND_PLATFORM_MACOSX_1_USE_GUI_1@ +@COND_PLATFORM_MACOSX_1_USE_GUI_1@ cp -f $(top_srcdir)/src/osx/carbon/wxmac.icns test_allheaders.app/Contents/Resources/wxmac.icns + +@COND_PLATFORM_MACOSX_1_USE_GUI_1@test_allheaders_bundle: $(____test_allheaders_BUNDLE_TGT_REF_DEP) + +@COND_USE_PCH_1@./.pch/testprec_test_allheaders/testprec.h.gch: +@COND_USE_PCH_1@ $(BK_MAKE_PCH) ./.pch/testprec_test_allheaders/testprec.h.gch testprec.h $(CXX) $(TEST_ALLHEADERS_CXXFLAGS) + data: @mkdir -p . @for f in horse.ani horse.bmp horse.cur horse.gif horse.ico horse.jpg horse.pcx horse.png horse.pnm horse.tga horse.tif horse.xpm; do \ @@ -784,7 +855,7 @@ test_drawingplugin_pluginsample.o: $(srcdir)/drawing/pluginsample.cpp $(CXXC) -c -o $@ $(TEST_DRAWINGPLUGIN_CXXFLAGS) $(srcdir)/drawing/pluginsample.cpp test_gui_sample_rc.o: $(srcdir)/../samples/sample.rc $(TEST_GUI_ODEP) - $(WINDRES) -i$< -o$@ $(__WIN32_DPI_MANIFEST_p_2) --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_6) $(__DEBUG_DEFINE_p_6) $(__EXCEPTIONS_DEFINE_p_6) $(__RTTI_DEFINE_p_6) $(__THREAD_DEFINE_p_6) --include-dir $(srcdir) $(__DLLFLAG_p_6) --include-dir $(srcdir)/../samples $(__RCDEFDIR_p) --include-dir $(top_srcdir)/include --include-dir $(top_srcdir)/3rdparty/catch/include + $(WINDRES) -i$< -o$@ $(__WIN32_DPI_MANIFEST_p) --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_0) $(__DEBUG_DEFINE_p_0) $(__EXCEPTIONS_DEFINE_p_0) $(__RTTI_DEFINE_p_0) $(__THREAD_DEFINE_p_0) --include-dir $(srcdir) $(__DLLFLAG_p_0) --include-dir $(srcdir)/../samples $(__RCDEFDIR_p) --include-dir $(top_srcdir)/include --include-dir $(top_srcdir)/3rdparty/catch/include test_gui_asserthelper.o: $(srcdir)/asserthelper.cpp $(TEST_GUI_ODEP) $(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/asserthelper.cpp @@ -1083,8 +1154,23 @@ test_gui_setsize.o: $(srcdir)/window/setsize.cpp $(TEST_GUI_ODEP) test_gui_xrctest.o: $(srcdir)/xml/xrctest.cpp $(TEST_GUI_ODEP) $(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/xml/xrctest.cpp +test_allheaders_sample_rc.o: $(srcdir)/../samples/sample.rc $(TEST_ALLHEADERS_ODEP) + $(WINDRES) -i$< -o$@ $(__WIN32_DPI_MANIFEST_p) --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_0) $(__DEBUG_DEFINE_p_0) $(__EXCEPTIONS_DEFINE_p_0) $(__RTTI_DEFINE_p_0) $(__THREAD_DEFINE_p_0) --include-dir $(srcdir) $(__DLLFLAG_p_0) --include-dir $(srcdir)/../samples $(__RCDEFDIR_p) --include-dir $(top_srcdir)/include --include-dir $(top_srcdir)/3rdparty/catch/include -failtest: failtest_combobox failtest_evthandler failtest_weakref +test_allheaders_asserthelper.o: $(srcdir)/asserthelper.cpp $(TEST_ALLHEADERS_ODEP) + $(CXXC) -c -o $@ $(TEST_ALLHEADERS_CXXFLAGS) $(srcdir)/asserthelper.cpp + +test_allheaders_test.o: $(srcdir)/test.cpp $(TEST_ALLHEADERS_ODEP) + $(CXXC) -c -o $@ $(TEST_ALLHEADERS_CXXFLAGS) $(srcdir)/test.cpp + +test_allheaders_allheaders.o: $(srcdir)/allheaders.cpp $(TEST_ALLHEADERS_ODEP) + $(CXXC) -c -o $@ $(TEST_ALLHEADERS_CXXFLAGS) $(srcdir)/allheaders.cpp + +test_allheaders_testableframe.o: $(srcdir)/testableframe.cpp $(TEST_ALLHEADERS_ODEP) + $(CXXC) -c -o $@ $(TEST_ALLHEADERS_CXXFLAGS) $(srcdir)/testableframe.cpp + + +failtest: failtest_combobox failtest_evthandler failtest_weakref failtest_allheaders failtest_combobox: @$(RM) test_gui_comboboxtest.o @@ -1112,9 +1198,18 @@ failtest_weakref: fi; \ exit 0 -.PHONY: failtest failtest_combobox failtest_evthandler failtest_weakref +failtest_allheaders: + @$(RM) test_allheaders.o + if $(MAKE) CPPFLAGS=-DwxNO_IMPLICIT_WXSTRING_ENCODING -DTEST_IMPLICIT_WXSTRING_ENCODING test_allheaders.o 2>/dev/null; then \ + echo "*** Compilation with TEST_IMPLICIT_WXSTRING_ENCODING unexpectedly succeeded.">&2; \ + exit 1; \ + fi; \ + exit 0 + +.PHONY: failtest failtest_combobox failtest_evthandler failtest_weakref failtest_allheaders # Include dependency info, if present: @IF_GNU_MAKE@-include ./.deps/*.d -.PHONY: all install uninstall clean distclean test_gui_bundle data data-images fr ja +.PHONY: all install uninstall clean distclean test_gui_bundle \ + test_allheaders_bundle data data-images fr ja diff --git a/tests/allheaders.cpp b/tests/allheaders.cpp new file mode 100644 index 0000000000..bcf0581a8f --- /dev/null +++ b/tests/allheaders.cpp @@ -0,0 +1,37 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: tests/allheaders.cpp +// Purpose: Compilation test for all headers +// Author: Vadim Zeitlin, Arrigo Marchiori +// Created: 2020-04-20 +// Copyright: (c) 2010,2020 Vadim Zeitlin, Wlodzimierz Skiba, Arrigo Marchiori +/////////////////////////////////////////////////////////////////////////////// + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// Avoid pre-compiled headers at all +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/setup.h" + +#if !wxUSE_UTF8_LOCALE_ONLY +#define wxNO_IMPLICIT_WXSTRING_ENCODING +#endif + +#include "testprec.h" + +#include "allheaders.h" + +TEST_CASE("wxNO_IMPLICIT_WXSTRING_ENCODING", "[string]") +{ + wxString s = wxASCII_STR("Hello, ASCII"); + REQUIRE(s == L"Hello, ASCII"); +#ifdef TEST_IMPLICIT_WXSTRING_ENCODING + // Compilation of this should fail, because the macro + // wxNO_IMPLICIT_WXSTRING_ENCODING must be set + s = "Hello, implicit encoding"; +#endif +} diff --git a/tests/allheaders.h b/tests/allheaders.h new file mode 100644 index 0000000000..004f9eb285 --- /dev/null +++ b/tests/allheaders.h @@ -0,0 +1,411 @@ +/* + This file should list all the header files in the include/wx directory + that can be directly included from the user code. + + Excluded headers: + + #include + #include + #include + #include + #include + #include + #include +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(__WINDOWS__) +#include +#endif diff --git a/tests/makefile.bcc b/tests/makefile.bcc index d13d5e2587..cd9fad9b31 100644 --- a/tests/makefile.bcc +++ b/tests/makefile.bcc @@ -1,6 +1,6 @@ # ========================================================================= # This makefile was generated by -# Bakefile 0.2.12 (http://www.bakefile.org) +# Bakefile 0.2.11 (http://www.bakefile.org) # Do not modify, all changes will be overwritten! # ========================================================================= @@ -30,7 +30,7 @@ LIBDIRNAME = \ SETUPHDIR = \ $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG) TEST_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ - $(__OPTIMIZEFLAG) $(__THREADSFLAG_2) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG_7) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ -I$(SETUPHDIR) -I.\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -I. \ @@ -124,7 +124,7 @@ TEST_OBJECTS = \ $(OBJS)\test_xlocale.obj \ $(OBJS)\test_xmltest.obj TEST_DRAWING_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ - $(__OPTIMIZEFLAG) $(__THREADSFLAG_2) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG_7) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ -I$(SETUPHDIR) -I.\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -I. \ @@ -138,7 +138,7 @@ TEST_DRAWING_OBJECTS = \ $(OBJS)\test_drawing_basictest.obj \ $(OBJS)\test_drawing_fonttest.obj TEST_DRAWINGPLUGIN_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include \ - $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG_2) -D__WXMSW__ \ + $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG_7) -D__WXMSW__ \ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) \ $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \ $(__UNICODE_DEFINE_p) -I$(SETUPHDIR) -I.\..\include \ @@ -146,7 +146,7 @@ TEST_DRAWINGPLUGIN_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include \ TEST_DRAWINGPLUGIN_OBJECTS = \ $(OBJS)\test_drawingplugin_pluginsample.obj TEST_GUI_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ - $(__OPTIMIZEFLAG) $(__THREADSFLAG_2) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG_7) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ -I$(SETUPHDIR) -I.\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -I. \ @@ -253,6 +253,20 @@ TEST_GUI_OBJECTS = \ $(OBJS)\test_gui_clientsize.obj \ $(OBJS)\test_gui_setsize.obj \ $(OBJS)\test_gui_xrctest.obj +TEST_ALLHEADERS_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include \ + $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG_7) -D__WXMSW__ \ + $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) \ + $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I$(SETUPHDIR) -I.\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -I. $(__DLLFLAG_p) -I.\..\samples -DNOPCH \ + -I.\..\3rdparty\catch\include -Hu -H=$(OBJS)\testprec_test_allheaders.csm \ + $(CPPFLAGS) $(CXXFLAGS) +TEST_ALLHEADERS_OBJECTS = \ + $(OBJS)\test_allheaders_dummy.obj \ + $(OBJS)\test_allheaders_asserthelper.obj \ + $(OBJS)\test_allheaders_test.obj \ + $(OBJS)\test_allheaders_allheaders.obj \ + $(OBJS)\test_allheaders_testableframe.obj ### Conditionally set variables: ### @@ -301,44 +315,6 @@ __test_drawingplugin___depname = $(OBJS)\test_drawingplugin.dll !if "$(USE_GUI)" == "1" __test_gui___depname = $(OBJS)\test_gui.exe !endif -!if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_7 = -d__WXUNIVERSAL__ -!endif -!if "$(DEBUG_FLAG)" == "0" -__DEBUG_DEFINE_p_7 = -dwxDEBUG_LEVEL=0 -!endif -!if "$(BUILD)" == "release" -__NDEBUG_DEFINE_p_7 = -dNDEBUG -!endif -!if "$(USE_EXCEPTIONS)" == "0" -__EXCEPTIONS_DEFINE_p_7 = -dwxNO_EXCEPTIONS -!endif -!if "$(USE_RTTI)" == "0" -__RTTI_DEFINE_p_7 = -dwxNO_RTTI -!endif -!if "$(USE_THREADS)" == "0" -__THREAD_DEFINE_p_7 = -dwxNO_THREADS -!endif -!if "$(UNICODE)" == "0" -__UNICODE_DEFINE_p_7 = -dwxUSE_UNICODE=0 -!endif -!if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_7 = -d_UNICODE -!endif -!if "$(USE_CAIRO)" == "1" -____CAIRO_INCLUDEDIR_FILENAMES_7_p = -i$(CAIRO_ROOT)\include\cairo -!endif -!if "$(SHARED)" == "1" -__DLLFLAG_p_7 = -dWXUSINGDLL -!endif -!if "$(MONOLITHIC)" == "0" && "$(USE_WEBVIEW)" == "1" -__WXLIB_WEBVIEW_p = \ - wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib -!endif -!if "$(MONOLITHIC)" == "0" && "$(USE_STC)" == "1" -__WXLIB_STC_p = \ - wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib -!endif !if "$(MONOLITHIC)" == "0" __WXLIB_AUI_p = \ wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib @@ -359,14 +335,13 @@ __WXLIB_XRC_p = \ __WXLIB_HTML_p = \ wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib !endif +!if "$(USE_GUI)" == "1" +__test_allheaders___depname = $(OBJS)\test_allheaders.exe +!endif !if "$(MONOLITHIC)" == "0" __WXLIB_XML_p = \ wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib !endif -!if "$(MONOLITHIC)" == "0" -__WXLIB_NET_p = \ - wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib -!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG = -Od !endif @@ -380,10 +355,10 @@ __THREADSFLAG = __THREADSFLAG = mt !endif !if "$(USE_THREADS)" == "0" -__THREADSFLAG_2 = +__THREADSFLAG_7 = !endif !if "$(USE_THREADS)" == "1" -__THREADSFLAG_2 = -tWM +__THREADSFLAG_7 = -tWM !endif !if "$(RUNTIME_LIBS)" == "dynamic" __RUNTIME_LIBS = -tWR @@ -392,46 +367,88 @@ __RUNTIME_LIBS = -tWR __RUNTIME_LIBS = !endif !if "$(RUNTIME_LIBS)" == "dynamic" -__RUNTIME_LIBS_2 = i +__RUNTIME_LIBS_3 = i !endif !if "$(RUNTIME_LIBS)" == "static" -__RUNTIME_LIBS_2 = +__RUNTIME_LIBS_3 = !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ !endif +!if "$(WXUNIV)" == "1" +__WXUNIV_DEFINE_p_0 = -d__WXUNIVERSAL__ +!endif !if "$(DEBUG_FLAG)" == "0" __DEBUG_DEFINE_p = -DwxDEBUG_LEVEL=0 !endif +!if "$(DEBUG_FLAG)" == "0" +__DEBUG_DEFINE_p_0 = -dwxDEBUG_LEVEL=0 +!endif !if "$(BUILD)" == "release" __NDEBUG_DEFINE_p = -DNDEBUG !endif +!if "$(BUILD)" == "release" +__NDEBUG_DEFINE_p_0 = -dNDEBUG +!endif !if "$(USE_EXCEPTIONS)" == "0" __EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS !endif +!if "$(USE_EXCEPTIONS)" == "0" +__EXCEPTIONS_DEFINE_p_0 = -dwxNO_EXCEPTIONS +!endif !if "$(USE_RTTI)" == "0" __RTTI_DEFINE_p = -DwxNO_RTTI !endif +!if "$(USE_RTTI)" == "0" +__RTTI_DEFINE_p_0 = -dwxNO_RTTI +!endif !if "$(USE_THREADS)" == "0" __THREAD_DEFINE_p = -DwxNO_THREADS !endif +!if "$(USE_THREADS)" == "0" +__THREAD_DEFINE_p_0 = -dwxNO_THREADS +!endif !if "$(UNICODE)" == "0" __UNICODE_DEFINE_p = -DwxUSE_UNICODE=0 !endif !if "$(UNICODE)" == "1" __UNICODE_DEFINE_p = -D_UNICODE !endif +!if "$(UNICODE)" == "0" +__UNICODE_DEFINE_p_0 = -dwxUSE_UNICODE=0 +!endif +!if "$(UNICODE)" == "1" +__UNICODE_DEFINE_p_0 = -d_UNICODE +!endif !if "$(USE_CAIRO)" == "1" ____CAIRO_INCLUDEDIR_FILENAMES = -I$(CAIRO_ROOT)\include\cairo !endif +!if "$(USE_CAIRO)" == "1" +____CAIRO_INCLUDEDIR_FILENAMES_0 = -i$(CAIRO_ROOT)\include\cairo +!endif !if "$(SHARED)" == "1" __DLLFLAG_p = -DWXUSINGDLL !endif +!if "$(SHARED)" == "1" +__DLLFLAG_p_0 = -dWXUSINGDLL +!endif +!if "$(MONOLITHIC)" == "0" && "$(USE_WEBVIEW)" == "1" +__WXLIB_WEBVIEW_p = \ + wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib +!endif +!if "$(MONOLITHIC)" == "0" && "$(USE_STC)" == "1" +__WXLIB_STC_p = \ + wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib +!endif !if "$(MONOLITHIC)" == "0" __WXLIB_CORE_p = \ wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib !endif !if "$(MONOLITHIC)" == "0" +__WXLIB_NET_p = \ + wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib +!endif +!if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = \ wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib !endif @@ -477,7 +494,7 @@ $(OBJS): ### Targets: ### -all: $(OBJS)\test.exe $(__test_drawing___depname) $(__test_drawingplugin___depname) $(__test_gui___depname) data data-images fr ja +all: $(OBJS)\test.exe $(__test_drawing___depname) $(__test_drawingplugin___depname) $(__test_gui___depname) $(__test_allheaders___depname) data data-images fr ja clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -507,30 +524,43 @@ clean: -if exist $(OBJS)\test_gui.ild del $(OBJS)\test_gui.ild -if exist $(OBJS)\test_gui.ilf del $(OBJS)\test_gui.ilf -if exist $(OBJS)\test_gui.ils del $(OBJS)\test_gui.ils + -if exist $(OBJS)\test_allheaders.exe del $(OBJS)\test_allheaders.exe + -if exist $(OBJS)\test_allheaders.tds del $(OBJS)\test_allheaders.tds + -if exist $(OBJS)\test_allheaders.ilc del $(OBJS)\test_allheaders.ilc + -if exist $(OBJS)\test_allheaders.ild del $(OBJS)\test_allheaders.ild + -if exist $(OBJS)\test_allheaders.ilf del $(OBJS)\test_allheaders.ilf + -if exist $(OBJS)\test_allheaders.ils del $(OBJS)\test_allheaders.ils $(OBJS)\test.exe: $(OBJS)\test_dummy.obj $(TEST_OBJECTS) ilink32 -Tpe -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) -ap $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&| - c0x32.obj $(TEST_OBJECTS),$@,, $(__WXLIB_NET_p) $(__WXLIB_XML_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_PNG_IF_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib uxtheme.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_2).lib,, + c0x32.obj $(TEST_OBJECTS),$@,, $(__WXLIB_NET_p) $(__WXLIB_XML_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_PNG_IF_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib uxtheme.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_3).lib,, | !if "$(USE_GUI)" == "1" $(OBJS)\test_drawing.exe: $(OBJS)\test_drawing_dummy.obj $(TEST_DRAWING_OBJECTS) ilink32 -Tpe -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) -ap $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&| - c0x32.obj $(TEST_DRAWING_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib uxtheme.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_2).lib,, + c0x32.obj $(TEST_DRAWING_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib uxtheme.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_3).lib,, | !endif !if "$(SHARED)" == "1" && "$(USE_GUI)" == "1" $(OBJS)\test_drawingplugin.dll: $(TEST_DRAWINGPLUGIN_OBJECTS) ilink32 -Tpd -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&| - c0d32.obj $(TEST_DRAWINGPLUGIN_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib uxtheme.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_2).lib,, + c0d32.obj $(TEST_DRAWINGPLUGIN_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib uxtheme.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_3).lib,, | !endif !if "$(USE_GUI)" == "1" $(OBJS)\test_gui.exe: $(OBJS)\test_gui_dummy.obj $(TEST_GUI_OBJECTS) $(OBJS)\test_gui_sample.res ilink32 -Tpe -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) -ap $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&| - c0x32.obj $(TEST_GUI_OBJECTS),$@,, $(__WXLIB_WEBVIEW_p) $(__WXLIB_STC_p) $(__WXLIB_AUI_p) $(__WXLIB_RICHTEXT_p) $(__WXLIB_MEDIA_p) $(__WXLIB_XRC_p) $(__WXLIB_XML_p) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib uxtheme.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_2).lib,, $(OBJS)\test_gui_sample.res + c0x32.obj $(TEST_GUI_OBJECTS),$@,, $(__WXLIB_WEBVIEW_p) $(__WXLIB_STC_p) $(__WXLIB_AUI_p) $(__WXLIB_RICHTEXT_p) $(__WXLIB_MEDIA_p) $(__WXLIB_XRC_p) $(__WXLIB_XML_p) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib uxtheme.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_3).lib,, $(OBJS)\test_gui_sample.res +| +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\test_allheaders.exe: $(OBJS)\test_allheaders_dummy.obj $(TEST_ALLHEADERS_OBJECTS) $(OBJS)\test_allheaders_sample.res + ilink32 -Tpe -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) -ap $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&| + c0x32.obj $(TEST_ALLHEADERS_OBJECTS),$@,, $(__WXLIB_WEBVIEW_p) $(__WXLIB_STC_p) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib uxtheme.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_3).lib,, $(OBJS)\test_allheaders_sample.res | !endif @@ -830,7 +860,7 @@ $(OBJS)\test_drawingplugin_pluginsample.obj: .\drawing\pluginsample.cpp $(CXX) -q -c -P -o$@ $(TEST_DRAWINGPLUGIN_CXXFLAGS) .\drawing\pluginsample.cpp $(OBJS)\test_gui_sample.res: .\..\samples\sample.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -dwxUSE_DPI_AWARE_MANIFEST=$(USE_DPI_AWARE_MANIFEST) -d__WXMSW__ $(__WXUNIV_DEFINE_p_7) $(__DEBUG_DEFINE_p_7) $(__NDEBUG_DEFINE_p_7) $(__EXCEPTIONS_DEFINE_p_7) $(__RTTI_DEFINE_p_7) $(__THREAD_DEFINE_p_7) $(__UNICODE_DEFINE_p_7) -i$(SETUPHDIR) -i.\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_7_p) -i. $(__DLLFLAG_p_7) -i.\..\samples -i$(BCCDIR)\include\windows\sdk -dNOPCH -i.\..\3rdparty\catch\include .\..\samples\sample.rc + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -dwxUSE_DPI_AWARE_MANIFEST=$(USE_DPI_AWARE_MANIFEST) -d__WXMSW__ $(__WXUNIV_DEFINE_p_0) $(__DEBUG_DEFINE_p_0) $(__NDEBUG_DEFINE_p_0) $(__EXCEPTIONS_DEFINE_p_0) $(__RTTI_DEFINE_p_0) $(__THREAD_DEFINE_p_0) $(__UNICODE_DEFINE_p_0) -i$(SETUPHDIR) -i.\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_0) -i. $(__DLLFLAG_p_0) -i.\..\samples -i$(BCCDIR)\include\windows\sdk -dNOPCH -i.\..\3rdparty\catch\include .\..\samples\sample.rc $(OBJS)\test_gui_dummy.obj: .\dummy.cpp $(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) -H .\dummy.cpp @@ -1132,3 +1162,21 @@ $(OBJS)\test_gui_setsize.obj: .\window\setsize.cpp $(OBJS)\test_gui_xrctest.obj: .\xml\xrctest.cpp $(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\xml\xrctest.cpp +$(OBJS)\test_allheaders_sample.res: .\..\samples\sample.rc + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -dwxUSE_DPI_AWARE_MANIFEST=$(USE_DPI_AWARE_MANIFEST) -d__WXMSW__ $(__WXUNIV_DEFINE_p_0) $(__DEBUG_DEFINE_p_0) $(__NDEBUG_DEFINE_p_0) $(__EXCEPTIONS_DEFINE_p_0) $(__RTTI_DEFINE_p_0) $(__THREAD_DEFINE_p_0) $(__UNICODE_DEFINE_p_0) -i$(SETUPHDIR) -i.\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_0) -i. $(__DLLFLAG_p_0) -i.\..\samples -i$(BCCDIR)\include\windows\sdk -dNOPCH -i.\..\3rdparty\catch\include .\..\samples\sample.rc + +$(OBJS)\test_allheaders_dummy.obj: .\dummy.cpp + $(CXX) -q -c -P -o$@ $(TEST_ALLHEADERS_CXXFLAGS) -H .\dummy.cpp + +$(OBJS)\test_allheaders_asserthelper.obj: .\asserthelper.cpp + $(CXX) -q -c -P -o$@ $(TEST_ALLHEADERS_CXXFLAGS) .\asserthelper.cpp + +$(OBJS)\test_allheaders_test.obj: .\test.cpp + $(CXX) -q -c -P -o$@ $(TEST_ALLHEADERS_CXXFLAGS) .\test.cpp + +$(OBJS)\test_allheaders_allheaders.obj: .\allheaders.cpp + $(CXX) -q -c -P -o$@ $(TEST_ALLHEADERS_CXXFLAGS) .\allheaders.cpp + +$(OBJS)\test_allheaders_testableframe.obj: .\testableframe.cpp + $(CXX) -q -c -P -o$@ $(TEST_ALLHEADERS_CXXFLAGS) .\testableframe.cpp + diff --git a/tests/makefile.gcc b/tests/makefile.gcc index 536ee1f5d0..83ca446361 100644 --- a/tests/makefile.gcc +++ b/tests/makefile.gcc @@ -1,6 +1,6 @@ # ========================================================================= # This makefile was generated by -# Bakefile 0.2.12 (http://www.bakefile.org) +# Bakefile 0.2.11 (http://www.bakefile.org) # Do not modify, all changes will be overwritten! # ========================================================================= @@ -248,6 +248,21 @@ TEST_GUI_OBJECTS = \ $(OBJS)\test_gui_clientsize.o \ $(OBJS)\test_gui_setsize.o \ $(OBJS)\test_gui_xrctest.o +TEST_ALLHEADERS_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ + $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + -I$(SETUPHDIR) -I.\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall -I. \ + $(__DLLFLAG_p) -I.\..\samples -DNOPCH -I.\..\3rdparty\catch\include \ + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) \ + $(CXXFLAGS) +TEST_ALLHEADERS_OBJECTS = \ + $(OBJS)\test_allheaders_sample_rc.o \ + $(OBJS)\test_allheaders_dummy.o \ + $(OBJS)\test_allheaders_asserthelper.o \ + $(OBJS)\test_allheaders_test.o \ + $(OBJS)\test_allheaders_allheaders.o \ + $(OBJS)\test_allheaders_testableframe.o ### Conditionally set variables: ### @@ -301,48 +316,6 @@ endif ifeq ($(USE_GUI),1) __test_gui___depname = $(OBJS)\test_gui.exe endif -ifeq ($(WXUNIV),1) -__WXUNIV_DEFINE_p_6 = --define __WXUNIVERSAL__ -endif -ifeq ($(DEBUG_FLAG),0) -__DEBUG_DEFINE_p_6 = --define wxDEBUG_LEVEL=0 -endif -ifeq ($(BUILD),release) -__NDEBUG_DEFINE_p_6 = --define NDEBUG -endif -ifeq ($(USE_EXCEPTIONS),0) -__EXCEPTIONS_DEFINE_p_6 = --define wxNO_EXCEPTIONS -endif -ifeq ($(USE_RTTI),0) -__RTTI_DEFINE_p_6 = --define wxNO_RTTI -endif -ifeq ($(USE_THREADS),0) -__THREAD_DEFINE_p_6 = --define wxNO_THREADS -endif -ifeq ($(UNICODE),0) -__UNICODE_DEFINE_p_6 = --define wxUSE_UNICODE=0 -endif -ifeq ($(UNICODE),1) -__UNICODE_DEFINE_p_6 = --define _UNICODE -endif -ifeq ($(USE_CAIRO),1) -__CAIRO_INCLUDEDIR_p_2 = --include-dir $(CAIRO_ROOT)/include/cairo -endif -ifeq ($(SHARED),1) -__DLLFLAG_p_6 = --define WXUSINGDLL -endif -ifeq ($(MONOLITHIC),0) -ifeq ($(USE_WEBVIEW),1) -__WXLIB_WEBVIEW_p = \ - -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview -endif -endif -ifeq ($(MONOLITHIC),0) -ifeq ($(USE_STC),1) -__WXLIB_STC_p = \ - -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc -endif -endif ifeq ($(MONOLITHIC),0) __WXLIB_AUI_p = \ -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui @@ -365,14 +338,13 @@ ifeq ($(MONOLITHIC),0) __WXLIB_HTML_p = \ -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html endif +ifeq ($(USE_GUI),1) +__test_allheaders___depname = $(OBJS)\test_allheaders.exe +endif ifeq ($(MONOLITHIC),0) __WXLIB_XML_p = \ -lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml endif -ifeq ($(MONOLITHIC),0) -__WXLIB_NET_p = \ - -lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net -endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG = -O0 endif @@ -394,38 +366,84 @@ endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ endif +ifeq ($(WXUNIV),1) +__WXUNIV_DEFINE_p_0 = --define __WXUNIVERSAL__ +endif ifeq ($(DEBUG_FLAG),0) __DEBUG_DEFINE_p = -DwxDEBUG_LEVEL=0 endif +ifeq ($(DEBUG_FLAG),0) +__DEBUG_DEFINE_p_0 = --define wxDEBUG_LEVEL=0 +endif ifeq ($(BUILD),release) __NDEBUG_DEFINE_p = -DNDEBUG endif +ifeq ($(BUILD),release) +__NDEBUG_DEFINE_p_0 = --define NDEBUG +endif ifeq ($(USE_EXCEPTIONS),0) __EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS endif +ifeq ($(USE_EXCEPTIONS),0) +__EXCEPTIONS_DEFINE_p_0 = --define wxNO_EXCEPTIONS +endif ifeq ($(USE_RTTI),0) __RTTI_DEFINE_p = -DwxNO_RTTI endif +ifeq ($(USE_RTTI),0) +__RTTI_DEFINE_p_0 = --define wxNO_RTTI +endif ifeq ($(USE_THREADS),0) __THREAD_DEFINE_p = -DwxNO_THREADS endif +ifeq ($(USE_THREADS),0) +__THREAD_DEFINE_p_0 = --define wxNO_THREADS +endif ifeq ($(UNICODE),0) __UNICODE_DEFINE_p = -DwxUSE_UNICODE=0 endif ifeq ($(UNICODE),1) __UNICODE_DEFINE_p = -D_UNICODE endif +ifeq ($(UNICODE),0) +__UNICODE_DEFINE_p_0 = --define wxUSE_UNICODE=0 +endif +ifeq ($(UNICODE),1) +__UNICODE_DEFINE_p_0 = --define _UNICODE +endif ifeq ($(USE_CAIRO),1) ____CAIRO_INCLUDEDIR_FILENAMES = -I$(CAIRO_ROOT)\include\cairo endif +ifeq ($(USE_CAIRO),1) +__CAIRO_INCLUDEDIR_p = --include-dir $(CAIRO_ROOT)/include/cairo +endif ifeq ($(SHARED),1) __DLLFLAG_p = -DWXUSINGDLL endif +ifeq ($(SHARED),1) +__DLLFLAG_p_0 = --define WXUSINGDLL +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(USE_WEBVIEW),1) +__WXLIB_WEBVIEW_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview +endif +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(USE_STC),1) +__WXLIB_STC_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc +endif +endif ifeq ($(MONOLITHIC),0) __WXLIB_CORE_p = \ -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core endif ifeq ($(MONOLITHIC),0) +__WXLIB_NET_p = \ + -lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net +endif +ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = \ -lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR) endif @@ -483,7 +501,7 @@ $(OBJS): ### Targets: ### -all: $(OBJS)\test.exe $(__test_drawing___depname) $(__test_drawingplugin___depname) $(__test_gui___depname) data data-images fr ja +all: $(OBJS)\test.exe $(__test_drawing___depname) $(__test_drawingplugin___depname) $(__test_gui___depname) $(__test_allheaders___depname) data data-images fr ja clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o @@ -492,19 +510,14 @@ clean: -if exist $(OBJS)\test_drawing.exe del $(OBJS)\test_drawing.exe -if exist $(OBJS)\test_drawingplugin.dll del $(OBJS)\test_drawingplugin.dll -if exist $(OBJS)\test_gui.exe del $(OBJS)\test_gui.exe + -if exist $(OBJS)\test_allheaders.exe del $(OBJS)\test_allheaders.exe $(OBJS)\test.exe: $(TEST_OBJECTS) - $(foreach f,$(subst \,/,$(TEST_OBJECTS)),$(shell echo $f >> $(subst \,/,$@).rsp.tmp)) - @move /y $@.rsp.tmp $@.rsp >nul - $(CXX) -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__WXLIB_NET_p) $(__WXLIB_XML_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_PNG_IF_MONO_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lwsock32 -lwininet -loleacc -luxtheme - @-del $@.rsp + $(CXX) -o $@ $(TEST_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__WXLIB_NET_p) $(__WXLIB_XML_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_PNG_IF_MONO_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lwsock32 -lwininet -loleacc -luxtheme ifeq ($(USE_GUI),1) $(OBJS)\test_drawing.exe: $(TEST_DRAWING_OBJECTS) - $(foreach f,$(subst \,/,$(TEST_DRAWING_OBJECTS)),$(shell echo $f >> $(subst \,/,$@).rsp.tmp)) - @move /y $@.rsp.tmp $@.rsp >nul - $(CXX) -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lwsock32 -lwininet -loleacc -luxtheme - @-del $@.rsp + $(CXX) -o $@ $(TEST_DRAWING_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lwsock32 -lwininet -loleacc -luxtheme endif ifeq ($(SHARED),1) @@ -516,10 +529,12 @@ endif ifeq ($(USE_GUI),1) $(OBJS)\test_gui.exe: $(TEST_GUI_OBJECTS) $(OBJS)\test_gui_sample_rc.o - $(foreach f,$(subst \,/,$(TEST_GUI_OBJECTS)),$(shell echo $f >> $(subst \,/,$@).rsp.tmp)) - @move /y $@.rsp.tmp $@.rsp >nul - $(CXX) -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__WXLIB_WEBVIEW_p) $(__WXLIB_STC_p) $(__WXLIB_AUI_p) $(__WXLIB_RICHTEXT_p) $(__WXLIB_MEDIA_p) $(__WXLIB_XRC_p) $(__WXLIB_XML_p) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lwsock32 -lwininet -loleacc -luxtheme - @-del $@.rsp + $(CXX) -o $@ $(TEST_GUI_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__WXLIB_WEBVIEW_p) $(__WXLIB_STC_p) $(__WXLIB_AUI_p) $(__WXLIB_RICHTEXT_p) $(__WXLIB_MEDIA_p) $(__WXLIB_XRC_p) $(__WXLIB_XML_p) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lwsock32 -lwininet -loleacc -luxtheme +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\test_allheaders.exe: $(TEST_ALLHEADERS_OBJECTS) $(OBJS)\test_allheaders_sample_rc.o + $(CXX) -o $@ $(TEST_ALLHEADERS_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__WXLIB_WEBVIEW_p) $(__WXLIB_STC_p) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lwsock32 -lwininet -loleacc -luxtheme endif data: @@ -818,7 +833,7 @@ $(OBJS)\test_drawingplugin_pluginsample.o: ./drawing/pluginsample.cpp $(CXX) -c -o $@ $(TEST_DRAWINGPLUGIN_CXXFLAGS) $(CPPDEPS) $< $(OBJS)\test_gui_sample_rc.o: ./../samples/sample.rc - $(WINDRES) -i$< -o$@ --define wxUSE_DPI_AWARE_MANIFEST=$(USE_DPI_AWARE_MANIFEST) --define __WXMSW__ $(__WXUNIV_DEFINE_p_6) $(__DEBUG_DEFINE_p_6) $(__NDEBUG_DEFINE_p_6) $(__EXCEPTIONS_DEFINE_p_6) $(__RTTI_DEFINE_p_6) $(__THREAD_DEFINE_p_6) $(__UNICODE_DEFINE_p_6) --include-dir $(SETUPHDIR) --include-dir ./../include $(__CAIRO_INCLUDEDIR_p_2) --include-dir . $(__DLLFLAG_p_6) --include-dir ./../samples --define NOPCH --include-dir ./../3rdparty/catch/include + $(WINDRES) -i$< -o$@ --define wxUSE_DPI_AWARE_MANIFEST=$(USE_DPI_AWARE_MANIFEST) --define __WXMSW__ $(__WXUNIV_DEFINE_p_0) $(__DEBUG_DEFINE_p_0) $(__NDEBUG_DEFINE_p_0) $(__EXCEPTIONS_DEFINE_p_0) $(__RTTI_DEFINE_p_0) $(__THREAD_DEFINE_p_0) $(__UNICODE_DEFINE_p_0) --include-dir $(SETUPHDIR) --include-dir ./../include $(__CAIRO_INCLUDEDIR_p) --include-dir . $(__DLLFLAG_p_0) --include-dir ./../samples --define NOPCH --include-dir ./../3rdparty/catch/include $(OBJS)\test_gui_dummy.o: ./dummy.cpp $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< @@ -1120,6 +1135,24 @@ $(OBJS)\test_gui_setsize.o: ./window/setsize.cpp $(OBJS)\test_gui_xrctest.o: ./xml/xrctest.cpp $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< +$(OBJS)\test_allheaders_sample_rc.o: ./../samples/sample.rc + $(WINDRES) -i$< -o$@ --define wxUSE_DPI_AWARE_MANIFEST=$(USE_DPI_AWARE_MANIFEST) --define __WXMSW__ $(__WXUNIV_DEFINE_p_0) $(__DEBUG_DEFINE_p_0) $(__NDEBUG_DEFINE_p_0) $(__EXCEPTIONS_DEFINE_p_0) $(__RTTI_DEFINE_p_0) $(__THREAD_DEFINE_p_0) $(__UNICODE_DEFINE_p_0) --include-dir $(SETUPHDIR) --include-dir ./../include $(__CAIRO_INCLUDEDIR_p) --include-dir . $(__DLLFLAG_p_0) --include-dir ./../samples --define NOPCH --include-dir ./../3rdparty/catch/include + +$(OBJS)\test_allheaders_dummy.o: ./dummy.cpp + $(CXX) -c -o $@ $(TEST_ALLHEADERS_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\test_allheaders_asserthelper.o: ./asserthelper.cpp + $(CXX) -c -o $@ $(TEST_ALLHEADERS_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\test_allheaders_test.o: ./test.cpp + $(CXX) -c -o $@ $(TEST_ALLHEADERS_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\test_allheaders_allheaders.o: ./allheaders.cpp + $(CXX) -c -o $@ $(TEST_ALLHEADERS_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\test_allheaders_testableframe.o: ./testableframe.cpp + $(CXX) -c -o $@ $(TEST_ALLHEADERS_CXXFLAGS) $(CPPDEPS) $< + .PHONY: all clean data data-images fr ja diff --git a/tests/makefile.vc b/tests/makefile.vc index 0e539926ec..db9bf3f7d7 100644 --- a/tests/makefile.vc +++ b/tests/makefile.vc @@ -1,6 +1,6 @@ # ========================================================================= # This makefile was generated by -# Bakefile 0.2.12 (http://www.bakefile.org) +# Bakefile 0.2.11 (http://www.bakefile.org) # Do not modify, all changes will be overwritten! # ========================================================================= @@ -264,6 +264,26 @@ TEST_GUI_OBJECTS = \ $(OBJS)\test_gui_xrctest.obj TEST_GUI_RESOURCES = \ $(OBJS)\test_gui_sample.res +TEST_ALLHEADERS_CXXFLAGS = /M$(__RUNTIME_LIBS_76)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) /Fd$(OBJS)\test_allheaders.pdb $(____DEBUGRUNTIME) \ + $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) $(__TARGET_CPU_COMPFLAG_p) /D__WXMSW__ \ + $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) \ + $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I.\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /I. $(__DLLFLAG_p) /I.\..\samples \ + /DNOPCH /I.\..\3rdparty\catch\include /D_CONSOLE $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /Yu"testprec.h" \ + /Fp"$(OBJS)\testprec_test_allheaders.pch" $(CPPFLAGS) $(CXXFLAGS) +TEST_ALLHEADERS_OBJECTS = \ + $(OBJS)\test_allheaders_dummy.obj \ + $(OBJS)\test_allheaders_asserthelper.obj \ + $(OBJS)\test_allheaders_test.obj \ + $(OBJS)\test_allheaders_allheaders.obj \ + $(OBJS)\test_allheaders_testableframe.obj +TEST_ALLHEADERS_RESOURCES = \ + $(OBJS)\test_allheaders_sample.res ### Conditionally set variables: ### @@ -532,7 +552,7 @@ EXTRALIBS_FOR_BASE = EXTRALIBS_FOR_BASE = !endif !if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" -__DEBUGINFO_2 = $(__DEBUGRUNTIME_2) +__DEBUGINFO_2 = $(__DEBUGRUNTIME_3) !endif !if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" __DEBUGINFO_2 = @@ -541,7 +561,7 @@ __DEBUGINFO_2 = __DEBUGINFO_2 = !endif !if "$(DEBUG_INFO)" == "1" -__DEBUGINFO_2 = $(__DEBUGRUNTIME_2) +__DEBUGINFO_2 = $(__DEBUGRUNTIME_3) !endif !if "$(RUNTIME_LIBS)" == "dynamic" __RUNTIME_LIBS_10 = D @@ -556,7 +576,7 @@ __LIB_PNG_IF_MONO_p = $(__LIB_PNG_p) __test_drawing___depname = $(OBJS)\test_drawing.exe !endif !if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" -__DEBUGINFO_19 = $(__DEBUGRUNTIME_2) +__DEBUGINFO_19 = $(__DEBUGRUNTIME_3) !endif !if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" __DEBUGINFO_19 = @@ -565,7 +585,7 @@ __DEBUGINFO_19 = __DEBUGINFO_19 = !endif !if "$(DEBUG_INFO)" == "1" -__DEBUGINFO_19 = $(__DEBUGRUNTIME_2) +__DEBUGINFO_19 = $(__DEBUGRUNTIME_3) !endif !if "$(RUNTIME_LIBS)" == "dynamic" __RUNTIME_LIBS_27 = D @@ -577,7 +597,7 @@ __RUNTIME_LIBS_27 = $(__THREADSFLAG) __test_drawingplugin___depname = $(OBJS)\test_drawingplugin.dll !endif !if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" -__DEBUGINFO_37 = $(__DEBUGRUNTIME_2) +__DEBUGINFO_37 = $(__DEBUGRUNTIME_3) !endif !if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" __DEBUGINFO_37 = @@ -586,7 +606,7 @@ __DEBUGINFO_37 = __DEBUGINFO_37 = !endif !if "$(DEBUG_INFO)" == "1" -__DEBUGINFO_37 = $(__DEBUGRUNTIME_2) +__DEBUGINFO_37 = $(__DEBUGRUNTIME_3) !endif !if "$(RUNTIME_LIBS)" == "dynamic" __RUNTIME_LIBS_45 = D @@ -598,7 +618,7 @@ __RUNTIME_LIBS_45 = $(__THREADSFLAG) __test_gui___depname = $(OBJS)\test_gui.exe !endif !if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" -__DEBUGINFO_51 = $(__DEBUGRUNTIME_2) +__DEBUGINFO_51 = $(__DEBUGRUNTIME_3) !endif !if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" __DEBUGINFO_51 = @@ -607,19 +627,7 @@ __DEBUGINFO_51 = __DEBUGINFO_51 = !endif !if "$(DEBUG_INFO)" == "1" -__DEBUGINFO_51 = $(__DEBUGRUNTIME_2) -!endif -!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default" -____DEBUGRUNTIME_52_p_1 = /d _DEBUG -!endif -!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" -____DEBUGRUNTIME_52_p_1 = -!endif -!if "$(DEBUG_RUNTIME_LIBS)" == "0" -____DEBUGRUNTIME_52_p_1 = -!endif -!if "$(DEBUG_RUNTIME_LIBS)" == "1" -____DEBUGRUNTIME_52_p_1 = /d _DEBUG +__DEBUGINFO_51 = $(__DEBUGRUNTIME_3) !endif !if "$(RUNTIME_LIBS)" == "dynamic" __RUNTIME_LIBS_59 = D @@ -627,62 +635,6 @@ __RUNTIME_LIBS_59 = D !if "$(RUNTIME_LIBS)" == "static" __RUNTIME_LIBS_59 = $(__THREADSFLAG) !endif -!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0" -__NO_VC_CRTDBG_p_7 = /d __NO_VC_CRTDBG__ -!endif -!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1" -__NO_VC_CRTDBG_p_7 = /d __NO_VC_CRTDBG__ -!endif -!if "$(TARGET_CPU)" == "" -__TARGET_CPU_COMPFLAG_p_7 = /d TARGET_CPU_COMPFLAG=0 -!endif -!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "X64" -__TARGET_CPU_COMPFLAG_p_7 = -!endif -!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "x64" -__TARGET_CPU_COMPFLAG_p_7 = -!endif -!if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_7 = /d __WXUNIVERSAL__ -!endif -!if "$(DEBUG_FLAG)" == "0" -__DEBUG_DEFINE_p_7 = /d wxDEBUG_LEVEL=0 -!endif -!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" -__NDEBUG_DEFINE_p_7 = /d NDEBUG -!endif -!if "$(DEBUG_RUNTIME_LIBS)" == "0" -__NDEBUG_DEFINE_p_7 = /d NDEBUG -!endif -!if "$(USE_EXCEPTIONS)" == "0" -__EXCEPTIONS_DEFINE_p_7 = /d wxNO_EXCEPTIONS -!endif -!if "$(USE_RTTI)" == "0" -__RTTI_DEFINE_p_7 = /d wxNO_RTTI -!endif -!if "$(USE_THREADS)" == "0" -__THREAD_DEFINE_p_7 = /d wxNO_THREADS -!endif -!if "$(UNICODE)" == "0" -__UNICODE_DEFINE_p_7 = /d wxUSE_UNICODE=0 -!endif -!if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_7 = /d _UNICODE -!endif -!if "$(USE_CAIRO)" == "1" -____CAIRO_INCLUDEDIR_FILENAMES_7_p = /i $(CAIRO_ROOT)\include\cairo -!endif -!if "$(SHARED)" == "1" -__DLLFLAG_p_7 = /d WXUSINGDLL -!endif -!if "$(MONOLITHIC)" == "0" && "$(USE_WEBVIEW)" == "1" -__WXLIB_WEBVIEW_p = \ - wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib -!endif -!if "$(MONOLITHIC)" == "0" && "$(USE_STC)" == "1" -__WXLIB_STC_p = \ - wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib -!endif !if "$(MONOLITHIC)" == "0" __WXLIB_AUI_p = \ wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib @@ -703,14 +655,31 @@ __WXLIB_XRC_p = \ __WXLIB_HTML_p = \ wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib !endif +!if "$(USE_GUI)" == "1" +__test_allheaders___depname = $(OBJS)\test_allheaders.exe +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_68 = $(__DEBUGRUNTIME_3) +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_68 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_68 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_68 = $(__DEBUGRUNTIME_3) +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_76 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_76 = $(__THREADSFLAG) +!endif !if "$(MONOLITHIC)" == "0" __WXLIB_XML_p = \ wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib !endif -!if "$(MONOLITHIC)" == "0" -__WXLIB_NET_p = \ - wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib -!endif !if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" __DEBUGINFO = /Zi !endif @@ -724,16 +693,16 @@ __DEBUGINFO = __DEBUGINFO = /Zi !endif !if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" -__DEBUGINFO_4 = /DEBUG +__DEBUGINFO_5 = /DEBUG !endif !if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" -__DEBUGINFO_4 = +__DEBUGINFO_5 = !endif !if "$(DEBUG_INFO)" == "0" -__DEBUGINFO_4 = +__DEBUGINFO_5 = !endif !if "$(DEBUG_INFO)" == "1" -__DEBUGINFO_4 = /DEBUG +__DEBUGINFO_5 = /DEBUG !endif !if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default" ____DEBUGRUNTIME = /D_DEBUG @@ -748,6 +717,18 @@ ____DEBUGRUNTIME = ____DEBUGRUNTIME = /D_DEBUG !endif !if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_0 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_0 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_0 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_0 = /d _DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default" __DEBUGRUNTIME = d !endif !if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" @@ -760,16 +741,16 @@ __DEBUGRUNTIME = __DEBUGRUNTIME = d !endif !if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default" -__DEBUGRUNTIME_2 = +__DEBUGRUNTIME_3 = !endif !if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" -__DEBUGRUNTIME_2 = /opt:ref /opt:icf +__DEBUGRUNTIME_3 = /opt:ref /opt:icf !endif !if "$(DEBUG_RUNTIME_LIBS)" == "0" -__DEBUGRUNTIME_2 = /opt:ref /opt:icf +__DEBUGRUNTIME_3 = /opt:ref /opt:icf !endif !if "$(DEBUG_RUNTIME_LIBS)" == "1" -__DEBUGRUNTIME_2 = +__DEBUGRUNTIME_3 = !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG = /Od @@ -801,6 +782,12 @@ __NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__ !if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1" __NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__ !endif +!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0" +__NO_VC_CRTDBG_p_0 = /d __NO_VC_CRTDBG__ +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1" +__NO_VC_CRTDBG_p_0 = /d __NO_VC_CRTDBG__ +!endif !if "$(TARGET_CPU)" == "" __TARGET_CPU_COMPFLAG_p = /DTARGET_CPU_COMPFLAG=0 !endif @@ -810,44 +797,98 @@ __TARGET_CPU_COMPFLAG_p = !if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "x64" __TARGET_CPU_COMPFLAG_p = !endif +!if "$(TARGET_CPU)" == "" +__TARGET_CPU_COMPFLAG_p_0 = /d TARGET_CPU_COMPFLAG=0 +!endif +!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "X64" +__TARGET_CPU_COMPFLAG_p_0 = +!endif +!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "x64" +__TARGET_CPU_COMPFLAG_p_0 = +!endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif +!if "$(WXUNIV)" == "1" +__WXUNIV_DEFINE_p_0 = /d __WXUNIVERSAL__ +!endif !if "$(DEBUG_FLAG)" == "0" __DEBUG_DEFINE_p = /DwxDEBUG_LEVEL=0 !endif +!if "$(DEBUG_FLAG)" == "0" +__DEBUG_DEFINE_p_0 = /d wxDEBUG_LEVEL=0 +!endif !if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" __NDEBUG_DEFINE_p = /DNDEBUG !endif !if "$(DEBUG_RUNTIME_LIBS)" == "0" __NDEBUG_DEFINE_p = /DNDEBUG !endif +!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" +__NDEBUG_DEFINE_p_0 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__NDEBUG_DEFINE_p_0 = /d NDEBUG +!endif !if "$(USE_EXCEPTIONS)" == "0" __EXCEPTIONS_DEFINE_p = /DwxNO_EXCEPTIONS !endif +!if "$(USE_EXCEPTIONS)" == "0" +__EXCEPTIONS_DEFINE_p_0 = /d wxNO_EXCEPTIONS +!endif !if "$(USE_RTTI)" == "0" __RTTI_DEFINE_p = /DwxNO_RTTI !endif +!if "$(USE_RTTI)" == "0" +__RTTI_DEFINE_p_0 = /d wxNO_RTTI +!endif !if "$(USE_THREADS)" == "0" __THREAD_DEFINE_p = /DwxNO_THREADS !endif +!if "$(USE_THREADS)" == "0" +__THREAD_DEFINE_p_0 = /d wxNO_THREADS +!endif !if "$(UNICODE)" == "0" __UNICODE_DEFINE_p = /DwxUSE_UNICODE=0 !endif !if "$(UNICODE)" == "1" __UNICODE_DEFINE_p = /D_UNICODE !endif +!if "$(UNICODE)" == "0" +__UNICODE_DEFINE_p_0 = /d wxUSE_UNICODE=0 +!endif +!if "$(UNICODE)" == "1" +__UNICODE_DEFINE_p_0 = /d _UNICODE +!endif !if "$(USE_CAIRO)" == "1" ____CAIRO_INCLUDEDIR_FILENAMES = /I$(CAIRO_ROOT)\include\cairo !endif +!if "$(USE_CAIRO)" == "1" +____CAIRO_INCLUDEDIR_FILENAMES_0 = /i $(CAIRO_ROOT)\include\cairo +!endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif +!if "$(SHARED)" == "1" +__DLLFLAG_p_0 = /d WXUSINGDLL +!endif +!if "$(MONOLITHIC)" == "0" && "$(USE_WEBVIEW)" == "1" +__WXLIB_WEBVIEW_p = \ + wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib +!endif +!if "$(MONOLITHIC)" == "0" && "$(USE_STC)" == "1" +__WXLIB_STC_p = \ + wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib +!endif !if "$(MONOLITHIC)" == "0" __WXLIB_CORE_p = \ wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib !endif !if "$(MONOLITHIC)" == "0" +__WXLIB_NET_p = \ + wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib +!endif +!if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = \ wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib !endif @@ -881,7 +922,7 @@ $(OBJS): ### Targets: ### -all: $(OBJS)\test.exe $(__test_drawing___depname) $(__test_drawingplugin___depname) $(__test_gui___depname) data data-images fr ja +all: $(OBJS)\test.exe $(__test_drawing___depname) $(__test_drawingplugin___depname) $(__test_gui___depname) $(__test_allheaders___depname) data data-images fr ja clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -899,33 +940,43 @@ clean: -if exist $(OBJS)\test_gui.exe del $(OBJS)\test_gui.exe -if exist $(OBJS)\test_gui.ilk del $(OBJS)\test_gui.ilk -if exist $(OBJS)\test_gui.pdb del $(OBJS)\test_gui.pdb + -if exist $(OBJS)\test_allheaders.exe del $(OBJS)\test_allheaders.exe + -if exist $(OBJS)\test_allheaders.ilk del $(OBJS)\test_allheaders.ilk + -if exist $(OBJS)\test_allheaders.pdb del $(OBJS)\test_allheaders.pdb $(OBJS)\test.exe: $(OBJS)\test_dummy.obj $(TEST_OBJECTS) - link /NOLOGO /OUT:$@ $(__DEBUGINFO_4) /pdb:"$(OBJS)\test.pdb" $(__DEBUGINFO_2) $(WIN32_DPI_LINKFLAG) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:CONSOLE $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< + link /NOLOGO /OUT:$@ $(__DEBUGINFO_5) /pdb:"$(OBJS)\test.pdb" $(__DEBUGINFO_2) $(WIN32_DPI_LINKFLAG) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:CONSOLE $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< $(TEST_OBJECTS) $(__WXLIB_NET_p) $(__WXLIB_XML_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_PNG_IF_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib << !if "$(USE_GUI)" == "1" $(OBJS)\test_drawing.exe: $(OBJS)\test_drawing_dummy.obj $(TEST_DRAWING_OBJECTS) - link /NOLOGO /OUT:$@ $(__DEBUGINFO_4) /pdb:"$(OBJS)\test_drawing.pdb" $(__DEBUGINFO_19) $(WIN32_DPI_LINKFLAG) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:CONSOLE $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< + link /NOLOGO /OUT:$@ $(__DEBUGINFO_5) /pdb:"$(OBJS)\test_drawing.pdb" $(__DEBUGINFO_19) $(WIN32_DPI_LINKFLAG) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:CONSOLE $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< $(TEST_DRAWING_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib << !endif !if "$(SHARED)" == "1" && "$(USE_GUI)" == "1" $(OBJS)\test_drawingplugin.dll: $(TEST_DRAWINGPLUGIN_OBJECTS) - link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_4) /pdb:"$(OBJS)\test_drawingplugin.pdb" $(__DEBUGINFO_37) $(WIN32_DPI_LINKFLAG) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< + link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_5) /pdb:"$(OBJS)\test_drawingplugin.pdb" $(__DEBUGINFO_37) $(WIN32_DPI_LINKFLAG) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< $(TEST_DRAWINGPLUGIN_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib << !endif !if "$(USE_GUI)" == "1" $(OBJS)\test_gui.exe: $(OBJS)\test_gui_dummy.obj $(TEST_GUI_OBJECTS) $(OBJS)\test_gui_sample.res - link /NOLOGO /OUT:$@ $(__DEBUGINFO_4) /pdb:"$(OBJS)\test_gui.pdb" $(__DEBUGINFO_51) $(WIN32_DPI_LINKFLAG) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:CONSOLE $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< + link /NOLOGO /OUT:$@ $(__DEBUGINFO_5) /pdb:"$(OBJS)\test_gui.pdb" $(__DEBUGINFO_51) $(WIN32_DPI_LINKFLAG) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:CONSOLE $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< $(TEST_GUI_OBJECTS) $(TEST_GUI_RESOURCES) $(__WXLIB_WEBVIEW_p) $(__WXLIB_STC_p) $(__WXLIB_AUI_p) $(__WXLIB_RICHTEXT_p) $(__WXLIB_MEDIA_p) $(__WXLIB_XRC_p) $(__WXLIB_XML_p) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib << !endif +!if "$(USE_GUI)" == "1" +$(OBJS)\test_allheaders.exe: $(OBJS)\test_allheaders_dummy.obj $(TEST_ALLHEADERS_OBJECTS) $(OBJS)\test_allheaders_sample.res + link /NOLOGO /OUT:$@ $(__DEBUGINFO_5) /pdb:"$(OBJS)\test_allheaders.pdb" $(__DEBUGINFO_68) $(WIN32_DPI_LINKFLAG) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:CONSOLE $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< + $(TEST_ALLHEADERS_OBJECTS) $(TEST_ALLHEADERS_RESOURCES) $(__WXLIB_WEBVIEW_p) $(__WXLIB_STC_p) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib +<< +!endif + data: if not exist $(OBJS) mkdir $(OBJS) for %f in (horse.ani horse.bmp horse.cur horse.gif horse.ico horse.jpg horse.pcx horse.png horse.pnm horse.tga horse.tif horse.xpm) do if not exist $(OBJS)\%f copy .\%f $(OBJS) @@ -1225,7 +1276,7 @@ $(OBJS)\test_gui_dummy.obj: .\dummy.cpp $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) /Yctestprec.h .\dummy.cpp $(OBJS)\test_gui_sample.res: .\..\samples\sample.rc - rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_52_p_1) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_7) $(__TARGET_CPU_COMPFLAG_p_7) /d __WXMSW__ $(__WXUNIV_DEFINE_p_7) $(__DEBUG_DEFINE_p_7) $(__NDEBUG_DEFINE_p_7) $(__EXCEPTIONS_DEFINE_p_7) $(__RTTI_DEFINE_p_7) $(__THREAD_DEFINE_p_7) $(__UNICODE_DEFINE_p_7) /i $(SETUPHDIR) /i .\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_7_p) /i . $(__DLLFLAG_p_7) /i .\..\samples /d NOPCH /i .\..\3rdparty\catch\include /d _CONSOLE .\..\samples\sample.rc + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_0) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_0) $(__TARGET_CPU_COMPFLAG_p_0) /d __WXMSW__ $(__WXUNIV_DEFINE_p_0) $(__DEBUG_DEFINE_p_0) $(__NDEBUG_DEFINE_p_0) $(__EXCEPTIONS_DEFINE_p_0) $(__RTTI_DEFINE_p_0) $(__THREAD_DEFINE_p_0) $(__UNICODE_DEFINE_p_0) /i $(SETUPHDIR) /i .\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_0) /i . $(__DLLFLAG_p_0) /i .\..\samples /d NOPCH /i .\..\3rdparty\catch\include /d _CONSOLE .\..\samples\sample.rc $(OBJS)\test_gui_asserthelper.obj: .\asserthelper.cpp $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\asserthelper.cpp @@ -1524,3 +1575,21 @@ $(OBJS)\test_gui_setsize.obj: .\window\setsize.cpp $(OBJS)\test_gui_xrctest.obj: .\xml\xrctest.cpp $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\xml\xrctest.cpp +$(OBJS)\test_allheaders_dummy.obj: .\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(TEST_ALLHEADERS_CXXFLAGS) /Yctestprec.h .\dummy.cpp + +$(OBJS)\test_allheaders_sample.res: .\..\samples\sample.rc + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_0) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_0) $(__TARGET_CPU_COMPFLAG_p_0) /d __WXMSW__ $(__WXUNIV_DEFINE_p_0) $(__DEBUG_DEFINE_p_0) $(__NDEBUG_DEFINE_p_0) $(__EXCEPTIONS_DEFINE_p_0) $(__RTTI_DEFINE_p_0) $(__THREAD_DEFINE_p_0) $(__UNICODE_DEFINE_p_0) /i $(SETUPHDIR) /i .\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_0) /i . $(__DLLFLAG_p_0) /i .\..\samples /d NOPCH /i .\..\3rdparty\catch\include /d _CONSOLE .\..\samples\sample.rc + +$(OBJS)\test_allheaders_asserthelper.obj: .\asserthelper.cpp + $(CXX) /c /nologo /TP /Fo$@ $(TEST_ALLHEADERS_CXXFLAGS) .\asserthelper.cpp + +$(OBJS)\test_allheaders_test.obj: .\test.cpp + $(CXX) /c /nologo /TP /Fo$@ $(TEST_ALLHEADERS_CXXFLAGS) .\test.cpp + +$(OBJS)\test_allheaders_allheaders.obj: .\allheaders.cpp + $(CXX) /c /nologo /TP /Fo$@ $(TEST_ALLHEADERS_CXXFLAGS) .\allheaders.cpp + +$(OBJS)\test_allheaders_testableframe.obj: .\testableframe.cpp + $(CXX) /c /nologo /TP /Fo$@ $(TEST_ALLHEADERS_CXXFLAGS) .\testableframe.cpp + diff --git a/tests/test.bkl b/tests/test.bkl index e1bf5e0ec5..2588593b05 100644 --- a/tests/test.bkl +++ b/tests/test.bkl @@ -298,6 +298,31 @@ base + + + console + + + asserthelper.cpp + test.cpp + allheaders.cpp + testableframe.cpp + + + $(WXLIB_WEBVIEW) + $(WXLIB_STC) + core + net + base + + testdata.fc @@ -348,7 +373,7 @@ -failtest: failtest_combobox failtest_evthandler failtest_weakref +failtest: failtest_combobox failtest_evthandler failtest_weakref failtest_allheaders failtest_combobox: @$(RM) test_gui_comboboxtest.o @@ -376,7 +401,15 @@ failtest_weakref: fi; \ exit 0 -.PHONY: failtest failtest_combobox failtest_evthandler failtest_weakref +failtest_allheaders: + @$(RM) test_allheaders.o + if $(MAKE) CPPFLAGS=-DwxNO_IMPLICIT_WXSTRING_ENCODING -DTEST_IMPLICIT_WXSTRING_ENCODING test_allheaders.o 2>/dev/null; then \ + echo "*** Compilation with TEST_IMPLICIT_WXSTRING_ENCODING unexpectedly succeeded.">&2; \ + exit 1; \ + fi; \ + exit 0 + +.PHONY: failtest failtest_combobox failtest_evthandler failtest_weakref failtest_allheaders diff --git a/tests/test.cpp b/tests/test.cpp index baba0f7b3e..2677c4dad6 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -109,9 +109,10 @@ static wxString FormatAssertMessage(const wxString& file, const wxString& msg) { wxString str; - str << "wxWidgets assert: " << cond << " failed " - "at " << file << ":" << line << " in " << func - << " with message '" << msg << "'"; + str << wxASCII_STR("wxWidgets assert: ") << cond + << wxASCII_STR(" failed at ") << file << wxASCII_STR(":") << line + << wxASCII_STR(" in ") << func << wxASCII_STR(" with message '") + << msg << wxASCII_STR("'"); return str; } @@ -133,7 +134,7 @@ static void TestAssertHandler(const wxString& file, { // Exceptions thrown from worker threads are not caught currently and // so we'd just die without any useful information -- abort instead. - abortReason << assertMessage << "in a worker thread."; + abortReason << assertMessage << wxASCII_STR("in a worker thread."); } #if __cplusplus >= 201703L || wxCHECK_VISUALC_VERSION(14) else if ( uncaught_exceptions() ) @@ -146,12 +147,14 @@ static void TestAssertHandler(const wxString& file, // about why the test failed then. if ( s_lastAssertMessage.empty() ) { - abortReason << assertMessage << "while handling an exception"; + abortReason << assertMessage + << wxASCII_STR("while handling an exception"); } else // In this case the exception is due to a previous assert. { - abortReason << s_lastAssertMessage << "\n and another " - << assertMessage << " while handling it."; + abortReason << s_lastAssertMessage + << wxASCII_STR("\n and another ") << assertMessage + << wxASCII_STR(" while handling it."); } } else // Can "safely" throw from here. @@ -229,8 +232,8 @@ public: // show some details about the exception along the way. virtual bool OnExceptionInMainLoop() wxOVERRIDE { - wxFprintf(stderr, "Unhandled exception in the main loop: %s\n", - Catch::translateActiveException()); + wxFprintf(stderr, wxASCII_STR("Unhandled exception in the main loop: %s\n"), + wxASCII_STR(Catch::translateActiveException().c_str())); throw; } @@ -358,7 +361,7 @@ extern bool IsNetworkAvailable() // under Travis to avoid false positives. static int s_isTravis = -1; if ( s_isTravis == -1 ) - s_isTravis = wxGetEnv("TRAVIS", NULL); + s_isTravis = wxGetEnv(wxASCII_STR("TRAVIS"), NULL); if ( s_isTravis ) return false; @@ -369,7 +372,7 @@ extern bool IsNetworkAvailable() wxSocketBase::Initialize(); wxIPV4address addr; - if (!addr.Hostname("www.google.com") || !addr.Service("www")) + if (!addr.Hostname(wxASCII_STR("www.google.com")) || !addr.Service(wxASCII_STR("www"))) { wxSocketBase::Shutdown(); return false; @@ -392,18 +395,18 @@ extern bool IsAutomaticTest() // Allow setting an environment variable to emulate buildslave user for // testing. wxString username; - if ( !wxGetEnv("WX_TEST_USER", &username) ) + if ( !wxGetEnv(wxASCII_STR("WX_TEST_USER"), &username) ) username = wxGetUserId(); username.MakeLower(); - s_isAutomatic = username == "buildbot" || - username.Matches("sandbox*"); + s_isAutomatic = username == wxASCII_STR("buildbot") || + username.Matches(wxASCII_STR("sandbox*")); // Also recognize Travis and AppVeyor CI environments. if ( !s_isAutomatic ) { - s_isAutomatic = wxGetEnv("TRAVIS", NULL) || - wxGetEnv("APPVEYOR", NULL); + s_isAutomatic = wxGetEnv(wxASCII_STR("TRAVIS"), NULL) || + wxGetEnv(wxASCII_STR("APPVEYOR"), NULL); } } @@ -416,7 +419,7 @@ extern bool IsRunningUnderXVFB() if ( s_isRunningUnderXVFB == -1 ) { wxString value; - s_isRunningUnderXVFB = wxGetEnv("wxUSE_XVFB", &value) && value == "1"; + s_isRunningUnderXVFB = wxGetEnv(wxASCII_STR("wxUSE_XVFB"), &value) && value == wxASCII_STR("1"); } return s_isRunningUnderXVFB == 1; @@ -446,14 +449,14 @@ bool EnableUITests() // Allow explicitly configuring this via an environment variable under // all platforms. wxString enabled; - if ( wxGetEnv("WX_UI_TESTS", &enabled) ) + if ( wxGetEnv(wxASCII_STR("WX_UI_TESTS"), &enabled) ) { - if ( enabled == "1" ) + if ( enabled == wxASCII_STR("1") ) s_enabled = 1; - else if ( enabled == "0" ) + else if ( enabled == wxASCII_STR("0") ) s_enabled = 0; else - wxFprintf(stderr, "Unknown \"WX_UI_TESTS\" value \"%s\" ignored.\n", enabled); + wxFprintf(stderr, wxASCII_STR("Unknown \"WX_UI_TESTS\" value \"%s\" ignored.\n"), enabled); } if ( s_enabled == -1 ) @@ -616,7 +619,7 @@ int TestApp::RunTests() // Switch off logging to avoid interfering with the tests output unless // WXTRACE is set, as otherwise setting it would have no effect while // running the tests. - if ( !wxGetEnv("WXTRACE", NULL) ) + if ( !wxGetEnv(wxASCII_STR("WXTRACE"), NULL) ) wxLog::EnableLogging(false); #endif diff --git a/tests/test_vc7_test_allheaders.vcproj b/tests/test_vc7_test_allheaders.vcproj new file mode 100644 index 0000000000..ded0ef4915 --- /dev/null +++ b/tests/test_vc7_test_allheaders.vcproj @@ -0,0 +1,351 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/test_vc8_test_allheaders.vcproj b/tests/test_vc8_test_allheaders.vcproj new file mode 100644 index 0000000000..4482209a35 --- /dev/null +++ b/tests/test_vc8_test_allheaders.vcproj @@ -0,0 +1,933 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/test_vc9_test_allheaders.vcproj b/tests/test_vc9_test_allheaders.vcproj new file mode 100644 index 0000000000..51e927e366 --- /dev/null +++ b/tests/test_vc9_test_allheaders.vcproj @@ -0,0 +1,905 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/testableframe.cpp b/tests/testableframe.cpp index 7ff54696f3..44aa2cda7c 100644 --- a/tests/testableframe.cpp +++ b/tests/testableframe.cpp @@ -16,7 +16,7 @@ #include "wx/app.h" #include "testableframe.h" -wxTestableFrame::wxTestableFrame() : wxFrame(NULL, wxID_ANY, "Test Frame") +wxTestableFrame::wxTestableFrame() : wxFrame(NULL, wxID_ANY, wxASCII_STR("Test Frame")) { // Use fixed position to facilitate debugging. Move(200, 200); diff --git a/tests/testprec.h b/tests/testprec.h index 4f9068994a..57dfe5d17e 100644 --- a/tests/testprec.h +++ b/tests/testprec.h @@ -73,7 +73,7 @@ struct StringMaker if ( wc < 0x7f ) return std::string(static_cast(wc), 1); - return wxString::Format("U+%06X", wc).ToStdString(); + return wxString::Format(wxASCII_STR("U+%06X"), wc).ToStdString(wxConvLibc); } };