Globally replace _T() with wxT().
Standardize on using a single macro across all wxWidgets sources and solve the name clash with Sun CC standard headers (see #10660). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -243,7 +243,7 @@ END_EVENT_TABLE()
|
||||
#define NATIVE_OR_GENERIC_CTRLS GENERIC_CTRLS
|
||||
#endif
|
||||
|
||||
IMPLEMENT_WIDGETS_PAGE(BitmapComboBoxWidgetsPage, _T("BitmapCombobox"),
|
||||
IMPLEMENT_WIDGETS_PAGE(BitmapComboBoxWidgetsPage, wxT("BitmapCombobox"),
|
||||
NATIVE_OR_GENERIC_CTRLS | WITH_ITEMS_CTRLS | COMBO_CTRLS
|
||||
);
|
||||
|
||||
@@ -299,39 +299,39 @@ void BitmapComboBoxWidgetsPage::CreateContent()
|
||||
wxSizer *sizerLeft = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
// left pane - style box
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY, _T("&Set style"));
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY, wxT("&Set style"));
|
||||
|
||||
|
||||
// should be in sync with ComboKind_XXX values
|
||||
static const wxString kinds[] =
|
||||
{
|
||||
_T("default"),
|
||||
_T("simple"),
|
||||
_T("drop down"),
|
||||
wxT("default"),
|
||||
wxT("simple"),
|
||||
wxT("drop down"),
|
||||
};
|
||||
|
||||
m_radioKind = new wxRadioBox(this, wxID_ANY, _T("Combobox &kind:"),
|
||||
m_radioKind = new wxRadioBox(this, wxID_ANY, wxT("Combobox &kind:"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
WXSIZEOF(kinds), kinds,
|
||||
1, wxRA_SPECIFY_COLS);
|
||||
|
||||
wxSizer *sizerStyle = new wxStaticBoxSizer(box, wxVERTICAL);
|
||||
|
||||
m_chkSort = CreateCheckBoxAndAddToSizer(sizerStyle, _T("&Sort items"));
|
||||
m_chkReadonly = CreateCheckBoxAndAddToSizer(sizerStyle, _T("&Read only"));
|
||||
m_chkSort = CreateCheckBoxAndAddToSizer(sizerStyle, wxT("&Sort items"));
|
||||
m_chkReadonly = CreateCheckBoxAndAddToSizer(sizerStyle, wxT("&Read only"));
|
||||
|
||||
wxButton *btn = new wxButton(this, BitmapComboBoxPage_Reset, _T("&Reset"));
|
||||
wxButton *btn = new wxButton(this, BitmapComboBoxPage_Reset, wxT("&Reset"));
|
||||
sizerStyle->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 3);
|
||||
|
||||
sizerLeft->Add(sizerStyle, 0, wxGROW | wxALIGN_CENTRE_HORIZONTAL);
|
||||
sizerLeft->Add(m_radioKind, 0, wxGROW | wxALL, 5);
|
||||
|
||||
// left pane - other options box
|
||||
box = new wxStaticBox(this, wxID_ANY, _T("Demo options"));
|
||||
box = new wxStaticBox(this, wxID_ANY, wxT("Demo options"));
|
||||
|
||||
wxSizer *sizerOptions = new wxStaticBoxSizer(box, wxVERTICAL);
|
||||
|
||||
sizerRow = CreateSizerWithSmallTextAndLabel(_T("Control &height:"),
|
||||
sizerRow = CreateSizerWithSmallTextAndLabel(wxT("Control &height:"),
|
||||
BitmapComboBoxPage_ChangeHeight,
|
||||
&m_textChangeHeight);
|
||||
m_textChangeHeight->SetSize(20, wxDefaultCoord);
|
||||
@@ -341,42 +341,42 @@ void BitmapComboBoxWidgetsPage::CreateContent()
|
||||
|
||||
// middle pane
|
||||
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY,
|
||||
_T("&Change wxBitmapComboBox contents"));
|
||||
wxT("&Change wxBitmapComboBox contents"));
|
||||
wxSizer *sizerMiddle = new wxStaticBoxSizer(box2, wxVERTICAL);
|
||||
|
||||
btn = new wxButton(this, BitmapComboBoxPage_ContainerTests, _T("Run &tests"));
|
||||
btn = new wxButton(this, BitmapComboBoxPage_ContainerTests, wxT("Run &tests"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
#if wxUSE_IMAGE
|
||||
btn = new wxButton(this, BitmapComboBoxPage_AddWidgetIcons, _T("Add &widget icons"));
|
||||
btn = new wxButton(this, BitmapComboBoxPage_AddWidgetIcons, wxT("Add &widget icons"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, BitmapComboBoxPage_LoadFromFile, _T("Insert image from &file"));
|
||||
btn = new wxButton(this, BitmapComboBoxPage_LoadFromFile, wxT("Insert image from &file"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, BitmapComboBoxPage_SetFromFile, _T("&Set image from file"));
|
||||
btn = new wxButton(this, BitmapComboBoxPage_SetFromFile, wxT("&Set image from file"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
#endif
|
||||
|
||||
btn = new wxButton(this, BitmapComboBoxPage_AddSeveralWithImages, _T("A&ppend a few strings with images"));
|
||||
btn = new wxButton(this, BitmapComboBoxPage_AddSeveralWithImages, wxT("A&ppend a few strings with images"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, BitmapComboBoxPage_AddSeveral, _T("Append a &few strings"));
|
||||
btn = new wxButton(this, BitmapComboBoxPage_AddSeveral, wxT("Append a &few strings"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, BitmapComboBoxPage_AddMany, _T("Append &many strings"));
|
||||
btn = new wxButton(this, BitmapComboBoxPage_AddMany, wxT("Append &many strings"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(BitmapComboBoxPage_Delete,
|
||||
_T("&Delete this item"),
|
||||
wxT("&Delete this item"),
|
||||
BitmapComboBoxPage_DeleteText,
|
||||
&m_textDelete);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, BitmapComboBoxPage_DeleteSel, _T("Delete &selection"));
|
||||
btn = new wxButton(this, BitmapComboBoxPage_DeleteSel, wxT("Delete &selection"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, BitmapComboBoxPage_Clear, _T("&Clear"));
|
||||
btn = new wxButton(this, BitmapComboBoxPage_Clear, wxT("&Clear"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
#if wxUSE_IMAGE
|
||||
@@ -433,7 +433,7 @@ void BitmapComboBoxWidgetsPage::CreateCombo()
|
||||
switch ( m_radioKind->GetSelection() )
|
||||
{
|
||||
default:
|
||||
wxFAIL_MSG( _T("unknown combo kind") );
|
||||
wxFAIL_MSG( wxT("unknown combo kind") );
|
||||
// fall through
|
||||
|
||||
case ComboKind_Default:
|
||||
@@ -512,7 +512,7 @@ void BitmapComboBoxWidgetsPage::OnButtonChange(wxCommandEvent& WXUNUSED(event))
|
||||
#ifndef __WXGTK__
|
||||
m_combobox->SetString(sel, m_textChange->GetValue());
|
||||
#else
|
||||
wxLogMessage(_T("Not implemented in wxGTK"));
|
||||
wxLogMessage(wxT("Not implemented in wxGTK"));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -551,7 +551,7 @@ void BitmapComboBoxWidgetsPage::OnButtonInsert(wxCommandEvent& WXUNUSED(event))
|
||||
if ( !m_textInsert->IsModified() )
|
||||
{
|
||||
// update the default string
|
||||
m_textInsert->SetValue(wxString::Format(_T("test item %u"), ++s_item));
|
||||
m_textInsert->SetValue(wxString::Format(wxT("test item %u"), ++s_item));
|
||||
}
|
||||
|
||||
int sel = m_combobox->GetSelection();
|
||||
@@ -595,15 +595,15 @@ void BitmapComboBoxWidgetsPage::OnButtonAddMany(wxCommandEvent& WXUNUSED(event))
|
||||
// "many" means 1000 here
|
||||
for ( unsigned int n = 0; n < 1000; n++ )
|
||||
{
|
||||
m_combobox->Append(wxString::Format(_T("item #%u"), n));
|
||||
m_combobox->Append(wxString::Format(wxT("item #%u"), n));
|
||||
}
|
||||
}
|
||||
|
||||
void BitmapComboBoxWidgetsPage::OnButtonAddSeveral(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
m_combobox->Append(_T("First"));
|
||||
m_combobox->Append(_T("another one"));
|
||||
m_combobox->Append(_T("and the last (very very very very very very very very very very long) one"));
|
||||
m_combobox->Append(wxT("First"));
|
||||
m_combobox->Append(wxT("another one"));
|
||||
m_combobox->Append(wxT("and the last (very very very very very very very very very very long) one"));
|
||||
}
|
||||
|
||||
void BitmapComboBoxWidgetsPage::OnButtonAddSeveralWithImages(wxCommandEvent& WXUNUSED(event))
|
||||
@@ -800,26 +800,26 @@ void BitmapComboBoxWidgetsPage::OnComboText(wxCommandEvent& event)
|
||||
wxString s = event.GetString();
|
||||
|
||||
wxASSERT_MSG( s == m_combobox->GetValue(),
|
||||
_T("event and combobox values should be the same") );
|
||||
wxT("event and combobox values should be the same") );
|
||||
|
||||
if (event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER)
|
||||
{
|
||||
wxLogMessage(_T("BitmapCombobox enter pressed (now '%s')"), s.c_str());
|
||||
wxLogMessage(wxT("BitmapCombobox enter pressed (now '%s')"), s.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogMessage(_T("BitmapCombobox text changed (now '%s')"), s.c_str());
|
||||
wxLogMessage(wxT("BitmapCombobox text changed (now '%s')"), s.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void BitmapComboBoxWidgetsPage::OnComboBox(wxCommandEvent& event)
|
||||
{
|
||||
long sel = event.GetInt();
|
||||
m_textDelete->SetValue(wxString::Format(_T("%ld"), sel));
|
||||
m_textDelete->SetValue(wxString::Format(wxT("%ld"), sel));
|
||||
|
||||
wxLogMessage(_T("BitmapCombobox item %ld selected"), sel);
|
||||
wxLogMessage(wxT("BitmapCombobox item %ld selected"), sel);
|
||||
|
||||
wxLogMessage(_T("BitmapCombobox GetValue(): %s"), m_combobox->GetValue().c_str() );
|
||||
wxLogMessage(wxT("BitmapCombobox GetValue(): %s"), m_combobox->GetValue().c_str() );
|
||||
}
|
||||
|
||||
void BitmapComboBoxWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& WXUNUSED(event))
|
||||
@@ -934,12 +934,12 @@ wxBitmap BitmapComboBoxWidgetsPage::CreateBitmap(const wxColour& colour)
|
||||
|
||||
void BitmapComboBoxWidgetsPage::OnDropDown(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxLogMessage(_T("Combobox dropped down"));
|
||||
wxLogMessage(wxT("Combobox dropped down"));
|
||||
}
|
||||
|
||||
void BitmapComboBoxWidgetsPage::OnCloseUp(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxLogMessage(_T("Combobox closed up"));
|
||||
wxLogMessage(wxT("Combobox closed up"));
|
||||
}
|
||||
|
||||
#endif // wxUSE_BITMAPCOMBOBOX
|
||||
|
@@ -174,7 +174,7 @@ END_EVENT_TABLE()
|
||||
#define FAMILY_CTRLS NATIVE_CTRLS
|
||||
#endif
|
||||
|
||||
IMPLEMENT_WIDGETS_PAGE(ButtonWidgetsPage, _T("Button"), FAMILY_CTRLS );
|
||||
IMPLEMENT_WIDGETS_PAGE(ButtonWidgetsPage, wxT("Button"), FAMILY_CTRLS );
|
||||
|
||||
ButtonWidgetsPage::ButtonWidgetsPage(WidgetsBookCtrl *book,
|
||||
wxImageList *imaglist)
|
||||
@@ -205,14 +205,14 @@ void ButtonWidgetsPage::CreateContent()
|
||||
wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
||||
// left pane
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY, _T("&Set style"));
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY, wxT("&Set style"));
|
||||
|
||||
wxSizer *sizerLeft = new wxStaticBoxSizer(box, wxVERTICAL);
|
||||
|
||||
m_chkBitmapOnly = CreateCheckBoxAndAddToSizer(sizerLeft, "&Bitmap only");
|
||||
m_chkTextAndBitmap = CreateCheckBoxAndAddToSizer(sizerLeft, "Text &and &bitmap");
|
||||
m_chkFit = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Fit exactly"));
|
||||
m_chkDefault = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Default"));
|
||||
m_chkFit = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("&Fit exactly"));
|
||||
m_chkDefault = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("&Default"));
|
||||
|
||||
sizerLeft->AddSpacer(5);
|
||||
|
||||
@@ -244,22 +244,22 @@ void ButtonWidgetsPage::CreateContent()
|
||||
// should be in sync with enums Button[HV]Align!
|
||||
static const wxString halign[] =
|
||||
{
|
||||
_T("left"),
|
||||
_T("centre"),
|
||||
_T("right"),
|
||||
wxT("left"),
|
||||
wxT("centre"),
|
||||
wxT("right"),
|
||||
};
|
||||
|
||||
static const wxString valign[] =
|
||||
{
|
||||
_T("top"),
|
||||
_T("centre"),
|
||||
_T("bottom"),
|
||||
wxT("top"),
|
||||
wxT("centre"),
|
||||
wxT("bottom"),
|
||||
};
|
||||
|
||||
m_radioHAlign = new wxRadioBox(this, wxID_ANY, _T("&Horz alignment"),
|
||||
m_radioHAlign = new wxRadioBox(this, wxID_ANY, wxT("&Horz alignment"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
WXSIZEOF(halign), halign);
|
||||
m_radioVAlign = new wxRadioBox(this, wxID_ANY, _T("&Vert alignment"),
|
||||
m_radioVAlign = new wxRadioBox(this, wxID_ANY, wxT("&Vert alignment"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
WXSIZEOF(valign), valign);
|
||||
|
||||
@@ -268,18 +268,18 @@ void ButtonWidgetsPage::CreateContent()
|
||||
|
||||
sizerLeft->Add(5, 5, 0, wxGROW | wxALL, 5); // spacer
|
||||
|
||||
wxButton *btn = new wxButton(this, ButtonPage_Reset, _T("&Reset"));
|
||||
wxButton *btn = new wxButton(this, ButtonPage_Reset, wxT("&Reset"));
|
||||
sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
|
||||
|
||||
// middle pane
|
||||
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY, _T("&Operations"));
|
||||
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY, wxT("&Operations"));
|
||||
wxSizer *sizerMiddle = new wxStaticBoxSizer(box2, wxVERTICAL);
|
||||
|
||||
wxSizer *sizerRow = CreateSizerWithTextAndButton(ButtonPage_ChangeLabel,
|
||||
_T("Change label"),
|
||||
wxT("Change label"),
|
||||
wxID_ANY,
|
||||
&m_textLabel);
|
||||
m_textLabel->SetValue(_T("&Press me!"));
|
||||
m_textLabel->SetValue(wxT("&Press me!"));
|
||||
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
@@ -351,7 +351,7 @@ void ButtonWidgetsPage::CreateButton()
|
||||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG(_T("unexpected radiobox selection"));
|
||||
wxFAIL_MSG(wxT("unexpected radiobox selection"));
|
||||
// fall through
|
||||
|
||||
case ButtonHAlign_Centre:
|
||||
@@ -369,7 +369,7 @@ void ButtonWidgetsPage::CreateButton()
|
||||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG(_T("unexpected radiobox selection"));
|
||||
wxFAIL_MSG(wxT("unexpected radiobox selection"));
|
||||
// fall through
|
||||
|
||||
case ButtonVAlign_Centre:
|
||||
@@ -387,15 +387,15 @@ void ButtonWidgetsPage::CreateButton()
|
||||
showsBitmap = true;
|
||||
|
||||
wxBitmapButton *bbtn = new wxBitmapButton(this, ButtonPage_Button,
|
||||
CreateBitmap(_T("normal")));
|
||||
CreateBitmap(wxT("normal")));
|
||||
if ( m_chkUsePressed->GetValue() )
|
||||
bbtn->SetBitmapPressed(CreateBitmap(_T("pushed")));
|
||||
bbtn->SetBitmapPressed(CreateBitmap(wxT("pushed")));
|
||||
if ( m_chkUseFocused->GetValue() )
|
||||
bbtn->SetBitmapFocus(CreateBitmap(_T("focused")));
|
||||
bbtn->SetBitmapFocus(CreateBitmap(wxT("focused")));
|
||||
if ( m_chkUseCurrent->GetValue() )
|
||||
bbtn->SetBitmapCurrent(CreateBitmap(_T("hover")));
|
||||
bbtn->SetBitmapCurrent(CreateBitmap(wxT("hover")));
|
||||
if ( m_chkUseDisabled->GetValue() )
|
||||
bbtn->SetBitmapDisabled(CreateBitmap(_T("disabled")));
|
||||
bbtn->SetBitmapDisabled(CreateBitmap(wxT("disabled")));
|
||||
m_button = bbtn;
|
||||
}
|
||||
else // normal button
|
||||
@@ -481,7 +481,7 @@ void ButtonWidgetsPage::OnButtonChangeLabel(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
void ButtonWidgetsPage::OnButton(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxLogMessage(_T("Test button clicked."));
|
||||
wxLogMessage(wxT("Test button clicked."));
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -496,8 +496,8 @@ wxBitmap ButtonWidgetsPage::CreateBitmap(const wxString& label)
|
||||
dc.SetBackground(wxBrush(*wxCYAN));
|
||||
dc.Clear();
|
||||
dc.SetTextForeground(*wxBLACK);
|
||||
dc.DrawLabel(wxStripMenuCodes(m_textLabel->GetValue()) + _T("\n")
|
||||
_T("(") + label + _T(" state)"),
|
||||
dc.DrawLabel(wxStripMenuCodes(m_textLabel->GetValue()) + wxT("\n")
|
||||
wxT("(") + label + wxT(" state)"),
|
||||
wxArtProvider::GetBitmap(wxART_INFORMATION),
|
||||
wxRect(10, 10, bmp.GetWidth() - 20, bmp.GetHeight() - 20),
|
||||
wxALIGN_CENTRE);
|
||||
|
@@ -170,14 +170,14 @@ void CheckBoxWidgetsPage::CreateContent()
|
||||
wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
||||
// left pane
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY, _T("&Set style"));
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY, wxT("&Set style"));
|
||||
|
||||
wxSizer *sizerLeft = new wxStaticBoxSizer(box, wxVERTICAL);
|
||||
|
||||
m_chkRight = CreateCheckBoxAndAddToSizer
|
||||
(
|
||||
sizerLeft,
|
||||
_T("&Right aligned"),
|
||||
wxT("&Right aligned"),
|
||||
CheckboxPage_ChkRight
|
||||
);
|
||||
|
||||
@@ -185,39 +185,39 @@ void CheckBoxWidgetsPage::CreateContent()
|
||||
|
||||
static const wxString kinds[] =
|
||||
{
|
||||
_T("usual &2-state checkbox"),
|
||||
_T("&3rd state settable by program"),
|
||||
_T("&user-settable 3rd state"),
|
||||
wxT("usual &2-state checkbox"),
|
||||
wxT("&3rd state settable by program"),
|
||||
wxT("&user-settable 3rd state"),
|
||||
};
|
||||
|
||||
m_radioKind = new wxRadioBox(this, wxID_ANY, _T("&Kind"),
|
||||
m_radioKind = new wxRadioBox(this, wxID_ANY, wxT("&Kind"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
WXSIZEOF(kinds), kinds,
|
||||
1);
|
||||
sizerLeft->Add(m_radioKind, 0, wxGROW | wxALL, 5);
|
||||
wxButton *btn = new wxButton(this, CheckboxPage_Reset, _T("&Reset"));
|
||||
wxButton *btn = new wxButton(this, CheckboxPage_Reset, wxT("&Reset"));
|
||||
sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
|
||||
|
||||
// middle pane
|
||||
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY, _T("&Operations"));
|
||||
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY, wxT("&Operations"));
|
||||
wxSizer *sizerMiddle = new wxStaticBoxSizer(box2, wxVERTICAL);
|
||||
|
||||
sizerMiddle->Add(CreateSizerWithTextAndButton(CheckboxPage_ChangeLabel,
|
||||
_T("Change label"),
|
||||
wxT("Change label"),
|
||||
wxID_ANY,
|
||||
&m_textLabel),
|
||||
0, wxALL | wxGROW, 5);
|
||||
sizerMiddle->Add(new wxButton(this, CheckboxPage_Check, _T("&Check it")),
|
||||
sizerMiddle->Add(new wxButton(this, CheckboxPage_Check, wxT("&Check it")),
|
||||
0, wxALL | wxGROW, 5);
|
||||
sizerMiddle->Add(new wxButton(this, CheckboxPage_Uncheck, _T("&Uncheck it")),
|
||||
sizerMiddle->Add(new wxButton(this, CheckboxPage_Uncheck, wxT("&Uncheck it")),
|
||||
0, wxALL | wxGROW, 5);
|
||||
sizerMiddle->Add(new wxButton(this, CheckboxPage_PartCheck,
|
||||
_T("Put in &3rd state")),
|
||||
wxT("Put in &3rd state")),
|
||||
0, wxALL | wxGROW, 5);
|
||||
|
||||
// right pane
|
||||
wxSizer *sizerRight = new wxBoxSizer(wxHORIZONTAL);
|
||||
m_checkbox = new wxCheckBox(this, CheckboxPage_Checkbox, _T("&Check me!"));
|
||||
m_checkbox = new wxCheckBox(this, CheckboxPage_Checkbox, wxT("&Check me!"));
|
||||
sizerRight->Add(0, 0, 1, wxCENTRE);
|
||||
sizerRight->Add(m_checkbox, 1, wxCENTRE);
|
||||
sizerRight->Add(0, 0, 1, wxCENTRE);
|
||||
@@ -260,7 +260,7 @@ void CheckBoxWidgetsPage::CreateCheckbox()
|
||||
switch ( m_radioKind->GetSelection() )
|
||||
{
|
||||
default:
|
||||
wxFAIL_MSG(_T("unexpected radiobox selection"));
|
||||
wxFAIL_MSG(wxT("unexpected radiobox selection"));
|
||||
// fall through
|
||||
|
||||
case CheckboxKind_2State:
|
||||
@@ -309,8 +309,8 @@ void CheckBoxWidgetsPage::OnButtonChangeLabel(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
void CheckBoxWidgetsPage::OnCheckBox(wxCommandEvent& event)
|
||||
{
|
||||
wxLogMessage(_T("Test checkbox %schecked (value = %d)."),
|
||||
event.IsChecked() ? _T("") : _T("un"),
|
||||
wxLogMessage(wxT("Test checkbox %schecked (value = %d)."),
|
||||
event.IsChecked() ? wxT("") : wxT("un"),
|
||||
(int)m_checkbox->Get3StateValue());
|
||||
}
|
||||
|
||||
|
@@ -184,7 +184,7 @@ END_EVENT_TABLE()
|
||||
#define FAMILY_CTRLS NATIVE_CTRLS
|
||||
#endif
|
||||
|
||||
IMPLEMENT_WIDGETS_PAGE(ChoiceWidgetsPage, _T("Choice"),
|
||||
IMPLEMENT_WIDGETS_PAGE(ChoiceWidgetsPage, wxT("Choice"),
|
||||
FAMILY_CTRLS | WITH_ITEMS_CTRLS
|
||||
);
|
||||
|
||||
@@ -213,60 +213,60 @@ void ChoiceWidgetsPage::CreateContent()
|
||||
|
||||
// left pane
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY,
|
||||
_T("&Set choice parameters"));
|
||||
wxT("&Set choice parameters"));
|
||||
wxSizer *sizerLeft = new wxStaticBoxSizer(box, wxVERTICAL);
|
||||
|
||||
static const wxString modes[] =
|
||||
{
|
||||
_T("single"),
|
||||
_T("extended"),
|
||||
_T("multiple"),
|
||||
wxT("single"),
|
||||
wxT("extended"),
|
||||
wxT("multiple"),
|
||||
};
|
||||
|
||||
m_chkSort = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Sort items"));
|
||||
m_chkSort = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("&Sort items"));
|
||||
|
||||
wxButton *btn = new wxButton(this, ChoicePage_Reset, _T("&Reset"));
|
||||
wxButton *btn = new wxButton(this, ChoicePage_Reset, wxT("&Reset"));
|
||||
sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
|
||||
|
||||
// middle pane
|
||||
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY,
|
||||
_T("&Change choice contents"));
|
||||
wxT("&Change choice contents"));
|
||||
wxSizer *sizerMiddle = new wxStaticBoxSizer(box2, wxVERTICAL);
|
||||
|
||||
wxSizer *sizerRow = new wxBoxSizer(wxHORIZONTAL);
|
||||
btn = new wxButton(this, ChoicePage_Add, _T("&Add this string"));
|
||||
m_textAdd = new wxTextCtrl(this, ChoicePage_AddText, _T("test item 0"));
|
||||
btn = new wxButton(this, ChoicePage_Add, wxT("&Add this string"));
|
||||
m_textAdd = new wxTextCtrl(this, ChoicePage_AddText, wxT("test item 0"));
|
||||
sizerRow->Add(btn, 0, wxRIGHT, 5);
|
||||
sizerRow->Add(m_textAdd, 1, wxLEFT, 5);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, ChoicePage_AddSeveral, _T("&Insert a few strings"));
|
||||
btn = new wxButton(this, ChoicePage_AddSeveral, wxT("&Insert a few strings"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, ChoicePage_AddMany, _T("Add &many strings"));
|
||||
btn = new wxButton(this, ChoicePage_AddMany, wxT("Add &many strings"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = new wxBoxSizer(wxHORIZONTAL);
|
||||
btn = new wxButton(this, ChoicePage_Change, _T("C&hange current"));
|
||||
btn = new wxButton(this, ChoicePage_Change, wxT("C&hange current"));
|
||||
m_textChange = new wxTextCtrl(this, ChoicePage_ChangeText, wxEmptyString);
|
||||
sizerRow->Add(btn, 0, wxRIGHT, 5);
|
||||
sizerRow->Add(m_textChange, 1, wxLEFT, 5);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = new wxBoxSizer(wxHORIZONTAL);
|
||||
btn = new wxButton(this, ChoicePage_Delete, _T("&Delete this item"));
|
||||
btn = new wxButton(this, ChoicePage_Delete, wxT("&Delete this item"));
|
||||
m_textDelete = new wxTextCtrl(this, ChoicePage_DeleteText, wxEmptyString);
|
||||
sizerRow->Add(btn, 0, wxRIGHT, 5);
|
||||
sizerRow->Add(m_textDelete, 1, wxLEFT, 5);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, ChoicePage_DeleteSel, _T("Delete &selection"));
|
||||
btn = new wxButton(this, ChoicePage_DeleteSel, wxT("Delete &selection"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, ChoicePage_Clear, _T("&Clear"));
|
||||
btn = new wxButton(this, ChoicePage_Clear, wxT("&Clear"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, ChoicePage_ContainerTests, _T("Run &tests"));
|
||||
btn = new wxButton(this, ChoicePage_ContainerTests, wxT("Run &tests"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
// right pane
|
||||
@@ -380,7 +380,7 @@ void ChoiceWidgetsPage::OnButtonAdd(wxCommandEvent& WXUNUSED(event))
|
||||
if ( !m_textAdd->IsModified() )
|
||||
{
|
||||
// update the default string
|
||||
m_textAdd->SetValue(wxString::Format(_T("test item %u"), ++s_item));
|
||||
m_textAdd->SetValue(wxString::Format(wxT("test item %u"), ++s_item));
|
||||
}
|
||||
|
||||
m_choice->Append(s);
|
||||
@@ -392,7 +392,7 @@ void ChoiceWidgetsPage::OnButtonAddMany(wxCommandEvent& WXUNUSED(event))
|
||||
wxArrayString strings;
|
||||
for ( unsigned int n = 0; n < 1000; n++ )
|
||||
{
|
||||
strings.Add(wxString::Format(_T("item #%u"), n));
|
||||
strings.Add(wxString::Format(wxT("item #%u"), n));
|
||||
}
|
||||
m_choice->Append(strings);
|
||||
}
|
||||
@@ -400,9 +400,9 @@ void ChoiceWidgetsPage::OnButtonAddMany(wxCommandEvent& WXUNUSED(event))
|
||||
void ChoiceWidgetsPage::OnButtonAddSeveral(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxArrayString items;
|
||||
items.Add(_T("First"));
|
||||
items.Add(_T("another one"));
|
||||
items.Add(_T("and the last (very very very very very very very very very very long) one"));
|
||||
items.Add(wxT("First"));
|
||||
items.Add(wxT("another one"));
|
||||
items.Add(wxT("and the last (very very very very very very very very very very long) one"));
|
||||
m_choice->Insert(items, 0);
|
||||
}
|
||||
|
||||
@@ -437,9 +437,9 @@ void ChoiceWidgetsPage::OnUpdateUIAddSeveral(wxUpdateUIEvent& event)
|
||||
void ChoiceWidgetsPage::OnChoice(wxCommandEvent& event)
|
||||
{
|
||||
long sel = event.GetSelection();
|
||||
m_textDelete->SetValue(wxString::Format(_T("%ld"), sel));
|
||||
m_textDelete->SetValue(wxString::Format(wxT("%ld"), sel));
|
||||
|
||||
wxLogMessage(_T("Choice item %ld selected"), sel);
|
||||
wxLogMessage(wxT("Choice item %ld selected"), sel);
|
||||
}
|
||||
|
||||
void ChoiceWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& WXUNUSED(event))
|
||||
|
@@ -129,7 +129,7 @@ END_EVENT_TABLE()
|
||||
#define FAMILY_CTRLS GENERIC_CTRLS
|
||||
#endif
|
||||
|
||||
IMPLEMENT_WIDGETS_PAGE(ColourPickerWidgetsPage, _T("ColourPicker"),
|
||||
IMPLEMENT_WIDGETS_PAGE(ColourPickerWidgetsPage, wxT("ColourPicker"),
|
||||
PICKER_CTRLS | FAMILY_CTRLS);
|
||||
|
||||
ColourPickerWidgetsPage::ColourPickerWidgetsPage(WidgetsBookCtrl *book,
|
||||
@@ -143,12 +143,12 @@ void ColourPickerWidgetsPage::CreateContent()
|
||||
// left pane
|
||||
wxSizer *boxleft = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
wxStaticBoxSizer *clrbox = new wxStaticBoxSizer(wxVERTICAL, this, _T("&ColourPicker style"));
|
||||
m_chkColourTextCtrl = CreateCheckBoxAndAddToSizer(clrbox, _T("With textctrl"), false);
|
||||
m_chkColourShowLabel = CreateCheckBoxAndAddToSizer(clrbox, _T("With label"), false);
|
||||
wxStaticBoxSizer *clrbox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("&ColourPicker style"));
|
||||
m_chkColourTextCtrl = CreateCheckBoxAndAddToSizer(clrbox, wxT("With textctrl"), false);
|
||||
m_chkColourShowLabel = CreateCheckBoxAndAddToSizer(clrbox, wxT("With label"), false);
|
||||
boxleft->Add(clrbox, 0, wxALL|wxGROW, 5);
|
||||
|
||||
boxleft->Add(new wxButton(this, PickerPage_Reset, _T("&Reset")),
|
||||
boxleft->Add(new wxButton(this, PickerPage_Reset, wxT("&Reset")),
|
||||
0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
|
||||
|
||||
Reset(); // set checkboxes state
|
||||
|
@@ -220,7 +220,7 @@ END_EVENT_TABLE()
|
||||
#define FAMILY_CTRLS NATIVE_CTRLS
|
||||
#endif
|
||||
|
||||
IMPLEMENT_WIDGETS_PAGE(ComboboxWidgetsPage, _T("Combobox"),
|
||||
IMPLEMENT_WIDGETS_PAGE(ComboboxWidgetsPage, wxT("Combobox"),
|
||||
FAMILY_CTRLS | WITH_ITEMS_CTRLS | COMBO_CTRLS
|
||||
);
|
||||
|
||||
@@ -248,50 +248,50 @@ void ComboboxWidgetsPage::CreateContent()
|
||||
wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
||||
// left pane
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY, _T("&Set style"));
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY, wxT("&Set style"));
|
||||
|
||||
// should be in sync with ComboKind_XXX values
|
||||
static const wxString kinds[] =
|
||||
{
|
||||
_T("default"),
|
||||
_T("simple"),
|
||||
_T("drop down"),
|
||||
wxT("default"),
|
||||
wxT("simple"),
|
||||
wxT("drop down"),
|
||||
};
|
||||
|
||||
m_radioKind = new wxRadioBox(this, wxID_ANY, _T("Combobox &kind:"),
|
||||
m_radioKind = new wxRadioBox(this, wxID_ANY, wxT("Combobox &kind:"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
WXSIZEOF(kinds), kinds,
|
||||
1, wxRA_SPECIFY_COLS);
|
||||
|
||||
wxSizer *sizerLeft = new wxStaticBoxSizer(box, wxVERTICAL);
|
||||
|
||||
m_chkSort = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Sort items"));
|
||||
m_chkReadonly = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Read only"));
|
||||
m_chkFilename = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&File name"));
|
||||
m_chkSort = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("&Sort items"));
|
||||
m_chkReadonly = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("&Read only"));
|
||||
m_chkFilename = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("&File name"));
|
||||
m_chkFilename->Disable(); // not implemented yet
|
||||
|
||||
sizerLeft->Add(5, 5, 0, wxGROW | wxALL, 5); // spacer
|
||||
sizerLeft->Add(m_radioKind, 0, wxGROW | wxALL, 5);
|
||||
|
||||
wxButton *btn = new wxButton(this, ComboPage_Reset, _T("&Reset"));
|
||||
wxButton *btn = new wxButton(this, ComboPage_Reset, wxT("&Reset"));
|
||||
sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
|
||||
|
||||
// middle pane
|
||||
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY,
|
||||
_T("&Change combobox contents"));
|
||||
wxT("&Change combobox contents"));
|
||||
wxSizer *sizerMiddle = new wxStaticBoxSizer(box2, wxVERTICAL);
|
||||
|
||||
wxSizer *sizerRow;
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(ComboPage_SetCurrent,
|
||||
_T("Current &selection"),
|
||||
wxT("Current &selection"),
|
||||
ComboPage_CurText,
|
||||
&m_textCur);
|
||||
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
wxTextCtrl *text;
|
||||
sizerRow = CreateSizerWithTextAndLabel(_T("Insertion Point"),
|
||||
sizerRow = CreateSizerWithTextAndLabel(wxT("Insertion Point"),
|
||||
ComboPage_InsertionPointText,
|
||||
&text);
|
||||
text->SetEditable(false);
|
||||
@@ -299,48 +299,48 @@ void ComboboxWidgetsPage::CreateContent()
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(ComboPage_Insert,
|
||||
_T("&Insert this string"),
|
||||
wxT("&Insert this string"),
|
||||
ComboPage_InsertText,
|
||||
&m_textInsert);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(ComboPage_Add,
|
||||
_T("&Add this string"),
|
||||
wxT("&Add this string"),
|
||||
ComboPage_AddText,
|
||||
&m_textAdd);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, ComboPage_AddSeveral, _T("&Append a few strings"));
|
||||
btn = new wxButton(this, ComboPage_AddSeveral, wxT("&Append a few strings"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, ComboPage_AddMany, _T("Append &many strings"));
|
||||
btn = new wxButton(this, ComboPage_AddMany, wxT("Append &many strings"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(ComboPage_Change,
|
||||
_T("C&hange current"),
|
||||
wxT("C&hange current"),
|
||||
ComboPage_ChangeText,
|
||||
&m_textChange);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(ComboPage_Delete,
|
||||
_T("&Delete this item"),
|
||||
wxT("&Delete this item"),
|
||||
ComboPage_DeleteText,
|
||||
&m_textDelete);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, ComboPage_DeleteSel, _T("Delete &selection"));
|
||||
btn = new wxButton(this, ComboPage_DeleteSel, wxT("Delete &selection"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, ComboPage_Clear, _T("&Clear"));
|
||||
btn = new wxButton(this, ComboPage_Clear, wxT("&Clear"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(ComboPage_SetValue,
|
||||
_T("SetValue"),
|
||||
wxT("SetValue"),
|
||||
ComboPage_SetValueText,
|
||||
&m_textSetValue);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, ComboPage_ContainerTests, _T("Run &tests"));
|
||||
btn = new wxButton(this, ComboPage_ContainerTests, wxT("Run &tests"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
|
||||
@@ -389,7 +389,7 @@ void ComboboxWidgetsPage::CreateCombo()
|
||||
switch ( m_radioKind->GetSelection() )
|
||||
{
|
||||
default:
|
||||
wxFAIL_MSG( _T("unknown combo kind") );
|
||||
wxFAIL_MSG( wxT("unknown combo kind") );
|
||||
// fall through
|
||||
|
||||
case ComboKind_Default:
|
||||
@@ -456,7 +456,7 @@ void ComboboxWidgetsPage::OnButtonChange(wxCommandEvent& WXUNUSED(event))
|
||||
#ifndef __WXGTK__
|
||||
m_combobox->SetString(sel, m_textChange->GetValue());
|
||||
#else
|
||||
wxLogMessage(_T("Not implemented in wxGTK"));
|
||||
wxLogMessage(wxT("Not implemented in wxGTK"));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -501,7 +501,7 @@ void ComboboxWidgetsPage::OnButtonInsert(wxCommandEvent& WXUNUSED(event))
|
||||
if ( !m_textInsert->IsModified() )
|
||||
{
|
||||
// update the default string
|
||||
m_textInsert->SetValue(wxString::Format(_T("test item %u"), ++s_item));
|
||||
m_textInsert->SetValue(wxString::Format(wxT("test item %u"), ++s_item));
|
||||
}
|
||||
|
||||
if (m_combobox->GetSelection() >= 0)
|
||||
@@ -516,7 +516,7 @@ void ComboboxWidgetsPage::OnButtonAdd(wxCommandEvent& WXUNUSED(event))
|
||||
if ( !m_textAdd->IsModified() )
|
||||
{
|
||||
// update the default string
|
||||
m_textAdd->SetValue(wxString::Format(_T("test item %u"), ++s_item));
|
||||
m_textAdd->SetValue(wxString::Format(wxT("test item %u"), ++s_item));
|
||||
}
|
||||
|
||||
m_combobox->Append(s);
|
||||
@@ -527,7 +527,7 @@ void ComboboxWidgetsPage::OnButtonAddMany(wxCommandEvent& WXUNUSED(event))
|
||||
// "many" means 1000 here
|
||||
for ( unsigned int n = 0; n < 1000; n++ )
|
||||
{
|
||||
m_combobox->Append(wxString::Format(_T("item #%u"), n));
|
||||
m_combobox->Append(wxString::Format(wxT("item #%u"), n));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -542,15 +542,15 @@ void ComboboxWidgetsPage::OnButtonSetCurrent(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
void ComboboxWidgetsPage::OnButtonAddSeveral(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
m_combobox->Append(_T("First"));
|
||||
m_combobox->Append(_T("another one"));
|
||||
m_combobox->Append(_T("and the last (very very very very very very very very very very long) one"));
|
||||
m_combobox->Append(wxT("First"));
|
||||
m_combobox->Append(wxT("another one"));
|
||||
m_combobox->Append(wxT("and the last (very very very very very very very very very very long) one"));
|
||||
}
|
||||
|
||||
void ComboboxWidgetsPage::OnUpdateUIInsertionPointText(wxUpdateUIEvent& event)
|
||||
{
|
||||
if (m_combobox)
|
||||
event.SetText( wxString::Format(_T("%ld"), m_combobox->GetInsertionPoint()) );
|
||||
event.SetText( wxString::Format(wxT("%ld"), m_combobox->GetInsertionPoint()) );
|
||||
}
|
||||
|
||||
void ComboboxWidgetsPage::OnUpdateUIResetButton(wxUpdateUIEvent& event)
|
||||
@@ -615,28 +615,28 @@ void ComboboxWidgetsPage::OnComboText(wxCommandEvent& event)
|
||||
wxString s = event.GetString();
|
||||
|
||||
wxASSERT_MSG( s == m_combobox->GetValue(),
|
||||
_T("event and combobox values should be the same") );
|
||||
wxT("event and combobox values should be the same") );
|
||||
|
||||
if (event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER)
|
||||
{
|
||||
wxLogMessage(_T("Combobox enter pressed (now '%s')"), s.c_str());
|
||||
wxLogMessage(wxT("Combobox enter pressed (now '%s')"), s.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogMessage(_T("Combobox text changed (now '%s')"), s.c_str());
|
||||
wxLogMessage(wxT("Combobox text changed (now '%s')"), s.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void ComboboxWidgetsPage::OnComboBox(wxCommandEvent& event)
|
||||
{
|
||||
long sel = event.GetInt();
|
||||
const wxString selstr = wxString::Format(_T("%ld"), sel);
|
||||
const wxString selstr = wxString::Format(wxT("%ld"), sel);
|
||||
m_textDelete->SetValue(selstr);
|
||||
m_textCur->SetValue(selstr);
|
||||
|
||||
wxLogMessage(_T("Combobox item %ld selected"), sel);
|
||||
wxLogMessage(wxT("Combobox item %ld selected"), sel);
|
||||
|
||||
wxLogMessage(_T("Combobox GetValue(): %s"), m_combobox->GetValue().c_str() );
|
||||
wxLogMessage(wxT("Combobox GetValue(): %s"), m_combobox->GetValue().c_str() );
|
||||
}
|
||||
|
||||
void ComboboxWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& WXUNUSED(event))
|
||||
@@ -646,12 +646,12 @@ void ComboboxWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
void ComboboxWidgetsPage::OnDropdown(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxLogMessage(_T("Combobox dropped down"));
|
||||
wxLogMessage(wxT("Combobox dropped down"));
|
||||
}
|
||||
|
||||
void ComboboxWidgetsPage::OnCloseup(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxLogMessage(_T("Combobox closed up"));
|
||||
wxLogMessage(wxT("Combobox closed up"));
|
||||
}
|
||||
|
||||
#endif //wxUSE_COMBOBOX
|
||||
|
@@ -185,9 +185,9 @@ void DatePickerWidgetsPage::Reset()
|
||||
const wxDateTime today = wxDateTime::Today();
|
||||
|
||||
m_datePicker->SetValue(today);
|
||||
m_day->SetValue(wxString::Format(_T("%d"), today.GetDay()));
|
||||
m_month->SetValue(wxString::Format(_T("%d"), today.GetMonth()));
|
||||
m_year->SetValue(wxString::Format(_T("%d"), today.GetYear()));
|
||||
m_day->SetValue(wxString::Format(wxT("%d"), today.GetDay()));
|
||||
m_month->SetValue(wxString::Format(wxT("%d"), today.GetMonth()));
|
||||
m_year->SetValue(wxString::Format(wxT("%d"), today.GetYear()));
|
||||
}
|
||||
|
||||
void DatePickerWidgetsPage::CreateDatePicker()
|
||||
@@ -237,12 +237,12 @@ void DatePickerWidgetsPage::OnButtonSet(wxCommandEvent& WXUNUSED(event))
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogError(_T("Date is invalid"));
|
||||
wxLogError(wxT("Date is invalid"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogError(_T("One of inputs is not number"));
|
||||
wxLogError(wxT("One of inputs is not number"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -61,16 +61,16 @@ enum
|
||||
|
||||
static const wxString stdPaths[] =
|
||||
{
|
||||
_T("&none"),
|
||||
_T("&config"),
|
||||
_T("&data"),
|
||||
_T("&documents"),
|
||||
_T("&local data"),
|
||||
_T("&plugins"),
|
||||
_T("&resources"),
|
||||
_T("&user config"),
|
||||
_T("&user data"),
|
||||
_T("&user local data")
|
||||
wxT("&none"),
|
||||
wxT("&config"),
|
||||
wxT("&data"),
|
||||
wxT("&documents"),
|
||||
wxT("&local data"),
|
||||
wxT("&plugins"),
|
||||
wxT("&resources"),
|
||||
wxT("&user config"),
|
||||
wxT("&user data"),
|
||||
wxT("&user local data")
|
||||
};
|
||||
|
||||
enum
|
||||
@@ -182,30 +182,30 @@ void DirCtrlWidgetsPage::CreateContent()
|
||||
0, wxALL | wxALIGN_RIGHT , 5 );
|
||||
|
||||
wxSizer *sizerUseFlags =
|
||||
new wxStaticBoxSizer(wxVERTICAL, this, _T("&Flags"));
|
||||
m_chkDirOnly = CreateCheckBoxAndAddToSizer(sizerUseFlags, _T("wxDIRCTRL_DIR_ONLY"));
|
||||
m_chk3D = CreateCheckBoxAndAddToSizer(sizerUseFlags, _T("wxDIRCTRL_3D_INTERNAL"));
|
||||
m_chkFirst = CreateCheckBoxAndAddToSizer(sizerUseFlags, _T("wxDIRCTRL_SELECT_FIRST"));
|
||||
m_chkLabels = CreateCheckBoxAndAddToSizer(sizerUseFlags, _T("wxDIRCTRL_EDIT_LABELS"));
|
||||
m_chkMulti = CreateCheckBoxAndAddToSizer(sizerUseFlags, _T("wxDIRCTRL_MULTIPLE"));
|
||||
new wxStaticBoxSizer(wxVERTICAL, this, wxT("&Flags"));
|
||||
m_chkDirOnly = CreateCheckBoxAndAddToSizer(sizerUseFlags, wxT("wxDIRCTRL_DIR_ONLY"));
|
||||
m_chk3D = CreateCheckBoxAndAddToSizer(sizerUseFlags, wxT("wxDIRCTRL_3D_INTERNAL"));
|
||||
m_chkFirst = CreateCheckBoxAndAddToSizer(sizerUseFlags, wxT("wxDIRCTRL_SELECT_FIRST"));
|
||||
m_chkLabels = CreateCheckBoxAndAddToSizer(sizerUseFlags, wxT("wxDIRCTRL_EDIT_LABELS"));
|
||||
m_chkMulti = CreateCheckBoxAndAddToSizer(sizerUseFlags, wxT("wxDIRCTRL_MULTIPLE"));
|
||||
sizerLeft->Add(sizerUseFlags, wxSizerFlags().Expand().Border());
|
||||
|
||||
wxSizer *sizerFilters =
|
||||
new wxStaticBoxSizer(wxVERTICAL, this, _T("&Filters"));
|
||||
new wxStaticBoxSizer(wxVERTICAL, this, wxT("&Filters"));
|
||||
m_fltr[0] = CreateCheckBoxAndAddToSizer(sizerFilters, wxString::Format(wxT("all files (%s)|%s"),
|
||||
wxFileSelectorDefaultWildcardStr, wxFileSelectorDefaultWildcardStr));
|
||||
m_fltr[1] = CreateCheckBoxAndAddToSizer(sizerFilters, wxT("C++ files (*.cpp; *.h)|*.cpp;*.h"));
|
||||
m_fltr[2] = CreateCheckBoxAndAddToSizer(sizerFilters, wxT("PNG images (*.png)|*.png"));
|
||||
sizerLeft->Add(sizerFilters, wxSizerFlags().Expand().Border());
|
||||
|
||||
wxButton *btn = new wxButton(this, DirCtrlPage_Reset, _T("&Reset"));
|
||||
wxButton *btn = new wxButton(this, DirCtrlPage_Reset, wxT("&Reset"));
|
||||
sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
|
||||
|
||||
// keep consistency between enum and labels of radiobox
|
||||
wxCOMPILE_TIME_ASSERT( stdPathMax == WXSIZEOF(stdPaths), EnumForRadioBoxMismatch);
|
||||
|
||||
// middle pane
|
||||
m_radioStdPath = new wxRadioBox(this, wxID_ANY, _T("Standard path"),
|
||||
m_radioStdPath = new wxRadioBox(this, wxID_ANY, wxT("Standard path"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
WXSIZEOF(stdPaths), stdPaths, 1);
|
||||
|
||||
@@ -300,7 +300,7 @@ void DirCtrlWidgetsPage::OnRadioBox(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxString path;
|
||||
|
||||
wxTheApp->SetAppName(_T("widgets"));
|
||||
wxTheApp->SetAppName(wxT("widgets"));
|
||||
wxStandardPathsBase& stdp = wxStandardPaths::Get();
|
||||
|
||||
switch ( m_radioStdPath->GetSelection() )
|
||||
@@ -351,7 +351,7 @@ void DirCtrlWidgetsPage::OnRadioBox(wxCommandEvent& WXUNUSED(event))
|
||||
m_dirCtrl->SetPath(path);
|
||||
if(!m_dirCtrl->GetPath().IsSameAs(path))
|
||||
{
|
||||
wxLogMessage(_T("Selected standard path and path from control do not match!"));
|
||||
wxLogMessage(wxT("Selected standard path and path from control do not match!"));
|
||||
m_radioStdPath->SetSelection(stdPathUnknown);
|
||||
}
|
||||
}
|
||||
|
@@ -130,7 +130,7 @@ END_EVENT_TABLE()
|
||||
#define FAMILY_CTRLS GENERIC_CTRLS
|
||||
#endif
|
||||
|
||||
IMPLEMENT_WIDGETS_PAGE(DirPickerWidgetsPage, _T("DirPicker"),
|
||||
IMPLEMENT_WIDGETS_PAGE(DirPickerWidgetsPage, wxT("DirPicker"),
|
||||
PICKER_CTRLS | FAMILY_CTRLS);
|
||||
|
||||
DirPickerWidgetsPage::DirPickerWidgetsPage(WidgetsBookCtrl *book,
|
||||
@@ -144,13 +144,13 @@ void DirPickerWidgetsPage::CreateContent()
|
||||
// left pane
|
||||
wxSizer *boxleft = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
wxStaticBoxSizer *dirbox = new wxStaticBoxSizer(wxVERTICAL, this, _T("&DirPicker style"));
|
||||
m_chkDirTextCtrl = CreateCheckBoxAndAddToSizer(dirbox, _T("With textctrl"), false);
|
||||
m_chkDirMustExist = CreateCheckBoxAndAddToSizer(dirbox, _T("Dir must exist"), false);
|
||||
m_chkDirChangeDir = CreateCheckBoxAndAddToSizer(dirbox, _T("Change working dir"), false);
|
||||
wxStaticBoxSizer *dirbox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("&DirPicker style"));
|
||||
m_chkDirTextCtrl = CreateCheckBoxAndAddToSizer(dirbox, wxT("With textctrl"), false);
|
||||
m_chkDirMustExist = CreateCheckBoxAndAddToSizer(dirbox, wxT("Dir must exist"), false);
|
||||
m_chkDirChangeDir = CreateCheckBoxAndAddToSizer(dirbox, wxT("Change working dir"), false);
|
||||
boxleft->Add(dirbox, 0, wxALL|wxGROW, 5);
|
||||
|
||||
boxleft->Add(new wxButton(this, PickerPage_Reset, _T("&Reset")),
|
||||
boxleft->Add(new wxButton(this, PickerPage_Reset, wxT("&Reset")),
|
||||
0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
|
||||
|
||||
Reset(); // set checkboxes state
|
||||
|
@@ -116,7 +116,7 @@ END_EVENT_TABLE()
|
||||
// implementation
|
||||
// ============================================================================
|
||||
|
||||
IMPLEMENT_WIDGETS_PAGE(EditableListboxWidgetsPage, _T("EditableListbox"), GENERIC_CTRLS);
|
||||
IMPLEMENT_WIDGETS_PAGE(EditableListboxWidgetsPage, wxT("EditableListbox"), GENERIC_CTRLS);
|
||||
|
||||
EditableListboxWidgetsPage::EditableListboxWidgetsPage(WidgetsBookCtrl *book,
|
||||
wxImageList *imaglist)
|
||||
@@ -135,15 +135,15 @@ void EditableListboxWidgetsPage::CreateContent()
|
||||
|
||||
// left pane
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY,
|
||||
_T("&Set listbox parameters"));
|
||||
wxT("&Set listbox parameters"));
|
||||
wxSizer *sizerLeft = new wxStaticBoxSizer(box, wxVERTICAL);
|
||||
|
||||
m_chkAllowNew = CreateCheckBoxAndAddToSizer(sizerLeft, _T("Allow new items"));
|
||||
m_chkAllowEdit = CreateCheckBoxAndAddToSizer(sizerLeft, _T("Allow editing items"));
|
||||
m_chkAllowDelete = CreateCheckBoxAndAddToSizer(sizerLeft, _T("Allow deleting items"));
|
||||
m_chkAllowNoReorder = CreateCheckBoxAndAddToSizer(sizerLeft, _T("Block user reordering"));
|
||||
m_chkAllowNew = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("Allow new items"));
|
||||
m_chkAllowEdit = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("Allow editing items"));
|
||||
m_chkAllowDelete = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("Allow deleting items"));
|
||||
m_chkAllowNoReorder = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("Block user reordering"));
|
||||
|
||||
wxButton *btn = new wxButton(this, EditableListboxPage_Reset, _T("&Reset"));
|
||||
wxButton *btn = new wxButton(this, EditableListboxPage_Reset, wxT("&Reset"));
|
||||
sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
|
||||
|
||||
// right pane
|
||||
|
@@ -177,21 +177,21 @@ void FileCtrlWidgetsPage::CreateContent()
|
||||
0, wxALL | wxEXPAND , 5 );
|
||||
|
||||
wxSizer *sizerUseFlags =
|
||||
new wxStaticBoxSizer( wxVERTICAL, this, _T( "&Flags" ) );
|
||||
new wxStaticBoxSizer( wxVERTICAL, this, wxT( "&Flags" ) );
|
||||
|
||||
m_chkMultiple = CreateCheckBoxAndAddToSizer( sizerUseFlags, _T( "wxFC_MULTIPLE" ) );
|
||||
m_chkNoShowHidden = CreateCheckBoxAndAddToSizer( sizerUseFlags, _T( "wxFC_NOSHOWHIDDEN" ) );
|
||||
m_chkMultiple = CreateCheckBoxAndAddToSizer( sizerUseFlags, wxT( "wxFC_MULTIPLE" ) );
|
||||
m_chkNoShowHidden = CreateCheckBoxAndAddToSizer( sizerUseFlags, wxT( "wxFC_NOSHOWHIDDEN" ) );
|
||||
sizerLeft->Add( sizerUseFlags, wxSizerFlags().Expand().Border() );
|
||||
|
||||
wxSizer *sizerFilters =
|
||||
new wxStaticBoxSizer( wxVERTICAL, this, _T( "&Filters" ) );
|
||||
new wxStaticBoxSizer( wxVERTICAL, this, wxT( "&Filters" ) );
|
||||
m_fltr[0] = CreateCheckBoxAndAddToSizer( sizerFilters, wxString::Format( wxT( "all files (%s)|%s" ),
|
||||
wxFileSelectorDefaultWildcardStr, wxFileSelectorDefaultWildcardStr ) );
|
||||
m_fltr[1] = CreateCheckBoxAndAddToSizer( sizerFilters, wxT( "C++ files (*.cpp; *.h)|*.cpp;*.h" ) );
|
||||
m_fltr[2] = CreateCheckBoxAndAddToSizer( sizerFilters, wxT( "PNG images (*.png)|*.png" ) );
|
||||
sizerLeft->Add( sizerFilters, wxSizerFlags().Expand().Border() );
|
||||
|
||||
wxButton *btn = new wxButton( this, FileCtrlPage_Reset, _T( "&Reset" ) );
|
||||
wxButton *btn = new wxButton( this, FileCtrlPage_Reset, wxT( "&Reset" ) );
|
||||
sizerLeft->Add( btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15 );
|
||||
|
||||
// right pane
|
||||
|
@@ -144,7 +144,7 @@ END_EVENT_TABLE()
|
||||
#define FAMILY_CTRLS GENERIC_CTRLS
|
||||
#endif
|
||||
|
||||
IMPLEMENT_WIDGETS_PAGE(FilePickerWidgetsPage, _T("FilePicker"),
|
||||
IMPLEMENT_WIDGETS_PAGE(FilePickerWidgetsPage, wxT("FilePicker"),
|
||||
PICKER_CTRLS | FAMILY_CTRLS);
|
||||
|
||||
FilePickerWidgetsPage::FilePickerWidgetsPage(WidgetsBookCtrl *book,
|
||||
@@ -158,20 +158,20 @@ void FilePickerWidgetsPage::CreateContent()
|
||||
// left pane
|
||||
wxSizer *boxleft = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
static const wxString mode[] = { _T("open"), _T("save") };
|
||||
m_radioFilePickerMode = new wxRadioBox(this, wxID_ANY, _T("wxFilePicker mode"),
|
||||
static const wxString mode[] = { wxT("open"), wxT("save") };
|
||||
m_radioFilePickerMode = new wxRadioBox(this, wxID_ANY, wxT("wxFilePicker mode"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
WXSIZEOF(mode), mode);
|
||||
boxleft->Add(m_radioFilePickerMode, 0, wxALL|wxGROW, 5);
|
||||
|
||||
wxStaticBoxSizer *filebox = new wxStaticBoxSizer(wxVERTICAL, this, _T("&FilePicker style"));
|
||||
m_chkFileTextCtrl = CreateCheckBoxAndAddToSizer(filebox, _T("With textctrl"), false);
|
||||
m_chkFileOverwritePrompt = CreateCheckBoxAndAddToSizer(filebox, _T("Overwrite prompt"), false);
|
||||
m_chkFileMustExist = CreateCheckBoxAndAddToSizer(filebox, _T("File must exist"), false);
|
||||
m_chkFileChangeDir = CreateCheckBoxAndAddToSizer(filebox, _T("Change working dir"), false);
|
||||
wxStaticBoxSizer *filebox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("&FilePicker style"));
|
||||
m_chkFileTextCtrl = CreateCheckBoxAndAddToSizer(filebox, wxT("With textctrl"), false);
|
||||
m_chkFileOverwritePrompt = CreateCheckBoxAndAddToSizer(filebox, wxT("Overwrite prompt"), false);
|
||||
m_chkFileMustExist = CreateCheckBoxAndAddToSizer(filebox, wxT("File must exist"), false);
|
||||
m_chkFileChangeDir = CreateCheckBoxAndAddToSizer(filebox, wxT("Change working dir"), false);
|
||||
boxleft->Add(filebox, 0, wxALL|wxGROW, 5);
|
||||
|
||||
boxleft->Add(new wxButton(this, PickerPage_Reset, _T("&Reset")),
|
||||
boxleft->Add(new wxButton(this, PickerPage_Reset, wxT("&Reset")),
|
||||
0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
|
||||
|
||||
Reset(); // set checkboxes state
|
||||
|
@@ -130,7 +130,7 @@ END_EVENT_TABLE()
|
||||
#define FAMILY_CTRLS GENERIC_CTRLS
|
||||
#endif
|
||||
|
||||
IMPLEMENT_WIDGETS_PAGE(FontPickerWidgetsPage, _T("FontPicker"),
|
||||
IMPLEMENT_WIDGETS_PAGE(FontPickerWidgetsPage, wxT("FontPicker"),
|
||||
PICKER_CTRLS | FAMILY_CTRLS);
|
||||
|
||||
FontPickerWidgetsPage::FontPickerWidgetsPage(WidgetsBookCtrl *book,
|
||||
@@ -144,13 +144,13 @@ void FontPickerWidgetsPage::CreateContent()
|
||||
// left pane
|
||||
wxSizer *boxleft = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
wxStaticBoxSizer *fontbox = new wxStaticBoxSizer(wxVERTICAL, this, _T("&FontPicker style"));
|
||||
m_chkFontTextCtrl = CreateCheckBoxAndAddToSizer(fontbox, _T("With textctrl"));
|
||||
m_chkFontDescAsLabel = CreateCheckBoxAndAddToSizer(fontbox, _T("Font desc as btn label"));
|
||||
m_chkFontUseFontForLabel = CreateCheckBoxAndAddToSizer(fontbox, _T("Use font for label"), false);
|
||||
wxStaticBoxSizer *fontbox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("&FontPicker style"));
|
||||
m_chkFontTextCtrl = CreateCheckBoxAndAddToSizer(fontbox, wxT("With textctrl"));
|
||||
m_chkFontDescAsLabel = CreateCheckBoxAndAddToSizer(fontbox, wxT("Font desc as btn label"));
|
||||
m_chkFontUseFontForLabel = CreateCheckBoxAndAddToSizer(fontbox, wxT("Use font for label"), false);
|
||||
boxleft->Add(fontbox, 0, wxALL|wxGROW, 5);
|
||||
|
||||
boxleft->Add(new wxButton(this, PickerPage_Reset, _T("&Reset")),
|
||||
boxleft->Add(new wxButton(this, PickerPage_Reset, wxT("&Reset")),
|
||||
0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
|
||||
|
||||
Reset(); // set checkboxes state
|
||||
|
@@ -175,7 +175,7 @@ END_EVENT_TABLE()
|
||||
#define FAMILY_CTRLS NATIVE_CTRLS
|
||||
#endif
|
||||
|
||||
IMPLEMENT_WIDGETS_PAGE(GaugeWidgetsPage, _T("Gauge"), FAMILY_CTRLS );
|
||||
IMPLEMENT_WIDGETS_PAGE(GaugeWidgetsPage, wxT("Gauge"), FAMILY_CTRLS );
|
||||
|
||||
GaugeWidgetsPage::GaugeWidgetsPage(WidgetsBookCtrl *book,
|
||||
wxImageList *imaglist)
|
||||
@@ -198,24 +198,24 @@ void GaugeWidgetsPage::CreateContent()
|
||||
wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
||||
// left pane
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY, _T("&Set style"));
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY, wxT("&Set style"));
|
||||
|
||||
wxSizer *sizerLeft = new wxStaticBoxSizer(box, wxVERTICAL);
|
||||
|
||||
m_chkVert = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Vertical"));
|
||||
m_chkSmooth = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Smooth"));
|
||||
m_chkVert = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("&Vertical"));
|
||||
m_chkSmooth = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("&Smooth"));
|
||||
|
||||
sizerLeft->Add(5, 5, 0, wxGROW | wxALL, 5); // spacer
|
||||
|
||||
wxButton *btn = new wxButton(this, GaugePage_Reset, _T("&Reset"));
|
||||
wxButton *btn = new wxButton(this, GaugePage_Reset, wxT("&Reset"));
|
||||
sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
|
||||
|
||||
// middle pane
|
||||
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY, _T("&Change gauge value"));
|
||||
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY, wxT("&Change gauge value"));
|
||||
wxSizer *sizerMiddle = new wxStaticBoxSizer(box2, wxVERTICAL);
|
||||
|
||||
wxTextCtrl *text;
|
||||
wxSizer *sizerRow = CreateSizerWithTextAndLabel(_T("Current value"),
|
||||
wxSizer *sizerRow = CreateSizerWithTextAndLabel(wxT("Current value"),
|
||||
GaugePage_CurValueText,
|
||||
&text);
|
||||
text->SetEditable(false);
|
||||
@@ -223,26 +223,26 @@ void GaugeWidgetsPage::CreateContent()
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(GaugePage_SetValue,
|
||||
_T("Set &value"),
|
||||
wxT("Set &value"),
|
||||
GaugePage_ValueText,
|
||||
&m_textValue);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(GaugePage_SetRange,
|
||||
_T("Set &range"),
|
||||
wxT("Set &range"),
|
||||
GaugePage_RangeText,
|
||||
&m_textRange);
|
||||
m_textRange->SetValue( wxString::Format(_T("%lu"), m_range) );
|
||||
m_textRange->SetValue( wxString::Format(wxT("%lu"), m_range) );
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, GaugePage_Progress, _T("Simulate &progress"));
|
||||
btn = new wxButton(this, GaugePage_Progress, wxT("Simulate &progress"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, GaugePage_IndeterminateProgress,
|
||||
_T("Simulate &indeterminate job"));
|
||||
wxT("Simulate &indeterminate job"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, GaugePage_Clear, _T("&Clear"));
|
||||
btn = new wxButton(this, GaugePage_Clear, wxT("&Clear"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
// right pane
|
||||
@@ -316,13 +316,13 @@ void GaugeWidgetsPage::StartTimer(wxButton *clicked)
|
||||
{
|
||||
static const int INTERVAL = 300;
|
||||
|
||||
wxLogMessage(_T("Launched progress timer (interval = %d ms)"), INTERVAL);
|
||||
wxLogMessage(wxT("Launched progress timer (interval = %d ms)"), INTERVAL);
|
||||
|
||||
m_timer = new wxTimer(this,
|
||||
clicked->GetId() == GaugePage_Progress ? GaugePage_Timer : GaugePage_IndeterminateTimer);
|
||||
m_timer->Start(INTERVAL);
|
||||
|
||||
clicked->SetLabel(_T("&Stop timer"));
|
||||
clicked->SetLabel(wxT("&Stop timer"));
|
||||
|
||||
if (clicked->GetId() == GaugePage_Progress)
|
||||
FindWindow(GaugePage_IndeterminateProgress)->Disable();
|
||||
@@ -332,7 +332,7 @@ void GaugeWidgetsPage::StartTimer(wxButton *clicked)
|
||||
|
||||
void GaugeWidgetsPage::StopTimer(wxButton *clicked)
|
||||
{
|
||||
wxCHECK_RET( m_timer, _T("shouldn't be called") );
|
||||
wxCHECK_RET( m_timer, wxT("shouldn't be called") );
|
||||
|
||||
m_timer->Stop();
|
||||
delete m_timer;
|
||||
@@ -340,16 +340,16 @@ void GaugeWidgetsPage::StopTimer(wxButton *clicked)
|
||||
|
||||
if (clicked->GetId() == GaugePage_Progress)
|
||||
{
|
||||
clicked->SetLabel(_T("Simulate &progress"));
|
||||
clicked->SetLabel(wxT("Simulate &progress"));
|
||||
FindWindow(GaugePage_IndeterminateProgress)->Enable();
|
||||
}
|
||||
else
|
||||
{
|
||||
clicked->SetLabel(_T("Simulate indeterminate job"));
|
||||
clicked->SetLabel(wxT("Simulate indeterminate job"));
|
||||
FindWindow(GaugePage_Progress)->Enable();
|
||||
}
|
||||
|
||||
wxLogMessage(_T("Progress finished."));
|
||||
wxLogMessage(wxT("Progress finished."));
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -374,7 +374,7 @@ void GaugeWidgetsPage::OnButtonProgress(wxCommandEvent& event)
|
||||
{
|
||||
StopTimer(b);
|
||||
|
||||
wxLogMessage(_T("Stopped the timer."));
|
||||
wxLogMessage(wxT("Stopped the timer."));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -389,7 +389,7 @@ void GaugeWidgetsPage::OnButtonIndeterminateProgress(wxCommandEvent& event)
|
||||
{
|
||||
StopTimer(b);
|
||||
|
||||
wxLogMessage(_T("Stopped the timer."));
|
||||
wxLogMessage(wxT("Stopped the timer."));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -449,7 +449,7 @@ void GaugeWidgetsPage::OnProgressTimer(wxTimerEvent& WXUNUSED(event))
|
||||
else // reached the end
|
||||
{
|
||||
wxButton *btn = (wxButton *)FindWindow(GaugePage_Progress);
|
||||
wxCHECK_RET( btn, _T("no progress button?") );
|
||||
wxCHECK_RET( btn, wxT("no progress button?") );
|
||||
|
||||
StopTimer(btn);
|
||||
}
|
||||
@@ -462,7 +462,7 @@ void GaugeWidgetsPage::OnIndeterminateProgressTimer(wxTimerEvent& WXUNUSED(event
|
||||
|
||||
void GaugeWidgetsPage::OnUpdateUICurValueText(wxUpdateUIEvent& event)
|
||||
{
|
||||
event.SetText( wxString::Format(_T("%d"), m_gauge->GetValue()));
|
||||
event.SetText( wxString::Format(wxT("%d"), m_gauge->GetValue()));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -167,14 +167,14 @@ void HyperlinkWidgetsPage::CreateContent()
|
||||
|
||||
static const wxString alignments[] =
|
||||
{
|
||||
_T("&left"),
|
||||
_T("¢re"),
|
||||
_T("&right")
|
||||
wxT("&left"),
|
||||
wxT("¢re"),
|
||||
wxT("&right")
|
||||
};
|
||||
wxCOMPILE_TIME_ASSERT( WXSIZEOF(alignments) == Align_Max,
|
||||
AlignMismatch );
|
||||
|
||||
m_radioAlignMode = new wxRadioBox(this, wxID_ANY, _T("alignment"),
|
||||
m_radioAlignMode = new wxRadioBox(this, wxID_ANY, wxT("alignment"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
WXSIZEOF(alignments), alignments);
|
||||
m_radioAlignMode->SetSelection(1); // start with "centre" selected since
|
||||
@@ -304,7 +304,7 @@ void HyperlinkWidgetsPage::OnAlignment(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
default:
|
||||
case Align_Max:
|
||||
wxFAIL_MSG( _T("unknown alignment") );
|
||||
wxFAIL_MSG( wxT("unknown alignment") );
|
||||
// fall through
|
||||
|
||||
case Align_Left:
|
||||
|
@@ -71,12 +71,12 @@ ItemContainerWidgetsPage::ItemContainerWidgetsPage(WidgetsBookCtrl *book,
|
||||
const char *const icon[])
|
||||
: WidgetsPage(book, image_list, icon), m_trackedDataObjects(0)
|
||||
{
|
||||
m_items.Add(_T("This"));
|
||||
m_items.Add(_T("is"));
|
||||
m_items.Add(_T("a"));
|
||||
m_items.Add(_T("List"));
|
||||
m_items.Add(_T("of"));
|
||||
m_items.Add(_T("strings"));
|
||||
m_items.Add(wxT("This"));
|
||||
m_items.Add(wxT("is"));
|
||||
m_items.Add(wxT("a"));
|
||||
m_items.Add(wxT("List"));
|
||||
m_items.Add(wxT("of"));
|
||||
m_items.Add(wxT("strings"));
|
||||
m_itemsSorted = m_items;
|
||||
}
|
||||
|
||||
@@ -103,11 +103,11 @@ bool ItemContainerWidgetsPage::VerifyAllClientDataDestroyed()
|
||||
{
|
||||
if ( m_trackedDataObjects )
|
||||
{
|
||||
wxString message = _T("Bug in managing wxClientData: ");
|
||||
wxString message = wxT("Bug in managing wxClientData: ");
|
||||
if ( m_trackedDataObjects > 0 )
|
||||
message << m_trackedDataObjects << _T(" lost objects");
|
||||
message << m_trackedDataObjects << wxT(" lost objects");
|
||||
else
|
||||
message << (-m_trackedDataObjects) << _T(" extra deletes");
|
||||
message << (-m_trackedDataObjects) << wxT(" extra deletes");
|
||||
wxFAIL_MSG(message);
|
||||
return false;
|
||||
}
|
||||
@@ -118,7 +118,7 @@ bool ItemContainerWidgetsPage::VerifyAllClientDataDestroyed()
|
||||
void ItemContainerWidgetsPage::StartTest(const wxString& label)
|
||||
{
|
||||
m_container->Clear();
|
||||
wxLogMessage(_T("Test - %s:"), label.c_str());
|
||||
wxLogMessage(wxT("Test - %s:"), label.c_str());
|
||||
}
|
||||
|
||||
void ItemContainerWidgetsPage::EndTest(const wxArrayString& items)
|
||||
@@ -128,7 +128,7 @@ void ItemContainerWidgetsPage::EndTest(const wxArrayString& items)
|
||||
bool ok = count == items.GetCount();
|
||||
if ( !ok )
|
||||
{
|
||||
wxFAIL_MSG(_T("Item count does not match."));
|
||||
wxFAIL_MSG(wxT("Item count does not match."));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -138,7 +138,7 @@ void ItemContainerWidgetsPage::EndTest(const wxArrayString& items)
|
||||
if ( str != items[i] )
|
||||
{
|
||||
wxFAIL_MSG(wxString::Format(
|
||||
_T("Wrong string \"%s\" at position %d (expected \"%s\")"),
|
||||
wxT("Wrong string \"%s\" at position %d (expected \"%s\")"),
|
||||
str.c_str(), i, items[i].c_str()));
|
||||
ok = false;
|
||||
break;
|
||||
@@ -173,19 +173,19 @@ void ItemContainerWidgetsPage::EndTest(const wxArrayString& items)
|
||||
m_container->Clear();
|
||||
ok &= VerifyAllClientDataDestroyed();
|
||||
|
||||
wxLogMessage(_T("...%s"), ok ? _T("passed") : _T("failed"));
|
||||
wxLogMessage(wxT("...%s"), ok ? wxT("passed") : wxT("failed"));
|
||||
}
|
||||
|
||||
wxString
|
||||
ItemContainerWidgetsPage::DumpContainerData(const wxArrayString& expected) const
|
||||
{
|
||||
wxString str;
|
||||
str << _T("Current content:\n");
|
||||
str << wxT("Current content:\n");
|
||||
|
||||
unsigned i;
|
||||
for ( i = 0; i < m_container->GetCount(); ++i )
|
||||
{
|
||||
str << _T(" - ") << m_container->GetString(i) << _T(" [");
|
||||
str << wxT(" - ") << m_container->GetString(i) << wxT(" [");
|
||||
if ( m_container->HasClientObjectData() )
|
||||
{
|
||||
TrackedClientData *
|
||||
@@ -199,20 +199,20 @@ ItemContainerWidgetsPage::DumpContainerData(const wxArrayString& expected) const
|
||||
if ( data )
|
||||
str << (wxUIntPtr)data;
|
||||
}
|
||||
str << _T("]\n");
|
||||
str << wxT("]\n");
|
||||
}
|
||||
|
||||
str << _T("Expected content:\n");
|
||||
str << wxT("Expected content:\n");
|
||||
for ( i = 0; i < expected.GetCount(); ++i )
|
||||
{
|
||||
const wxString& item = expected[i];
|
||||
str << _T(" - ") << item << _T("[");
|
||||
str << wxT(" - ") << item << wxT("[");
|
||||
for( unsigned j = 0; j < m_items.GetCount(); ++j )
|
||||
{
|
||||
if ( m_items[j] == item )
|
||||
str << j;
|
||||
}
|
||||
str << _T("]\n");
|
||||
str << wxT("]\n");
|
||||
}
|
||||
|
||||
return str;
|
||||
@@ -222,7 +222,7 @@ bool ItemContainerWidgetsPage::VerifyClientData(wxUIntPtr i, const wxString& str
|
||||
{
|
||||
if ( i > m_items.GetCount() || m_items[i] != str )
|
||||
{
|
||||
wxLogMessage(_T("Client data for '%s' does not match."), str.c_str());
|
||||
wxLogMessage(wxT("Client data for '%s' does not match."), str.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -246,9 +246,9 @@ ItemContainerWidgetsPage::MakeArray(const wxSortedArrayString& sorted)
|
||||
void ItemContainerWidgetsPage::OnButtonTestItemContainer(wxCommandEvent&)
|
||||
{
|
||||
m_container = GetContainer();
|
||||
wxASSERT_MSG(m_container, _T("Widget must have a test widget"));
|
||||
wxASSERT_MSG(m_container, wxT("Widget must have a test widget"));
|
||||
|
||||
wxLogMessage(_T("wxItemContainer test for %s, %s:"),
|
||||
wxLogMessage(wxT("wxItemContainer test for %s, %s:"),
|
||||
GetWidget()->GetClassInfo()->GetClassName(),
|
||||
(m_container->IsSorted() ? "Sorted" : "Unsorted"));
|
||||
|
||||
@@ -256,16 +256,16 @@ void ItemContainerWidgetsPage::OnButtonTestItemContainer(wxCommandEvent&)
|
||||
expected_result = m_container->IsSorted() ? MakeArray(m_itemsSorted)
|
||||
: m_items;
|
||||
|
||||
StartTest(_T("Append one item"));
|
||||
StartTest(wxT("Append one item"));
|
||||
wxString item = m_items[0];
|
||||
m_container->Append(item);
|
||||
EndTest(wxArrayString(1, &item));
|
||||
|
||||
StartTest(_T("Append some items"));
|
||||
StartTest(wxT("Append some items"));
|
||||
m_container->Append(m_items);
|
||||
EndTest(expected_result);
|
||||
|
||||
StartTest(_T("Append some items with data objects"));
|
||||
StartTest(wxT("Append some items with data objects"));
|
||||
wxClientData **objects = new wxClientData *[m_items.GetCount()];
|
||||
unsigned i;
|
||||
for ( i = 0; i < m_items.GetCount(); ++i )
|
||||
@@ -274,7 +274,7 @@ void ItemContainerWidgetsPage::OnButtonTestItemContainer(wxCommandEvent&)
|
||||
EndTest(expected_result);
|
||||
delete[] objects;
|
||||
|
||||
StartTest(_T("Append some items with data"));
|
||||
StartTest(wxT("Append some items with data"));
|
||||
void **data = new void *[m_items.GetCount()];
|
||||
for ( i = 0; i < m_items.GetCount(); ++i )
|
||||
data[i] = wxUIntToPtr(i);
|
||||
@@ -282,19 +282,19 @@ void ItemContainerWidgetsPage::OnButtonTestItemContainer(wxCommandEvent&)
|
||||
EndTest(expected_result);
|
||||
delete[] data;
|
||||
|
||||
StartTest(_T("Append some items with data, one by one"));
|
||||
StartTest(wxT("Append some items with data, one by one"));
|
||||
for ( i = 0; i < m_items.GetCount(); ++i )
|
||||
m_container->Append(m_items[i], wxUIntToPtr(i));
|
||||
EndTest(expected_result);
|
||||
|
||||
StartTest(_T("Append some items with data objects, one by one"));
|
||||
StartTest(wxT("Append some items with data objects, one by one"));
|
||||
for ( i = 0; i < m_items.GetCount(); ++i )
|
||||
m_container->Append(m_items[i], CreateClientData(i));
|
||||
EndTest(expected_result);
|
||||
|
||||
if ( !m_container->IsSorted() )
|
||||
{
|
||||
StartTest(_T("Insert in reverse order with data, one by one"));
|
||||
StartTest(wxT("Insert in reverse order with data, one by one"));
|
||||
for ( unsigned i = m_items.GetCount(); i; --i )
|
||||
m_container->Insert(m_items[i - 1], 0, wxUIntToPtr(i - 1));
|
||||
EndTest(expected_result);
|
||||
|
@@ -225,7 +225,7 @@ END_EVENT_TABLE()
|
||||
#define FAMILY_CTRLS NATIVE_CTRLS
|
||||
#endif
|
||||
|
||||
IMPLEMENT_WIDGETS_PAGE(ListboxWidgetsPage, _T("Listbox"),
|
||||
IMPLEMENT_WIDGETS_PAGE(ListboxWidgetsPage, wxT("Listbox"),
|
||||
FAMILY_CTRLS | WITH_ITEMS_CTRLS
|
||||
);
|
||||
|
||||
@@ -259,17 +259,17 @@ void ListboxWidgetsPage::CreateContent()
|
||||
|
||||
// left pane
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY,
|
||||
_T("&Set listbox parameters"));
|
||||
wxT("&Set listbox parameters"));
|
||||
wxSizer *sizerLeft = new wxStaticBoxSizer(box, wxVERTICAL);
|
||||
|
||||
static const wxString modes[] =
|
||||
{
|
||||
_T("single"),
|
||||
_T("extended"),
|
||||
_T("multiple"),
|
||||
wxT("single"),
|
||||
wxT("extended"),
|
||||
wxT("multiple"),
|
||||
};
|
||||
|
||||
m_radioSelMode = new wxRadioBox(this, wxID_ANY, _T("Selection &mode:"),
|
||||
m_radioSelMode = new wxRadioBox(this, wxID_ANY, wxT("Selection &mode:"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
WXSIZEOF(modes), modes,
|
||||
1, wxRA_SPECIFY_COLS);
|
||||
@@ -277,69 +277,69 @@ void ListboxWidgetsPage::CreateContent()
|
||||
m_chkVScroll = CreateCheckBoxAndAddToSizer
|
||||
(
|
||||
sizerLeft,
|
||||
_T("Always show &vertical scrollbar")
|
||||
wxT("Always show &vertical scrollbar")
|
||||
);
|
||||
m_chkHScroll = CreateCheckBoxAndAddToSizer
|
||||
(
|
||||
sizerLeft,
|
||||
_T("Show &horizontal scrollbar")
|
||||
wxT("Show &horizontal scrollbar")
|
||||
);
|
||||
m_chkCheck = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Check list box"));
|
||||
m_chkSort = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Sort items"));
|
||||
m_chkOwnerDraw = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Owner drawn"));
|
||||
m_chkCheck = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("&Check list box"));
|
||||
m_chkSort = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("&Sort items"));
|
||||
m_chkOwnerDraw = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("&Owner drawn"));
|
||||
|
||||
sizerLeft->Add(5, 5, 0, wxGROW | wxALL, 5); // spacer
|
||||
sizerLeft->Add(m_radioSelMode, 0, wxGROW | wxALL, 5);
|
||||
|
||||
wxButton *btn = new wxButton(this, ListboxPage_Reset, _T("&Reset"));
|
||||
wxButton *btn = new wxButton(this, ListboxPage_Reset, wxT("&Reset"));
|
||||
sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
|
||||
|
||||
// middle pane
|
||||
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY,
|
||||
_T("&Change listbox contents"));
|
||||
wxT("&Change listbox contents"));
|
||||
wxSizer *sizerMiddle = new wxStaticBoxSizer(box2, wxVERTICAL);
|
||||
|
||||
wxSizer *sizerRow = new wxBoxSizer(wxHORIZONTAL);
|
||||
btn = new wxButton(this, ListboxPage_Add, _T("&Add this string"));
|
||||
m_textAdd = new wxTextCtrl(this, ListboxPage_AddText, _T("test item 0"));
|
||||
btn = new wxButton(this, ListboxPage_Add, wxT("&Add this string"));
|
||||
m_textAdd = new wxTextCtrl(this, ListboxPage_AddText, wxT("test item 0"));
|
||||
sizerRow->Add(btn, 0, wxRIGHT, 5);
|
||||
sizerRow->Add(m_textAdd, 1, wxLEFT, 5);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, ListboxPage_AddSeveral, _T("&Insert a few strings"));
|
||||
btn = new wxButton(this, ListboxPage_AddSeveral, wxT("&Insert a few strings"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, ListboxPage_AddMany, _T("Add &many strings"));
|
||||
btn = new wxButton(this, ListboxPage_AddMany, wxT("Add &many strings"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = new wxBoxSizer(wxHORIZONTAL);
|
||||
btn = new wxButton(this, ListboxPage_Change, _T("C&hange current"));
|
||||
btn = new wxButton(this, ListboxPage_Change, wxT("C&hange current"));
|
||||
m_textChange = new wxTextCtrl(this, ListboxPage_ChangeText, wxEmptyString);
|
||||
sizerRow->Add(btn, 0, wxRIGHT, 5);
|
||||
sizerRow->Add(m_textChange, 1, wxLEFT, 5);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = new wxBoxSizer(wxHORIZONTAL);
|
||||
btn = new wxButton(this, ListboxPage_EnsureVisible, _T("Make item &visible"));
|
||||
btn = new wxButton(this, ListboxPage_EnsureVisible, wxT("Make item &visible"));
|
||||
m_textEnsureVisible = new wxTextCtrl(this, ListboxPage_EnsureVisibleText, wxEmptyString);
|
||||
sizerRow->Add(btn, 0, wxRIGHT, 5);
|
||||
sizerRow->Add(m_textEnsureVisible, 1, wxLEFT, 5);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = new wxBoxSizer(wxHORIZONTAL);
|
||||
btn = new wxButton(this, ListboxPage_Delete, _T("&Delete this item"));
|
||||
btn = new wxButton(this, ListboxPage_Delete, wxT("&Delete this item"));
|
||||
m_textDelete = new wxTextCtrl(this, ListboxPage_DeleteText, wxEmptyString);
|
||||
sizerRow->Add(btn, 0, wxRIGHT, 5);
|
||||
sizerRow->Add(m_textDelete, 1, wxLEFT, 5);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, ListboxPage_DeleteSel, _T("Delete &selection"));
|
||||
btn = new wxButton(this, ListboxPage_DeleteSel, wxT("Delete &selection"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, ListboxPage_Clear, _T("&Clear"));
|
||||
btn = new wxButton(this, ListboxPage_Clear, wxT("&Clear"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, ListboxPage_ContainerTests, _T("Run &tests"));
|
||||
btn = new wxButton(this, ListboxPage_ContainerTests, wxT("Run &tests"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
// right pane
|
||||
@@ -383,7 +383,7 @@ void ListboxWidgetsPage::CreateLbox()
|
||||
switch ( m_radioSelMode->GetSelection() )
|
||||
{
|
||||
default:
|
||||
wxFAIL_MSG( _T("unexpected radio box selection") );
|
||||
wxFAIL_MSG( wxT("unexpected radio box selection") );
|
||||
|
||||
case LboxSel_Single: flags |= wxLB_SINGLE; break;
|
||||
case LboxSel_Extended: flags |= wxLB_EXTENDED; break;
|
||||
@@ -528,7 +528,7 @@ void ListboxWidgetsPage::OnButtonAdd(wxCommandEvent& WXUNUSED(event))
|
||||
if ( !m_textAdd->IsModified() )
|
||||
{
|
||||
// update the default string
|
||||
m_textAdd->SetValue(wxString::Format(_T("test item %u"), ++s_item));
|
||||
m_textAdd->SetValue(wxString::Format(wxT("test item %u"), ++s_item));
|
||||
}
|
||||
|
||||
m_lbox->Append(s);
|
||||
@@ -539,16 +539,16 @@ void ListboxWidgetsPage::OnButtonAddMany(wxCommandEvent& WXUNUSED(event))
|
||||
// "many" means 1000 here
|
||||
for ( unsigned int n = 0; n < 1000; n++ )
|
||||
{
|
||||
m_lbox->Append(wxString::Format(_T("item #%u"), n));
|
||||
m_lbox->Append(wxString::Format(wxT("item #%u"), n));
|
||||
}
|
||||
}
|
||||
|
||||
void ListboxWidgetsPage::OnButtonAddSeveral(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxArrayString items;
|
||||
items.Add(_T("First"));
|
||||
items.Add(_T("another one"));
|
||||
items.Add(_T("and the last (very very very very very very very very very very long) one"));
|
||||
items.Add(wxT("First"));
|
||||
items.Add(wxT("another one"));
|
||||
items.Add(wxT("and the last (very very very very very very very very very very long) one"));
|
||||
m_lbox->InsertItems(items, 0);
|
||||
}
|
||||
|
||||
@@ -590,26 +590,26 @@ void ListboxWidgetsPage::OnUpdateUIAddSeveral(wxUpdateUIEvent& event)
|
||||
void ListboxWidgetsPage::OnListbox(wxCommandEvent& event)
|
||||
{
|
||||
long sel = event.GetSelection();
|
||||
m_textDelete->SetValue(wxString::Format(_T("%ld"), sel));
|
||||
m_textDelete->SetValue(wxString::Format(wxT("%ld"), sel));
|
||||
|
||||
if (event.IsSelection())
|
||||
{
|
||||
wxLogMessage(_T("Listbox item %ld selected"), sel);
|
||||
wxLogMessage(wxT("Listbox item %ld selected"), sel);
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogMessage(_T("Listbox item %ld deselected"), sel);
|
||||
wxLogMessage(wxT("Listbox item %ld deselected"), sel);
|
||||
}
|
||||
}
|
||||
|
||||
void ListboxWidgetsPage::OnListboxDClick(wxCommandEvent& event)
|
||||
{
|
||||
wxLogMessage( _T("Listbox item %d double clicked"), event.GetInt() );
|
||||
wxLogMessage( wxT("Listbox item %d double clicked"), event.GetInt() );
|
||||
}
|
||||
|
||||
void ListboxWidgetsPage::OnCheckListbox(wxCommandEvent& event)
|
||||
{
|
||||
wxLogMessage( _T("Listbox item %d toggled"), event.GetInt() );
|
||||
wxLogMessage( wxT("Listbox item %d toggled"), event.GetInt() );
|
||||
}
|
||||
|
||||
void ListboxWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& WXUNUSED(event))
|
||||
|
@@ -211,20 +211,20 @@ void BookWidgetsPage::CreateContent()
|
||||
wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
||||
// left pane
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY, _T("&Set style"));
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY, wxT("&Set style"));
|
||||
|
||||
// must be in sync with Orient enum
|
||||
wxArrayString orientations;
|
||||
orientations.Add(_T("&top"));
|
||||
orientations.Add(_T("&bottom"));
|
||||
orientations.Add(_T("&left"));
|
||||
orientations.Add(_T("&right"));
|
||||
orientations.Add(wxT("&top"));
|
||||
orientations.Add(wxT("&bottom"));
|
||||
orientations.Add(wxT("&left"));
|
||||
orientations.Add(wxT("&right"));
|
||||
|
||||
wxASSERT_MSG( orientations.GetCount() == Orient_Max,
|
||||
_T("forgot to update something") );
|
||||
wxT("forgot to update something") );
|
||||
|
||||
m_chkImages = new wxCheckBox(this, wxID_ANY, _T("Show &images"));
|
||||
m_radioOrient = new wxRadioBox(this, wxID_ANY, _T("&Tab orientation"),
|
||||
m_chkImages = new wxCheckBox(this, wxID_ANY, wxT("Show &images"));
|
||||
m_radioOrient = new wxRadioBox(this, wxID_ANY, wxT("&Tab orientation"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
orientations, 1, wxRA_SPECIFY_COLS);
|
||||
|
||||
@@ -234,48 +234,48 @@ void BookWidgetsPage::CreateContent()
|
||||
sizerLeft->Add(5, 5, 0, wxGROW | wxALL, 5); // spacer
|
||||
sizerLeft->Add(m_radioOrient, 0, wxALL, 5);
|
||||
|
||||
wxButton *btn = new wxButton(this, BookPage_Reset, _T("&Reset"));
|
||||
wxButton *btn = new wxButton(this, BookPage_Reset, wxT("&Reset"));
|
||||
sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
|
||||
|
||||
// middle pane
|
||||
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY, _T("&Contents"));
|
||||
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY, wxT("&Contents"));
|
||||
wxSizer *sizerMiddle = new wxStaticBoxSizer(box2, wxVERTICAL);
|
||||
|
||||
wxTextCtrl *text;
|
||||
wxSizer *sizerRow = CreateSizerWithTextAndLabel(_T("Number of pages: "),
|
||||
wxSizer *sizerRow = CreateSizerWithTextAndLabel(wxT("Number of pages: "),
|
||||
BookPage_NumPagesText,
|
||||
&text);
|
||||
text->SetEditable(false);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndLabel(_T("Current selection: "),
|
||||
sizerRow = CreateSizerWithTextAndLabel(wxT("Current selection: "),
|
||||
BookPage_CurSelectText,
|
||||
&text);
|
||||
text->SetEditable(false);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(BookPage_SelectPage,
|
||||
_T("&Select page"),
|
||||
wxT("&Select page"),
|
||||
BookPage_SelectText,
|
||||
&m_textSelect);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, BookPage_AddPage, _T("&Add page"));
|
||||
btn = new wxButton(this, BookPage_AddPage, wxT("&Add page"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(BookPage_InsertPage,
|
||||
_T("&Insert page at"),
|
||||
wxT("&Insert page at"),
|
||||
BookPage_InsertText,
|
||||
&m_textInsert);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(BookPage_RemovePage,
|
||||
_T("&Remove page"),
|
||||
wxT("&Remove page"),
|
||||
BookPage_RemoveText,
|
||||
&m_textRemove);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, BookPage_DeleteAll, _T("&Delete All"));
|
||||
btn = new wxButton(this, BookPage_DeleteAll, wxT("&Delete All"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
// right pane
|
||||
@@ -359,7 +359,7 @@ void BookWidgetsPage::RecreateBook()
|
||||
switch ( m_radioOrient->GetSelection() )
|
||||
{
|
||||
default:
|
||||
wxFAIL_MSG( _T("unknown orientation") );
|
||||
wxFAIL_MSG( wxT("unknown orientation") );
|
||||
// fall through
|
||||
|
||||
case Orient_Top:
|
||||
@@ -450,7 +450,7 @@ int BookWidgetsPage::GetIconIndex() const
|
||||
|
||||
wxWindow *BookWidgetsPage::CreateNewPage()
|
||||
{
|
||||
return new wxTextCtrl(m_book, wxID_ANY, _T("I'm a book page"));
|
||||
return new wxTextCtrl(m_book, wxID_ANY, wxT("I'm a book page"));
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -472,30 +472,30 @@ void BookWidgetsPage::OnButtonDeleteAll(wxCommandEvent& WXUNUSED(event))
|
||||
void BookWidgetsPage::OnButtonSelectPage(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
int pos = GetTextValue(m_textSelect);
|
||||
wxCHECK_RET( IsValidValue(pos), _T("button should be disabled") );
|
||||
wxCHECK_RET( IsValidValue(pos), wxT("button should be disabled") );
|
||||
|
||||
m_book->SetSelection(pos);
|
||||
}
|
||||
|
||||
void BookWidgetsPage::OnButtonAddPage(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
m_book->AddPage(CreateNewPage(), _T("Added page"), false,
|
||||
m_book->AddPage(CreateNewPage(), wxT("Added page"), false,
|
||||
GetIconIndex());
|
||||
}
|
||||
|
||||
void BookWidgetsPage::OnButtonInsertPage(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
int pos = GetTextValue(m_textInsert);
|
||||
wxCHECK_RET( IsValidValue(pos), _T("button should be disabled") );
|
||||
wxCHECK_RET( IsValidValue(pos), wxT("button should be disabled") );
|
||||
|
||||
m_book->InsertPage(pos, CreateNewPage(), _T("Inserted page"), false,
|
||||
m_book->InsertPage(pos, CreateNewPage(), wxT("Inserted page"), false,
|
||||
GetIconIndex());
|
||||
}
|
||||
|
||||
void BookWidgetsPage::OnButtonRemovePage(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
int pos = GetTextValue(m_textRemove);
|
||||
wxCHECK_RET( IsValidValue(pos), _T("button should be disabled") );
|
||||
wxCHECK_RET( IsValidValue(pos), wxT("button should be disabled") );
|
||||
|
||||
m_book->DeletePage(pos);
|
||||
}
|
||||
@@ -525,13 +525,13 @@ void BookWidgetsPage::OnUpdateUIResetButton(wxUpdateUIEvent& event)
|
||||
void BookWidgetsPage::OnUpdateUINumPagesText(wxUpdateUIEvent& event)
|
||||
{
|
||||
if(m_book)
|
||||
event.SetText( wxString::Format(_T("%u"), unsigned(m_book->GetPageCount())) );
|
||||
event.SetText( wxString::Format(wxT("%u"), unsigned(m_book->GetPageCount())) );
|
||||
}
|
||||
|
||||
void BookWidgetsPage::OnUpdateUICurSelectText(wxUpdateUIEvent& event)
|
||||
{
|
||||
if(m_book)
|
||||
event.SetText( wxString::Format(_T("%d"), m_book->GetSelection()) );
|
||||
event.SetText( wxString::Format(wxT("%d"), m_book->GetSelection()) );
|
||||
}
|
||||
|
||||
void BookWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& WXUNUSED(event))
|
||||
@@ -594,13 +594,13 @@ END_EVENT_TABLE()
|
||||
#define FAMILY_CTRLS NATIVE_CTRLS
|
||||
#endif
|
||||
|
||||
IMPLEMENT_WIDGETS_PAGE(NotebookWidgetsPage, _T("Notebook"),
|
||||
IMPLEMENT_WIDGETS_PAGE(NotebookWidgetsPage, wxT("Notebook"),
|
||||
FAMILY_CTRLS | BOOK_CTRLS
|
||||
);
|
||||
|
||||
void NotebookWidgetsPage::OnPageChanging(wxNotebookEvent& event)
|
||||
{
|
||||
wxLogMessage(_T("Notebook page changing from %d to %d (currently %d)."),
|
||||
wxLogMessage(wxT("Notebook page changing from %d to %d (currently %d)."),
|
||||
event.GetOldSelection(),
|
||||
event.GetSelection(),
|
||||
m_book->GetSelection());
|
||||
@@ -610,7 +610,7 @@ void NotebookWidgetsPage::OnPageChanging(wxNotebookEvent& event)
|
||||
|
||||
void NotebookWidgetsPage::OnPageChanged(wxNotebookEvent& event)
|
||||
{
|
||||
wxLogMessage(_T("Notebook page changed from %d to %d (currently %d)."),
|
||||
wxLogMessage(wxT("Notebook page changed from %d to %d (currently %d)."),
|
||||
event.GetOldSelection(),
|
||||
event.GetSelection(),
|
||||
m_book->GetSelection());
|
||||
@@ -667,13 +667,13 @@ BEGIN_EVENT_TABLE(ListbookWidgetsPage, BookWidgetsPage)
|
||||
EVT_LISTBOOK_PAGE_CHANGED(wxID_ANY, ListbookWidgetsPage::OnPageChanged)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
IMPLEMENT_WIDGETS_PAGE(ListbookWidgetsPage, _T("Listbook"),
|
||||
IMPLEMENT_WIDGETS_PAGE(ListbookWidgetsPage, wxT("Listbook"),
|
||||
GENERIC_CTRLS | BOOK_CTRLS
|
||||
);
|
||||
|
||||
void ListbookWidgetsPage::OnPageChanging(wxListbookEvent& event)
|
||||
{
|
||||
wxLogMessage(_T("Listbook page changing from %d to %d (currently %d)."),
|
||||
wxLogMessage(wxT("Listbook page changing from %d to %d (currently %d)."),
|
||||
event.GetOldSelection(),
|
||||
event.GetSelection(),
|
||||
m_book->GetSelection());
|
||||
@@ -683,7 +683,7 @@ void ListbookWidgetsPage::OnPageChanging(wxListbookEvent& event)
|
||||
|
||||
void ListbookWidgetsPage::OnPageChanged(wxListbookEvent& event)
|
||||
{
|
||||
wxLogMessage(_T("Listbook page changed from %d to %d (currently %d)."),
|
||||
wxLogMessage(wxT("Listbook page changed from %d to %d (currently %d)."),
|
||||
event.GetOldSelection(),
|
||||
event.GetSelection(),
|
||||
m_book->GetSelection());
|
||||
@@ -740,13 +740,13 @@ BEGIN_EVENT_TABLE(ChoicebookWidgetsPage, BookWidgetsPage)
|
||||
EVT_CHOICEBOOK_PAGE_CHANGED(wxID_ANY, ChoicebookWidgetsPage::OnPageChanged)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
IMPLEMENT_WIDGETS_PAGE(ChoicebookWidgetsPage, _T("Choicebook"),
|
||||
IMPLEMENT_WIDGETS_PAGE(ChoicebookWidgetsPage, wxT("Choicebook"),
|
||||
GENERIC_CTRLS | BOOK_CTRLS
|
||||
);
|
||||
|
||||
void ChoicebookWidgetsPage::OnPageChanging(wxChoicebookEvent& event)
|
||||
{
|
||||
wxLogMessage(_T("Choicebook page changing from %d to %d (currently %d)."),
|
||||
wxLogMessage(wxT("Choicebook page changing from %d to %d (currently %d)."),
|
||||
event.GetOldSelection(),
|
||||
event.GetSelection(),
|
||||
m_book->GetSelection());
|
||||
@@ -756,7 +756,7 @@ void ChoicebookWidgetsPage::OnPageChanging(wxChoicebookEvent& event)
|
||||
|
||||
void ChoicebookWidgetsPage::OnPageChanged(wxChoicebookEvent& event)
|
||||
{
|
||||
wxLogMessage(_T("Choicebook page changed from %d to %d (currently %d)."),
|
||||
wxLogMessage(wxT("Choicebook page changed from %d to %d (currently %d)."),
|
||||
event.GetOldSelection(),
|
||||
event.GetSelection(),
|
||||
m_book->GetSelection());
|
||||
|
@@ -296,7 +296,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
IMPLEMENT_WIDGETS_PAGE(ODComboboxWidgetsPage, _T("OwnerDrawnCombobox"),
|
||||
IMPLEMENT_WIDGETS_PAGE(ODComboboxWidgetsPage, wxT("OwnerDrawnCombobox"),
|
||||
GENERIC_CTRLS | WITH_ITEMS_CTRLS | COMBO_CTRLS
|
||||
);
|
||||
|
||||
@@ -329,88 +329,88 @@ void ODComboboxWidgetsPage::CreateContent()
|
||||
wxSizer *sizerLeft = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
// left pane - style box
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY, _T("&Set style"));
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY, wxT("&Set style"));
|
||||
|
||||
wxSizer *sizerStyle = new wxStaticBoxSizer(box, wxVERTICAL);
|
||||
|
||||
m_chkSort = CreateCheckBoxAndAddToSizer(sizerStyle, _T("&Sort items"));
|
||||
m_chkReadonly = CreateCheckBoxAndAddToSizer(sizerStyle, _T("&Read only"));
|
||||
m_chkDclickcycles = CreateCheckBoxAndAddToSizer(sizerStyle, _T("&Double-click Cycles"));
|
||||
m_chkSort = CreateCheckBoxAndAddToSizer(sizerStyle, wxT("&Sort items"));
|
||||
m_chkReadonly = CreateCheckBoxAndAddToSizer(sizerStyle, wxT("&Read only"));
|
||||
m_chkDclickcycles = CreateCheckBoxAndAddToSizer(sizerStyle, wxT("&Double-click Cycles"));
|
||||
|
||||
sizerStyle->AddSpacer(4);
|
||||
|
||||
m_chkBitmapbutton = CreateCheckBoxAndAddToSizer(sizerStyle, _T("&Bitmap button"));
|
||||
m_chkStdbutton = CreateCheckBoxAndAddToSizer(sizerStyle, _T("B&lank button background"));
|
||||
m_chkBitmapbutton = CreateCheckBoxAndAddToSizer(sizerStyle, wxT("&Bitmap button"));
|
||||
m_chkStdbutton = CreateCheckBoxAndAddToSizer(sizerStyle, wxT("B&lank button background"));
|
||||
|
||||
wxButton *btn = new wxButton(this, ODComboPage_Reset, _T("&Reset"));
|
||||
wxButton *btn = new wxButton(this, ODComboPage_Reset, wxT("&Reset"));
|
||||
sizerStyle->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 3);
|
||||
|
||||
sizerLeft->Add(sizerStyle, 0, wxGROW | wxALIGN_CENTRE_HORIZONTAL);
|
||||
|
||||
// left pane - popup adjustment box
|
||||
box = new wxStaticBox(this, wxID_ANY, _T("Adjust &popup"));
|
||||
box = new wxStaticBox(this, wxID_ANY, wxT("Adjust &popup"));
|
||||
|
||||
wxSizer *sizerPopupPos = new wxStaticBoxSizer(box, wxVERTICAL);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndLabel(_T("Min. Width:"),
|
||||
sizerRow = CreateSizerWithTextAndLabel(wxT("Min. Width:"),
|
||||
ODComboPage_PopupMinWidth,
|
||||
&m_textPopupMinWidth);
|
||||
m_textPopupMinWidth->SetValue(wxT("-1"));
|
||||
sizerPopupPos->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndLabel(_T("Max. Height:"),
|
||||
sizerRow = CreateSizerWithTextAndLabel(wxT("Max. Height:"),
|
||||
ODComboPage_PopupHeight,
|
||||
&m_textPopupHeight);
|
||||
m_textPopupHeight->SetValue(wxT("-1"));
|
||||
sizerPopupPos->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
m_chkAlignpopupright = CreateCheckBoxAndAddToSizer(sizerPopupPos, _T("Align Right"));
|
||||
m_chkAlignpopupright = CreateCheckBoxAndAddToSizer(sizerPopupPos, wxT("Align Right"));
|
||||
|
||||
sizerLeft->Add(sizerPopupPos, 0, wxGROW | wxALIGN_CENTRE_HORIZONTAL | wxTOP, 2);
|
||||
|
||||
// left pane - button adjustment box
|
||||
box = new wxStaticBox(this, wxID_ANY, _T("Adjust &button"));
|
||||
box = new wxStaticBox(this, wxID_ANY, wxT("Adjust &button"));
|
||||
|
||||
wxSizer *sizerButtonPos = new wxStaticBoxSizer(box, wxVERTICAL);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndLabel(_T("Width:"),
|
||||
sizerRow = CreateSizerWithTextAndLabel(wxT("Width:"),
|
||||
ODComboPage_ButtonWidth,
|
||||
&m_textButtonWidth);
|
||||
m_textButtonWidth->SetValue(wxT("-1"));
|
||||
sizerButtonPos->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndLabel(_T("VSpacing:"),
|
||||
sizerRow = CreateSizerWithTextAndLabel(wxT("VSpacing:"),
|
||||
ODComboPage_ButtonSpacing,
|
||||
&m_textButtonSpacing);
|
||||
m_textButtonSpacing->SetValue(wxT("0"));
|
||||
sizerButtonPos->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndLabel(_T("Height:"),
|
||||
sizerRow = CreateSizerWithTextAndLabel(wxT("Height:"),
|
||||
ODComboPage_ButtonHeight,
|
||||
&m_textButtonHeight);
|
||||
m_textButtonHeight->SetValue(wxT("-1"));
|
||||
sizerButtonPos->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
m_chkAlignbutleft = CreateCheckBoxAndAddToSizer(sizerButtonPos, _T("Align Left"));
|
||||
m_chkAlignbutleft = CreateCheckBoxAndAddToSizer(sizerButtonPos, wxT("Align Left"));
|
||||
|
||||
sizerLeft->Add(sizerButtonPos, 0, wxGROW | wxALIGN_CENTRE_HORIZONTAL | wxTOP, 2);
|
||||
|
||||
// middle pane
|
||||
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY,
|
||||
_T("&Change combobox contents"));
|
||||
wxT("&Change combobox contents"));
|
||||
wxSizer *sizerMiddle = new wxStaticBoxSizer(box2, wxVERTICAL);
|
||||
|
||||
btn = new wxButton(this, ODComboPage_ContainerTests, _T("Run &tests"));
|
||||
btn = new wxButton(this, ODComboPage_ContainerTests, wxT("Run &tests"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndLabel(_T("Current selection"),
|
||||
sizerRow = CreateSizerWithTextAndLabel(wxT("Current selection"),
|
||||
ODComboPage_CurText,
|
||||
&text);
|
||||
text->SetEditable(false);
|
||||
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndLabel(_T("Insertion Point"),
|
||||
sizerRow = CreateSizerWithTextAndLabel(wxT("Insertion Point"),
|
||||
ODComboPage_InsertionPointText,
|
||||
&text);
|
||||
text->SetEditable(false);
|
||||
@@ -418,39 +418,39 @@ void ODComboboxWidgetsPage::CreateContent()
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(ODComboPage_Insert,
|
||||
_T("&Insert this string"),
|
||||
wxT("&Insert this string"),
|
||||
ODComboPage_InsertText,
|
||||
&m_textInsert);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(ODComboPage_Add,
|
||||
_T("&Add this string"),
|
||||
wxT("&Add this string"),
|
||||
ODComboPage_AddText,
|
||||
&m_textAdd);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, ODComboPage_AddSeveral, _T("&Append a few strings"));
|
||||
btn = new wxButton(this, ODComboPage_AddSeveral, wxT("&Append a few strings"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, ODComboPage_AddMany, _T("Append &many strings"));
|
||||
btn = new wxButton(this, ODComboPage_AddMany, wxT("Append &many strings"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(ODComboPage_Change,
|
||||
_T("C&hange current"),
|
||||
wxT("C&hange current"),
|
||||
ODComboPage_ChangeText,
|
||||
&m_textChange);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(ODComboPage_Delete,
|
||||
_T("&Delete this item"),
|
||||
wxT("&Delete this item"),
|
||||
ODComboPage_DeleteText,
|
||||
&m_textDelete);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, ODComboPage_DeleteSel, _T("Delete &selection"));
|
||||
btn = new wxButton(this, ODComboPage_DeleteSel, wxT("Delete &selection"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
btn = new wxButton(this, ODComboPage_Clear, _T("&Clear"));
|
||||
btn = new wxButton(this, ODComboPage_Clear, wxT("&Clear"));
|
||||
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
|
||||
|
||||
// right pane
|
||||
@@ -566,7 +566,7 @@ void ODComboboxWidgetsPage::OnButtonChange(wxCommandEvent& WXUNUSED(event))
|
||||
#ifndef __WXGTK__
|
||||
m_combobox->SetString(sel, m_textChange->GetValue());
|
||||
#else
|
||||
wxLogMessage(_T("Not implemented in wxGTK"));
|
||||
wxLogMessage(wxT("Not implemented in wxGTK"));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -605,7 +605,7 @@ void ODComboboxWidgetsPage::OnButtonInsert(wxCommandEvent& WXUNUSED(event))
|
||||
if ( !m_textInsert->IsModified() )
|
||||
{
|
||||
// update the default string
|
||||
m_textInsert->SetValue(wxString::Format(_T("test item %u"), ++s_item));
|
||||
m_textInsert->SetValue(wxString::Format(wxT("test item %u"), ++s_item));
|
||||
}
|
||||
|
||||
if (m_combobox->GetSelection() >= 0)
|
||||
@@ -620,7 +620,7 @@ void ODComboboxWidgetsPage::OnButtonAdd(wxCommandEvent& WXUNUSED(event))
|
||||
if ( !m_textAdd->IsModified() )
|
||||
{
|
||||
// update the default string
|
||||
m_textAdd->SetValue(wxString::Format(_T("test item %u"), ++s_item));
|
||||
m_textAdd->SetValue(wxString::Format(wxT("test item %u"), ++s_item));
|
||||
}
|
||||
|
||||
m_combobox->Append(s);
|
||||
@@ -631,15 +631,15 @@ void ODComboboxWidgetsPage::OnButtonAddMany(wxCommandEvent& WXUNUSED(event))
|
||||
// "many" means 1000 here
|
||||
for ( unsigned int n = 0; n < 1000; n++ )
|
||||
{
|
||||
m_combobox->Append(wxString::Format(_T("item #%u"), n));
|
||||
m_combobox->Append(wxString::Format(wxT("item #%u"), n));
|
||||
}
|
||||
}
|
||||
|
||||
void ODComboboxWidgetsPage::OnButtonAddSeveral(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
m_combobox->Append(_T("First"));
|
||||
m_combobox->Append(_T("another one"));
|
||||
m_combobox->Append(_T("and the last (very very very very very very very very very very long) one"));
|
||||
m_combobox->Append(wxT("First"));
|
||||
m_combobox->Append(wxT("another one"));
|
||||
m_combobox->Append(wxT("and the last (very very very very very very very very very very long) one"));
|
||||
}
|
||||
|
||||
void ODComboboxWidgetsPage::OnTextPopupWidth(wxCommandEvent& WXUNUSED(event))
|
||||
@@ -695,13 +695,13 @@ void ODComboboxWidgetsPage::OnTextButtonAll(wxCommandEvent& WXUNUSED(event))
|
||||
void ODComboboxWidgetsPage::OnUpdateUICurText(wxUpdateUIEvent& event)
|
||||
{
|
||||
if (m_combobox)
|
||||
event.SetText( wxString::Format(_T("%d"), m_combobox->GetSelection()) );
|
||||
event.SetText( wxString::Format(wxT("%d"), m_combobox->GetSelection()) );
|
||||
}
|
||||
|
||||
void ODComboboxWidgetsPage::OnUpdateUIInsertionPointText(wxUpdateUIEvent& event)
|
||||
{
|
||||
if (m_combobox)
|
||||
event.SetText( wxString::Format(_T("%ld"), m_combobox->GetInsertionPoint()) );
|
||||
event.SetText( wxString::Format(wxT("%ld"), m_combobox->GetInsertionPoint()) );
|
||||
}
|
||||
|
||||
void ODComboboxWidgetsPage::OnUpdateUIResetButton(wxUpdateUIEvent& event)
|
||||
@@ -758,26 +758,26 @@ void ODComboboxWidgetsPage::OnComboText(wxCommandEvent& event)
|
||||
wxString s = event.GetString();
|
||||
|
||||
wxASSERT_MSG( s == m_combobox->GetValue(),
|
||||
_T("event and combobox values should be the same") );
|
||||
wxT("event and combobox values should be the same") );
|
||||
|
||||
if (event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER)
|
||||
{
|
||||
wxLogMessage(_T("OwnerDrawnCombobox enter pressed (now '%s')"), s.c_str());
|
||||
wxLogMessage(wxT("OwnerDrawnCombobox enter pressed (now '%s')"), s.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogMessage(_T("OwnerDrawnCombobox text changed (now '%s')"), s.c_str());
|
||||
wxLogMessage(wxT("OwnerDrawnCombobox text changed (now '%s')"), s.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void ODComboboxWidgetsPage::OnComboBox(wxCommandEvent& event)
|
||||
{
|
||||
long sel = event.GetInt();
|
||||
m_textDelete->SetValue(wxString::Format(_T("%ld"), sel));
|
||||
m_textDelete->SetValue(wxString::Format(wxT("%ld"), sel));
|
||||
|
||||
wxLogMessage(_T("OwnerDrawnCombobox item %ld selected"), sel);
|
||||
wxLogMessage(wxT("OwnerDrawnCombobox item %ld selected"), sel);
|
||||
|
||||
wxLogMessage(_T("OwnerDrawnCombobox GetValue(): %s"), m_combobox->GetValue().c_str() );
|
||||
wxLogMessage(wxT("OwnerDrawnCombobox GetValue(): %s"), m_combobox->GetValue().c_str() );
|
||||
}
|
||||
|
||||
void ODComboboxWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& event)
|
||||
|
@@ -182,7 +182,7 @@ END_EVENT_TABLE()
|
||||
#define FAMILY_CTRLS NATIVE_CTRLS
|
||||
#endif
|
||||
|
||||
IMPLEMENT_WIDGETS_PAGE(RadioWidgetsPage, _T("Radio"),
|
||||
IMPLEMENT_WIDGETS_PAGE(RadioWidgetsPage, wxT("Radio"),
|
||||
FAMILY_CTRLS | WITH_ITEMS_CTRLS
|
||||
);
|
||||
|
||||
@@ -209,7 +209,7 @@ void RadioWidgetsPage::CreateContent()
|
||||
wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
||||
// left pane
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY, _T("&Set style"));
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY, wxT("&Set style"));
|
||||
|
||||
wxSizer *sizerLeft = new wxStaticBoxSizer(box, wxVERTICAL);
|
||||
|
||||
@@ -221,12 +221,12 @@ void RadioWidgetsPage::CreateContent()
|
||||
|
||||
static const wxString layoutDir[] =
|
||||
{
|
||||
_T("default"),
|
||||
_T("left to right"),
|
||||
_T("top to bottom")
|
||||
wxT("default"),
|
||||
wxT("left to right"),
|
||||
wxT("top to bottom")
|
||||
};
|
||||
|
||||
m_radioDir = new wxRadioBox(this, wxID_ANY, _T("Numbering:"),
|
||||
m_radioDir = new wxRadioBox(this, wxID_ANY, wxT("Numbering:"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
WXSIZEOF(layoutDir), layoutDir,
|
||||
1, wxRA_SPECIFY_COLS);
|
||||
@@ -238,57 +238,57 @@ void RadioWidgetsPage::CreateContent()
|
||||
#endif // wxRA_LEFTTORIGHT
|
||||
|
||||
wxSizer *sizerRow;
|
||||
sizerRow = CreateSizerWithTextAndLabel(_T("&Major dimension:"),
|
||||
sizerRow = CreateSizerWithTextAndLabel(wxT("&Major dimension:"),
|
||||
wxID_ANY,
|
||||
&m_textMajorDim);
|
||||
sizerLeft->Add(sizerRow, 0, wxGROW | wxALL, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndLabel(_T("&Number of buttons:"),
|
||||
sizerRow = CreateSizerWithTextAndLabel(wxT("&Number of buttons:"),
|
||||
wxID_ANY,
|
||||
&m_textNumBtns);
|
||||
sizerLeft->Add(sizerRow, 0, wxGROW | wxALL, 5);
|
||||
|
||||
wxButton *btn;
|
||||
btn = new wxButton(this, RadioPage_Update, _T("&Update"));
|
||||
btn = new wxButton(this, RadioPage_Update, wxT("&Update"));
|
||||
sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 5);
|
||||
|
||||
sizerLeft->Add(5, 5, 0, wxGROW | wxALL, 5); // spacer
|
||||
|
||||
btn = new wxButton(this, RadioPage_Reset, _T("&Reset"));
|
||||
btn = new wxButton(this, RadioPage_Reset, wxT("&Reset"));
|
||||
sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
|
||||
|
||||
// middle pane
|
||||
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY, _T("&Change parameters"));
|
||||
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY, wxT("&Change parameters"));
|
||||
wxSizer *sizerMiddle = new wxStaticBoxSizer(box2, wxVERTICAL);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndLabel(_T("Current selection:"),
|
||||
sizerRow = CreateSizerWithTextAndLabel(wxT("Current selection:"),
|
||||
wxID_ANY,
|
||||
&m_textCurSel);
|
||||
sizerMiddle->Add(sizerRow, 0, wxGROW | wxALL, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(RadioPage_Selection,
|
||||
_T("&Change selection:"),
|
||||
wxT("&Change selection:"),
|
||||
wxID_ANY,
|
||||
&m_textSel);
|
||||
sizerMiddle->Add(sizerRow, 0, wxGROW | wxALL, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(RadioPage_Label,
|
||||
_T("&Label for box:"),
|
||||
wxT("&Label for box:"),
|
||||
wxID_ANY,
|
||||
&m_textLabel);
|
||||
sizerMiddle->Add(sizerRow, 0, wxGROW | wxALL, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(RadioPage_LabelBtn,
|
||||
_T("&Label for buttons:"),
|
||||
wxT("&Label for buttons:"),
|
||||
wxID_ANY,
|
||||
&m_textLabelBtns);
|
||||
sizerMiddle->Add(sizerRow, 0, wxGROW | wxALL, 5);
|
||||
|
||||
m_chkEnableItem = CreateCheckBoxAndAddToSizer(sizerMiddle,
|
||||
_T("Disable &2nd item"),
|
||||
wxT("Disable &2nd item"),
|
||||
RadioPage_EnableItem);
|
||||
m_chkShowItem = CreateCheckBoxAndAddToSizer(sizerMiddle,
|
||||
_T("Hide 2nd &item"),
|
||||
wxT("Hide 2nd &item"),
|
||||
RadioPage_ShowItem);
|
||||
|
||||
// right pane
|
||||
@@ -314,10 +314,10 @@ void RadioWidgetsPage::CreateContent()
|
||||
|
||||
void RadioWidgetsPage::Reset()
|
||||
{
|
||||
m_textMajorDim->SetValue(wxString::Format(_T("%u"), DEFAULT_MAJOR_DIM));
|
||||
m_textNumBtns->SetValue(wxString::Format(_T("%u"), DEFAULT_NUM_ENTRIES));
|
||||
m_textLabel->SetValue(_T("I'm a radiobox"));
|
||||
m_textLabelBtns->SetValue(_T("item"));
|
||||
m_textMajorDim->SetValue(wxString::Format(wxT("%u"), DEFAULT_MAJOR_DIM));
|
||||
m_textNumBtns->SetValue(wxString::Format(wxT("%u"), DEFAULT_NUM_ENTRIES));
|
||||
m_textLabel->SetValue(wxT("I'm a radiobox"));
|
||||
m_textLabelBtns->SetValue(wxT("item"));
|
||||
|
||||
m_chkSpecifyRows->SetValue(false);
|
||||
m_chkEnableItem->SetValue(true);
|
||||
@@ -344,7 +344,7 @@ void RadioWidgetsPage::CreateRadio()
|
||||
unsigned long count;
|
||||
if ( !m_textNumBtns->GetValue().ToULong(&count) )
|
||||
{
|
||||
wxLogWarning(_T("Should have a valid number for number of items."));
|
||||
wxLogWarning(wxT("Should have a valid number for number of items."));
|
||||
|
||||
// fall back to default
|
||||
count = DEFAULT_NUM_ENTRIES;
|
||||
@@ -353,7 +353,7 @@ void RadioWidgetsPage::CreateRadio()
|
||||
unsigned long majorDim;
|
||||
if ( !m_textMajorDim->GetValue().ToULong(&majorDim) )
|
||||
{
|
||||
wxLogWarning(_T("Should have a valid major dimension number."));
|
||||
wxLogWarning(wxT("Should have a valid major dimension number."));
|
||||
|
||||
// fall back to default
|
||||
majorDim = DEFAULT_MAJOR_DIM;
|
||||
@@ -364,7 +364,7 @@ void RadioWidgetsPage::CreateRadio()
|
||||
wxString labelBtn = m_textLabelBtns->GetValue();
|
||||
for ( size_t n = 0; n < count; n++ )
|
||||
{
|
||||
items[n] = wxString::Format(_T("%s %lu"),
|
||||
items[n] = wxString::Format(wxT("%s %lu"),
|
||||
labelBtn.c_str(), (unsigned long)n + 1);
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ void RadioWidgetsPage::CreateRadio()
|
||||
switch ( m_radioDir->GetSelection() )
|
||||
{
|
||||
default:
|
||||
wxFAIL_MSG( _T("unexpected wxRadioBox layout direction") );
|
||||
wxFAIL_MSG( wxT("unexpected wxRadioBox layout direction") );
|
||||
// fall through
|
||||
|
||||
case RadioDir_Default:
|
||||
@@ -436,12 +436,12 @@ void RadioWidgetsPage::OnRadioBox(wxCommandEvent& event)
|
||||
int event_sel = event.GetSelection();
|
||||
wxUnusedVar(event_sel);
|
||||
|
||||
wxLogMessage(_T("Radiobox selection changed, now %d"), sel);
|
||||
wxLogMessage(wxT("Radiobox selection changed, now %d"), sel);
|
||||
|
||||
wxASSERT_MSG( sel == event_sel,
|
||||
_T("selection should be the same in event and radiobox") );
|
||||
wxT("selection should be the same in event and radiobox") );
|
||||
|
||||
m_textCurSel->SetValue(wxString::Format(_T("%d"), sel));
|
||||
m_textCurSel->SetValue(wxString::Format(wxT("%d"), sel));
|
||||
}
|
||||
|
||||
void RadioWidgetsPage::OnButtonRecreate(wxCommandEvent& WXUNUSED(event))
|
||||
@@ -460,7 +460,7 @@ void RadioWidgetsPage::OnButtonSelection(wxCommandEvent& WXUNUSED(event))
|
||||
if ( !m_textSel->GetValue().ToULong(&sel) ||
|
||||
(sel >= (size_t)m_radio->GetCount()) )
|
||||
{
|
||||
wxLogWarning(_T("Invalid number specified as new selection."));
|
||||
wxLogWarning(wxT("Invalid number specified as new selection."));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -518,14 +518,14 @@ void RadioWidgetsPage::OnUpdateUIReset(wxUpdateUIEvent& event)
|
||||
|
||||
void RadioWidgetsPage::OnUpdateUIEnableItem(wxUpdateUIEvent& event)
|
||||
{
|
||||
event.SetText(m_radio->IsItemEnabled(TEST_BUTTON) ? _T("Disable &2nd item")
|
||||
: _T("Enable &2nd item"));
|
||||
event.SetText(m_radio->IsItemEnabled(TEST_BUTTON) ? wxT("Disable &2nd item")
|
||||
: wxT("Enable &2nd item"));
|
||||
}
|
||||
|
||||
void RadioWidgetsPage::OnUpdateUIShowItem(wxUpdateUIEvent& event)
|
||||
{
|
||||
event.SetText(m_radio->IsItemShown(TEST_BUTTON) ? _T("Hide 2nd &item")
|
||||
: _T("Show 2nd &item"));
|
||||
event.SetText(m_radio->IsItemShown(TEST_BUTTON) ? wxT("Hide 2nd &item")
|
||||
: wxT("Show 2nd &item"));
|
||||
}
|
||||
|
||||
#endif // wxUSE_RADIOBOX
|
||||
|
@@ -123,7 +123,7 @@ END_EVENT_TABLE()
|
||||
#define FAMILY_CTRLS GENERIC_CTRLS
|
||||
#endif
|
||||
|
||||
IMPLEMENT_WIDGETS_PAGE(SearchCtrlWidgetsPage, _T("SearchCtrl"),
|
||||
IMPLEMENT_WIDGETS_PAGE(SearchCtrlWidgetsPage, wxT("SearchCtrl"),
|
||||
FAMILY_CTRLS | EDITABLE_CTRLS | ALL_CTRLS);
|
||||
|
||||
SearchCtrlWidgetsPage::SearchCtrlWidgetsPage(WidgetsBookCtrl *book,
|
||||
@@ -181,7 +181,7 @@ wxMenu* SearchCtrlWidgetsPage::CreateTestMenu()
|
||||
{
|
||||
wxMenu* menu = new wxMenu;
|
||||
const int SEARCH_MENU_SIZE = 5;
|
||||
wxMenuItem* menuItem = menu->Append(wxID_ANY, _T("Recent Searches"), wxT(""), wxITEM_NORMAL);
|
||||
wxMenuItem* menuItem = menu->Append(wxID_ANY, wxT("Recent Searches"), wxT(""), wxITEM_NORMAL);
|
||||
menuItem->Enable(false);
|
||||
for ( int i = 0; i < SEARCH_MENU_SIZE; i++ )
|
||||
{
|
||||
|
@@ -226,7 +226,7 @@ END_EVENT_TABLE()
|
||||
#define FAMILY_CTRLS NATIVE_CTRLS
|
||||
#endif
|
||||
|
||||
IMPLEMENT_WIDGETS_PAGE(SliderWidgetsPage, _T("Slider"), FAMILY_CTRLS );
|
||||
IMPLEMENT_WIDGETS_PAGE(SliderWidgetsPage, wxT("Slider"), FAMILY_CTRLS );
|
||||
|
||||
SliderWidgetsPage::SliderWidgetsPage(WidgetsBookCtrl *book,
|
||||
wxImageList *imaglist)
|
||||
@@ -252,41 +252,41 @@ void SliderWidgetsPage::CreateContent()
|
||||
wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
||||
// left pane
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY, _T("&Set style"));
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY, wxT("&Set style"));
|
||||
wxSizer *sizerLeft = new wxStaticBoxSizer(box, wxVERTICAL);
|
||||
|
||||
m_chkInverse = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Inverse"));
|
||||
m_chkTicks = CreateCheckBoxAndAddToSizer(sizerLeft, _T("Show &ticks"));
|
||||
m_chkLabels = CreateCheckBoxAndAddToSizer(sizerLeft, _T("Show &labels"));
|
||||
m_chkInverse = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("&Inverse"));
|
||||
m_chkTicks = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("Show &ticks"));
|
||||
m_chkLabels = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("Show &labels"));
|
||||
static const wxString sides[] =
|
||||
{
|
||||
_T("top"),
|
||||
_T("bottom"),
|
||||
_T("left"),
|
||||
_T("right"),
|
||||
wxT("top"),
|
||||
wxT("bottom"),
|
||||
wxT("left"),
|
||||
wxT("right"),
|
||||
};
|
||||
m_radioSides = new wxRadioBox(this, SliderPage_RadioSides, _T("&Ticks/Labels"),
|
||||
m_radioSides = new wxRadioBox(this, SliderPage_RadioSides, wxT("&Ticks/Labels"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
WXSIZEOF(sides), sides,
|
||||
1, wxRA_SPECIFY_COLS);
|
||||
sizerLeft->Add(m_radioSides, 0, wxGROW | wxALL, 5);
|
||||
m_chkBothSides = CreateCheckBoxAndAddToSizer
|
||||
(sizerLeft, _T("&Both sides"), SliderPage_BothSides);
|
||||
(sizerLeft, wxT("&Both sides"), SliderPage_BothSides);
|
||||
#if wxUSE_TOOLTIPS
|
||||
m_chkBothSides->SetToolTip( _T("\"Both sides\" is only supported \nin Win95 and Universal") );
|
||||
m_chkBothSides->SetToolTip( wxT("\"Both sides\" is only supported \nin Win95 and Universal") );
|
||||
#endif // wxUSE_TOOLTIPS
|
||||
|
||||
sizerLeft->Add(5, 5, 0, wxGROW | wxALL, 5); // spacer
|
||||
|
||||
wxButton *btn = new wxButton(this, SliderPage_Reset, _T("&Reset"));
|
||||
wxButton *btn = new wxButton(this, SliderPage_Reset, wxT("&Reset"));
|
||||
sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
|
||||
|
||||
// middle pane
|
||||
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY, _T("&Change slider value"));
|
||||
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY, wxT("&Change slider value"));
|
||||
wxSizer *sizerMiddle = new wxStaticBoxSizer(box2, wxVERTICAL);
|
||||
|
||||
wxTextCtrl *text;
|
||||
wxSizer *sizerRow = CreateSizerWithTextAndLabel(_T("Current value"),
|
||||
wxSizer *sizerRow = CreateSizerWithTextAndLabel(wxT("Current value"),
|
||||
SliderPage_CurValueText,
|
||||
&text);
|
||||
text->SetEditable(false);
|
||||
@@ -294,49 +294,49 @@ void SliderWidgetsPage::CreateContent()
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(SliderPage_SetValue,
|
||||
_T("Set &value"),
|
||||
wxT("Set &value"),
|
||||
SliderPage_ValueText,
|
||||
&m_textValue);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(SliderPage_SetMinAndMax,
|
||||
_T("&Min and max"),
|
||||
wxT("&Min and max"),
|
||||
SliderPage_MinText,
|
||||
&m_textMin);
|
||||
|
||||
m_textMax = new wxTextCtrl(this, SliderPage_MaxText, wxEmptyString);
|
||||
sizerRow->Add(m_textMax, 1, wxLEFT | wxALIGN_CENTRE_VERTICAL, 5);
|
||||
|
||||
m_textMin->SetValue( wxString::Format(_T("%d"), m_min) );
|
||||
m_textMax->SetValue( wxString::Format(_T("%d"), m_max) );
|
||||
m_textMin->SetValue( wxString::Format(wxT("%d"), m_min) );
|
||||
m_textMax->SetValue( wxString::Format(wxT("%d"), m_max) );
|
||||
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(SliderPage_SetLineSize,
|
||||
_T("Li&ne size"),
|
||||
wxT("Li&ne size"),
|
||||
SliderPage_LineSizeText,
|
||||
&m_textLineSize);
|
||||
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(SliderPage_SetPageSize,
|
||||
_T("P&age size"),
|
||||
wxT("P&age size"),
|
||||
SliderPage_PageSizeText,
|
||||
&m_textPageSize);
|
||||
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(SliderPage_SetTickFreq,
|
||||
_T("Tick &frequency"),
|
||||
wxT("Tick &frequency"),
|
||||
SliderPage_TickFreqText,
|
||||
&m_textTickFreq);
|
||||
|
||||
m_textTickFreq->SetValue(_T("10"));
|
||||
m_textTickFreq->SetValue(wxT("10"));
|
||||
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(SliderPage_SetThumbLen,
|
||||
_T("Thumb &length"),
|
||||
wxT("Thumb &length"),
|
||||
SliderPage_ThumbLenText,
|
||||
&m_textThumbLen);
|
||||
|
||||
@@ -350,8 +350,8 @@ void SliderWidgetsPage::CreateContent()
|
||||
Reset();
|
||||
CreateSlider();
|
||||
|
||||
m_textLineSize->SetValue(wxString::Format(_T("%d"), m_slider->GetLineSize()));
|
||||
m_textPageSize->SetValue(wxString::Format(_T("%d"), m_slider->GetPageSize()));
|
||||
m_textLineSize->SetValue(wxString::Format(wxT("%d"), m_slider->GetLineSize()));
|
||||
m_textPageSize->SetValue(wxString::Format(wxT("%d"), m_slider->GetPageSize()));
|
||||
|
||||
// the 3 panes panes compose the window
|
||||
sizerTop->Add(sizerLeft, 0, wxGROW | (wxALL & ~wxLEFT), 10);
|
||||
@@ -414,7 +414,7 @@ void SliderWidgetsPage::CreateSlider()
|
||||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG(_T("unexpected radiobox selection"));
|
||||
wxFAIL_MSG(wxT("unexpected radiobox selection"));
|
||||
// fall through
|
||||
}
|
||||
|
||||
@@ -473,7 +473,7 @@ void SliderWidgetsPage::DoSetLineSize()
|
||||
long lineSize;
|
||||
if ( !m_textLineSize->GetValue().ToLong(&lineSize) )
|
||||
{
|
||||
wxLogWarning(_T("Invalid slider line size"));
|
||||
wxLogWarning(wxT("Invalid slider line size"));
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -482,7 +482,7 @@ void SliderWidgetsPage::DoSetLineSize()
|
||||
|
||||
if ( m_slider->GetLineSize() != lineSize )
|
||||
{
|
||||
wxLogWarning(_T("Invalid line size in slider."));
|
||||
wxLogWarning(wxT("Invalid line size in slider."));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -491,7 +491,7 @@ void SliderWidgetsPage::DoSetPageSize()
|
||||
long pageSize;
|
||||
if ( !m_textPageSize->GetValue().ToLong(&pageSize) )
|
||||
{
|
||||
wxLogWarning(_T("Invalid slider page size"));
|
||||
wxLogWarning(wxT("Invalid slider page size"));
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -500,7 +500,7 @@ void SliderWidgetsPage::DoSetPageSize()
|
||||
|
||||
if ( m_slider->GetPageSize() != pageSize )
|
||||
{
|
||||
wxLogWarning(_T("Invalid page size in slider."));
|
||||
wxLogWarning(wxT("Invalid page size in slider."));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -509,7 +509,7 @@ void SliderWidgetsPage::DoSetTickFreq()
|
||||
long freq;
|
||||
if ( !m_textTickFreq->GetValue().ToLong(&freq) )
|
||||
{
|
||||
wxLogWarning(_T("Invalid slider tick frequency"));
|
||||
wxLogWarning(wxT("Invalid slider tick frequency"));
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -522,7 +522,7 @@ void SliderWidgetsPage::DoSetThumbLen()
|
||||
long len;
|
||||
if ( !m_textThumbLen->GetValue().ToLong(&len) )
|
||||
{
|
||||
wxLogWarning(_T("Invalid slider thumb length"));
|
||||
wxLogWarning(wxT("Invalid slider thumb length"));
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -569,7 +569,7 @@ void SliderWidgetsPage::OnButtonSetMinAndMax(wxCommandEvent& WXUNUSED(event))
|
||||
!m_textMax->GetValue().ToLong(&maxNew) ||
|
||||
minNew >= maxNew )
|
||||
{
|
||||
wxLogWarning(_T("Invalid min/max values for the slider."));
|
||||
wxLogWarning(wxT("Invalid min/max values for the slider."));
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -582,7 +582,7 @@ void SliderWidgetsPage::OnButtonSetMinAndMax(wxCommandEvent& WXUNUSED(event))
|
||||
if ( m_slider->GetMin() != m_min ||
|
||||
m_slider->GetMax() != m_max )
|
||||
{
|
||||
wxLogWarning(_T("Invalid range in slider."));
|
||||
wxLogWarning(wxT("Invalid range in slider."));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -591,7 +591,7 @@ void SliderWidgetsPage::OnButtonSetValue(wxCommandEvent& WXUNUSED(event))
|
||||
long val;
|
||||
if ( !m_textValue->GetValue().ToLong(&val) || !IsValidValue(val) )
|
||||
{
|
||||
wxLogWarning(_T("Invalid slider value."));
|
||||
wxLogWarning(wxT("Invalid slider value."));
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -657,7 +657,7 @@ void SliderWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
void SliderWidgetsPage::OnUpdateUICurValueText(wxUpdateUIEvent& event)
|
||||
{
|
||||
event.SetText( wxString::Format(_T("%d"), m_slider->GetValue()) );
|
||||
event.SetText( wxString::Format(wxT("%d"), m_slider->GetValue()) );
|
||||
}
|
||||
|
||||
void SliderWidgetsPage::OnUpdateUIRadioSides(wxUpdateUIEvent& event)
|
||||
|
@@ -196,7 +196,7 @@ END_EVENT_TABLE()
|
||||
#define FAMILY_CTRLS NATIVE_CTRLS
|
||||
#endif
|
||||
|
||||
IMPLEMENT_WIDGETS_PAGE(SpinBtnWidgetsPage, _T("Spin"),
|
||||
IMPLEMENT_WIDGETS_PAGE(SpinBtnWidgetsPage, wxT("Spin"),
|
||||
FAMILY_CTRLS | EDITABLE_CTRLS
|
||||
);
|
||||
|
||||
@@ -227,25 +227,25 @@ void SpinBtnWidgetsPage::CreateContent()
|
||||
wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
||||
// left pane
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY, _T("&Set style"));
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY, wxT("&Set style"));
|
||||
wxSizer *sizerLeft = new wxStaticBoxSizer(box, wxVERTICAL);
|
||||
|
||||
m_chkVert = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Vertical"));
|
||||
m_chkArrowKeys = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Arrow Keys"));
|
||||
m_chkWrap = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Wrap"));
|
||||
m_chkVert = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("&Vertical"));
|
||||
m_chkArrowKeys = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("&Arrow Keys"));
|
||||
m_chkWrap = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("&Wrap"));
|
||||
m_chkProcessEnter = CreateCheckBoxAndAddToSizer(sizerLeft,
|
||||
_T("Process &Enter"));
|
||||
wxT("Process &Enter"));
|
||||
|
||||
sizerLeft->Add(5, 5, 0, wxGROW | wxALL, 5); // spacer
|
||||
|
||||
static const wxString halign[] =
|
||||
{
|
||||
_T("left"),
|
||||
_T("centre"),
|
||||
_T("right"),
|
||||
wxT("left"),
|
||||
wxT("centre"),
|
||||
wxT("right"),
|
||||
};
|
||||
|
||||
m_radioAlign = new wxRadioBox(this, wxID_ANY, _T("&Text alignment"),
|
||||
m_radioAlign = new wxRadioBox(this, wxID_ANY, wxT("&Text alignment"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
WXSIZEOF(halign), halign, 1);
|
||||
|
||||
@@ -253,17 +253,17 @@ void SpinBtnWidgetsPage::CreateContent()
|
||||
|
||||
sizerLeft->Add(5, 5, 0, wxGROW | wxALL, 5); // spacer
|
||||
|
||||
wxButton *btn = new wxButton(this, SpinBtnPage_Reset, _T("&Reset"));
|
||||
wxButton *btn = new wxButton(this, SpinBtnPage_Reset, wxT("&Reset"));
|
||||
sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
|
||||
|
||||
// middle pane
|
||||
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY,
|
||||
_T("&Change spinbtn value"));
|
||||
wxT("&Change spinbtn value"));
|
||||
|
||||
wxSizer *sizerMiddle = new wxStaticBoxSizer(box2, wxVERTICAL);
|
||||
|
||||
wxTextCtrl *text;
|
||||
wxSizer *sizerRow = CreateSizerWithTextAndLabel(_T("Current value"),
|
||||
wxSizer *sizerRow = CreateSizerWithTextAndLabel(wxT("Current value"),
|
||||
SpinBtnPage_CurValueText,
|
||||
&text);
|
||||
text->SetEditable(false);
|
||||
@@ -271,21 +271,21 @@ void SpinBtnWidgetsPage::CreateContent()
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(SpinBtnPage_SetValue,
|
||||
_T("Set &value"),
|
||||
wxT("Set &value"),
|
||||
SpinBtnPage_ValueText,
|
||||
&m_textValue);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = CreateSizerWithTextAndButton(SpinBtnPage_SetMinAndMax,
|
||||
_T("&Min and max"),
|
||||
wxT("&Min and max"),
|
||||
SpinBtnPage_MinText,
|
||||
&m_textMin);
|
||||
|
||||
m_textMax = new wxTextCtrl(this, SpinBtnPage_MaxText, wxEmptyString);
|
||||
sizerRow->Add(m_textMax, 1, wxLEFT | wxALIGN_CENTRE_VERTICAL, 5);
|
||||
|
||||
m_textMin->SetValue( wxString::Format(_T("%d"), m_min) );
|
||||
m_textMax->SetValue( wxString::Format(_T("%d"), m_max) );
|
||||
m_textMin->SetValue( wxString::Format(wxT("%d"), m_min) );
|
||||
m_textMax->SetValue( wxString::Format(wxT("%d"), m_max) );
|
||||
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
@@ -342,7 +342,7 @@ void SpinBtnWidgetsPage::CreateSpin()
|
||||
switch ( m_radioAlign->GetSelection() )
|
||||
{
|
||||
default:
|
||||
wxFAIL_MSG(_T("unexpected radiobox selection"));
|
||||
wxFAIL_MSG(wxT("unexpected radiobox selection"));
|
||||
// fall through
|
||||
|
||||
case Align_Left:
|
||||
@@ -378,13 +378,13 @@ void SpinBtnWidgetsPage::CreateSpin()
|
||||
m_spinbtn->SetRange(m_min, m_max);
|
||||
|
||||
m_spinctrl = new wxSpinCtrl(this, SpinBtnPage_SpinCtrl,
|
||||
wxString::Format(_T("%d"), val),
|
||||
wxString::Format(wxT("%d"), val),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
flags | textFlags,
|
||||
m_min, m_max, val);
|
||||
|
||||
m_spinctrldbl = new wxSpinCtrlDouble(this, SpinBtnPage_SpinCtrlDouble,
|
||||
wxString::Format(_T("%d"), val),
|
||||
wxString::Format(wxT("%d"), val),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
flags | textFlags,
|
||||
m_min, m_max, val, 0.1);
|
||||
@@ -426,7 +426,7 @@ void SpinBtnWidgetsPage::OnButtonSetMinAndMax(wxCommandEvent& WXUNUSED(event))
|
||||
!m_textMax->GetValue().ToLong(&maxNew) ||
|
||||
minNew > maxNew )
|
||||
{
|
||||
wxLogWarning(_T("Invalid min/max values for the spinbtn."));
|
||||
wxLogWarning(wxT("Invalid min/max values for the spinbtn."));
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -444,7 +444,7 @@ void SpinBtnWidgetsPage::OnButtonSetValue(wxCommandEvent& WXUNUSED(event))
|
||||
long val;
|
||||
if ( !m_textValue->GetValue().ToLong(&val) || !IsValidValue(val) )
|
||||
{
|
||||
wxLogWarning(_T("Invalid spinbtn value."));
|
||||
wxLogWarning(wxT("Invalid spinbtn value."));
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -482,7 +482,7 @@ void SpinBtnWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
void SpinBtnWidgetsPage::OnUpdateUICurValueText(wxUpdateUIEvent& event)
|
||||
{
|
||||
event.SetText( wxString::Format(_T("%d"), m_spinbtn->GetValue()));
|
||||
event.SetText( wxString::Format(wxT("%d"), m_spinbtn->GetValue()));
|
||||
}
|
||||
|
||||
void SpinBtnWidgetsPage::OnSpinBtn(wxSpinEvent& event)
|
||||
@@ -490,20 +490,20 @@ void SpinBtnWidgetsPage::OnSpinBtn(wxSpinEvent& event)
|
||||
int value = event.GetInt();
|
||||
|
||||
wxASSERT_MSG( value == m_spinbtn->GetValue(),
|
||||
_T("spinbtn value should be the same") );
|
||||
wxT("spinbtn value should be the same") );
|
||||
|
||||
wxLogMessage(_T("Spin button value changed, now %d"), value);
|
||||
wxLogMessage(wxT("Spin button value changed, now %d"), value);
|
||||
}
|
||||
|
||||
void SpinBtnWidgetsPage::OnSpinBtnUp(wxSpinEvent& event)
|
||||
{
|
||||
wxLogMessage( _T("Spin button value incremented, will be %d (was %d)"),
|
||||
wxLogMessage( wxT("Spin button value incremented, will be %d (was %d)"),
|
||||
event.GetInt(), m_spinbtn->GetValue() );
|
||||
}
|
||||
|
||||
void SpinBtnWidgetsPage::OnSpinBtnDown(wxSpinEvent& event)
|
||||
{
|
||||
wxLogMessage( _T("Spin button value decremented, will be %d (was %d)"),
|
||||
wxLogMessage( wxT("Spin button value decremented, will be %d (was %d)"),
|
||||
event.GetInt(), m_spinbtn->GetValue() );
|
||||
}
|
||||
|
||||
@@ -512,21 +512,21 @@ void SpinBtnWidgetsPage::OnSpinCtrl(wxSpinEvent& event)
|
||||
int value = event.GetInt();
|
||||
|
||||
wxASSERT_MSG( value == m_spinctrl->GetValue(),
|
||||
_T("spinctrl value should be the same") );
|
||||
wxT("spinctrl value should be the same") );
|
||||
|
||||
wxLogMessage(_T("Spin control value changed, now %d"), value);
|
||||
wxLogMessage(wxT("Spin control value changed, now %d"), value);
|
||||
}
|
||||
|
||||
void SpinBtnWidgetsPage::OnSpinCtrlDouble(wxSpinDoubleEvent& event)
|
||||
{
|
||||
double value = event.GetValue();
|
||||
|
||||
wxLogMessage(_T("Spin control value changed, now %g"), value);
|
||||
wxLogMessage(wxT("Spin control value changed, now %g"), value);
|
||||
}
|
||||
|
||||
void SpinBtnWidgetsPage::OnSpinText(wxCommandEvent& event)
|
||||
{
|
||||
wxLogMessage(_T("Text changed in spin control, now \"%s\""),
|
||||
wxLogMessage(wxT("Text changed in spin control, now \"%s\""),
|
||||
event.GetString().c_str());
|
||||
}
|
||||
|
||||
|
@@ -167,7 +167,7 @@ END_EVENT_TABLE()
|
||||
// implementation
|
||||
// ============================================================================
|
||||
|
||||
IMPLEMENT_WIDGETS_PAGE(StaticWidgetsPage, _T("Static"),
|
||||
IMPLEMENT_WIDGETS_PAGE(StaticWidgetsPage, wxT("Static"),
|
||||
(int)wxPlatform(GENERIC_CTRLS).If(wxOS_WINDOWS,NATIVE_CTRLS)
|
||||
);
|
||||
|
||||
@@ -211,22 +211,22 @@ void StaticWidgetsPage::CreateContent()
|
||||
|
||||
static const wxString halign[] =
|
||||
{
|
||||
_T("left"),
|
||||
_T("centre"),
|
||||
_T("right"),
|
||||
wxT("left"),
|
||||
wxT("centre"),
|
||||
wxT("right"),
|
||||
};
|
||||
|
||||
static const wxString valign[] =
|
||||
{
|
||||
_T("top"),
|
||||
_T("centre"),
|
||||
_T("bottom"),
|
||||
wxT("top"),
|
||||
wxT("centre"),
|
||||
wxT("bottom"),
|
||||
};
|
||||
|
||||
m_radioHAlign = new wxRadioBox(this, wxID_ANY, _T("&Horz alignment"),
|
||||
m_radioHAlign = new wxRadioBox(this, wxID_ANY, wxT("&Horz alignment"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
WXSIZEOF(halign), halign, 3);
|
||||
m_radioVAlign = new wxRadioBox(this, wxID_ANY, _T("&Vert alignment"),
|
||||
m_radioVAlign = new wxRadioBox(this, wxID_ANY, wxT("&Vert alignment"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
WXSIZEOF(valign), valign, 3);
|
||||
|
||||
@@ -236,23 +236,23 @@ void StaticWidgetsPage::CreateContent()
|
||||
|
||||
sizerLeft->Add(5, 5, 0, wxGROW | wxALL, 5); // spacer
|
||||
|
||||
m_chkEllipsize = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Ellipsize"));
|
||||
m_chkEllipsize = CreateCheckBoxAndAddToSizer(sizerLeft, wxT("&Ellipsize"));
|
||||
|
||||
static const wxString ellipsizeMode[] =
|
||||
{
|
||||
_T("&start"),
|
||||
_T("&middle"),
|
||||
_T("&end"),
|
||||
wxT("&start"),
|
||||
wxT("&middle"),
|
||||
wxT("&end"),
|
||||
};
|
||||
|
||||
m_radioEllipsize = new wxRadioBox(this, wxID_ANY, _T("&Ellipsize mode"),
|
||||
m_radioEllipsize = new wxRadioBox(this, wxID_ANY, wxT("&Ellipsize mode"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
WXSIZEOF(ellipsizeMode), ellipsizeMode,
|
||||
3);
|
||||
|
||||
sizerLeft->Add(m_radioEllipsize, 0, wxGROW | wxALL, 5);
|
||||
|
||||
wxButton *btn = new wxButton(this, StaticPage_Reset, _T("&Reset"));
|
||||
wxButton *btn = new wxButton(this, StaticPage_Reset, wxT("&Reset"));
|
||||
sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
|
||||
|
||||
// middle pane
|
||||
@@ -296,13 +296,13 @@ void StaticWidgetsPage::CreateContent()
|
||||
// NB: must be done _before_ calling CreateStatic()
|
||||
Reset();
|
||||
|
||||
m_textBox->SetValue(_T("This is a box"));
|
||||
m_textLabel->SetValue(_T("And this is a\n\tlabel inside the box with a &mnemonic.\n")
|
||||
_T("Only this text is affected by the ellipsize settings."));
|
||||
m_textLabelWithMarkup->SetValue(_T("Another label, this time <b>decorated</b> ")
|
||||
_T("with <u>markup</u>; here you need entities ")
|
||||
_T("for the symbols: < > & ' " ")
|
||||
_T(" but you can still place &mnemonics..."));
|
||||
m_textBox->SetValue(wxT("This is a box"));
|
||||
m_textLabel->SetValue(wxT("And this is a\n\tlabel inside the box with a &mnemonic.\n")
|
||||
wxT("Only this text is affected by the ellipsize settings."));
|
||||
m_textLabelWithMarkup->SetValue(wxT("Another label, this time <b>decorated</b> ")
|
||||
wxT("with <u>markup</u>; here you need entities ")
|
||||
wxT("for the symbols: < > & ' " ")
|
||||
wxT(" but you can still place &mnemonics..."));
|
||||
|
||||
// right pane
|
||||
wxSizer *sizerRight = new wxBoxSizer(wxHORIZONTAL);
|
||||
@@ -370,7 +370,7 @@ void StaticWidgetsPage::CreateStatic()
|
||||
switch ( m_radioHAlign->GetSelection() )
|
||||
{
|
||||
default:
|
||||
wxFAIL_MSG(_T("unexpected radiobox selection"));
|
||||
wxFAIL_MSG(wxT("unexpected radiobox selection"));
|
||||
// fall through
|
||||
|
||||
case StaticHAlign_Left:
|
||||
@@ -389,7 +389,7 @@ void StaticWidgetsPage::CreateStatic()
|
||||
switch ( m_radioVAlign->GetSelection() )
|
||||
{
|
||||
default:
|
||||
wxFAIL_MSG(_T("unexpected radiobox selection"));
|
||||
wxFAIL_MSG(wxT("unexpected radiobox selection"));
|
||||
// fall through
|
||||
|
||||
case StaticVAlign_Top:
|
||||
@@ -410,7 +410,7 @@ void StaticWidgetsPage::CreateStatic()
|
||||
switch ( m_radioEllipsize->GetSelection() )
|
||||
{
|
||||
default:
|
||||
wxFAIL_MSG(_T("unexpected radiobox selection"));
|
||||
wxFAIL_MSG(wxT("unexpected radiobox selection"));
|
||||
// fall through
|
||||
|
||||
case StaticEllipsize_Start:
|
||||
|
@@ -263,32 +263,32 @@ protected:
|
||||
switch ( HitTest(event.GetPosition(), &x, &y) )
|
||||
{
|
||||
default:
|
||||
wxFAIL_MSG( _T("unexpected HitTest() result") );
|
||||
wxFAIL_MSG( wxT("unexpected HitTest() result") );
|
||||
// fall through
|
||||
|
||||
case wxTE_HT_UNKNOWN:
|
||||
x = y = -1;
|
||||
where = _T("nowhere near");
|
||||
where = wxT("nowhere near");
|
||||
break;
|
||||
|
||||
case wxTE_HT_BEFORE:
|
||||
where = _T("before");
|
||||
where = wxT("before");
|
||||
break;
|
||||
|
||||
case wxTE_HT_BELOW:
|
||||
where = _T("below");
|
||||
where = wxT("below");
|
||||
break;
|
||||
|
||||
case wxTE_HT_BEYOND:
|
||||
where = _T("beyond");
|
||||
where = wxT("beyond");
|
||||
break;
|
||||
|
||||
case wxTE_HT_ON_TEXT:
|
||||
where = _T("at");
|
||||
where = wxT("at");
|
||||
break;
|
||||
}
|
||||
|
||||
wxLogMessage(_T("Mouse is %s (%ld, %ld)"), where.c_str(), x, y);
|
||||
wxLogMessage(wxT("Mouse is %s (%ld, %ld)"), where.c_str(), x, y);
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
@@ -344,7 +344,7 @@ END_EVENT_TABLE()
|
||||
#define FAMILY_CTRLS NATIVE_CTRLS
|
||||
#endif
|
||||
|
||||
IMPLEMENT_WIDGETS_PAGE(TextWidgetsPage, _T("Text"),
|
||||
IMPLEMENT_WIDGETS_PAGE(TextWidgetsPage, wxT("Text"),
|
||||
FAMILY_CTRLS | EDITABLE_CTRLS
|
||||
);
|
||||
|
||||
@@ -389,12 +389,12 @@ void TextWidgetsPage::CreateContent()
|
||||
// left pane
|
||||
static const wxString modes[] =
|
||||
{
|
||||
_T("single line"),
|
||||
_T("multi line"),
|
||||
wxT("single line"),
|
||||
wxT("multi line"),
|
||||
};
|
||||
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY, _T("&Set textctrl parameters"));
|
||||
m_radioTextLines = new wxRadioBox(this, wxID_ANY, _T("&Number of lines:"),
|
||||
wxStaticBox *box = new wxStaticBox(this, wxID_ANY, wxT("&Set textctrl parameters"));
|
||||
m_radioTextLines = new wxRadioBox(this, wxID_ANY, wxT("&Number of lines:"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
WXSIZEOF(modes), modes,
|
||||
1, wxRA_SPECIFY_COLS);
|
||||
@@ -405,26 +405,26 @@ void TextWidgetsPage::CreateContent()
|
||||
sizerLeft->AddSpacer(5);
|
||||
|
||||
m_chkPassword = CreateCheckBoxAndAddToSizer(
|
||||
sizerLeft, _T("&Password control"), TextPage_Password
|
||||
sizerLeft, wxT("&Password control"), TextPage_Password
|
||||
);
|
||||
m_chkReadonly = CreateCheckBoxAndAddToSizer(
|
||||
sizerLeft, _T("&Read-only mode")
|
||||
sizerLeft, wxT("&Read-only mode")
|
||||
);
|
||||
m_chkFilename = CreateCheckBoxAndAddToSizer(
|
||||
sizerLeft, _T("&Filename control")
|
||||
sizerLeft, wxT("&Filename control")
|
||||
);
|
||||
m_chkFilename->Disable(); // not implemented yet
|
||||
sizerLeft->AddSpacer(5);
|
||||
|
||||
static const wxString wrap[] =
|
||||
{
|
||||
_T("no wrap"),
|
||||
_T("word wrap"),
|
||||
_T("char wrap"),
|
||||
_T("best wrap"),
|
||||
wxT("no wrap"),
|
||||
wxT("word wrap"),
|
||||
wxT("char wrap"),
|
||||
wxT("best wrap"),
|
||||
};
|
||||
|
||||
m_radioWrap = new wxRadioBox(this, wxID_ANY, _T("&Wrap style:"),
|
||||
m_radioWrap = new wxRadioBox(this, wxID_ANY, wxT("&Wrap style:"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
WXSIZEOF(wrap), wrap,
|
||||
1, wxRA_SPECIFY_COLS);
|
||||
@@ -433,12 +433,12 @@ void TextWidgetsPage::CreateContent()
|
||||
#ifdef __WXMSW__
|
||||
static const wxString kinds[] =
|
||||
{
|
||||
_T("plain edit"),
|
||||
_T("rich edit"),
|
||||
_T("rich edit 2.0"),
|
||||
wxT("plain edit"),
|
||||
wxT("rich edit"),
|
||||
wxT("rich edit 2.0"),
|
||||
};
|
||||
|
||||
m_radioKind = new wxRadioBox(this, wxID_ANY, _T("Control &kind"),
|
||||
m_radioKind = new wxRadioBox(this, wxID_ANY, wxT("Control &kind"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
WXSIZEOF(kinds), kinds,
|
||||
1, wxRA_SPECIFY_COLS);
|
||||
@@ -447,33 +447,33 @@ void TextWidgetsPage::CreateContent()
|
||||
sizerLeft->Add(m_radioKind, 0, wxGROW | wxALL, 5);
|
||||
#endif // __WXMSW__
|
||||
|
||||
wxButton *btn = new wxButton(this, TextPage_Reset, _T("&Reset"));
|
||||
wxButton *btn = new wxButton(this, TextPage_Reset, wxT("&Reset"));
|
||||
sizerLeft->Add(2, 2, 0, wxGROW | wxALL, 1); // spacer
|
||||
sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
|
||||
|
||||
// middle pane
|
||||
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY, _T("&Change contents:"));
|
||||
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY, wxT("&Change contents:"));
|
||||
wxSizer *sizerMiddleUp = new wxStaticBoxSizer(box2, wxVERTICAL);
|
||||
|
||||
btn = new wxButton(this, TextPage_Set, _T("&Set text value"));
|
||||
btn = new wxButton(this, TextPage_Set, wxT("&Set text value"));
|
||||
sizerMiddleUp->Add(btn, 0, wxALL | wxGROW, 1);
|
||||
|
||||
btn = new wxButton(this, TextPage_Add, _T("&Append text"));
|
||||
btn = new wxButton(this, TextPage_Add, wxT("&Append text"));
|
||||
sizerMiddleUp->Add(btn, 0, wxALL | wxGROW, 1);
|
||||
|
||||
btn = new wxButton(this, TextPage_Insert, _T("&Insert text"));
|
||||
btn = new wxButton(this, TextPage_Insert, wxT("&Insert text"));
|
||||
sizerMiddleUp->Add(btn, 0, wxALL | wxGROW, 1);
|
||||
|
||||
btn = new wxButton(this, TextPage_Load, _T("&Load file"));
|
||||
btn = new wxButton(this, TextPage_Load, wxT("&Load file"));
|
||||
sizerMiddleUp->Add(btn, 0, wxALL | wxGROW, 1);
|
||||
|
||||
btn = new wxButton(this, TextPage_Clear, _T("&Clear"));
|
||||
btn = new wxButton(this, TextPage_Clear, wxT("&Clear"));
|
||||
sizerMiddleUp->Add(btn, 0, wxALL | wxGROW, 1);
|
||||
|
||||
btn = new wxButton(this, TextPage_StreamRedirector, _T("St&ream redirection"));
|
||||
btn = new wxButton(this, TextPage_StreamRedirector, wxT("St&ream redirection"));
|
||||
sizerMiddleUp->Add(btn, 0, wxALL | wxGROW, 1);
|
||||
|
||||
wxStaticBox *box4 = new wxStaticBox(this, wxID_ANY, _T("&Info:"));
|
||||
wxStaticBox *box4 = new wxStaticBox(this, wxID_ANY, wxT("&Info:"));
|
||||
wxSizer *sizerMiddleDown = new wxStaticBoxSizer(box4, wxVERTICAL);
|
||||
|
||||
m_textPosCur = CreateInfoText();
|
||||
@@ -483,19 +483,19 @@ void TextWidgetsPage::CreateContent()
|
||||
wxSizer *sizerRow = new wxBoxSizer(wxHORIZONTAL);
|
||||
sizerRow->Add(CreateTextWithLabelSizer
|
||||
(
|
||||
_T("Current pos:"),
|
||||
wxT("Current pos:"),
|
||||
m_textPosCur
|
||||
),
|
||||
0, wxRIGHT, 5);
|
||||
sizerRow->Add(CreateTextWithLabelSizer
|
||||
(
|
||||
_T("Col:"),
|
||||
wxT("Col:"),
|
||||
m_textColCur
|
||||
),
|
||||
0, wxLEFT | wxRIGHT, 5);
|
||||
sizerRow->Add(CreateTextWithLabelSizer
|
||||
(
|
||||
_T("Row:"),
|
||||
wxT("Row:"),
|
||||
m_textRowCur
|
||||
),
|
||||
0, wxLEFT, 5);
|
||||
@@ -507,9 +507,9 @@ void TextWidgetsPage::CreateContent()
|
||||
(
|
||||
CreateTextWithLabelSizer
|
||||
(
|
||||
_T("Number of lines:"),
|
||||
wxT("Number of lines:"),
|
||||
m_textLineLast,
|
||||
_T("Last position:"),
|
||||
wxT("Last position:"),
|
||||
m_textPosLast
|
||||
),
|
||||
0, wxALL, 5
|
||||
@@ -521,9 +521,9 @@ void TextWidgetsPage::CreateContent()
|
||||
(
|
||||
CreateTextWithLabelSizer
|
||||
(
|
||||
_T("Selection: from"),
|
||||
wxT("Selection: from"),
|
||||
m_textSelFrom,
|
||||
_T("to"),
|
||||
wxT("to"),
|
||||
m_textSelTo
|
||||
),
|
||||
0, wxALL, 5
|
||||
@@ -536,7 +536,7 @@ void TextWidgetsPage::CreateContent()
|
||||
(
|
||||
CreateTextWithLabelSizer
|
||||
(
|
||||
_T("Range 10..20:"),
|
||||
wxT("Range 10..20:"),
|
||||
m_textRange
|
||||
),
|
||||
0, wxALL, 5
|
||||
@@ -547,7 +547,7 @@ void TextWidgetsPage::CreateContent()
|
||||
sizerMiddle->Add(sizerMiddleDown, 1, wxGROW | wxTOP, 5);
|
||||
|
||||
// right pane
|
||||
wxStaticBox *box3 = new wxStaticBox(this, wxID_ANY, _T("&Text:"));
|
||||
wxStaticBox *box3 = new wxStaticBox(this, wxID_ANY, wxT("&Text:"));
|
||||
m_sizerText = new wxStaticBoxSizer(box3, wxHORIZONTAL);
|
||||
Reset();
|
||||
CreateText();
|
||||
@@ -572,7 +572,7 @@ wxTextCtrl *TextWidgetsPage::CreateInfoText()
|
||||
if ( !s_maxWidth )
|
||||
{
|
||||
// calc it once only
|
||||
GetTextExtent(_T("9999999"), &s_maxWidth, NULL);
|
||||
GetTextExtent(wxT("9999999"), &s_maxWidth, NULL);
|
||||
}
|
||||
|
||||
wxTextCtrl *text = new wxTextCtrl(this, wxID_ANY, wxEmptyString,
|
||||
@@ -626,7 +626,7 @@ void TextWidgetsPage::CreateText()
|
||||
switch ( m_radioTextLines->GetSelection() )
|
||||
{
|
||||
default:
|
||||
wxFAIL_MSG( _T("unexpected lines radio box selection") );
|
||||
wxFAIL_MSG( wxT("unexpected lines radio box selection") );
|
||||
|
||||
case TextLines_Single:
|
||||
break;
|
||||
@@ -645,7 +645,7 @@ void TextWidgetsPage::CreateText()
|
||||
switch ( m_radioWrap->GetSelection() )
|
||||
{
|
||||
default:
|
||||
wxFAIL_MSG( _T("unexpected wrap style radio box selection") );
|
||||
wxFAIL_MSG( wxT("unexpected wrap style radio box selection") );
|
||||
|
||||
case WrapStyle_None:
|
||||
flags |= wxTE_DONTWRAP; // same as wxHSCROLL
|
||||
@@ -669,7 +669,7 @@ void TextWidgetsPage::CreateText()
|
||||
switch ( m_radioKind->GetSelection() )
|
||||
{
|
||||
default:
|
||||
wxFAIL_MSG( _T("unexpected kind radio box selection") );
|
||||
wxFAIL_MSG( wxT("unexpected kind radio box selection") );
|
||||
|
||||
case TextKind_Plain:
|
||||
break;
|
||||
@@ -694,7 +694,7 @@ void TextWidgetsPage::CreateText()
|
||||
}
|
||||
else
|
||||
{
|
||||
valueOld = _T("Hello, Universe!");
|
||||
valueOld = wxT("Hello, Universe!");
|
||||
}
|
||||
|
||||
m_text = new WidgetsTextCtrl(this, TextPage_Textctrl, valueOld, flags);
|
||||
@@ -754,7 +754,7 @@ void TextWidgetsPage::OnIdle(wxIdleEvent& WXUNUSED(event))
|
||||
if ( m_textLineLast )
|
||||
{
|
||||
m_textLineLast->SetValue(
|
||||
wxString::Format(_T("%d"), m_text->GetNumberOfLines()) );
|
||||
wxString::Format(wxT("%d"), m_text->GetNumberOfLines()) );
|
||||
}
|
||||
|
||||
if ( m_textSelFrom && m_textSelTo )
|
||||
@@ -799,8 +799,8 @@ void TextWidgetsPage::OnButtonReset(wxCommandEvent& WXUNUSED(event))
|
||||
void TextWidgetsPage::OnButtonSet(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
m_text->SetValue(m_text->GetWindowStyle() & wxTE_MULTILINE
|
||||
? _T("Here,\nthere and\neverywhere")
|
||||
: _T("Yellow submarine"));
|
||||
? wxT("Here,\nthere and\neverywhere")
|
||||
: wxT("Yellow submarine"));
|
||||
|
||||
m_text->SetFocus();
|
||||
}
|
||||
@@ -809,18 +809,18 @@ void TextWidgetsPage::OnButtonAdd(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
if ( m_text->GetWindowStyle() & wxTE_MULTILINE )
|
||||
{
|
||||
m_text->AppendText(_T("We all live in a\n"));
|
||||
m_text->AppendText(wxT("We all live in a\n"));
|
||||
}
|
||||
|
||||
m_text->AppendText(_T("Yellow submarine"));
|
||||
m_text->AppendText(wxT("Yellow submarine"));
|
||||
}
|
||||
|
||||
void TextWidgetsPage::OnButtonInsert(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
m_text->WriteText(_T("Is there anybody going to listen to my story"));
|
||||
m_text->WriteText(wxT("Is there anybody going to listen to my story"));
|
||||
if ( m_text->GetWindowStyle() & wxTE_MULTILINE )
|
||||
{
|
||||
m_text->WriteText(_T("\nall about the girl who came to stay"));
|
||||
m_text->WriteText(wxT("\nall about the girl who came to stay"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -834,14 +834,14 @@ void TextWidgetsPage::OnButtonLoad(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
// search for the file in several dirs where it's likely to be
|
||||
wxPathList pathlist;
|
||||
pathlist.Add(_T("."));
|
||||
pathlist.Add(_T(".."));
|
||||
pathlist.Add(_T("../../../samples/widgets"));
|
||||
pathlist.Add(wxT("."));
|
||||
pathlist.Add(wxT(".."));
|
||||
pathlist.Add(wxT("../../../samples/widgets"));
|
||||
|
||||
wxString filename = pathlist.FindValidPath(_T("textctrl.cpp"));
|
||||
wxString filename = pathlist.FindValidPath(wxT("textctrl.cpp"));
|
||||
if ( !filename )
|
||||
{
|
||||
wxLogError(_T("File textctrl.cpp not found."));
|
||||
wxLogError(wxT("File textctrl.cpp not found."));
|
||||
}
|
||||
else // load it
|
||||
{
|
||||
@@ -849,12 +849,12 @@ void TextWidgetsPage::OnButtonLoad(wxCommandEvent& WXUNUSED(event))
|
||||
if ( !m_text->LoadFile(filename) )
|
||||
{
|
||||
// this is not supposed to happen ...
|
||||
wxLogError(_T("Error loading file."));
|
||||
wxLogError(wxT("Error loading file."));
|
||||
}
|
||||
else
|
||||
{
|
||||
long elapsed = sw.Time();
|
||||
wxLogMessage(_T("Loaded file '%s' in %lu.%us"),
|
||||
wxLogMessage(wxT("Loaded file '%s' in %lu.%us"),
|
||||
filename.c_str(), elapsed / 1000,
|
||||
(unsigned int) elapsed % 1000);
|
||||
}
|
||||
@@ -901,12 +901,12 @@ void TextWidgetsPage::OnText(wxCommandEvent& WXUNUSED(event))
|
||||
return;
|
||||
}
|
||||
|
||||
wxLogMessage(_T("Text ctrl value changed"));
|
||||
wxLogMessage(wxT("Text ctrl value changed"));
|
||||
}
|
||||
|
||||
void TextWidgetsPage::OnTextEnter(wxCommandEvent& event)
|
||||
{
|
||||
wxLogMessage(_T("Text entered: '%s'"), event.GetString().c_str());
|
||||
wxLogMessage(wxT("Text entered: '%s'"), event.GetString().c_str());
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
@@ -919,9 +919,9 @@ void TextWidgetsPage::OnStreamRedirector(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
#if wxHAS_TEXT_WINDOW_STREAM
|
||||
wxStreamToTextRedirector redirect(m_text);
|
||||
wxString str( _T("Outputed to cout, appears in wxTextCtrl!") );
|
||||
wxString str( wxT("Outputed to cout, appears in wxTextCtrl!") );
|
||||
wxSTD cout << str << wxSTD endl;
|
||||
#else
|
||||
wxMessageBox(_T("This wxWidgets build does not support wxStreamToTextRedirector"));
|
||||
wxMessageBox(wxT("This wxWidgets build does not support wxStreamToTextRedirector"));
|
||||
#endif
|
||||
}
|
||||
|
@@ -132,14 +132,14 @@ void ToggleWidgetsPage::CreateContent()
|
||||
// wxSizer *sizerLeft = new wxStaticBoxSizer(box, wxVERTICAL);
|
||||
|
||||
// middle pane
|
||||
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY, _T("&Operations"));
|
||||
wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY, wxT("&Operations"));
|
||||
wxSizer *sizerMiddle = new wxStaticBoxSizer(box2, wxVERTICAL);
|
||||
|
||||
wxSizer *sizerRow = CreateSizerWithTextAndButton(TogglePage_ChangeLabel,
|
||||
_T("Change label"),
|
||||
wxT("Change label"),
|
||||
wxID_ANY,
|
||||
&m_textLabel);
|
||||
m_textLabel->SetValue(_T("&Toggle me!"));
|
||||
m_textLabel->SetValue(wxT("&Toggle me!"));
|
||||
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
|
@@ -326,26 +326,26 @@ bool WidgetsApp::OnInit()
|
||||
// this sample side by side and it is useful to see which one is which
|
||||
wxString title;
|
||||
#if defined(__WXUNIVERSAL__)
|
||||
title = _T("wxUniv/");
|
||||
title = wxT("wxUniv/");
|
||||
#endif
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
title += _T("wxMSW");
|
||||
title += wxT("wxMSW");
|
||||
#elif defined(__WXGTK__)
|
||||
title += _T("wxGTK");
|
||||
title += wxT("wxGTK");
|
||||
#elif defined(__WXMAC__)
|
||||
title += _T("wxMAC");
|
||||
title += wxT("wxMAC");
|
||||
#elif defined(__WXMOTIF__)
|
||||
title += _T("wxMOTIF");
|
||||
title += wxT("wxMOTIF");
|
||||
#elif __WXPALMOS5__
|
||||
title += _T("wxPALMOS5");
|
||||
title += wxT("wxPALMOS5");
|
||||
#elif __WXPALMOS6__
|
||||
title += _T("wxPALMOS6");
|
||||
title += wxT("wxPALMOS6");
|
||||
#else
|
||||
title += _T("wxWidgets");
|
||||
title += wxT("wxWidgets");
|
||||
#endif
|
||||
|
||||
wxFrame *frame = new WidgetsFrame(title + _T(" widgets demo"));
|
||||
wxFrame *frame = new WidgetsFrame(title + wxT(" widgets demo"));
|
||||
frame->Show();
|
||||
|
||||
return true;
|
||||
@@ -376,45 +376,45 @@ WidgetsFrame::WidgetsFrame(const wxString& title)
|
||||
wxMenuBar *mbar = new wxMenuBar;
|
||||
wxMenu *menuWidget = new wxMenu;
|
||||
#if wxUSE_TOOLTIPS
|
||||
menuWidget->Append(Widgets_SetTooltip, _T("Set &tooltip...\tCtrl-T"));
|
||||
menuWidget->Append(Widgets_SetTooltip, wxT("Set &tooltip...\tCtrl-T"));
|
||||
menuWidget->AppendSeparator();
|
||||
#endif // wxUSE_TOOLTIPS
|
||||
menuWidget->Append(Widgets_SetFgColour, _T("Set &foreground...\tCtrl-F"));
|
||||
menuWidget->Append(Widgets_SetBgColour, _T("Set &background...\tCtrl-B"));
|
||||
menuWidget->Append(Widgets_SetFont, _T("Set f&ont...\tCtrl-O"));
|
||||
menuWidget->AppendCheckItem(Widgets_Enable, _T("&Enable/disable\tCtrl-E"));
|
||||
menuWidget->Append(Widgets_SetFgColour, wxT("Set &foreground...\tCtrl-F"));
|
||||
menuWidget->Append(Widgets_SetBgColour, wxT("Set &background...\tCtrl-B"));
|
||||
menuWidget->Append(Widgets_SetFont, wxT("Set f&ont...\tCtrl-O"));
|
||||
menuWidget->AppendCheckItem(Widgets_Enable, wxT("&Enable/disable\tCtrl-E"));
|
||||
|
||||
wxMenu *menuBorders = new wxMenu;
|
||||
menuBorders->AppendRadioItem(Widgets_BorderDefault, _T("De&fault\tCtrl-Shift-9"));
|
||||
menuBorders->AppendRadioItem(Widgets_BorderNone, _T("&None\tCtrl-Shift-0"));
|
||||
menuBorders->AppendRadioItem(Widgets_BorderSimple, _T("&Simple\tCtrl-Shift-1"));
|
||||
menuBorders->AppendRadioItem(Widgets_BorderDouble, _T("&Double\tCtrl-Shift-2"));
|
||||
menuBorders->AppendRadioItem(Widgets_BorderStatic, _T("Stati&c\tCtrl-Shift-3"));
|
||||
menuBorders->AppendRadioItem(Widgets_BorderRaised, _T("&Raised\tCtrl-Shift-4"));
|
||||
menuBorders->AppendRadioItem(Widgets_BorderSunken, _T("S&unken\tCtrl-Shift-5"));
|
||||
menuWidget->AppendSubMenu(menuBorders, _T("Set &border"));
|
||||
menuBorders->AppendRadioItem(Widgets_BorderDefault, wxT("De&fault\tCtrl-Shift-9"));
|
||||
menuBorders->AppendRadioItem(Widgets_BorderNone, wxT("&None\tCtrl-Shift-0"));
|
||||
menuBorders->AppendRadioItem(Widgets_BorderSimple, wxT("&Simple\tCtrl-Shift-1"));
|
||||
menuBorders->AppendRadioItem(Widgets_BorderDouble, wxT("&Double\tCtrl-Shift-2"));
|
||||
menuBorders->AppendRadioItem(Widgets_BorderStatic, wxT("Stati&c\tCtrl-Shift-3"));
|
||||
menuBorders->AppendRadioItem(Widgets_BorderRaised, wxT("&Raised\tCtrl-Shift-4"));
|
||||
menuBorders->AppendRadioItem(Widgets_BorderSunken, wxT("S&unken\tCtrl-Shift-5"));
|
||||
menuWidget->AppendSubMenu(menuBorders, wxT("Set &border"));
|
||||
|
||||
menuWidget->AppendSeparator();
|
||||
menuWidget->AppendCheckItem(Widgets_GlobalBusyCursor,
|
||||
_T("Toggle &global busy cursor\tCtrl-Shift-U"));
|
||||
wxT("Toggle &global busy cursor\tCtrl-Shift-U"));
|
||||
menuWidget->AppendCheckItem(Widgets_BusyCursor,
|
||||
_T("Toggle b&usy cursor\tCtrl-U"));
|
||||
wxT("Toggle b&usy cursor\tCtrl-U"));
|
||||
|
||||
menuWidget->AppendSeparator();
|
||||
menuWidget->Append(wxID_EXIT, _T("&Quit\tCtrl-Q"));
|
||||
mbar->Append(menuWidget, _T("&Widget"));
|
||||
menuWidget->Append(wxID_EXIT, wxT("&Quit\tCtrl-Q"));
|
||||
mbar->Append(menuWidget, wxT("&Widget"));
|
||||
|
||||
wxMenu *menuTextEntry = new wxMenu;
|
||||
menuTextEntry->AppendRadioItem(TextEntry_DisableAutoComplete,
|
||||
_T("&Disable auto-completion"));
|
||||
wxT("&Disable auto-completion"));
|
||||
menuTextEntry->AppendRadioItem(TextEntry_AutoCompleteFixed,
|
||||
_T("Fixed-&list auto-completion"));
|
||||
wxT("Fixed-&list auto-completion"));
|
||||
menuTextEntry->AppendRadioItem(TextEntry_AutoCompleteFilenames,
|
||||
_T("&Files names auto-completion"));
|
||||
wxT("&Files names auto-completion"));
|
||||
menuTextEntry->AppendSeparator();
|
||||
menuTextEntry->Append(TextEntry_SetHint, "Set help &hint");
|
||||
|
||||
mbar->Append(menuTextEntry, _T("&Text"));
|
||||
mbar->Append(menuTextEntry, wxT("&Text"));
|
||||
|
||||
SetMenuBar(mbar);
|
||||
|
||||
@@ -443,7 +443,7 @@ WidgetsFrame::WidgetsFrame(const wxString& title)
|
||||
// the lower one only has the log listbox and a button to clear it
|
||||
#if USE_LOG
|
||||
wxSizer *sizerDown = new wxStaticBoxSizer(
|
||||
new wxStaticBox( m_panel, wxID_ANY, _T("&Log window") ),
|
||||
new wxStaticBox( m_panel, wxID_ANY, wxT("&Log window") ),
|
||||
wxVERTICAL);
|
||||
|
||||
m_lboxLog = new wxListBox(m_panel, wxID_ANY);
|
||||
@@ -456,11 +456,11 @@ WidgetsFrame::WidgetsFrame(const wxString& title)
|
||||
wxBoxSizer *sizerBtns = new wxBoxSizer(wxHORIZONTAL);
|
||||
wxButton *btn;
|
||||
#if USE_LOG
|
||||
btn = new wxButton(m_panel, Widgets_ClearLog, _T("Clear &log"));
|
||||
btn = new wxButton(m_panel, Widgets_ClearLog, wxT("Clear &log"));
|
||||
sizerBtns->Add(btn);
|
||||
sizerBtns->Add(10, 0); // spacer
|
||||
#endif // USE_LOG
|
||||
btn = new wxButton(m_panel, Widgets_Quit, _T("E&xit"));
|
||||
btn = new wxButton(m_panel, Widgets_Quit, wxT("E&xit"));
|
||||
sizerBtns->Add(btn);
|
||||
sizerDown->Add(sizerBtns, 0, wxALL | wxALIGN_RIGHT, 5);
|
||||
|
||||
@@ -572,7 +572,7 @@ void WidgetsFrame::InitBook()
|
||||
}
|
||||
}
|
||||
|
||||
GetMenuBar()->Append(menuPages, _T("&Page"));
|
||||
GetMenuBar()->Append(menuPages, wxT("&Page"));
|
||||
|
||||
#if USE_ICONS_IN_BOOK
|
||||
m_book->AssignImageList(imageList);
|
||||
@@ -641,7 +641,7 @@ WidgetsPage *WidgetsFrame::CurrentPage()
|
||||
|
||||
#if !USE_TREEBOOK
|
||||
WidgetsBookCtrl *subBook = wxStaticCast(page, WidgetsBookCtrl);
|
||||
wxCHECK_MSG( subBook, NULL, _T("no WidgetsBookCtrl?") );
|
||||
wxCHECK_MSG( subBook, NULL, wxT("no WidgetsBookCtrl?") );
|
||||
|
||||
page = subBook->GetCurrentPage();
|
||||
#endif // !USE_TREEBOOK
|
||||
@@ -737,13 +737,13 @@ void WidgetsFrame::OnGoToPage(wxCommandEvent& event)
|
||||
|
||||
void WidgetsFrame::OnSetTooltip(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
static wxString s_tip = _T("This is a tooltip");
|
||||
static wxString s_tip = wxT("This is a tooltip");
|
||||
|
||||
wxTextEntryDialog dialog
|
||||
(
|
||||
this,
|
||||
_T("Tooltip text (may use \\n, leave empty to remove): "),
|
||||
_T("Widgets sample"),
|
||||
wxT("Tooltip text (may use \\n, leave empty to remove): "),
|
||||
wxT("Widgets sample"),
|
||||
s_tip
|
||||
);
|
||||
|
||||
@@ -751,7 +751,7 @@ void WidgetsFrame::OnSetTooltip(wxCommandEvent& WXUNUSED(event))
|
||||
return;
|
||||
|
||||
s_tip = dialog.GetValue();
|
||||
s_tip.Replace(_T("\\n"), _T("\n"));
|
||||
s_tip.Replace(wxT("\\n"), wxT("\n"));
|
||||
|
||||
WidgetsPage *page = CurrentPage();
|
||||
|
||||
@@ -789,7 +789,7 @@ void WidgetsFrame::OnSetFgCol(wxCommandEvent& WXUNUSED(event))
|
||||
ctrl2->Refresh();
|
||||
}
|
||||
#else
|
||||
wxLogMessage(_T("Colour selection dialog not available in current build."));
|
||||
wxLogMessage(wxT("Colour selection dialog not available in current build."));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -817,7 +817,7 @@ void WidgetsFrame::OnSetBgCol(wxCommandEvent& WXUNUSED(event))
|
||||
ctrl2->Refresh();
|
||||
}
|
||||
#else
|
||||
wxLogMessage(_T("Colour selection dialog not available in current build."));
|
||||
wxLogMessage(wxT("Colour selection dialog not available in current build."));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -845,7 +845,7 @@ void WidgetsFrame::OnSetFont(wxCommandEvent& WXUNUSED(event))
|
||||
ctrl2->Refresh();
|
||||
}
|
||||
#else
|
||||
wxLogMessage(_T("Font selection dialog not available in current build."));
|
||||
wxLogMessage(wxT("Font selection dialog not available in current build."));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -869,7 +869,7 @@ void WidgetsFrame::OnSetBorder(wxCommandEvent& event)
|
||||
case Widgets_BorderDouble: border = wxBORDER_DOUBLE; break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( _T("unknown border style") );
|
||||
wxFAIL_MSG( wxT("unknown border style") );
|
||||
// fall through
|
||||
|
||||
case Widgets_BorderDefault: border = wxBORDER_DEFAULT; break;
|
||||
|
Reference in New Issue
Block a user