Remove most occurrences of wxT() from the docs

wxT() macro rarely needed now, so do not use it in the docs
unless it is required.
This commit is contained in:
PB 2023-04-09 20:35:49 +02:00
parent d0e892ac09
commit d378444010
12 changed files with 55 additions and 55 deletions

View file

@ -99,7 +99,7 @@ wxString::FromUTF8().
Example 3: Input in KOI8-R. Construction of wxCSConv instance on the fly.
@code
wxString str(input_data, wxCSConv(wxT("koi8-r")));
wxString str(input_data, wxCSConv("koi8-r"));
@endcode
Example 4: Printing a wxString to stdout in UTF-8 encoding.

View file

@ -112,7 +112,7 @@ English using message catalogs:
@li Specify the source code language and charset as arguments to
wxLocale::AddCatalog. For example:
@code
locale.AddCatalog(wxT("myapp"), wxLANGUAGE_GERMAN, wxT("iso-8859-1"));
locale.AddCatalog("myapp", wxLANGUAGE_GERMAN, "iso-8859-1");
@endcode

View file

@ -107,12 +107,12 @@ r.BeginAlignment(wxTEXT_ALIGNMENT_CENTRE);
r.BeginBold();
r.BeginFontSize(14);
r.WriteText(wxT("Welcome to wxRichTextCtrl, a wxWidgets control for editing and presenting styled text and images"));
r.WriteText("Welcome to wxRichTextCtrl, a wxWidgets control for editing and presenting styled text and images");
r.EndFontSize();
r.Newline();
r.BeginItalic();
r.WriteText(wxT("by Julian Smart"));
r.WriteText("by Julian Smart");
r.EndItalic();
r.EndBold();
@ -125,75 +125,75 @@ r.EndAlignment();
r.Newline();
r.Newline();
r.WriteText(wxT("What can you do with this thing? "));
r.WriteText("What can you do with this thing? ");
r.WriteImage(wxBitmap(smiley_xpm));
r.WriteText(wxT(" Well, you can change text "));
r.WriteText(" Well, you can change text ");
r.BeginTextColour(wxColour(255, 0, 0));
r.WriteText(wxT("colour, like this red bit."));
r.WriteText("colour, like this red bit.");
r.EndTextColour();
r.BeginTextColour(wxColour(0, 0, 255));
r.WriteText(wxT(" And this blue bit."));
r.WriteText(" And this blue bit.");
r.EndTextColour();
r.WriteText(wxT(" Naturally you can make things "));
r.WriteText(" Naturally you can make things ");
r.BeginBold();
r.WriteText(wxT("bold "));
r.WriteText("bold ");
r.EndBold();
r.BeginItalic();
r.WriteText(wxT("or italic "));
r.WriteText("or italic ");
r.EndItalic();
r.BeginUnderline();
r.WriteText(wxT("or underlined."));
r.WriteText("or underlined.");
r.EndUnderline();
r.BeginFontSize(14);
r.WriteText(wxT(" Different font sizes on the same line is allowed, too."));
r.WriteText(" Different font sizes on the same line is allowed, too.");
r.EndFontSize();
r.WriteText(wxT(" Next we'll show an indented paragraph."));
r.WriteText(" Next we'll show an indented paragraph.");
r.BeginLeftIndent(60);
r.Newline();
r.WriteText(wxT("Indented paragraph."));
r.WriteText("Indented paragraph.");
r.EndLeftIndent();
r.Newline();
r.WriteText(wxT("Next, we'll show a first-line indent, achieved using BeginLeftIndent(100, -40)."));
r.WriteText("Next, we'll show a first-line indent, achieved using BeginLeftIndent(100, -40).");
r.BeginLeftIndent(100, -40);
r.Newline();
r.WriteText(wxT("It was in January, the most down-trodden month of an Edinburgh winter."));
r.WriteText("It was in January, the most down-trodden month of an Edinburgh winter.");
r.EndLeftIndent();
r.Newline();
r.WriteText(wxT("Numbered bullets are possible, again using subindents:"));
r.WriteText("Numbered bullets are possible, again using subindents:");
r.BeginNumberedBullet(1, 100, 60);
r.Newline();
r.WriteText(wxT("This is my first item. Note that wxRichTextCtrl doesn't automatically do numbering, but this will be added later."));
r.WriteText("This is my first item. Note that wxRichTextCtrl doesn't automatically do numbering, but this will be added later.");
r.EndNumberedBullet();
r.BeginNumberedBullet(2, 100, 60);
r.Newline();
r.WriteText(wxT("This is my second item."));
r.WriteText("This is my second item.");
r.EndNumberedBullet();
r.Newline();
r.WriteText(wxT("The following paragraph is right-indented:"));
r.WriteText("The following paragraph is right-indented:");
r.BeginRightIndent(200);
r.Newline();
r.WriteText(wxT("It was in January, the most down-trodden month of an Edinburgh winter. An attractive woman came into the cafe, which is nothing remarkable."));
r.WriteText("It was in January, the most down-trodden month of an Edinburgh winter. An attractive woman came into the cafe, which is nothing remarkable.");
r.EndRightIndent();
r.Newline();
@ -208,17 +208,17 @@ attr.SetFlags(wxTEXT_ATTR_TABS);
attr.SetTabs(tabs);
r.SetDefaultStyle(attr);
r.WriteText(wxT("This line contains tabs:\tFirst tab\tSecond tab\tThird tab"));
r.WriteText("This line contains tabs:\tFirst tab\tSecond tab\tThird tab");
r.Newline();
r.WriteText(wxT("Other notable features of wxRichTextCtrl include:"));
r.WriteText("Other notable features of wxRichTextCtrl include:");
r.BeginSymbolBullet(wxT('*'), 100, 60);
r.BeginSymbolBullet('*', 100, 60);
r.Newline();
r.WriteText(wxT("Compatibility with wxTextCtrl API"));
r.WriteText("Compatibility with wxTextCtrl API");
r.EndSymbolBullet();
r.WriteText(wxT("Note: this sample content was generated programmatically from within the MyFrame constructor in the demo. The images were loaded from inline XPMs. Enjoy wxRichTextCtrl!"));
r.WriteText("Note: this sample content was generated programmatically from within the MyFrame constructor in the demo. The images were loaded from inline XPMs. Enjoy wxRichTextCtrl!");
r.EndSuppressUndo();
@endcode

