From: Václav Slavík Date: Sun, 28 Jan 2001 23:21:20 +0000 (+0000) Subject: _T() -> wxT() X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a559d70856c65f8fd91d6e56c3e98c3828e18db7 _T() -> wxT() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/contrib/include/wx/xml/xml.h b/contrib/include/wx/xml/xml.h index c9d8549ec3..033a7240d3 100644 --- a/contrib/include/wx/xml/xml.h +++ b/contrib/include/wx/xml/xml.h @@ -168,7 +168,7 @@ class WXDLLEXPORT wxXmlNode class WXDLLEXPORT wxXmlDocument : public wxObject { public: - wxXmlDocument() : wxObject(), m_Version(_T("1.0")), m_Root(NULL) {} + wxXmlDocument() : wxObject(), m_Version(wxT("1.0")), m_Root(NULL) {} wxXmlDocument(const wxString& filename, wxXmlIOType io_type = wxXML_IO_AUTO); wxXmlDocument(wxInputStream& stream, wxXmlIOType io_type = wxXML_IO_AUTO); ~wxXmlDocument() { delete m_Root; } diff --git a/contrib/include/wx/xml/xmlres.h b/contrib/include/wx/xml/xmlres.h index 0947c0634a..673680886f 100644 --- a/contrib/include/wx/xml/xmlres.h +++ b/contrib/include/wx/xml/xmlres.h @@ -165,7 +165,7 @@ extern wxXmlResource *wxTheXmlResource; // END_EVENT_TABLE() #define XMLID(str_id) \ - wxXmlResource::GetXMLID(_T(str_id)) + wxXmlResource::GetXMLID(wxT(str_id)) // This macro returns pointer to particular control in dialog @@ -174,7 +174,7 @@ extern wxXmlResource *wxTheXmlResource; // Example: // wxDialog dlg; // wxTheXmlResource->LoadDialog(&dlg, mainFrame, "my_dialog"); -// XMLCTRL(dlg, "my_textctrl", wxTextCtrl)->SetValue(_T("default value")); +// XMLCTRL(dlg, "my_textctrl", wxTextCtrl)->SetValue(wxT("default value")); #define XMLCTRL(window, id, type) \ ((type*)((window).FindWindow(XMLID(id)))) @@ -223,7 +223,7 @@ class WXDLLEXPORT wxXmlResourceHandler : public wxObject // Returns true if the node has property class equal to classname, // e.g. bool IsOfClass(wxXmlNode *node, const wxString& classname) - { return node->GetPropVal(_T("class"), wxEmptyString) == classname; } + { return node->GetPropVal(wxT("class"), wxEmptyString) == classname; } // Gets node content from wxXML_ENTITY_NODE // (the problem is, content is represented as @@ -248,7 +248,7 @@ class WXDLLEXPORT wxXmlResourceHandler : public wxObject // Gets style flags from text in form "flag | flag2| flag3 |..." // Only understads flags added with AddStyle - int GetStyle(const wxString& param = _T("style"), int defaults = 0); + int GetStyle(const wxString& param = wxT("style"), int defaults = 0); // Gets text from param and does some convertions: // - replaces \n, \r, \t by respective chars (according to C syntax) @@ -270,18 +270,18 @@ class WXDLLEXPORT wxXmlResourceHandler : public wxObject wxColour GetColour(const wxString& param); // Get size/position (may be in dlg units): - wxSize GetSize(const wxString& param = _T("size")); - wxPoint GetPosition(const wxString& param = _T("pos")); + wxSize GetSize(const wxString& param = wxT("size")); + wxPoint GetPosition(const wxString& param = wxT("pos")); // Get dimension (may be in dlg units): wxCoord GetDimension(const wxString& param, wxCoord defaultv = 0); // Get bitmap: - wxBitmap GetBitmap(const wxString& param = _T("bitmap"), wxSize size = wxDefaultSize); - wxIcon GetIcon(const wxString& param = _T("icon"), wxSize size = wxDefaultSize); + wxBitmap GetBitmap(const wxString& param = wxT("bitmap"), wxSize size = wxDefaultSize); + wxIcon GetIcon(const wxString& param = wxT("icon"), wxSize size = wxDefaultSize); // Get font: - wxFont GetFont(const wxString& param = _T("font")); + wxFont GetFont(const wxString& param = wxT("font")); // Sets common window options: void SetupWindow(wxWindow *wnd); @@ -295,7 +295,7 @@ class WXDLLEXPORT wxXmlResourceHandler : public wxObject wxFileSystem& GetCurFileSystem() { return m_Resource->GetCurFileSystem(); } }; -#define ADD_STYLE(style) AddStyle(_T(#style), style) +#define ADD_STYLE(style) AddStyle(wxT(#style), style) diff --git a/contrib/src/xml/xh_bmp.cpp b/contrib/src/xml/xh_bmp.cpp index a5eb0341b5..5eb366c939 100644 --- a/contrib/src/xml/xh_bmp.cpp +++ b/contrib/src/xml/xh_bmp.cpp @@ -30,14 +30,14 @@ wxBitmapXmlHandler::wxBitmapXmlHandler() wxObject *wxBitmapXmlHandler::DoCreateResource() { - return new wxBitmap(GetBitmap(_T(""))); + return new wxBitmap(GetBitmap(wxT(""))); } bool wxBitmapXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, _T("wxBitmap")); + return IsOfClass(node, wxT("wxBitmap")); } @@ -48,13 +48,13 @@ wxIconXmlHandler::wxIconXmlHandler() wxObject *wxIconXmlHandler::DoCreateResource() { - return new wxIcon(GetIcon(_T(""))); + return new wxIcon(GetIcon(wxT(""))); } bool wxIconXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, _T("wxIcon")); + return IsOfClass(node, wxT("wxIcon")); } diff --git a/contrib/src/xml/xh_bmpbt.cpp b/contrib/src/xml/xh_bmpbt.cpp index a4230b1c74..69327e7609 100644 --- a/contrib/src/xml/xh_bmpbt.cpp +++ b/contrib/src/xml/xh_bmpbt.cpp @@ -38,20 +38,20 @@ wxObject *wxBitmapButtonXmlHandler::DoCreateResource() { wxBitmapButton *button = new wxBitmapButton(m_ParentAsWindow, GetID(), - GetBitmap(_T("bitmap")), + GetBitmap(wxT("bitmap")), GetPosition(), GetSize(), - GetStyle(_T("style"), wxBU_AUTODRAW), + GetStyle(wxT("style"), wxBU_AUTODRAW), wxDefaultValidator, GetName()); - if (GetBool(_T("default"), 0) == 1) button->SetDefault(); + if (GetBool(wxT("default"), 0) == 1) button->SetDefault(); SetupWindow(button); - if (!GetParamValue(_T("selected")).IsEmpty()) - button->SetBitmapSelected(GetBitmap(_T("selected"))); - if (!GetParamValue(_T("focus")).IsEmpty()) - button->SetBitmapFocus(GetBitmap(_T("focus"))); - if (!GetParamValue(_T("disabled")).IsEmpty()) - button->SetBitmapDisabled(GetBitmap(_T("disabled"))); + if (!GetParamValue(wxT("selected")).IsEmpty()) + button->SetBitmapSelected(GetBitmap(wxT("selected"))); + if (!GetParamValue(wxT("focus")).IsEmpty()) + button->SetBitmapFocus(GetBitmap(wxT("focus"))); + if (!GetParamValue(wxT("disabled")).IsEmpty()) + button->SetBitmapDisabled(GetBitmap(wxT("disabled"))); return button; } @@ -60,7 +60,7 @@ wxObject *wxBitmapButtonXmlHandler::DoCreateResource() bool wxBitmapButtonXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, _T("wxBitmapButton")); + return IsOfClass(node, wxT("wxBitmapButton")); } diff --git a/contrib/src/xml/xh_bttn.cpp b/contrib/src/xml/xh_bttn.cpp index c73b849310..1bb47f4362 100644 --- a/contrib/src/xml/xh_bttn.cpp +++ b/contrib/src/xml/xh_bttn.cpp @@ -34,12 +34,12 @@ wxObject *wxButtonXmlHandler::DoCreateResource() { wxButton *button = new wxButton(m_ParentAsWindow, GetID(), - GetText(_T("label")), + GetText(wxT("label")), GetPosition(), GetSize(), GetStyle(), wxDefaultValidator, GetName()); - if (GetBool(_T("default"), 0) == 1) button->SetDefault(); + if (GetBool(wxT("default"), 0) == 1) button->SetDefault(); SetupWindow(button); return button; @@ -49,7 +49,7 @@ wxObject *wxButtonXmlHandler::DoCreateResource() bool wxButtonXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, _T("wxButton")); + return IsOfClass(node, wxT("wxButton")); } diff --git a/contrib/src/xml/xh_cald.cpp b/contrib/src/xml/xh_cald.cpp index 723734d7c5..5e980a478f 100644 --- a/contrib/src/xml/xh_cald.cpp +++ b/contrib/src/xml/xh_cald.cpp @@ -54,7 +54,7 @@ wxObject *wxCalendarCtrlXmlHandler::DoCreateResource() bool wxCalendarCtrlXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, _T("wxCalendarCtrl")); + return IsOfClass(node, wxT("wxCalendarCtrl")); } diff --git a/contrib/src/xml/xh_chckb.cpp b/contrib/src/xml/xh_chckb.cpp index 0351054f8f..057de6e462 100644 --- a/contrib/src/xml/xh_chckb.cpp +++ b/contrib/src/xml/xh_chckb.cpp @@ -34,14 +34,14 @@ wxObject *wxCheckBoxXmlHandler::DoCreateResource() { wxCheckBox *control = new wxCheckBox(m_ParentAsWindow, GetID(), - GetText(_T("label")), + GetText(wxT("label")), GetPosition(), GetSize(), GetStyle(), wxDefaultValidator, GetName() ); - control->SetValue( GetBool( _T("checked"))); + control->SetValue( GetBool( wxT("checked"))); SetupWindow(control); return control; @@ -51,7 +51,7 @@ wxObject *wxCheckBoxXmlHandler::DoCreateResource() bool wxCheckBoxXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, _T("wxCheckBox")); + return IsOfClass(node, wxT("wxCheckBox")); } #endif diff --git a/contrib/src/xml/xh_chckl.cpp b/contrib/src/xml/xh_chckl.cpp index 826709bc9c..51f307adc3 100644 --- a/contrib/src/xml/xh_chckl.cpp +++ b/contrib/src/xml/xh_chckl.cpp @@ -31,11 +31,11 @@ wxCheckListXmlHandler::wxCheckListXmlHandler() wxObject *wxCheckListXmlHandler::DoCreateResource() { - if (m_Class == _T("wxCheckList")) + if (m_Class == wxT("wxCheckList")) { // need to build the list of strings from children m_InsideBox = TRUE; - CreateChildrenPrivately(NULL, GetParamNode(_T("content"))); + CreateChildrenPrivately(NULL, GetParamNode(wxT("content"))); wxString *strings = (wxString *) NULL; if( strList.GetCount() > 0 ) { @@ -57,19 +57,19 @@ wxObject *wxCheckListXmlHandler::DoCreateResource() ); // step through children myself (again.) - wxXmlNode *n = GetParamNode(_T("content")); + wxXmlNode *n = GetParamNode(wxT("content")); if (n) n = n->GetChildren(); int i = 0; while (n) { if (n->GetType() != wxXML_ELEMENT_NODE || - n->GetName() != _T("item")) + n->GetName() != wxT("item")) { n = n->GetNext(); continue; } // checking boolean is a bit ugly here (see GetBool() ) - wxString v = n->GetPropVal(_T("checked"), wxEmptyString); + wxString v = n->GetPropVal(wxT("checked"), wxEmptyString); v.MakeLower(); - if (v && v == _T("1")) + if (v && v == wxT("1")) control->Check( i, TRUE ); i++; @@ -101,8 +101,8 @@ wxObject *wxCheckListXmlHandler::DoCreateResource() bool wxCheckListXmlHandler::CanHandle(wxXmlNode *node) { - return (IsOfClass(node, _T("wxCheckList")) || - (m_InsideBox && node->GetName() == _T("item")) + return (IsOfClass(node, wxT("wxCheckList")) || + (m_InsideBox && node->GetName() == wxT("item")) ); } diff --git a/contrib/src/xml/xh_choic.cpp b/contrib/src/xml/xh_choic.cpp index 2e5918236d..0417f076e1 100644 --- a/contrib/src/xml/xh_choic.cpp +++ b/contrib/src/xml/xh_choic.cpp @@ -31,14 +31,14 @@ wxChoiceXmlHandler::wxChoiceXmlHandler() wxObject *wxChoiceXmlHandler::DoCreateResource() { - if( m_Class == _T("wxChoice")) + if( m_Class == wxT("wxChoice")) { // find the selection - long selection = GetLong( _T("selection"), -1 ); + long selection = GetLong( wxT("selection"), -1 ); // need to build the list of strings from children m_InsideBox = TRUE; - CreateChildrenPrivately( NULL, GetParamNode(_T("content"))); + CreateChildrenPrivately( NULL, GetParamNode(wxT("content"))); wxString *strings = (wxString *) NULL; if( strList.GetCount() > 0 ) { @@ -87,8 +87,8 @@ wxObject *wxChoiceXmlHandler::DoCreateResource() bool wxChoiceXmlHandler::CanHandle(wxXmlNode *node) { - return (IsOfClass(node, _T("wxChoice")) || - (m_InsideBox && node->GetName() == _T("item")) + return (IsOfClass(node, wxT("wxChoice")) || + (m_InsideBox && node->GetName() == wxT("item")) ); } diff --git a/contrib/src/xml/xh_combo.cpp b/contrib/src/xml/xh_combo.cpp index 9af99a7957..4f80166701 100644 --- a/contrib/src/xml/xh_combo.cpp +++ b/contrib/src/xml/xh_combo.cpp @@ -36,14 +36,14 @@ wxComboBoxXmlHandler::wxComboBoxXmlHandler() wxObject *wxComboBoxXmlHandler::DoCreateResource() { - if( m_Class == _T("wxComboBox")) + if( m_Class == wxT("wxComboBox")) { // find the selection - long selection = GetLong( _T("selection"), -1 ); + long selection = GetLong( wxT("selection"), -1 ); // need to build the list of strings from children m_InsideBox = TRUE; - CreateChildrenPrivately( NULL, GetParamNode(_T("content"))); + CreateChildrenPrivately( NULL, GetParamNode(wxT("content"))); wxString *strings = (wxString *) NULL; if( strList.GetCount() > 0 ) { @@ -56,7 +56,7 @@ wxObject *wxComboBoxXmlHandler::DoCreateResource() wxComboBox *control = new wxComboBox(m_ParentAsWindow, GetID(), - GetText(_T("value")), + GetText(wxT("value")), GetPosition(), GetSize(), strList.GetCount(), strings, @@ -93,8 +93,8 @@ wxObject *wxComboBoxXmlHandler::DoCreateResource() bool wxComboBoxXmlHandler::CanHandle(wxXmlNode *node) { - return (IsOfClass(node, _T("wxComboBox")) || - (m_InsideBox && node->GetName() == _T("item")) + return (IsOfClass(node, wxT("wxComboBox")) || + (m_InsideBox && node->GetName() == wxT("item")) ); } diff --git a/contrib/src/xml/xh_dlg.cpp b/contrib/src/xml/xh_dlg.cpp index 62b971a4e7..6110b807e7 100644 --- a/contrib/src/xml/xh_dlg.cpp +++ b/contrib/src/xml/xh_dlg.cpp @@ -54,9 +54,9 @@ wxObject *wxDialogXmlHandler::DoCreateResource() dlg->Create(m_ParentAsWindow, GetID(), - GetText(_T("title")), + GetText(wxT("title")), wxDefaultPosition, wxDefaultSize, - GetStyle(_T("style"), wxDEFAULT_DIALOG_STYLE), + GetStyle(wxT("style"), wxDEFAULT_DIALOG_STYLE), GetName()); dlg->SetClientSize(GetSize()); dlg->Move(GetPosition()); @@ -74,7 +74,7 @@ wxObject *wxDialogXmlHandler::DoCreateResource() bool wxDialogXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, _T("wxDialog")); + return IsOfClass(node, wxT("wxDialog")); } diff --git a/contrib/src/xml/xh_gauge.cpp b/contrib/src/xml/xh_gauge.cpp index 5989d2859f..2341a469c2 100644 --- a/contrib/src/xml/xh_gauge.cpp +++ b/contrib/src/xml/xh_gauge.cpp @@ -38,24 +38,24 @@ wxObject *wxGaugeXmlHandler::DoCreateResource() { wxGauge *control = new wxGauge(m_ParentAsWindow, GetID(), - GetLong( _T("range"), wxGAUGE_DEFAULT_RANGE), + GetLong( wxT("range"), wxGAUGE_DEFAULT_RANGE), GetPosition(), GetSize(), GetStyle(), wxDefaultValidator, GetName() ); - if( HasParam( _T("value") )) + if( HasParam( wxT("value") )) { - control->SetValue( GetLong( _T("value") )); + control->SetValue( GetLong( wxT("value") )); } - if( HasParam( _T("shadow") )) + if( HasParam( wxT("shadow") )) { - control->SetShadowWidth( GetDimension( _T("shadow") )); + control->SetShadowWidth( GetDimension( wxT("shadow") )); } - if( HasParam( _T("bezel") )) + if( HasParam( wxT("bezel") )) { - control->SetBezelFace( GetDimension( _T("bezel") )); + control->SetBezelFace( GetDimension( wxT("bezel") )); } SetupWindow(control); @@ -67,7 +67,7 @@ wxObject *wxGaugeXmlHandler::DoCreateResource() bool wxGaugeXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, _T("wxGauge")); + return IsOfClass(node, wxT("wxGauge")); } diff --git a/contrib/src/xml/xh_html.cpp b/contrib/src/xml/xh_html.cpp index 23a5cb4c27..fba431d79f 100644 --- a/contrib/src/xml/xh_html.cpp +++ b/contrib/src/xml/xh_html.cpp @@ -39,22 +39,22 @@ wxObject *wxHtmlWindowXmlHandler::DoCreateResource() wxHtmlWindow *control = new wxHtmlWindow(m_ParentAsWindow, GetID(), GetPosition(), GetSize(), - GetStyle( _T("style" ), wxHW_SCROLLBAR_AUTO), + GetStyle( wxT("style" ), wxHW_SCROLLBAR_AUTO), GetName() ); - if( HasParam( _T("borders") )) + if( HasParam( wxT("borders") )) { - control->SetBorders( GetDimension( _T("borders" ))); + control->SetBorders( GetDimension( wxT("borders" ))); } - if( HasParam( _T("url") )) + if( HasParam( wxT("url") )) { - control->LoadPage( GetParamValue( _T("url" ))); + control->LoadPage( GetParamValue( wxT("url" ))); } - else if( HasParam( _T("htmlcode") )) + else if( HasParam( wxT("htmlcode") )) { - control->SetPage( GetText(_T("htmlcode")) ); + control->SetPage( GetText(wxT("htmlcode")) ); } SetupWindow(control); @@ -66,7 +66,7 @@ wxObject *wxHtmlWindowXmlHandler::DoCreateResource() bool wxHtmlWindowXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, _T("wxHtmlWindow")); + return IsOfClass(node, wxT("wxHtmlWindow")); } #endif // wxUSE_HTML diff --git a/contrib/src/xml/xh_listb.cpp b/contrib/src/xml/xh_listb.cpp index f99fb7ae3d..2dc087e1be 100644 --- a/contrib/src/xml/xh_listb.cpp +++ b/contrib/src/xml/xh_listb.cpp @@ -37,14 +37,14 @@ wxListBoxXmlHandler::wxListBoxXmlHandler() wxObject *wxListBoxXmlHandler::DoCreateResource() { - if( m_Class == _T("wxListBox")) + if( m_Class == wxT("wxListBox")) { // find the selection - long selection = GetLong( _T("selection"), -1 ); + long selection = GetLong( wxT("selection"), -1 ); // need to build the list of strings from children m_InsideBox = TRUE; - CreateChildrenPrivately( NULL, GetParamNode(_T("content"))); + CreateChildrenPrivately( NULL, GetParamNode(wxT("content"))); wxString *strings = (wxString *) NULL; if( strList.GetCount() > 0 ) { @@ -93,8 +93,8 @@ wxObject *wxListBoxXmlHandler::DoCreateResource() bool wxListBoxXmlHandler::CanHandle(wxXmlNode *node) { - return (IsOfClass(node, _T("wxListBox")) || - (m_InsideBox && node->GetName() == _T("item")) + return (IsOfClass(node, wxT("wxListBox")) || + (m_InsideBox && node->GetName() == wxT("item")) ); } diff --git a/contrib/src/xml/xh_listc.cpp b/contrib/src/xml/xh_listc.cpp index df2c2328c0..095d0c395d 100644 --- a/contrib/src/xml/xh_listc.cpp +++ b/contrib/src/xml/xh_listc.cpp @@ -63,5 +63,5 @@ wxObject *wxListCtrlXmlHandler::DoCreateResource() bool wxListCtrlXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, _T("wxListCtrl")); + return IsOfClass(node, wxT("wxListCtrl")); } diff --git a/contrib/src/xml/xh_menu.cpp b/contrib/src/xml/xh_menu.cpp index 906e675a5d..94334f41ad 100644 --- a/contrib/src/xml/xh_menu.cpp +++ b/contrib/src/xml/xh_menu.cpp @@ -33,11 +33,11 @@ wxMenuXmlHandler::wxMenuXmlHandler() : wxObject *wxMenuXmlHandler::DoCreateResource() { - if (m_Class == _T("wxMenu")) + if (m_Class == wxT("wxMenu")) { wxMenu *menu = new wxMenu(GetStyle()); - wxString title = GetText(_T("label")); - wxString help = GetText(_T("help")); + wxString title = GetText(wxT("label")); + wxString help = GetText(wxT("help")); bool oldins = m_InsideMenu; m_InsideMenu = TRUE; @@ -61,25 +61,25 @@ wxObject *wxMenuXmlHandler::DoCreateResource() { wxMenu *p_menu = wxDynamicCast(m_Parent, wxMenu); - if (m_Class == _T("separator")) + if (m_Class == wxT("separator")) p_menu->AppendSeparator(); - else if (m_Class == _T("break")) + else if (m_Class == wxT("break")) p_menu->Break(); else /*wxMenuItem*/ { int id = GetID(); - bool checkable = GetBool(_T("checkable")); + bool checkable = GetBool(wxT("checkable")); - wxMenuItem *mitem = new wxMenuItem(p_menu, id, GetText(_T("label")), - GetText(_T("help")), checkable); + wxMenuItem *mitem = new wxMenuItem(p_menu, id, GetText(wxT("label")), + GetText(wxT("help")), checkable); #if wxCHECK_VERSION(2,3,0) || defined(__WXMSW__) - if (HasParam(_T("bitmap"))) - mitem->SetBitmap(GetBitmap(_T("bitmap"))); + if (HasParam(wxT("bitmap"))) + mitem->SetBitmap(GetBitmap(wxT("bitmap"))); #endif p_menu->Append(mitem); - mitem->Enable(GetBool(_T("enabled"), TRUE)); - if (checkable) mitem->Check(GetBool(_T("checked"))); + mitem->Enable(GetBool(wxT("enabled"), TRUE)); + if (checkable) mitem->Check(GetBool(wxT("checked"))); } return NULL; } @@ -89,11 +89,11 @@ wxObject *wxMenuXmlHandler::DoCreateResource() bool wxMenuXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, _T("wxMenu")) || + return IsOfClass(node, wxT("wxMenu")) || (m_InsideMenu && - (IsOfClass(node, _T("wxMenuItem")) || - IsOfClass(node, _T("break")) || - IsOfClass(node, _T("separator"))) + (IsOfClass(node, wxT("wxMenuItem")) || + IsOfClass(node, wxT("break")) || + IsOfClass(node, wxT("separator"))) ); } @@ -125,6 +125,6 @@ wxObject *wxMenuBarXmlHandler::DoCreateResource() bool wxMenuBarXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, _T("wxMenuBar")); + return IsOfClass(node, wxT("wxMenuBar")); } diff --git a/contrib/src/xml/xh_notbk.cpp b/contrib/src/xml/xh_notbk.cpp index fa8bec1b82..0810468f8d 100644 --- a/contrib/src/xml/xh_notbk.cpp +++ b/contrib/src/xml/xh_notbk.cpp @@ -41,9 +41,9 @@ wxNotebookXmlHandler::wxNotebookXmlHandler() wxObject *wxNotebookXmlHandler::DoCreateResource() { - if (m_Class == _T("notebookpage")) + if (m_Class == wxT("notebookpage")) { - wxXmlNode *n = GetParamNode(_T("object")); + wxXmlNode *n = GetParamNode(wxT("object")); if (n) { @@ -54,15 +54,15 @@ wxObject *wxNotebookXmlHandler::DoCreateResource() wxWindow *wnd = wxDynamicCast(item, wxWindow); if (wnd) - m_Notebook->AddPage(wnd, GetText(_T("label")), - GetBool(_T("selected"), 0)); + m_Notebook->AddPage(wnd, GetText(wxT("label")), + GetBool(wxT("selected"), 0)); else - wxLogError(_T("Error in resource.")); + wxLogError(wxT("Error in resource.")); return wnd; } else { - wxLogError(_T("Error in resource: no control within notebook's tag.")); + wxLogError(wxT("Error in resource: no control within notebook's tag.")); return NULL; } } @@ -71,7 +71,7 @@ wxObject *wxNotebookXmlHandler::DoCreateResource() wxNotebook *nb = new wxNotebook(m_ParentAsWindow, GetID(), GetPosition(), GetSize(), - GetStyle( _T("style" )), + GetStyle( wxT("style" )), GetName()); wxNotebook *old_par = m_Notebook; @@ -82,7 +82,7 @@ wxObject *wxNotebookXmlHandler::DoCreateResource() m_IsInside = old_ins; m_Notebook = old_par; - if (GetBool(_T("usenotebooksizer"), FALSE)) + if (GetBool(wxT("usenotebooksizer"), FALSE)) return new wxNotebookSizer(nb); else return nb; @@ -93,8 +93,8 @@ wxObject *wxNotebookXmlHandler::DoCreateResource() bool wxNotebookXmlHandler::CanHandle(wxXmlNode *node) { - return ((!m_IsInside && IsOfClass(node, _T("wxNotebook"))) || - (m_IsInside && IsOfClass(node, _T("notebookpage")))); + return ((!m_IsInside && IsOfClass(node, wxT("wxNotebook"))) || + (m_IsInside && IsOfClass(node, wxT("notebookpage")))); } #endif diff --git a/contrib/src/xml/xh_panel.cpp b/contrib/src/xml/xh_panel.cpp index 6240cb96b1..0c09dd27d6 100644 --- a/contrib/src/xml/xh_panel.cpp +++ b/contrib/src/xml/xh_panel.cpp @@ -42,13 +42,13 @@ wxObject *wxPanelXmlHandler::DoCreateResource() panel = new wxPanel(m_ParentAsWindow, GetID(), GetPosition(), GetSize(), - GetStyle(_T("style"), 0), + GetStyle(wxT("style"), 0), GetName()); else panel->Create(m_ParentAsWindow, GetID(), GetPosition(), GetSize(), - GetStyle(_T("style"), 0), + GetStyle(wxT("style"), 0), GetName()); SetupWindow(panel); CreateChildren(panel); @@ -59,5 +59,5 @@ wxObject *wxPanelXmlHandler::DoCreateResource() bool wxPanelXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, _T("wxPanel")); + return IsOfClass(node, wxT("wxPanel")); } diff --git a/contrib/src/xml/xh_radbt.cpp b/contrib/src/xml/xh_radbt.cpp index d8306a034d..4be009e0a9 100644 --- a/contrib/src/xml/xh_radbt.cpp +++ b/contrib/src/xml/xh_radbt.cpp @@ -42,14 +42,14 @@ wxObject *wxRadioButtonXmlHandler::DoCreateResource() wxRadioButton *control = new wxRadioButton(m_ParentAsWindow, GetID(), - GetText(_T("label")), + GetText(wxT("label")), GetPosition(), GetSize(), GetStyle(), wxDefaultValidator, GetName() ); - control->SetValue( GetBool(_T("value"), 0)); + control->SetValue( GetBool(wxT("value"), 0)); SetupWindow(control); return control; @@ -59,7 +59,7 @@ wxObject *wxRadioButtonXmlHandler::DoCreateResource() bool wxRadioButtonXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, _T("wxRadioButton")); + return IsOfClass(node, wxT("wxRadioButton")); } diff --git a/contrib/src/xml/xh_radbx.cpp b/contrib/src/xml/xh_radbx.cpp index 35db103fa2..eba8f45be7 100644 --- a/contrib/src/xml/xh_radbx.cpp +++ b/contrib/src/xml/xh_radbx.cpp @@ -36,14 +36,14 @@ wxRadioBoxXmlHandler::wxRadioBoxXmlHandler() wxObject *wxRadioBoxXmlHandler::DoCreateResource() { - if( m_Class == _T("wxRadioBox")) + if( m_Class == wxT("wxRadioBox")) { // find the selection - long selection = GetLong( _T("selection"), -1 ); + long selection = GetLong( wxT("selection"), -1 ); // need to build the list of strings from children m_InsideBox = TRUE; - CreateChildrenPrivately( NULL, GetParamNode(_T("content"))); + CreateChildrenPrivately( NULL, GetParamNode(wxT("content"))); wxString *strings = (wxString *) NULL; if( strList.GetCount() > 0 ) { @@ -56,11 +56,11 @@ wxObject *wxRadioBoxXmlHandler::DoCreateResource() wxRadioBox *control = new wxRadioBox(m_ParentAsWindow, GetID(), - GetText(_T("label")), + GetText(wxT("label")), GetPosition(), GetSize(), strList.GetCount(), strings, - GetLong( _T("dimension"), 1 ), + GetLong( wxT("dimension"), 1 ), GetStyle(), wxDefaultValidator, GetName() @@ -94,8 +94,8 @@ wxObject *wxRadioBoxXmlHandler::DoCreateResource() bool wxRadioBoxXmlHandler::CanHandle(wxXmlNode *node) { - return (IsOfClass(node, _T("wxRadioBox")) || - (m_InsideBox && node->GetName() == _T("item")) + return (IsOfClass(node, wxT("wxRadioBox")) || + (m_InsideBox && node->GetName() == wxT("item")) ); } diff --git a/contrib/src/xml/xh_scrol.cpp b/contrib/src/xml/xh_scrol.cpp index e3c46c8b3f..73531f1401 100644 --- a/contrib/src/xml/xh_scrol.cpp +++ b/contrib/src/xml/xh_scrol.cpp @@ -40,10 +40,10 @@ wxObject *wxScrollBarXmlHandler::DoCreateResource() wxDefaultValidator, GetName() ); - control->SetScrollbar(GetLong( _T("value"), 0), - GetLong( _T("thumbsize"),1), - GetLong( _T("range"), 10), - GetLong( _T("pagesize"),1) + control->SetScrollbar(GetLong( wxT("value"), 0), + GetLong( wxT("thumbsize"),1), + GetLong( wxT("range"), 10), + GetLong( wxT("pagesize"),1) ); @@ -56,7 +56,7 @@ wxObject *wxScrollBarXmlHandler::DoCreateResource() bool wxScrollBarXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, _T("wxScrollBar")); + return IsOfClass(node, wxT("wxScrollBar")); } diff --git a/contrib/src/xml/xh_sizer.cpp b/contrib/src/xml/xh_sizer.cpp index ae7cda12f1..3db7d8ad66 100644 --- a/contrib/src/xml/xh_sizer.cpp +++ b/contrib/src/xml/xh_sizer.cpp @@ -28,10 +28,10 @@ bool wxSizerXmlHandler::IsSizerNode(wxXmlNode *node) { - return (IsOfClass(node, _T("wxBoxSizer"))) || - (IsOfClass(node, _T("wxStaticBoxSizer"))) || - (IsOfClass(node, _T("wxGridSizer"))) || - (IsOfClass(node, _T("wxFlexGridSizer"))); + return (IsOfClass(node, wxT("wxBoxSizer"))) || + (IsOfClass(node, wxT("wxStaticBoxSizer"))) || + (IsOfClass(node, wxT("wxGridSizer"))) || + (IsOfClass(node, wxT("wxFlexGridSizer"))); } @@ -74,9 +74,9 @@ wxSizerXmlHandler::wxSizerXmlHandler() wxObject *wxSizerXmlHandler::DoCreateResource() { - if (m_Class == _T("sizeritem")) + if (m_Class == wxT("sizeritem")) { - wxXmlNode *n = GetParamNode(_T("object")); + wxXmlNode *n = GetParamNode(wxT("object")); if (n) { @@ -89,40 +89,40 @@ wxObject *wxSizerXmlHandler::DoCreateResource() m_ParentSizer = old_par; wxSizer *sizer = wxDynamicCast(item, wxSizer); wxWindow *wnd = wxDynamicCast(item, wxWindow); - wxSize minsize = GetSize(_T("minsize")); + wxSize minsize = GetSize(wxT("minsize")); if (sizer) { - m_ParentSizer->Add(sizer, GetLong(_T("option")), - GetStyle(_T("flag")), GetDimension(_T("border"))); + m_ParentSizer->Add(sizer, GetLong(wxT("option")), + GetStyle(wxT("flag")), GetDimension(wxT("border"))); if (!(minsize == wxDefaultSize)) m_ParentSizer->SetItemMinSize(sizer, minsize.x, minsize.y); } else if (wnd) { - m_ParentSizer->Add(wnd, GetLong(_T("option")), - GetStyle(_T("flag")), GetDimension(_T("border"))); + m_ParentSizer->Add(wnd, GetLong(wxT("option")), + GetStyle(wxT("flag")), GetDimension(wxT("border"))); if (!(minsize == wxDefaultSize)) m_ParentSizer->SetItemMinSize(wnd, minsize.x, minsize.y); } else - wxLogError(_T("Error in resource.")); + wxLogError(wxT("Error in resource.")); return item; } else /*n == NULL*/ { - wxLogError(_T("Error in resource: no control/sizer within sizer's tag.")); + wxLogError(wxT("Error in resource: no control/sizer within sizer's tag.")); return NULL; } } - else if (m_Class == _T("spacer")) + else if (m_Class == wxT("spacer")) { - wxCHECK_MSG(m_ParentSizer, NULL, _T("Incorrect syntax of XML resource: spacer not within sizer!")); + wxCHECK_MSG(m_ParentSizer, NULL, wxT("Incorrect syntax of XML resource: spacer not within sizer!")); wxSize sz = GetSize(); m_ParentSizer->Add(sz.x, sz.y, - GetLong(_T("option")), GetStyle(_T("flag")), GetDimension(_T("border"))); + GetLong(wxT("option")), GetStyle(wxT("flag")), GetDimension(wxT("border"))); return NULL; } @@ -133,52 +133,52 @@ wxObject *wxSizerXmlHandler::DoCreateResource() wxXmlNode *parentNode = m_Node->GetParent(); wxCHECK_MSG(m_ParentSizer != NULL || - ((IsOfClass(parentNode, _T("wxPanel")) || - IsOfClass(parentNode, _T("wxDialog"))) && + ((IsOfClass(parentNode, wxT("wxPanel")) || + IsOfClass(parentNode, wxT("wxDialog"))) && parentNode->GetType() == wxXML_ELEMENT_NODE), NULL, - _T("Incorrect use of sizer: parent is not 'wxDialog' or 'wxPanel'.")); + wxT("Incorrect use of sizer: parent is not 'wxDialog' or 'wxPanel'.")); - if (m_Class == _T("wxBoxSizer")) - sizer = new wxBoxSizer(GetStyle(_T("orient"), wxHORIZONTAL)); + if (m_Class == wxT("wxBoxSizer")) + sizer = new wxBoxSizer(GetStyle(wxT("orient"), wxHORIZONTAL)); - else if (m_Class == _T("wxStaticBoxSizer")) + else if (m_Class == wxT("wxStaticBoxSizer")) { sizer = new wxStaticBoxSizer( - new wxStaticBox(m_ParentAsWindow, -1, GetText(_T("label"))), - GetStyle(_T("orient"), wxHORIZONTAL)); + new wxStaticBox(m_ParentAsWindow, -1, GetText(wxT("label"))), + GetStyle(wxT("orient"), wxHORIZONTAL)); } - else if (m_Class == _T("wxGridSizer")) - sizer = new wxGridSizer(GetLong(_T("rows")), GetLong(_T("cols")), - GetDimension(_T("vgap")), GetDimension(_T("hgap"))); + else if (m_Class == wxT("wxGridSizer")) + sizer = new wxGridSizer(GetLong(wxT("rows")), GetLong(wxT("cols")), + GetDimension(wxT("vgap")), GetDimension(wxT("hgap"))); - else if (m_Class == _T("wxFlexGridSizer")) + else if (m_Class == wxT("wxFlexGridSizer")) { wxFlexGridSizer *fsizer = - new wxFlexGridSizer(GetLong(_T("rows")), GetLong(_T("cols")), - GetDimension(_T("vgap")), GetDimension(_T("hgap"))); + new wxFlexGridSizer(GetLong(wxT("rows")), GetLong(wxT("cols")), + GetDimension(wxT("vgap")), GetDimension(wxT("hgap"))); sizer = fsizer; wxStringTokenizer tkn; unsigned long l; - tkn.SetString(GetParamValue(_T("growablerows")), _T(",")); + tkn.SetString(GetParamValue(wxT("growablerows")), wxT(",")); while (tkn.HasMoreTokens()) { if (!tkn.GetNextToken().ToULong(&l)) - wxLogError(_T("growablerows must be comma-separated list of row numbers")); + wxLogError(wxT("growablerows must be comma-separated list of row numbers")); else fsizer->AddGrowableRow(l); } - tkn.SetString(GetParamValue(_T("growablecols")), _T(",")); + tkn.SetString(GetParamValue(wxT("growablecols")), wxT(",")); while (tkn.HasMoreTokens()) { if (!tkn.GetNextToken().ToULong(&l)) - wxLogError(_T("growablecols must be comma-separated list of column numbers")); + wxLogError(wxT("growablecols must be comma-separated list of column numbers")); else fsizer->AddGrowableCol(l); } } - wxSize minsize = GetSize(_T("minsize")); + wxSize minsize = GetSize(wxT("minsize")); if (!(minsize == wxDefaultSize)) sizer->SetMinSize(minsize); @@ -214,6 +214,6 @@ wxObject *wxSizerXmlHandler::DoCreateResource() bool wxSizerXmlHandler::CanHandle(wxXmlNode *node) { return ((!m_IsInside && IsSizerNode(node)) || - (m_IsInside && IsOfClass(node, _T("sizeritem"))) || - (m_IsInside && IsOfClass(node, _T("spacer")))); + (m_IsInside && IsOfClass(node, wxT("sizeritem"))) || + (m_IsInside && IsOfClass(node, wxT("spacer")))); } diff --git a/contrib/src/xml/xh_slidr.cpp b/contrib/src/xml/xh_slidr.cpp index ec99ffb413..ad0c0076aa 100644 --- a/contrib/src/xml/xh_slidr.cpp +++ b/contrib/src/xml/xh_slidr.cpp @@ -44,38 +44,38 @@ wxObject *wxSliderXmlHandler::DoCreateResource() { wxSlider *control = new wxSlider(m_ParentAsWindow, GetID(), - GetLong( _T("value"), wxSL_DEFAULT_VALUE), - GetLong( _T("min"), wxSL_DEFAULT_MIN), - GetLong( _T("max"), wxSL_DEFAULT_MAX), + GetLong( wxT("value"), wxSL_DEFAULT_VALUE), + GetLong( wxT("min"), wxSL_DEFAULT_MIN), + GetLong( wxT("max"), wxSL_DEFAULT_MAX), GetPosition(), GetSize(), GetStyle(), wxDefaultValidator, GetName() ); - if( HasParam( _T("tickfreq") )) + if( HasParam( wxT("tickfreq") )) { - control->SetTickFreq( GetLong( _T("tickfreq") ), 0 ); + control->SetTickFreq( GetLong( wxT("tickfreq") ), 0 ); } - if( HasParam( _T("pagesize") )) + if( HasParam( wxT("pagesize") )) { - control->SetPageSize( GetLong( _T("pagesize") ) ); + control->SetPageSize( GetLong( wxT("pagesize") ) ); } - if( HasParam( _T("linesize") )) + if( HasParam( wxT("linesize") )) { - control->SetLineSize( GetLong( _T("linesize") )); + control->SetLineSize( GetLong( wxT("linesize") )); } - if( HasParam( _T("thumb") )) + if( HasParam( wxT("thumb") )) { - control->SetThumbLength( GetLong( _T("thumb") )); + control->SetThumbLength( GetLong( wxT("thumb") )); } - if( HasParam( _T("tick") )) + if( HasParam( wxT("tick") )) { - control->SetTick( GetLong( _T("tick") )); + control->SetTick( GetLong( wxT("tick") )); } - if( HasParam( _T("selmin") ) && HasParam( _T("selmax")) ) + if( HasParam( wxT("selmin") ) && HasParam( wxT("selmax")) ) { - control->SetSelection( GetLong( _T("selmin") ), GetLong( _T("selmax")) ); + control->SetSelection( GetLong( wxT("selmin") ), GetLong( wxT("selmax")) ); } SetupWindow(control); @@ -87,7 +87,7 @@ wxObject *wxSliderXmlHandler::DoCreateResource() bool wxSliderXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, _T("wxSlider")); + return IsOfClass(node, wxT("wxSlider")); } diff --git a/contrib/src/xml/xh_spin.cpp b/contrib/src/xml/xh_spin.cpp index 24f046fd16..3cc514893e 100644 --- a/contrib/src/xml/xh_spin.cpp +++ b/contrib/src/xml/xh_spin.cpp @@ -39,13 +39,13 @@ wxObject *wxSpinButtonXmlHandler::DoCreateResource() wxSpinButton *control = new wxSpinButton(m_ParentAsWindow, GetID(), GetPosition(), GetSize(), - GetStyle( _T("style"), wxSP_VERTICAL | wxSP_ARROW_KEYS ), + GetStyle( wxT("style"), wxSP_VERTICAL | wxSP_ARROW_KEYS ), GetName() ); - control->SetValue( GetLong( _T("value"), wxSP_DEFAULT_VALUE) ); - control->SetRange( GetLong( _T("min"), wxSP_DEFAULT_MIN), - GetLong( _T("max"), wxSP_DEFAULT_MAX) ); + control->SetValue( GetLong( wxT("value"), wxSP_DEFAULT_VALUE) ); + control->SetRange( GetLong( wxT("min"), wxSP_DEFAULT_MIN), + GetLong( wxT("max"), wxSP_DEFAULT_MAX) ); SetupWindow(control); return control; @@ -55,7 +55,7 @@ wxObject *wxSpinButtonXmlHandler::DoCreateResource() bool wxSpinButtonXmlHandler::CanHandle(wxXmlNode *node) { - return node->GetName() == _T("spinbutton"); + return node->GetName() == wxT("spinbutton"); } #endif // wxUSE_SPINBTN @@ -75,12 +75,12 @@ wxObject *wxSpinCtrlXmlHandler::DoCreateResource() { wxSpinCtrl *control = new wxSpinCtrl(m_ParentAsWindow, GetID(), - GetText(_T("value")), + GetText(wxT("value")), GetPosition(), GetSize(), - GetStyle( _T("style"), wxSP_ARROW_KEYS ), - GetLong( _T("min"), wxSP_DEFAULT_MIN), - GetLong( _T("max"), wxSP_DEFAULT_MAX), - GetLong( _T("value"), wxSP_DEFAULT_VALUE), + GetStyle( wxT("style"), wxSP_ARROW_KEYS ), + GetLong( wxT("min"), wxSP_DEFAULT_MIN), + GetLong( wxT("max"), wxSP_DEFAULT_MAX), + GetLong( wxT("value"), wxSP_DEFAULT_VALUE), GetName() ); @@ -93,7 +93,7 @@ wxObject *wxSpinCtrlXmlHandler::DoCreateResource() bool wxSpinCtrlXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, _T("wxSpinCtrl")); + return IsOfClass(node, wxT("wxSpinCtrl")); } #endif // wxUSE_SPINCTRL diff --git a/contrib/src/xml/xh_stbmp.cpp b/contrib/src/xml/xh_stbmp.cpp index 4e654a4553..699e5339a5 100644 --- a/contrib/src/xml/xh_stbmp.cpp +++ b/contrib/src/xml/xh_stbmp.cpp @@ -32,7 +32,7 @@ wxObject *wxStaticBitmapXmlHandler::DoCreateResource() { wxStaticBitmap *bmp = new wxStaticBitmap(m_ParentAsWindow, GetID(), - GetBitmap(_T("bitmap"), GetSize()), + GetBitmap(wxT("bitmap"), GetSize()), GetPosition(), GetSize(), GetStyle(), GetName() @@ -46,7 +46,7 @@ wxObject *wxStaticBitmapXmlHandler::DoCreateResource() bool wxStaticBitmapXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, _T("wxStaticBitmap")); + return IsOfClass(node, wxT("wxStaticBitmap")); } diff --git a/contrib/src/xml/xh_stbox.cpp b/contrib/src/xml/xh_stbox.cpp index 1f49da12c1..2572364e3e 100644 --- a/contrib/src/xml/xh_stbox.cpp +++ b/contrib/src/xml/xh_stbox.cpp @@ -32,7 +32,7 @@ wxObject *wxStaticBoxXmlHandler::DoCreateResource() { wxStaticBox *box = new wxStaticBox(m_ParentAsWindow, GetID(), - GetText(_T("label")), + GetText(wxT("label")), GetPosition(), GetSize(), GetStyle(), GetName() @@ -46,7 +46,7 @@ wxObject *wxStaticBoxXmlHandler::DoCreateResource() bool wxStaticBoxXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, _T("wxStaticBox")); + return IsOfClass(node, wxT("wxStaticBox")); } diff --git a/contrib/src/xml/xh_stlin.cpp b/contrib/src/xml/xh_stlin.cpp index 546838654c..d65fc08fe6 100644 --- a/contrib/src/xml/xh_stlin.cpp +++ b/contrib/src/xml/xh_stlin.cpp @@ -37,7 +37,7 @@ wxObject *wxStaticLineXmlHandler::DoCreateResource() wxStaticLine *line = new wxStaticLine(m_ParentAsWindow, GetID(), GetPosition(), GetSize(), - GetStyle(_T("style"), wxLI_HORIZONTAL), + GetStyle(wxT("style"), wxLI_HORIZONTAL), GetName() ); SetupWindow(line); @@ -49,7 +49,7 @@ wxObject *wxStaticLineXmlHandler::DoCreateResource() bool wxStaticLineXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, _T("wxStaticLine")); + return IsOfClass(node, wxT("wxStaticLine")); } #endif diff --git a/contrib/src/xml/xh_sttxt.cpp b/contrib/src/xml/xh_sttxt.cpp index 4627292fcb..fbf8fd0938 100644 --- a/contrib/src/xml/xh_sttxt.cpp +++ b/contrib/src/xml/xh_sttxt.cpp @@ -33,7 +33,7 @@ wxObject *wxStaticTextXmlHandler::DoCreateResource() { wxStaticText *text = new wxStaticText(m_ParentAsWindow, GetID(), - GetText(_T("label")), + GetText(wxT("label")), GetPosition(), GetSize(), GetStyle(), GetName() @@ -47,7 +47,7 @@ wxObject *wxStaticTextXmlHandler::DoCreateResource() bool wxStaticTextXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, _T("wxStaticText")); + return IsOfClass(node, wxT("wxStaticText")); } diff --git a/contrib/src/xml/xh_text.cpp b/contrib/src/xml/xh_text.cpp index 59d9ba87b1..a5d9b35a93 100644 --- a/contrib/src/xml/xh_text.cpp +++ b/contrib/src/xml/xh_text.cpp @@ -37,7 +37,7 @@ wxObject *wxTextCtrlXmlHandler::DoCreateResource() { wxTextCtrl *text = new wxTextCtrl(m_ParentAsWindow, GetID(), - GetText(_T("value")), + GetText(wxT("value")), GetPosition(), GetSize(), GetStyle(), wxDefaultValidator, @@ -52,7 +52,7 @@ wxObject *wxTextCtrlXmlHandler::DoCreateResource() bool wxTextCtrlXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, _T("wxTextCtrl")); + return IsOfClass(node, wxT("wxTextCtrl")); } diff --git a/contrib/src/xml/xh_toolb.cpp b/contrib/src/xml/xh_toolb.cpp index 0460be690c..87c4d2eb69 100644 --- a/contrib/src/xml/xh_toolb.cpp +++ b/contrib/src/xml/xh_toolb.cpp @@ -38,31 +38,31 @@ wxToolBarXmlHandler::wxToolBarXmlHandler() wxObject *wxToolBarXmlHandler::DoCreateResource() { - if (m_Class == _T("tool")) + if (m_Class == wxT("tool")) { - wxCHECK_MSG(m_Toolbar, NULL, _T("Incorrect syntax of XML resource: tool not within a toolbar!")); + wxCHECK_MSG(m_Toolbar, NULL, wxT("Incorrect syntax of XML resource: tool not within a toolbar!")); m_Toolbar->AddTool(GetID(), - GetBitmap(_T("bitmap")), - GetBitmap(_T("bitmap2")), - GetBool(_T("toggle")), + GetBitmap(wxT("bitmap")), + GetBitmap(wxT("bitmap2")), + GetBool(wxT("toggle")), GetPosition().x, GetPosition().y, NULL, - GetText(_T("tooltip")), - GetText(_T("longhelp"))); + GetText(wxT("tooltip")), + GetText(wxT("longhelp"))); return m_Toolbar; // must return non-NULL } - else if (m_Class == _T("separator")) + else if (m_Class == wxT("separator")) { - wxCHECK_MSG(m_Toolbar, NULL, _T("Incorrect syntax of XML resource: separator not within a toolbar!")); + wxCHECK_MSG(m_Toolbar, NULL, wxT("Incorrect syntax of XML resource: separator not within a toolbar!")); m_Toolbar->AddSeparator(); return m_Toolbar; // must return non-NULL } else /**/ { - int style = GetStyle(_T("style"), wxNO_BORDER | wxTB_HORIZONTAL); + int style = GetStyle(wxT("style"), wxNO_BORDER | wxTB_HORIZONTAL); #ifdef __WXMSW__ if (!(style & wxNO_BORDER)) style |= wxNO_BORDER; #endif @@ -73,20 +73,20 @@ wxObject *wxToolBarXmlHandler::DoCreateResource() style, GetName()); - wxSize bmpsize = GetSize(_T("bitmapsize")); + wxSize bmpsize = GetSize(wxT("bitmapsize")); if (!(bmpsize == wxDefaultSize)) toolbar->SetToolBitmapSize(bmpsize); - wxSize margins = GetSize(_T("margins")); + wxSize margins = GetSize(wxT("margins")); if (!(margins == wxDefaultSize)) toolbar->SetMargins(margins.x, margins.y); - long packing = GetLong(_T("packing"), -1); + long packing = GetLong(wxT("packing"), -1); if (packing != -1) toolbar->SetToolPacking(packing); - long separation = GetLong(_T("separation"), -1); + long separation = GetLong(wxT("separation"), -1); if (separation != -1) toolbar->SetToolSeparation(separation); - wxXmlNode *children_node = GetParamNode(_T("object")); + wxXmlNode *children_node = GetParamNode(wxT("object")); if (children_node == NULL) return toolbar; m_IsInside = TRUE; @@ -97,12 +97,12 @@ wxObject *wxToolBarXmlHandler::DoCreateResource() while (n) { if (n->GetType() == wxXML_ELEMENT_NODE && - n->GetName() == _T("object")) + n->GetName() == wxT("object")) { wxObject *created = CreateResFromNode(n, toolbar, NULL); wxControl *control = wxDynamicCast(created, wxControl); - if (IsOfClass(n, _T("tool")) && - IsOfClass(n, _T("separator")) && + if (IsOfClass(n, wxT("tool")) && + IsOfClass(n, wxT("separator")) && control != NULL) toolbar->AddControl(control); } @@ -121,9 +121,9 @@ wxObject *wxToolBarXmlHandler::DoCreateResource() bool wxToolBarXmlHandler::CanHandle(wxXmlNode *node) { - return ((!m_IsInside && IsOfClass(node, _T("wxToolBar"))) || - (m_IsInside && IsOfClass(node, _T("tool"))) || - (m_IsInside && IsOfClass(node, _T("separator")))); + return ((!m_IsInside && IsOfClass(node, wxT("wxToolBar"))) || + (m_IsInside && IsOfClass(node, wxT("tool"))) || + (m_IsInside && IsOfClass(node, wxT("separator")))); } #endif diff --git a/contrib/src/xml/xh_tree.cpp b/contrib/src/xml/xh_tree.cpp index 941648be98..30582f9d55 100644 --- a/contrib/src/xml/xh_tree.cpp +++ b/contrib/src/xml/xh_tree.cpp @@ -51,7 +51,7 @@ wxObject *wxTreeCtrlXmlHandler::DoCreateResource() bool wxTreeCtrlXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, _T("wxTreeCtrl")); + return IsOfClass(node, wxT("wxTreeCtrl")); } diff --git a/contrib/src/xml/xh_unkwn.cpp b/contrib/src/xml/xh_unkwn.cpp index 7c3f083417..5a8145c1ff 100644 --- a/contrib/src/xml/xh_unkwn.cpp +++ b/contrib/src/xml/xh_unkwn.cpp @@ -32,8 +32,8 @@ wxUnknownWidgetXmlHandler::wxUnknownWidgetXmlHandler() wxObject *wxUnknownWidgetXmlHandler::DoCreateResource() { - long id = GetLong(_T("id"), -1); - wxString name = GetParamValue(_T("name")); + long id = GetLong(wxT("id"), -1); + wxString name = GetParamValue(wxT("name")); wxWindow *wnd = NULL; @@ -43,7 +43,7 @@ wxObject *wxUnknownWidgetXmlHandler::DoCreateResource() wnd = m_ParentAsWindow->FindWindow(name); if (wnd == NULL) - wxLogError(_T("Cannot find specified window for class 'unknown' (id=%li, name='%s')."), id, name.mb_str()); + wxLogError(wxT("Cannot find specified window for class 'unknown' (id=%li, name='%s')."), id, name.mb_str()); else { if (wnd->GetParent() != m_ParentAsWindow) @@ -56,6 +56,6 @@ wxObject *wxUnknownWidgetXmlHandler::DoCreateResource() bool wxUnknownWidgetXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, _T("unknown")); + return IsOfClass(node, wxT("unknown")); } diff --git a/contrib/src/xml/xml.cpp b/contrib/src/xml/xml.cpp index 89ed5a56d9..0ed177189a 100644 --- a/contrib/src/xml/xml.cpp +++ b/contrib/src/xml/xml.cpp @@ -168,7 +168,7 @@ void wxXmlNode::AddChild(wxXmlNode *child) void wxXmlNode::InsertChild(wxXmlNode *child, wxXmlNode *before_node) { - wxASSERT_MSG(before_node->GetParent() == this, _T("wxXmlNode::InsertChild - the node has incorrect parent")); + wxASSERT_MSG(before_node->GetParent() == this, wxT("wxXmlNode::InsertChild - the node has incorrect parent")); if (m_Children == before_node) m_Children = child; diff --git a/contrib/src/xml/xmlbin.cpp b/contrib/src/xml/xmlbin.cpp index d647e8fe9b..85fe6763ac 100644 --- a/contrib/src/xml/xmlbin.cpp +++ b/contrib/src/xml/xmlbin.cpp @@ -31,7 +31,7 @@ bool wxXmlIOHandlerBin::CanLoad(wxInputStream& stream) { bool canread; - canread = (ReadHeader(stream) == _T("XMLBIN ")); + canread = (ReadHeader(stream) == wxT("XMLBIN ")); stream.SeekI(-9, wxFromCurrent); return canread; } diff --git a/contrib/src/xml/xmlbinz.cpp b/contrib/src/xml/xmlbinz.cpp index db42f205ca..2a0cce9df7 100644 --- a/contrib/src/xml/xmlbinz.cpp +++ b/contrib/src/xml/xmlbinz.cpp @@ -32,7 +32,7 @@ bool wxXmlIOHandlerBinZ::CanLoad(wxInputStream& stream) { bool canread; - canread = (ReadHeader(stream) == _T("XMLBINZ")); + canread = (ReadHeader(stream) == wxT("XMLBINZ")); stream.SeekI(-9, wxFromCurrent); return canread; } diff --git a/contrib/src/xml/xmlpars.cpp b/contrib/src/xml/xmlpars.cpp index 7dec0e47bf..ba56cb3c13 100644 --- a/contrib/src/xml/xmlpars.cpp +++ b/contrib/src/xml/xmlpars.cpp @@ -142,15 +142,15 @@ static bool LoadLibxml() wxLogNull lg; #ifdef __UNIX__ gs_libxmlDLL.Handle = - wxDllLoader::LoadLibrary(_T("wxlibxml.so.2"), &gs_libxmlLoaded); + wxDllLoader::LoadLibrary(wxT("wxlibxml.so.2"), &gs_libxmlLoaded); if (!gs_libxmlLoaded) gs_libxmlDLL.Handle = - wxDllLoader::LoadLibrary(_T("libxml.so.2"), &gs_libxmlLoaded); + wxDllLoader::LoadLibrary(wxT("libxml.so.2"), &gs_libxmlLoaded); #endif #ifdef __WXMSW__ gs_libxmlDLL.Handle = - wxDllLoader::LoadLibrary(_T("wxlibxml2.dll"), &gs_libxmlLoaded); + wxDllLoader::LoadLibrary(wxT("wxlibxml2.dll"), &gs_libxmlLoaded); if (!gs_libxmlLoaded) gs_libxmlDLL.Handle = - wxDllLoader::LoadLibrary(_T("libxml2.dll"), &gs_libxmlLoaded); + wxDllLoader::LoadLibrary(wxT("libxml2.dll"), &gs_libxmlLoaded); #endif } @@ -162,7 +162,7 @@ static bool LoadLibxml() #define LOAD_SYMBOL(sym) \ gs_libxmlDLL.sym = \ - (type_##sym)wxDllLoader::GetSymbol(gs_libxmlDLL.Handle, _T(#sym)); \ + (type_##sym)wxDllLoader::GetSymbol(gs_libxmlDLL.Handle, wxT(#sym)); \ if (!gs_libxmlDLL.sym) \ { \ ReleaseLibxml(); \ diff --git a/contrib/src/xml/xmlres.cpp b/contrib/src/xml/xmlres.cpp index e74d13b7ee..7c204def23 100644 --- a/contrib/src/xml/xmlres.cpp +++ b/contrib/src/xml/xmlres.cpp @@ -211,7 +211,7 @@ void wxXmlResource::ProcessPlatformProperty(wxXmlNode *node) while (c) { isok = FALSE; - if (!c->GetPropVal(_T("platform"), &s)) + if (!c->GetPropVal(wxT("platform"), &s)) isok = TRUE; else { @@ -222,13 +222,13 @@ void wxXmlResource::ProcessPlatformProperty(wxXmlNode *node) s = tkn.GetNextToken(); if ( #ifdef __WXMSW__ - s == wxString(_T("win")) + s == wxString(wxT("win")) #elif defined(__UNIX__) - s == wxString(_T("unix")) + s == wxString(wxT("unix")) #elif defined(__MAC__) - s == wxString(_T("mac")) + s == wxString(wxT("mac")) #elif defined(__OS2__) - s == wxString(_T("os2")) + s == wxString(wxT("os2")) #else FALSE #endif @@ -297,7 +297,7 @@ void wxXmlResource::UpdateResources() delete m_Data[i].Doc; m_Data[i].Doc = NULL; } - else if (m_Data[i].Doc->GetRoot()->GetName() != _T("resource")) + else if (m_Data[i].Doc->GetRoot()->GetName() != wxT("resource")) { wxLogError(_("Invalid XML resource '%s': doesn't have root node 'resource'."), m_Data[i].File.c_str()); delete m_Data[i].Doc; @@ -358,7 +358,7 @@ wxObject *wxXmlResource::CreateResFromNode(wxXmlNode *node, wxObject *parent, wx while (ND) { handler = (wxXmlResourceHandler*)ND->GetData(); - if (node->GetName() == _T("object") && handler->CanHandle(node)) + if (node->GetName() == wxT("object") && handler->CanHandle(node)) { ret = handler->CreateResource(node, parent, instance); if (ret) return ret; @@ -368,7 +368,7 @@ wxObject *wxXmlResource::CreateResFromNode(wxXmlNode *node, wxObject *parent, wx wxLogError(_("No handler found for XML node '%s', class '%s'!"), node->GetName().c_str(), - node->GetPropVal(_T("class"), wxEmptyString).c_str()); + node->GetPropVal(wxT("class"), wxEmptyString).c_str()); return NULL; } @@ -395,7 +395,7 @@ wxObject *wxXmlResourceHandler::CreateResource(wxXmlNode *node, wxObject *parent wxWindow *myParentAW = m_ParentAsWindow, *myInstanceAW = m_InstanceAsWindow; m_Node = node; - m_Class = node->GetPropVal(_T("class"), wxEmptyString); + m_Class = node->GetPropVal(wxT("class"), wxEmptyString); m_Parent = parent; m_Instance = instance; m_ParentAsWindow = wxDynamicCast(m_Parent, wxWindow); @@ -446,7 +446,7 @@ int wxXmlResourceHandler::GetStyle(const wxString& param, int defaults) if (!s) return defaults; - wxStringTokenizer tkn(s, _T("| "), wxTOKEN_STRTOK); + wxStringTokenizer tkn(s, wxT("| "), wxTOKEN_STRTOK); int style = 0; int index; wxString fl; @@ -517,9 +517,9 @@ int wxXmlResourceHandler::GetID() wxString sid = GetName(); long num; - if (sid == _T("-1")) return -1; + if (sid == wxT("-1")) return -1; else if (sid.IsNumber() && sid.ToLong(&num)) return num; -#define stdID(id) else if (sid == _T(#id)) return id +#define stdID(id) else if (sid == wxT(#id)) return id stdID(wxID_OPEN); stdID(wxID_CLOSE); stdID(wxID_NEW); stdID(wxID_SAVE); stdID(wxID_SAVEAS); stdID(wxID_REVERT); stdID(wxID_EXIT); stdID(wxID_UNDO); stdID(wxID_REDO); @@ -540,7 +540,7 @@ int wxXmlResourceHandler::GetID() wxString wxXmlResourceHandler::GetName() { - return m_Node->GetPropVal(_T("name"), _T("-1")); + return m_Node->GetPropVal(wxT("name"), wxT("-1")); } @@ -550,7 +550,7 @@ bool wxXmlResourceHandler::GetBool(const wxString& param, bool defaultv) wxString v = GetParamValue(param); v.MakeLower(); if (!v) return defaultv; - else return (v == _T("1")); + else return (v == wxT("1")); } @@ -560,8 +560,8 @@ wxColour wxXmlResourceHandler::GetColour(const wxString& param) wxString v = GetParamValue(param); unsigned long tmp = 0; - if (v.Length() != 7 || v[0] != _T('#') || - wxSscanf(v.c_str(), _T("#%lX"), &tmp) != 1) + if (v.Length() != 7 || v[0] != wxT('#') || + wxSscanf(v.c_str(), wxT("#%lX"), &tmp) != 1) { wxLogError(_("XML resource: Incorrect colour specification '%s' for property '%s'."), v.c_str(), param.c_str()); @@ -589,7 +589,7 @@ wxBitmap wxXmlResourceHandler::GetBitmap(const wxString& param, wxSize size) wxImage img(*(fsfile->GetStream())); delete fsfile; #else - wxImage img(GetParamValue(_T("bitmap"))); + wxImage img(GetParamValue(wxT("bitmap"))); #endif if (!img.Ok()) { @@ -663,15 +663,15 @@ wxString wxXmlResourceHandler::GetParamValue(const wxString& param) wxSize wxXmlResourceHandler::GetSize(const wxString& param) { wxString s = GetParamValue(param); - if (s.IsEmpty()) s = _T("-1,-1"); + if (s.IsEmpty()) s = wxT("-1,-1"); bool is_dlg; long sx, sy; - is_dlg = s[s.Length()-1] == _T('d'); + is_dlg = s[s.Length()-1] == wxT('d'); if (is_dlg) s.RemoveLast(); - if (!s.BeforeFirst(_T(',')).ToLong(&sx) || - !s.AfterLast(_T(',')).ToLong(&sy)) + if (!s.BeforeFirst(wxT(',')).ToLong(&sx) || + !s.AfterLast(wxT(',')).ToLong(&sy)) { wxLogError(_("Cannot parse coordinates from '%s'."), s.mb_str()); return wxDefaultSize; @@ -709,7 +709,7 @@ wxCoord wxXmlResourceHandler::GetDimension(const wxString& param, wxCoord defaul bool is_dlg; long sx; - is_dlg = s[s.Length()-1] == _T('d'); + is_dlg = s[s.Length()-1] == wxT('d'); if (is_dlg) s.RemoveLast(); if (!s.ToLong(&sx)) @@ -747,37 +747,37 @@ wxFont wxXmlResourceHandler::GetFont(const wxString& param) wxXmlNode *oldnode = m_Node; m_Node = font_node; - long size = GetLong(_T("size"), 12); + long size = GetLong(wxT("size"), 12); - wxString style = GetParamValue(_T("style")); - wxString weight = GetParamValue(_T("weight")); + wxString style = GetParamValue(wxT("style")); + wxString weight = GetParamValue(wxT("weight")); int istyle = wxNORMAL, iweight = wxNORMAL; - if (style == _T("italic")) istyle = wxITALIC; - else if (style == _T("slant")) istyle = wxSLANT; - if (weight == _T("bold")) iweight = wxBOLD; - else if (weight == _T("light")) iweight = wxLIGHT; + if (style == wxT("italic")) istyle = wxITALIC; + else if (style == wxT("slant")) istyle = wxSLANT; + if (weight == wxT("bold")) iweight = wxBOLD; + else if (weight == wxT("light")) iweight = wxLIGHT; - wxString family = GetParamValue(_T("family")); + wxString family = GetParamValue(wxT("family")); int ifamily = wxDEFAULT; - if (family == _T("decorative")) ifamily = wxDECORATIVE; - else if (family == _T("roman")) ifamily = wxROMAN; - else if (family == _T("script")) ifamily = wxSCRIPT; - else if (family == _T("swiss")) ifamily = wxSWISS; - else if (family == _T("modern")) ifamily = wxMODERN; + if (family == wxT("decorative")) ifamily = wxDECORATIVE; + else if (family == wxT("roman")) ifamily = wxROMAN; + else if (family == wxT("script")) ifamily = wxSCRIPT; + else if (family == wxT("swiss")) ifamily = wxSWISS; + else if (family == wxT("modern")) ifamily = wxMODERN; - bool underlined = GetBool(_T("underlined"), FALSE); + bool underlined = GetBool(wxT("underlined"), FALSE); - wxString encoding = GetParamValue(_T("encoding")); + wxString encoding = GetParamValue(wxT("encoding")); wxFontMapper mapper; wxFontEncoding enc = wxFONTENCODING_DEFAULT; if (!encoding.IsEmpty()) enc = mapper.CharsetToEncoding(encoding); if (enc == wxFONTENCODING_SYSTEM) enc = wxFONTENCODING_SYSTEM; - wxString faces = GetParamValue(_T("face")); + wxString faces = GetParamValue(wxT("face")); wxString facename = wxEmptyString; wxFontEnumerator enu; enu.EnumerateFacenames(); - wxStringTokenizer tk(faces, _T(",")); + wxStringTokenizer tk(faces, wxT(",")); while (tk.HasMoreTokens()) { int index = enu.GetFacenames()->Index(tk.GetNextToken(), FALSE); @@ -799,23 +799,23 @@ void wxXmlResourceHandler::SetupWindow(wxWindow *wnd) { //FIXME : add cursor - if (HasParam(_T("exstyle"))) - wnd->SetExtraStyle(GetStyle(_T("exstyle"))); - if (HasParam(_T("bg"))) - wnd->SetBackgroundColour(GetColour(_T("bg"))); - if (HasParam(_T("fg"))) - wnd->SetForegroundColour(GetColour(_T("fg"))); - if (GetBool(_T("enabled"), 1) == 0) + if (HasParam(wxT("exstyle"))) + wnd->SetExtraStyle(GetStyle(wxT("exstyle"))); + if (HasParam(wxT("bg"))) + wnd->SetBackgroundColour(GetColour(wxT("bg"))); + if (HasParam(wxT("fg"))) + wnd->SetForegroundColour(GetColour(wxT("fg"))); + if (GetBool(wxT("enabled"), 1) == 0) wnd->Enable(FALSE); - if (GetBool(_T("focused"), 0) == 1) + if (GetBool(wxT("focused"), 0) == 1) wnd->SetFocus(); - if (GetBool(_T("hidden"), 0) == 1) + if (GetBool(wxT("hidden"), 0) == 1) wnd->Show(FALSE); #if wxUSE_TOOLTIPS - if (HasParam(_T("tooltip"))) - wnd->SetToolTip(GetText(_T("tooltip"))); + if (HasParam(wxT("tooltip"))) + wnd->SetToolTip(GetText(wxT("tooltip"))); #endif - if (HasParam(_T("font"))) + if (HasParam(wxT("font"))) wnd->SetFont(GetFont()); } @@ -827,7 +827,7 @@ void wxXmlResourceHandler::CreateChildren(wxObject *parent, bool this_hnd_only) while (n) { if (n->GetType() == wxXML_ELEMENT_NODE && - n->GetName() == _T("object")) + n->GetName() == wxT("object")) { if (this_hnd_only && CanHandle(n)) CreateResource(n, parent, NULL);