Use wxASCII_STR() on string literals

Fix the build with wxNO_IMPLICIT_WXSTRING_ENCODING.
This commit is contained in:
Arrigo Marchiori
2019-10-22 12:34:29 +02:00
committed by Vadim Zeitlin
parent 65cbf40b7e
commit c86bcf962d
351 changed files with 965 additions and 950 deletions

View File

@@ -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();

View File

@@ -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);

View File

@@ -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);

View File

@@ -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;

View File

@@ -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;

View File

@@ -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(); }

View File

@@ -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)) { }

View File

@@ -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();

View File

@@ -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();
};

View File

@@ -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

View File

@@ -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);

View File

@@ -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;

View File

@@ -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);

View File

@@ -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)

View File

@@ -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);

View File

@@ -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 ;

View File

@@ -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; }

View File

@@ -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);

View File

@@ -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;

View File

@@ -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);

View File

@@ -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))
{

View File

@@ -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
// --------------

View File

@@ -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
// ---------

View File

@@ -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; }

View File

@@ -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();

View File

@@ -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();

View File

@@ -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);