View file

@ -26,7 +26,7 @@ Here is an example of wxTextValidator usage.
@code
wxTextCtrl *txt1 = new wxTextCtrl(
this, -1, wxT(""), wxDefaultPosition, wxDefaultSize, 0,
this, -1, "", wxDefaultPosition, wxDefaultSize, 0,
wxTextValidator(wxFILTER_ALPHA, &g_data.m_string));
@endcode

View file

@ -493,7 +493,7 @@ wxObject *MyControlXmlHandler::DoCreateResource()
// const wxString &theTitle, const wxFont &titleFont,
// const wxPoint &pos, const wxSize &size,
// long style = MYCONTROL_DEFAULT_STYLE,
// const wxString &name = wxT("MyControl"));
// const wxString &name = "MyControl");
//
// Then the XRC for your component should look like:
//
@ -512,12 +512,12 @@ wxObject *MyControlXmlHandler::DoCreateResource()
//
// And the code to read your custom tags from the XRC file is just:
control->Create(m_parentAsWindow, GetID(),
GetBitmap(wxT("first-bitmap")),
GetPosition(wxT("first-pos")),
GetBitmap(wxT("second-bitmap")),
GetPosition(wxT("second-pos")),
GetText(wxT("the-title")),
GetFont(wxT("title-font")),
GetBitmap("first-bitmap"),
GetPosition("first-pos"),
GetBitmap("second-bitmap"),
GetPosition("second-pos"),
GetText("the-title"),
GetFont("title-font"),
GetPosition(), GetSize(), GetStyle(), GetName());
SetupWindow(control);
@ -529,7 +529,7 @@ bool MyControlXmlHandler::CanHandle(wxXmlNode *node)
{
// this function tells XRC system that this handler can parse
// the <object class="MyControl"> tags
return IsOfClass(node, wxT("MyControl"));
return IsOfClass(node, "MyControl");
}
@endcode