replaced _T() usage with wxT()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Dimitri Schoolwerth
2012-01-18 23:10:59 +00:00
parent e1db4c1290
commit ebfe373ee7
2 changed files with 66 additions and 66 deletions

View File

@@ -155,7 +155,7 @@ void ClassListDialog::CreateControls()
itemBoxSizer5->Add(m_pChoiceBook, 0, wxGROW|wxALL, 5);
m_pTextCtrl = new wxTextCtrl( this, ID_TEXTCTRL, _T(""), wxDefaultPosition, wxSize(500, -1), wxTE_MULTILINE|wxTE_READONLY );
m_pTextCtrl = new wxTextCtrl( this, ID_TEXTCTRL, wxT(""), wxDefaultPosition, wxSize(500, -1), wxTE_MULTILINE|wxTE_READONLY );
itemBoxSizer5->Add(m_pTextCtrl, 3, wxGROW|wxALL, 5);
wxStdDialogButtonSizer* itemStdDialogButtonSizer17 = new wxStdDialogButtonSizer;
@@ -242,7 +242,7 @@ void ClassListDialog::InitControls()
m_pSizeListBox->Append(arr[i]);
// add root item to parent-mode treectrl
wxTreeItemId id = m_pParentTreeCtrl->AddRoot(_T("wxObject"));
wxTreeItemId id = m_pParentTreeCtrl->AddRoot(wxT("wxObject"));
// recursively add all leaves to the treectrl
int count = AddClassesWithParent(CLASSINFO(wxObject), id);
@@ -288,7 +288,7 @@ void ClassListDialog::UpdateFilterText()
void ClassListDialog::UpdateClassInfo(const wxString &itemName)
{
wxString classname = itemName.BeforeFirst(_T(' '));
wxString classname = itemName.BeforeFirst(wxT(' '));
wxCheckBox *cb = wx_static_cast(wxCheckBox*, FindWindow(ID_SHOW_PROPERTIES_RECURSIVELY));
m_pTextCtrl->SetValue(
@@ -375,61 +375,61 @@ wxString DumpStr(const wxString &str)
wxString DumpTypeInfo(const wxTypeInfo *ti)
{
if (!ti)
return _T("none");
return wxT("none");
return DumpStr(ti->GetTypeName());
}
wxString DumpPropertyAccessor(const wxPropertyAccessor *acc, int indent)
{
wxString ind = _T("\n") + wxString(indent, wxT(' '));
wxString ind = wxT("\n") + wxString(indent, wxT(' '));
wxString infostr;
if (!acc)
return ind + _T("no property accessors");
return ind + wxT("no property accessors");
if (acc->HasSetter())
infostr << ind << _T("setter name: ") << acc->GetSetterName();
infostr << ind << wxT("setter name: ") << acc->GetSetterName();
if (acc->HasCollectionGetter())
infostr << ind << _T("collection getter name: ") << acc->GetCollectionGetterName();
infostr << ind << wxT("collection getter name: ") << acc->GetCollectionGetterName();
if (acc->HasGetter())
infostr << ind << _T("getter name: ") << acc->GetGetterName();
infostr << ind << wxT("getter name: ") << acc->GetGetterName();
if (acc->HasAdder())
infostr << ind << _T("adder name: ") << acc->GetAdderName();
infostr << ind << wxT("adder name: ") << acc->GetAdderName();
return infostr;
}
wxString DumpPropertyInfo(const wxPropertyInfo *prop, int indent)
{
wxString ind = _T("\n") + wxString(indent, wxT(' '));
wxString ind = wxT("\n") + wxString(indent, wxT(' '));
wxString infostr;
if (!prop)
return ind + _T("none");
return ind + wxT("none");
infostr << ind << _T("flags: ");
infostr << ind << wxT("flags: ");
if (prop->GetFlags() & wxPROP_DEPRECATED)
infostr << _T("wxPROP_DEPRECATED,");
infostr << wxT("wxPROP_DEPRECATED,");
if (prop->GetFlags() & wxPROP_OBJECT_GRAPH)
infostr << _T("wxPROP_OBJECT_GRAPH,");
infostr << wxT("wxPROP_OBJECT_GRAPH,");
if (prop->GetFlags() & wxPROP_ENUM_STORE_LONG)
infostr << _T("wxPROP_ENUM_STORE_LONG,");
infostr << wxT("wxPROP_ENUM_STORE_LONG,");
if (prop->GetFlags() & wxPROP_DONT_STREAM)
infostr << _T("wxPROP_DONT_STREAM,");
infostr << wxT("wxPROP_DONT_STREAM,");
if (prop->GetFlags() == 0)
infostr << _T("none");
infostr << wxT("none");
else
infostr.RemoveLast(); // remove last comma
infostr << ind << _T("help string: ") << DumpStr(prop->GetHelpString());
infostr << ind << _T("group string: ") << DumpStr(prop->GetGroupString());
infostr << ind << wxT("help string: ") << DumpStr(prop->GetHelpString());
infostr << ind << wxT("group string: ") << DumpStr(prop->GetGroupString());
infostr << ind << _T("collection element type: ") << DumpTypeInfo(prop->GetCollectionElementTypeInfo());
infostr << ind << _T("type: ") << DumpTypeInfo(prop->GetTypeInfo());
infostr << ind << wxT("collection element type: ") << DumpTypeInfo(prop->GetCollectionElementTypeInfo());
infostr << ind << wxT("type: ") << DumpTypeInfo(prop->GetTypeInfo());
infostr << ind << _T("default value: ") << DumpStr(wxAnyGetAsString(prop->GetDefaultValue()));
infostr << ind << wxT("default value: ") << DumpStr(wxAnyGetAsString(prop->GetDefaultValue()));
infostr << DumpPropertyAccessor(prop->GetAccessor(), indent+1);
return infostr;
@@ -437,13 +437,13 @@ wxString DumpPropertyInfo(const wxPropertyInfo *prop, int indent)
wxString DumpHandlerInfo(const wxHandlerInfo *phdlr, int indent)
{
wxString ind = _T("\n") + wxString(indent, wxT(' '));
wxString ind = wxT("\n") + wxString(indent, wxT(' '));
wxString infostr;
if (!phdlr)
return ind + _T("none");
return ind + wxT("none");
infostr << ind << _T("event class: ") <<
infostr << ind << wxT("event class: ") <<
(phdlr->GetEventClassInfo() ? phdlr->GetEventClassInfo()->GetClassName() : wxT("none"));
return infostr;
@@ -457,12 +457,12 @@ int DumpProperties(const wxClassInfo *info, wxString& infostr, bool recursive)
prop;
prop = prop->GetNext(), pcount++)
{
infostr << _T("\n\n [") << pcount+1 << _T("] Property: ") << prop->GetName();
infostr << wxT("\n\n [") << pcount+1 << wxT("] Property: ") << prop->GetName();
infostr << DumpPropertyInfo(prop, 4);
}
if (pcount == 0)
infostr << _T("\n None");
infostr << wxT("\n None");
if (recursive)
{
@@ -475,7 +475,7 @@ int DumpProperties(const wxClassInfo *info, wxString& infostr, bool recursive)
if (ppcount)
{
pcount += ppcount;
infostr << _T("\n\n ") << parent[i]->GetClassName() << _T(" PARENT'S PROPERTIES:");
infostr << wxT("\n\n ") << parent[i]->GetClassName() << wxT(" PARENT'S PROPERTIES:");
infostr << str;
}
}
@@ -492,12 +492,12 @@ int DumpHandlers(const wxClassInfo *info, wxString& infostr, bool recursive)
h;
h = h->GetNext(), hcount++)
{
infostr << _T("\n\n [") << hcount+1 << _T("] Handler: ") << h->GetName();
infostr << wxT("\n\n [") << hcount+1 << wxT("] Handler: ") << h->GetName();
infostr << DumpHandlerInfo(h, 4);
}
if (hcount == 0)
infostr << _T("\n None");
infostr << wxT("\n None");
if (recursive)
{
@@ -510,7 +510,7 @@ int DumpHandlers(const wxClassInfo *info, wxString& infostr, bool recursive)
if (hhcount)
{
hcount += hhcount;
infostr << _T("\n\n ") << parent[i]->GetClassName() << _T(" PARENT'S HANDLERS:");
infostr << wxT("\n\n ") << parent[i]->GetClassName() << wxT(" PARENT'S HANDLERS:");
infostr << str;
}
}
@@ -528,32 +528,32 @@ wxString DumpClassInfo(const wxClassInfo *info, bool recursive)
// basic stuff:
infostr << _T("\n BASIC RTTI INFO ABOUT ") << info->GetClassName();
infostr << _T("\n =================================================");
infostr << _T("\n Base class #1: ") << DumpStr(info->GetBaseClassName1());
infostr << _T("\n Base class #2: ") << DumpStr(info->GetBaseClassName2());
infostr << _T("\n Include file: ") << DumpStr(info->GetIncludeName());
infostr << _T("\n Size: ") << info->GetSize();
infostr << _T("\n Dynamic: ") << (info->IsDynamic() ? _T("true") : _T("false"));
infostr << wxT("\n BASIC RTTI INFO ABOUT ") << info->GetClassName();
infostr << wxT("\n =================================================");
infostr << wxT("\n Base class #1: ") << DumpStr(info->GetBaseClassName1());
infostr << wxT("\n Base class #2: ") << DumpStr(info->GetBaseClassName2());
infostr << wxT("\n Include file: ") << DumpStr(info->GetIncludeName());
infostr << wxT("\n Size: ") << info->GetSize();
infostr << wxT("\n Dynamic: ") << (info->IsDynamic() ? wxT("true") : wxT("false"));
// advanced stuff:
infostr << _T("\n\n\n ADVANCED RTTI INFO ABOUT ") << info->GetClassName();
infostr << _T("\n =================================================\n");
infostr << _T("\n PROPERTIES");
infostr << _T("\n -----------------------------------------");
infostr << wxT("\n\n\n ADVANCED RTTI INFO ABOUT ") << info->GetClassName();
infostr << wxT("\n =================================================\n");
infostr << wxT("\n PROPERTIES");
infostr << wxT("\n -----------------------------------------");
int pcount = DumpProperties(info, infostr, recursive);
infostr << _T("\n\n HANDLERS");
infostr << _T("\n -----------------------------------------");
infostr << wxT("\n\n HANDLERS");
infostr << wxT("\n -----------------------------------------");
int hcount = DumpHandlers(info, infostr, recursive);
if (pcount+hcount == 0)
infostr << _T("\n\n no advanced info\n");
infostr << wxT("\n\n no advanced info\n");
else
{
infostr << _T("\n\n Total count of properties: ") << pcount;
infostr << _T("\n Total count of handlers: ") << hcount << _T("\n");
infostr << wxT("\n\n Total count of properties: ") << pcount;
infostr << wxT("\n Total count of handlers: ") << hcount << wxT("\n");
}
return infostr;

View File

@@ -141,7 +141,7 @@ bool MyApp::OnInit()
RegisterFrameRTTI();
// create the main application window
MyFrame *frame = new MyFrame(_T("Extended RTTI sample"));
MyFrame *frame = new MyFrame(wxT("Extended RTTI sample"));
// and show it (the frames, unlike simple controls, are not shown when
// created initially)
@@ -169,24 +169,24 @@ MyFrame::MyFrame(const wxString& title)
// the "About" item should be in the help menu
wxMenu *helpMenu = new wxMenu;
helpMenu->Append(Minimal_About, _T("&About...\tF1"), _T("Show about dialog"));
helpMenu->Append(Minimal_About, wxT("&About...\tF1"), wxT("Show about dialog"));
fileMenu->Append(Minimal_Persist, _T("Persist a wxFrame to XML..."),
_T("Creates a wxFrame using wxXTI and saves its description as XML"));
fileMenu->Append(Minimal_Depersist, _T("Depersist XML file..."),
_T("Loads the description of wxFrame from XML"));
fileMenu->Append(Minimal_GenerateCode, _T("Generate code for a wxFrame saved to XML..."),
_T("Generates the C++ code which belong to a persisted wxFrame"));
fileMenu->Append(Minimal_Persist, wxT("Persist a wxFrame to XML..."),
wxT("Creates a wxFrame using wxXTI and saves its description as XML"));
fileMenu->Append(Minimal_Depersist, wxT("Depersist XML file..."),
wxT("Loads the description of wxFrame from XML"));
fileMenu->Append(Minimal_GenerateCode, wxT("Generate code for a wxFrame saved to XML..."),
wxT("Generates the C++ code which belong to a persisted wxFrame"));
fileMenu->AppendSeparator();
fileMenu->Append(Minimal_DumpClasses, _T("Dump registered classes..."),
_T("Dumps the description of all wxWidgets classes registered in XTI"));
fileMenu->Append(Minimal_DumpClasses, wxT("Dump registered classes..."),
wxT("Dumps the description of all wxWidgets classes registered in XTI"));
fileMenu->AppendSeparator();
fileMenu->Append(Minimal_Quit, _T("E&xit\tAlt-X"), _T("Quit this program"));
fileMenu->Append(Minimal_Quit, wxT("E&xit\tAlt-X"), wxT("Quit this program"));
// now append the freshly created menu to the menu bar...
wxMenuBar *menuBar = new wxMenuBar();
menuBar->Append(fileMenu, _T("&File"));
menuBar->Append(helpMenu, _T("&Help"));
menuBar->Append(fileMenu, wxT("&File"));
menuBar->Append(helpMenu, wxT("&Help"));
// ... and attach this menu bar to the frame
SetMenuBar(menuBar);
@@ -195,7 +195,7 @@ MyFrame::MyFrame(const wxString& title)
#if wxUSE_STATUSBAR
// create a status bar just for fun (by default with 1 pane only)
CreateStatusBar(2);
SetStatusText(_T("Welcome to wxWidgets!"));
SetStatusText(wxT("Welcome to wxWidgets!"));
#endif // wxUSE_STATUSBAR
}
@@ -735,12 +735,12 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
wxMessageBox(wxString::Format(
_T("Welcome to %s!\n")
_T("\n")
_T("This sample demonstrates wxWidgets eXtended RTTI (XTI) system."),
wxT("Welcome to %s!\n")
wxT("\n")
wxT("This sample demonstrates wxWidgets eXtended RTTI (XTI) system."),
wxVERSION_STRING
),
_T("About wxWidgets XTI sample"),
wxT("About wxWidgets XTI sample"),
wxOK | wxICON_INFORMATION,
this);
}