remove usage of wxT() macro; it makes example code a bit harder to read
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
14860f1427
commit
f8ebb70d6c
@ -357,9 +357,9 @@ public:
|
||||
|
||||
Acceptable values are:
|
||||
@li a null variant (IsNull() returns @true)
|
||||
@li a list variant (GetType() == wxT("list"))
|
||||
@li a list variant (GetType() == "list")
|
||||
@li an integer representing the selected child element,
|
||||
or 0 if this object is selected (GetType() == wxT("long"))
|
||||
or 0 if this object is selected (GetType() == "long")
|
||||
@li a "void*" pointer to a wxAccessible child object
|
||||
*/
|
||||
virtual wxAccStatus GetSelections(wxVariant* selections);
|
||||
|
@ -70,8 +70,8 @@ enum wxAuiManagerOption
|
||||
@code
|
||||
wxTextCtrl* text1 = new wxTextCtrl(this, -1);
|
||||
wxTextCtrl* text2 = new wxTextCtrl(this, -1);
|
||||
m_mgr.AddPane(text1, wxLEFT, wxT("Pane Caption"));
|
||||
m_mgr.AddPane(text2, wxBOTTOM, wxT("Pane Caption"));
|
||||
m_mgr.AddPane(text1, wxLEFT, "Pane Caption");
|
||||
m_mgr.AddPane(text2, wxBOTTOM, "Pane Caption");
|
||||
m_mgr.Update();
|
||||
@endcode
|
||||
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
Usage sample:
|
||||
|
||||
@code
|
||||
wxCollapsiblePane *collpane = new wxCollapsiblePane(this, wxID_ANY, wxT("Details:"));
|
||||
wxCollapsiblePane *collpane = new wxCollapsiblePane(this, wxID_ANY, "Details:");
|
||||
|
||||
// add the pane with a zero proportion value to the 'sz' sizer which contains it
|
||||
sz->Add(collpane, 0, wxGROW|wxALL, 5);
|
||||
@ -73,7 +73,7 @@ public:
|
||||
// now add a test label in the collapsible pane using a sizer to layout it:
|
||||
wxWindow *win = collpane->GetPane();
|
||||
wxSizer *paneSz = new wxBoxSizer(wxVERTICAL);
|
||||
paneSz->Add(new wxStaticText(win, wxID_ANY, wxT("test!")), 1, wxGROW|wxALL, 2);
|
||||
paneSz->Add(new wxStaticText(win, wxID_ANY, "test!"), 1, wxGROW|wxALL, 2);
|
||||
win->SetSizer(paneSz);
|
||||
paneSz->SetSizeHints(win);
|
||||
@endcode
|
||||
|
@ -240,7 +240,7 @@ protected:
|
||||
@code
|
||||
// The help can be browsed during the lifetime of this object; when the
|
||||
// user quits the help, program execution will continue.
|
||||
wxHtmlModalHelp help(parent, wxT("help"), wxT("My topic"));
|
||||
wxHtmlModalHelp help(parent, "help", "My topic");
|
||||
@endcode
|
||||
|
||||
@library{wxhtml}
|
||||
|
@ -281,7 +281,7 @@ public:
|
||||
|
||||
@code
|
||||
frame = new MyParentFrame;
|
||||
frame->Create(parent, myParentFrameId, wxT("My Parent Frame"));
|
||||
frame->Create(parent, myParentFrameId, "My Parent Frame");
|
||||
@endcode
|
||||
|
||||
@remarks
|
||||
|
@ -73,7 +73,7 @@ public:
|
||||
helpMenu->Append(wxID_ABOUT);
|
||||
|
||||
// use the stock label and the stock accelerator but not the stock help string:
|
||||
helpMenu->Append(wxID_ABOUT, wxEmptyString, wxT("My custom help string"));
|
||||
helpMenu->Append(wxID_ABOUT, wxEmptyString, "My custom help string");
|
||||
|
||||
// use all stock properties except for the bitmap:
|
||||
wxMenuItem *mymenu = new wxMenuItem(helpMenu, wxID_ABOUT);
|
||||
|
@ -158,9 +158,9 @@ public:
|
||||
|
||||
virtual bool Load(const wxString& fileName)
|
||||
{
|
||||
if(m_PDF.CallMethod(wxT("LoadFile"), fileName).GetBool())
|
||||
if(m_PDF.CallMethod("LoadFile", fileName).GetBool())
|
||||
{
|
||||
m_PDF.CallMethod(wxT("setCurrentPage"), wxVariant((long)0));
|
||||
m_PDF.CallMethod("setCurrentPage", wxVariant((long)0));
|
||||
NotifyMovieLoaded(); // initial refresh
|
||||
wxSizeEvent event;
|
||||
m_pAX->OnSize(event);
|
||||
@ -171,7 +171,7 @@ public:
|
||||
}
|
||||
virtual bool Load(const wxURI& location)
|
||||
{
|
||||
return m_PDF.CallMethod(wxT("LoadFile"), location.BuildUnescapedURI()).GetBool();
|
||||
return m_PDF.CallMethod("LoadFile", location.BuildUnescapedURI()).GetBool();
|
||||
}
|
||||
virtual bool Load(const wxURI& WXUNUSED(location),
|
||||
const wxURI& WXUNUSED(proxy))
|
||||
@ -186,7 +186,7 @@ public:
|
||||
|
||||
virtual bool SetPosition(wxLongLong where)
|
||||
{
|
||||
m_PDF.CallMethod(wxT("setCurrentPage"), wxVariant((long)where.GetValue()));
|
||||
m_PDF.CallMethod("setCurrentPage", wxVariant((long)where.GetValue()));
|
||||
return true;
|
||||
}
|
||||
virtual wxLongLong GetPosition()
|
||||
@ -229,13 +229,13 @@ public:
|
||||
{
|
||||
if(flags)
|
||||
{
|
||||
m_PDF.CallMethod(wxT("setShowToolbar"), true);
|
||||
m_PDF.CallMethod(wxT("setShowScrollbars"), true);
|
||||
m_PDF.CallMethod("setShowToolbar", true);
|
||||
m_PDF.CallMethod("setShowScrollbars", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_PDF.CallMethod(wxT("setShowToolbar"), false);
|
||||
m_PDF.CallMethod(wxT("setShowScrollbars"), false);
|
||||
m_PDF.CallMethod("setShowToolbar", false);
|
||||
m_PDF.CallMethod("setShowScrollbars", false);
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -251,9 +251,9 @@ public:
|
||||
Put this in one of your existant source files and then create a wxMediaCtrl with
|
||||
|
||||
//[this] is the parent window, "myfile.pdf" is the PDF file to open
|
||||
wxMediaCtrl* mymediactrl = new wxMediaCtrl(this, wxT("myfile.pdf"), wxID_ANY,
|
||||
wxMediaCtrl* mymediactrl = new wxMediaCtrl(this, "myfile.pdf", wxID_ANY,
|
||||
wxDefaultPosition, wxSize(300,300),
|
||||
0, wxT("wxPDFMediaBackend"));
|
||||
0, "wxPDFMediaBackend");
|
||||
@endcode
|
||||
|
||||
|
||||
@ -262,7 +262,7 @@ public:
|
||||
@library{wxbase}
|
||||
@category{misc,ipc}
|
||||
|
||||
@see wxActiveXEvent, @ref page_samples_flash Flash sample
|
||||
@see wxActiveXEvent, @ref page_samples_flash
|
||||
*/
|
||||
class wxActiveXContainer : public wxControl
|
||||
{
|
||||
|
@ -65,7 +65,7 @@
|
||||
|
||||
To disable themed pages globally:
|
||||
@code
|
||||
wxSystemOptions::SetOption(wxT("msw.notebook.themed-background"), 0);
|
||||
wxSystemOptions::SetOption("msw.notebook.themed-background", 0);
|
||||
@endcode
|
||||
|
||||
Set the value to 1 to enable it again.
|
||||
|
@ -80,7 +80,7 @@ enum wxPropertySheetDialogFlags
|
||||
|
||||
// Add page
|
||||
wxPanel* panel = new wxPanel(GetBookCtrl(), ...);
|
||||
GetBookCtrl()->AddPage(panel, wxT("General"));
|
||||
GetBookCtrl()->AddPage(panel, "General");
|
||||
|
||||
LayoutDialog();
|
||||
return true;
|
||||
|
@ -170,19 +170,19 @@ public:
|
||||
|
||||
wxPropertyGridPage* page;
|
||||
|
||||
page = pgMan->AddPage(wxT("First Page"));
|
||||
page = pgMan->AddPage("First Page");
|
||||
|
||||
page->Append( new wxPropertyCategory(wxT("Category A1")) );
|
||||
page->Append( new wxPropertyCategory("Category A1") );
|
||||
|
||||
page->Append( new wxIntProperty(wxT("Number"),wxPG_LABEL,1) );
|
||||
page->Append( new wxIntProperty("Number",wxPG_LABEL,1) );
|
||||
|
||||
page->Append( new wxColourProperty(wxT("Colour"),wxPG_LABEL,*wxWHITE) );
|
||||
page->Append( new wxColourProperty("Colour",wxPG_LABEL,*wxWHITE) );
|
||||
|
||||
page = pgMan->AddPage(wxT("Second Page"));
|
||||
page = pgMan->AddPage("Second Page");
|
||||
|
||||
page->Append( wxT("Text"),wxPG_LABEL,wxT("(no text)") );
|
||||
page->Append( "Text",wxPG_LABEL,"(no text)" );
|
||||
|
||||
page->Append( new wxFontProperty(wxT("Font"),wxPG_LABEL) );
|
||||
page->Append( new wxFontProperty("Font",wxPG_LABEL) );
|
||||
@endcode
|
||||
|
||||
@section propgridmanager_window_styles_ Window Styles
|
||||
|
@ -94,19 +94,19 @@ enum
|
||||
@code
|
||||
wxString text;
|
||||
...
|
||||
wxRegEx reEmail = wxT("([^@]+)@([[:alnum:].-_].)+([[:alnum:]]+)");
|
||||
wxRegEx reEmail = "([^@]+)@([[:alnum:].-_].)+([[:alnum:]]+)";
|
||||
if ( reEmail.Matches(text) )
|
||||
{
|
||||
wxString text = reEmail.GetMatch(email);
|
||||
wxString username = reEmail.GetMatch(email, 1);
|
||||
if ( reEmail.GetMatch(email, 3) == wxT("com") ) // .com TLD?
|
||||
if ( reEmail.GetMatch(email, 3) == "com" ) // .com TLD?
|
||||
{
|
||||
...
|
||||
}
|
||||
}
|
||||
|
||||
// or we could do this to hide the email address
|
||||
size_t count = reEmail.ReplaceAll(text, wxT("HIDDEN@\\2\\3"));
|
||||
size_t count = reEmail.ReplaceAll(text, "HIDDEN@\\2\\3");
|
||||
printf("text now contains %u hidden addresses", count);
|
||||
@endcode
|
||||
*/
|
||||
|
@ -167,7 +167,9 @@ public:
|
||||
details about the parameters.
|
||||
*/
|
||||
bool Create(long flags, wxWindow* parent,
|
||||
const wxString& title = wxGetTranslation(wxT("Formatting")), wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE);
|
||||
const wxString& title = wxGetTranslation("Formatting"), wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE);
|
||||
|
||||
//@{
|
||||
/**
|
||||
|
@ -60,8 +60,8 @@ public:
|
||||
/**
|
||||
Constructor.
|
||||
*/
|
||||
wxRichTextHTMLHandler(const wxString& name = wxT("HTML"),
|
||||
const wxString& ext = wxT("html"),
|
||||
wxRichTextHTMLHandler(const wxString& name = "HTML",
|
||||
const wxString& ext = "html",
|
||||
int type = wxRICHTEXT_TYPE_HTML);
|
||||
|
||||
/**
|
||||
|
@ -194,7 +194,7 @@ public:
|
||||
/**
|
||||
Constructor.
|
||||
*/
|
||||
wxRichTextPrintout(const wxString& title = wxT("Printout"));
|
||||
wxRichTextPrintout(const wxString& title = "Printout");
|
||||
|
||||
/**
|
||||
Calculates scaling and text, header and footer rectangles.
|
||||
@ -272,7 +272,7 @@ public:
|
||||
Optionally pass a title to be used in the preview frame and printing wait
|
||||
dialog, and also a parent window for these windows.
|
||||
*/
|
||||
wxRichTextPrinting(const wxString& name = wxT("Printing"),
|
||||
wxRichTextPrinting(const wxString& name = "Printing",
|
||||
wxWindow* parentWindow = NULL);
|
||||
|
||||
/**
|
||||
|
@ -49,7 +49,7 @@
|
||||
// 'normal text', i.e. the current font) but do tell the dialog
|
||||
// what 'normal text' is.
|
||||
|
||||
wxSymbolPickerDialog dlg(wxT("*"), wxEmptyString, currentFontName, this);
|
||||
wxSymbolPickerDialog dlg("*", wxEmptyString, currentFontName, this);
|
||||
|
||||
if (dlg.ShowModal() == wxID_OK)
|
||||
{
|
||||
|
@ -35,8 +35,8 @@ public:
|
||||
/**
|
||||
Constructor.
|
||||
*/
|
||||
wxRichTextXMLHandler(const wxString& name = wxT("XML"),
|
||||
const wxString& ext = wxT("xml"),
|
||||
wxRichTextXMLHandler(const wxString& name = "XML",
|
||||
const wxString& ext = "xml",
|
||||
int type = wxRICHTEXT_TYPE_XML);
|
||||
|
||||
/**
|
||||
|
@ -469,7 +469,7 @@ public:
|
||||
could use it like this:
|
||||
|
||||
@code
|
||||
wxChar *name = wxT("rawfile.doc");
|
||||
wxChar *name = "rawfile.doc";
|
||||
FILE *fil = fopen(wxFNCONV(name), "r");
|
||||
@endcode
|
||||
|
||||
|
@ -36,12 +36,12 @@
|
||||
bitmaps will inadvertently be mapped to system colours.
|
||||
To do this, set the msw.remap system option before creating the toolbar:
|
||||
@code
|
||||
wxSystemOptions::SetOption(wxT("msw.remap"), 0);
|
||||
wxSystemOptions::SetOption("msw.remap", 0);
|
||||
@endcode
|
||||
If you wish to use 32-bit images (which include an alpha channel for
|
||||
transparency) use:
|
||||
@code
|
||||
wxSystemOptions::SetOption(wxT("msw.remap"), 2);
|
||||
wxSystemOptions::SetOption("msw.remap", 2);
|
||||
@endcode
|
||||
Then colour remapping is switched off, and a transparent background
|
||||
used. But only use this option under Windows XP with true colour:
|
||||
|
@ -511,7 +511,7 @@ public:
|
||||
Loads the XML document from given stream using the given encoding. See Load().
|
||||
*/
|
||||
wxXmlDocument(wxInputStream& stream,
|
||||
const wxString& encoding = wxT("UTF-8"));
|
||||
const wxString& encoding = "UTF-8");
|
||||
|
||||
/**
|
||||
Virtual destructor. Frees the document root node.
|
||||
@ -579,14 +579,14 @@ public:
|
||||
Returns true on success, false otherwise.
|
||||
*/
|
||||
virtual bool Load(const wxString& filename,
|
||||
const wxString& encoding = wxT("UTF-8"), int flags = wxXMLDOC_NONE);
|
||||
const wxString& encoding = "UTF-8", int flags = wxXMLDOC_NONE);
|
||||
|
||||
/**
|
||||
Like Load(const wxString&, const wxString&, int) but takes the data from
|
||||
given input stream.
|
||||
*/
|
||||
virtual bool Load(wxInputStream& stream,
|
||||
const wxString& encoding = wxT("UTF-8"), int flags = wxXMLDOC_NONE);
|
||||
const wxString& encoding = "UTF-8", int flags = wxXMLDOC_NONE);
|
||||
|
||||
/**
|
||||
Saves XML tree creating a file named with given string.
|
||||
|
@ -381,7 +381,7 @@ protected:
|
||||
/**
|
||||
Creates an animation (see wxAnimation) from the filename specified in @a param.
|
||||
*/
|
||||
wxAnimation GetAnimation(const wxString& param = wxT("animation"));
|
||||
wxAnimation GetAnimation(const wxString& param = "animation");
|
||||
|
||||
/**
|
||||
Gets a bitmap.
|
||||
@ -457,7 +457,7 @@ protected:
|
||||
/**
|
||||
Gets the position (may be in dialog units).
|
||||
*/
|
||||
wxPoint GetPosition(const wxString& param = wxT("pos"));
|
||||
wxPoint GetPosition(const wxString& param = "pos");
|
||||
|
||||
/**
|
||||
Gets the size (may be in dialog units).
|
||||
@ -468,7 +468,7 @@ protected:
|
||||
Gets style flags from text in form "flag | flag2| flag3 |..."
|
||||
Only understands flags added with AddStyle().
|
||||
*/
|
||||
int GetStyle(const wxString& param = wxT("style"), int defaults = 0);
|
||||
int GetStyle(const wxString& param = "style", int defaults = 0);
|
||||
|
||||
/**
|
||||
Gets text from param and does some conversions:
|
||||
|
Loading…
Reference in New Issue
Block a user