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:
@@ -115,7 +115,7 @@ IMPLEMENT_APP(MyApp)
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
// create the main application window
|
||||
MyFrame *frame = new MyFrame(_T("Minimal wxWindows App"));
|
||||
MyFrame *frame = new MyFrame(wxT("Minimal wxWindows App"));
|
||||
|
||||
// and show it (the frames, unlike simple controls, are not shown when
|
||||
// created initially)
|
||||
@@ -143,14 +143,14 @@ MyFrame::MyFrame(const wxString& title)
|
||||
|
||||
// the "About" item should be in the help menu
|
||||
wxMenu *helpMenu = new wxMenu;
|
||||
helpMenu->Append(Minimal_About, _T("&About...\tF1"), _T("Show about dialog"));
|
||||
helpMenu->Append(Minimal_About, wxT("&About...\tF1"), wxT("Show about dialog"));
|
||||
|
||||
menuFile->Append(Minimal_Quit, _T("E&xit\tAlt-X"), _T("Quit this program"));
|
||||
menuFile->Append(Minimal_Quit, wxT("E&xit\tAlt-X"), wxT("Quit this program"));
|
||||
|
||||
// now append the freshly created menu to the menu bar...
|
||||
wxMenuBar *menuBar = new wxMenuBar();
|
||||
menuBar->Append(menuFile, _T("&File"));
|
||||
menuBar->Append(helpMenu, _T("&Help"));
|
||||
menuBar->Append(menuFile, wxT("&File"));
|
||||
menuBar->Append(helpMenu, wxT("&Help"));
|
||||
|
||||
// ... and attach this menu bar to the frame
|
||||
SetMenuBar(menuBar);
|
||||
@@ -159,7 +159,7 @@ MyFrame::MyFrame(const wxString& title)
|
||||
#if wxUSE_STATUSBAR
|
||||
// create a status bar just for fun (by default with 1 pane only)
|
||||
CreateStatusBar(2);
|
||||
SetStatusText(_T("Welcome to wxWindows!"));
|
||||
SetStatusText(wxT("Welcome to wxWindows!"));
|
||||
#endif // wxUSE_STATUSBAR
|
||||
}
|
||||
|
||||
@@ -175,8 +175,8 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxString msg;
|
||||
msg.Printf( _T("This is the About dialog of the minimal sample.\n")
|
||||
_T("Welcome to %s"), wxVERSION_STRING);
|
||||
msg.Printf( wxT("This is the About dialog of the minimal sample.\n")
|
||||
wxT("Welcome to %s"), wxVERSION_STRING);
|
||||
|
||||
wxMessageBox(msg, _T("About Minimal"), wxOK | wxICON_INFORMATION, this);
|
||||
wxMessageBox(msg, wxT("About Minimal"), wxOK | wxICON_INFORMATION, this);
|
||||
}
|
||||
|
@@ -53,7 +53,7 @@ FortyCanvas::FortyCanvas(wxWindow* parent, const wxPoint& pos, const wxSize& siz
|
||||
m_arrowCursor = new wxCursor(wxCURSOR_ARROW);
|
||||
|
||||
wxString name = wxTheApp->GetAppName();
|
||||
if (name.Length() <= 0) name = _T("forty");
|
||||
if (name.Length() <= 0) name = wxT("forty");
|
||||
m_scoreFile = new ScoreFile(name);
|
||||
m_game = new Game(0, 0, 0);
|
||||
m_game->Deal();
|
||||
@@ -156,8 +156,8 @@ Called when the main frame is closed
|
||||
bool FortyCanvas::OnCloseCanvas()
|
||||
{
|
||||
if (m_game->InPlay() &&
|
||||
wxMessageBox(_T("Are you sure you want to\nabandon the current game?"),
|
||||
_T("Warning"), wxYES_NO | wxICON_QUESTION) == wxNO)
|
||||
wxMessageBox(wxT("Are you sure you want to\nabandon the current game?"),
|
||||
wxT("Warning"), wxYES_NO | wxICON_QUESTION) == wxNO)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@@ -62,7 +62,7 @@ Card::Card(int value, WayUp way_up) :
|
||||
m_symbolBmap = new wxBitmap(symbols_xpm);
|
||||
if (!m_symbolBmap->Ok())
|
||||
{
|
||||
::wxMessageBox(_T("Failed to load bitmap CardSymbols"), _T("Error"));
|
||||
::wxMessageBox(wxT("Failed to load bitmap CardSymbols"), wxT("Error"));
|
||||
}
|
||||
}
|
||||
if (!m_pictureBmap)
|
||||
@@ -70,7 +70,7 @@ Card::Card(int value, WayUp way_up) :
|
||||
m_pictureBmap = new wxBitmap(Pictures);
|
||||
if (!m_pictureBmap->Ok())
|
||||
{
|
||||
::wxMessageBox(_T("Failed to load bitmap CardPictures"), _T("Error"));
|
||||
::wxMessageBox(wxT("Failed to load bitmap CardPictures"), wxT("Error"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -79,7 +79,7 @@ bool FortyApp::OnInit()
|
||||
|
||||
wxSize size(668,510);
|
||||
|
||||
if ((argc > 1) && (!wxStrcmp(argv[1],_T("-L"))))
|
||||
if ((argc > 1) && (!wxStrcmp(argv[1],wxT("-L"))))
|
||||
{
|
||||
largecards = true;
|
||||
size = wxSize(1000,750);
|
||||
@@ -87,7 +87,7 @@ bool FortyApp::OnInit()
|
||||
|
||||
FortyFrame* frame = new FortyFrame(
|
||||
0,
|
||||
_T("Forty Thieves"),
|
||||
wxT("Forty Thieves"),
|
||||
wxDefaultPosition,
|
||||
size,
|
||||
largecards
|
||||
@@ -140,35 +140,35 @@ FortyFrame::FortyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos
|
||||
#endif
|
||||
// set the icon
|
||||
#ifdef __WXMSW__
|
||||
SetIcon(wxIcon(_T("CardsIcon")));
|
||||
SetIcon(wxIcon(wxT("CardsIcon")));
|
||||
#else
|
||||
SetIcon(wxIcon(forty_xpm));
|
||||
#endif
|
||||
|
||||
// Make a menu bar
|
||||
wxMenu* gameMenu = new wxMenu;
|
||||
gameMenu->Append(wxID_NEW, wxGetStockLabel(wxID_NEW), _T("Start a new game"));
|
||||
gameMenu->Append(SCORES, _T("&Scores..."), _T("Displays scores"));
|
||||
gameMenu->Append(wxID_EXIT, wxGetStockLabel(wxID_EXIT), _T("Exits Forty Thieves"));
|
||||
gameMenu->Append(wxID_NEW, wxGetStockLabel(wxID_NEW), wxT("Start a new game"));
|
||||
gameMenu->Append(SCORES, wxT("&Scores..."), wxT("Displays scores"));
|
||||
gameMenu->Append(wxID_EXIT, wxGetStockLabel(wxID_EXIT), wxT("Exits Forty Thieves"));
|
||||
|
||||
wxMenu* editMenu = new wxMenu;
|
||||
editMenu->Append(wxID_UNDO, wxGetStockLabel(wxID_UNDO), _T("Undo the last move"));
|
||||
editMenu->Append(wxID_REDO, wxGetStockLabel(wxID_REDO), _T("Redo a move that has been undone"));
|
||||
editMenu->Append(wxID_UNDO, wxGetStockLabel(wxID_UNDO), wxT("Undo the last move"));
|
||||
editMenu->Append(wxID_REDO, wxGetStockLabel(wxID_REDO), wxT("Redo a move that has been undone"));
|
||||
|
||||
wxMenu* optionsMenu = new wxMenu;
|
||||
optionsMenu->Append(RIGHT_BUTTON_UNDO,
|
||||
_T("&Right button undo"),
|
||||
_T("Enables/disables right mouse button undo and redo"),
|
||||
wxT("&Right button undo"),
|
||||
wxT("Enables/disables right mouse button undo and redo"),
|
||||
true
|
||||
);
|
||||
optionsMenu->Append(HELPING_HAND,
|
||||
_T("&Helping hand"),
|
||||
_T("Enables/disables hand cursor when a card can be moved"),
|
||||
wxT("&Helping hand"),
|
||||
wxT("Enables/disables hand cursor when a card can be moved"),
|
||||
true
|
||||
);
|
||||
optionsMenu->Append(LARGE_CARDS,
|
||||
_T("&Large cards"),
|
||||
_T("Enables/disables large cards for high resolution displays"),
|
||||
wxT("&Large cards"),
|
||||
wxT("Enables/disables large cards for high resolution displays"),
|
||||
true
|
||||
);
|
||||
optionsMenu->Check(HELPING_HAND, true);
|
||||
@@ -176,14 +176,14 @@ FortyFrame::FortyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos
|
||||
optionsMenu->Check(LARGE_CARDS, largecards ? true : false);
|
||||
|
||||
wxMenu* helpMenu = new wxMenu;
|
||||
helpMenu->Append(wxID_HELP_CONTENTS, _T("&Help Contents"), _T("Displays information about playing the game"));
|
||||
helpMenu->Append(wxID_ABOUT, _T("&About..."), _T("About Forty Thieves"));
|
||||
helpMenu->Append(wxID_HELP_CONTENTS, wxT("&Help Contents"), wxT("Displays information about playing the game"));
|
||||
helpMenu->Append(wxID_ABOUT, wxT("&About..."), wxT("About Forty Thieves"));
|
||||
|
||||
m_menuBar = new wxMenuBar;
|
||||
m_menuBar->Append(gameMenu, _T("&Game"));
|
||||
m_menuBar->Append(editMenu, _T("&Edit"));
|
||||
m_menuBar->Append(optionsMenu, _T("&Options"));
|
||||
m_menuBar->Append(helpMenu, _T("&Help"));
|
||||
m_menuBar->Append(gameMenu, wxT("&Game"));
|
||||
m_menuBar->Append(editMenu, wxT("&Edit"));
|
||||
m_menuBar->Append(optionsMenu, wxT("&Options"));
|
||||
m_menuBar->Append(helpMenu, wxT("&Help"));
|
||||
|
||||
SetMenuBar(m_menuBar);
|
||||
|
||||
@@ -247,11 +247,11 @@ void
|
||||
FortyFrame::About(wxCommandEvent&)
|
||||
{
|
||||
wxMessageBox(
|
||||
_T("Forty Thieves\n\n")
|
||||
_T("A free card game written with the wxWidgets toolkit\n")
|
||||
_T("Author: Chris Breeze (c) 1992-2004\n")
|
||||
_T("email: chris@breezesys.com"),
|
||||
_T("About Forty Thieves"),
|
||||
wxT("Forty Thieves\n\n")
|
||||
wxT("A free card game written with the wxWidgets toolkit\n")
|
||||
wxT("Author: Chris Breeze (c) 1992-2004\n")
|
||||
wxT("email: chris@breezesys.com"),
|
||||
wxT("About Forty Thieves"),
|
||||
wxOK|wxICON_INFORMATION, this
|
||||
);
|
||||
}
|
||||
@@ -326,7 +326,7 @@ bool FortyAboutDialog::AddControls(wxWindow* parent)
|
||||
file.Open();
|
||||
for ( htmlText = file.GetFirstLine();
|
||||
!file.Eof();
|
||||
htmlText << file.GetNextLine() << _T("\n") ) ;
|
||||
htmlText << file.GetNextLine() << wxT("\n") ) ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ bool FortyAboutDialog::AddControls(wxWindow* parent)
|
||||
}
|
||||
|
||||
// Customize the HTML
|
||||
htmlText.Replace(wxT("$DATE$"), _T(__DATE__));
|
||||
htmlText.Replace(wxT("$DATE$"), wxT(__DATE__));
|
||||
|
||||
wxSize htmlSize(400, 290);
|
||||
|
||||
|
@@ -158,7 +158,7 @@ void Game::DoMove(wxDC& dc, Pile* src, Pile* dest)
|
||||
{
|
||||
if (src == dest)
|
||||
{
|
||||
wxMessageBox(_T("Game::DoMove() src == dest"), _T("Debug message"),
|
||||
wxMessageBox(wxT("Game::DoMove() src == dest"), wxT("Debug message"),
|
||||
wxOK | wxICON_EXCLAMATION);
|
||||
}
|
||||
m_moves[m_moveIndex].src = src;
|
||||
@@ -170,7 +170,7 @@ void Game::DoMove(wxDC& dc, Pile* src, Pile* dest)
|
||||
}
|
||||
else
|
||||
{
|
||||
wxMessageBox(_T("Game::DoMove() Undo buffer full"), _T("Debug message"),
|
||||
wxMessageBox(wxT("Game::DoMove() Undo buffer full"), wxT("Debug message"),
|
||||
wxOK | wxICON_EXCLAMATION);
|
||||
}
|
||||
|
||||
@@ -198,8 +198,8 @@ void Game::DoMove(wxDC& dc, Pile* src, Pile* dest)
|
||||
// Redraw the score box to update games won
|
||||
DisplayScore(dc);
|
||||
|
||||
if (wxMessageBox(_T("Do you wish to play again?"),
|
||||
_T("Well Done, You have won!"), wxYES_NO | wxICON_QUESTION) == wxYES)
|
||||
if (wxMessageBox(wxT("Do you wish to play again?"),
|
||||
wxT("Well Done, You have won!"), wxYES_NO | wxICON_QUESTION) == wxYES)
|
||||
{
|
||||
Deal();
|
||||
canvas->Refresh();
|
||||
@@ -236,25 +236,25 @@ void Game::DisplayScore(wxDC& dc)
|
||||
wxCoord w, h;
|
||||
{
|
||||
wxCoord width, height;
|
||||
dc.GetTextExtent(_T("Average score:m_x"), &width, &height);
|
||||
dc.GetTextExtent(wxT("Average score:m_x"), &width, &height);
|
||||
w = width;
|
||||
h = height;
|
||||
}
|
||||
dc.DrawRectangle(x + w, y, 20, 4 * h);
|
||||
|
||||
wxString str;
|
||||
str.Printf(_T("%d"), m_currentScore);
|
||||
dc.DrawText(_T("Score:"), x, y);
|
||||
str.Printf(wxT("%d"), m_currentScore);
|
||||
dc.DrawText(wxT("Score:"), x, y);
|
||||
dc.DrawText(str, x + w, y);
|
||||
y += h;
|
||||
|
||||
str.Printf(_T("%d"), m_numGames);
|
||||
dc.DrawText(_T("Games played:"), x, y);
|
||||
str.Printf(wxT("%d"), m_numGames);
|
||||
dc.DrawText(wxT("Games played:"), x, y);
|
||||
dc.DrawText(str, x + w, y);
|
||||
y += h;
|
||||
|
||||
str.Printf(_T("%d"), m_numWins);
|
||||
dc.DrawText(_T("Games won:"), x, y);
|
||||
str.Printf(wxT("%d"), m_numWins);
|
||||
dc.DrawText(wxT("Games won:"), x, y);
|
||||
dc.DrawText(str, x + w, y);
|
||||
y += h;
|
||||
|
||||
@@ -263,8 +263,8 @@ void Game::DisplayScore(wxDC& dc)
|
||||
{
|
||||
average = (2 * (m_currentScore + m_totalScore) + m_numGames ) / (2 * m_numGames);
|
||||
}
|
||||
str.Printf(_T("%d"), average);
|
||||
dc.DrawText(_T("Average score:"), x, y);
|
||||
str.Printf(wxT("%d"), average);
|
||||
dc.DrawText(wxT("Average score:"), x, y);
|
||||
dc.DrawText(str, x + w, y);
|
||||
}
|
||||
|
||||
@@ -794,7 +794,7 @@ void Pack::Redraw(wxDC& dc)
|
||||
Pile::Redraw(dc);
|
||||
|
||||
wxString str;
|
||||
str.Printf(_T("%d "), m_topCard + 1);
|
||||
str.Printf(wxT("%d "), m_topCard + 1);
|
||||
|
||||
dc.SetBackgroundMode( wxSOLID );
|
||||
dc.SetTextBackground(FortyApp::BackgroundColour());
|
||||
@@ -811,7 +811,7 @@ void Pack::AddCard(Card* card)
|
||||
}
|
||||
else
|
||||
{
|
||||
wxMessageBox(_T("Pack::AddCard() Undo error"), _T("Forty Thieves: Warning"),
|
||||
wxMessageBox(wxT("Pack::AddCard() Undo error"), wxT("Forty Thieves: Warning"),
|
||||
wxOK | wxICON_EXCLAMATION);
|
||||
}
|
||||
card->TurnCard(facedown);
|
||||
|
@@ -37,10 +37,10 @@ PlayerSelectionDialog::PlayerSelectionDialog(
|
||||
wxWindow* parent,
|
||||
ScoreFile* file
|
||||
) :
|
||||
wxDialog(parent, wxID_ANY, _T("Player Selection"), wxDefaultPosition),
|
||||
wxDialog(parent, wxID_ANY, wxT("Player Selection"), wxDefaultPosition),
|
||||
m_scoreFile(file)
|
||||
{
|
||||
wxStaticText* msg = new wxStaticText(this, wxID_ANY, _T("Please select a name or type a new one:"));
|
||||
wxStaticText* msg = new wxStaticText(this, wxID_ANY, wxT("Please select a name or type a new one:"));
|
||||
|
||||
wxListBox* list = new wxListBox(
|
||||
this, ID_LISTBOX,
|
||||
@@ -116,9 +116,9 @@ void PlayerSelectionDialog::ButtonCallback(wxCommandEvent& event)
|
||||
wxString name = m_textField->GetValue();
|
||||
if (!name.IsNull() && name.Length() > 0)
|
||||
{
|
||||
if (name.Contains(_T('@')))
|
||||
if (name.Contains(wxT('@')))
|
||||
{
|
||||
wxMessageBox(_T("Names should not contain the '@' character"), _T("Forty Thieves"));
|
||||
wxMessageBox(wxT("Names should not contain the '@' character"), wxT("Forty Thieves"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -128,7 +128,7 @@ void PlayerSelectionDialog::ButtonCallback(wxCommandEvent& event)
|
||||
}
|
||||
else
|
||||
{
|
||||
wxMessageBox(_T("Please enter your name"), _T("Forty Thieves"));
|
||||
wxMessageBox(wxT("Please enter your name"), wxT("Forty Thieves"));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@@ -156,17 +156,17 @@ ScoreDialog::ScoreDialog(wxWindow* parent, ScoreFile* file) :
|
||||
average = (2 * score + games) / (2 * games);
|
||||
}
|
||||
list->SetCellValue(i,0,players[i]);
|
||||
string_value.Printf( _T("%u"), wins );
|
||||
string_value.Printf( wxT("%u"), wins );
|
||||
list->SetCellValue(i,1,string_value);
|
||||
string_value.Printf( _T("%u"), games );
|
||||
string_value.Printf( wxT("%u"), games );
|
||||
list->SetCellValue(i,2,string_value);
|
||||
string_value.Printf( _T("%u"), average );
|
||||
string_value.Printf( wxT("%u"), average );
|
||||
list->SetCellValue(i,3,string_value);
|
||||
}
|
||||
list->SetColLabelValue(0, _T("Players"));
|
||||
list->SetColLabelValue(1, _T("Wins"));
|
||||
list->SetColLabelValue(2, _T("Games"));
|
||||
list->SetColLabelValue(3, _T("Score"));
|
||||
list->SetColLabelValue(0, wxT("Players"));
|
||||
list->SetColLabelValue(1, wxT("Wins"));
|
||||
list->SetColLabelValue(2, wxT("Games"));
|
||||
list->SetColLabelValue(3, wxT("Score"));
|
||||
list->SetEditable(false);
|
||||
list->AutoSizeColumns();
|
||||
list->AutoSizeRows();
|
||||
|
@@ -33,7 +33,7 @@
|
||||
|
||||
ScoreFile::ScoreFile(const wxString& appName)
|
||||
{
|
||||
m_config = new wxConfig(appName, _T("wxWidgets"), appName, wxEmptyString,
|
||||
m_config = new wxConfig(appName, wxT("wxWidgets"), appName, wxEmptyString,
|
||||
wxCONFIG_USE_LOCAL_FILE); // only local
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ ScoreFile::~ScoreFile()
|
||||
|
||||
void ScoreFile::GetPlayerList( wxArrayString &list )
|
||||
{
|
||||
m_config->SetPath(_T("/Players"));
|
||||
m_config->SetPath(wxT("/Players"));
|
||||
int length = m_config->GetNumberOfGroups();
|
||||
|
||||
if (length <= 0) return;
|
||||
@@ -87,8 +87,8 @@ long ScoreFile::CalcCheck(const wxString& name, int p1, int p2, int p3)
|
||||
wxString ScoreFile::GetPreviousPlayer() const
|
||||
{
|
||||
wxString result;
|
||||
m_config->SetPath(_T("/General"));
|
||||
m_config->Read(_T("LastPlayer"), &result);
|
||||
m_config->SetPath(wxT("/General"));
|
||||
m_config->Read(wxT("LastPlayer"), &result);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -103,16 +103,16 @@ void ScoreFile::ReadPlayersScore(
|
||||
|
||||
games = wins = score = 0;
|
||||
|
||||
m_config->SetPath(_T("/Players"));
|
||||
m_config->SetPath(wxT("/Players"));
|
||||
m_config->SetPath(player);
|
||||
if (m_config->Read(_T("Score"), &myScore, 0L) &&
|
||||
m_config->Read(_T("Games"), &myGames, 0L) &&
|
||||
m_config->Read(_T("Wins"), &myWins, 0L) &&
|
||||
m_config->Read(_T("Check"), &check, 0L))
|
||||
if (m_config->Read(wxT("Score"), &myScore, 0L) &&
|
||||
m_config->Read(wxT("Games"), &myGames, 0L) &&
|
||||
m_config->Read(wxT("Wins"), &myWins, 0L) &&
|
||||
m_config->Read(wxT("Check"), &check, 0L))
|
||||
{
|
||||
if (check != CalcCheck(player, myGames, myWins, myScore))
|
||||
{
|
||||
wxMessageBox(_T("Score file corrupted"), _T("Warning"),
|
||||
wxMessageBox(wxT("Score file corrupted"), wxT("Warning"),
|
||||
wxOK | wxICON_EXCLAMATION);
|
||||
}
|
||||
else
|
||||
@@ -130,14 +130,14 @@ void ScoreFile::WritePlayersScore(const wxString& player, int wins, int games, i
|
||||
{
|
||||
if (!player.empty())
|
||||
{
|
||||
m_config->SetPath(_T("/General"));
|
||||
m_config->Write(_T("LastPlayer"), wxString(player)); // Without wxString tmp, thinks it's bool in VC++
|
||||
m_config->SetPath(wxT("/General"));
|
||||
m_config->Write(wxT("LastPlayer"), wxString(player)); // Without wxString tmp, thinks it's bool in VC++
|
||||
|
||||
m_config->SetPath(_T("/Players"));
|
||||
m_config->SetPath(wxT("/Players"));
|
||||
m_config->SetPath(player);
|
||||
m_config->Write(_T("Score"), (long)score);
|
||||
m_config->Write(_T("Games"), (long)games);
|
||||
m_config->Write(_T("Wins"), (long)wins);
|
||||
m_config->Write(_T("Check"), CalcCheck(player, games, wins, score));
|
||||
m_config->Write(wxT("Score"), (long)score);
|
||||
m_config->Write(wxT("Games"), (long)games);
|
||||
m_config->Write(wxT("Wins"), (long)wins);
|
||||
m_config->Write(wxT("Check"), CalcCheck(player, games, wins, score));
|
||||
}
|
||||
}
|
||||
|
@@ -93,13 +93,13 @@ DECLARE_EVENT_TABLE()
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
// Create the main frame window
|
||||
MyFrame *frame = new MyFrame(NULL, _T("Fractal Mountains for wxWidgets"), wxDefaultPosition, wxSize(640, 480));
|
||||
MyFrame *frame = new MyFrame(NULL, wxT("Fractal Mountains for wxWidgets"), wxDefaultPosition, wxSize(640, 480));
|
||||
|
||||
// Make a menubar
|
||||
wxMenu *file_menu = new wxMenu;
|
||||
file_menu->Append(wxID_EXIT, wxGetStockLabel(wxID_EXIT));
|
||||
menuBar = new wxMenuBar;
|
||||
menuBar->Append(file_menu, _T("&File"));
|
||||
menuBar->Append(file_menu, wxT("&File"));
|
||||
frame->SetMenuBar(menuBar);
|
||||
|
||||
int width, height;
|
||||
|
@@ -46,7 +46,7 @@ public:
|
||||
// causes a crash due to conversion objects not being available
|
||||
// during initialisation.
|
||||
#ifndef __WXMAC__
|
||||
m_shape.Add( wxString::Format(_T("%i %i"), -width/2, -height/2) );
|
||||
m_shape.Add( wxString::Format(wxT("%i %i"), -width/2, -height/2) );
|
||||
#endif
|
||||
for(int j = 0; j < height; j++)
|
||||
{
|
||||
|
@@ -79,8 +79,8 @@ static int current_page = 0; // Currently viewed page
|
||||
// Backing bitmap
|
||||
wxBitmap *backingBitmap = NULL;
|
||||
|
||||
void PoetryError(const wxChar *, const wxChar *caption=_T("wxPoem Error"));
|
||||
void PoetryNotify(const wxChar *Msg, const wxChar *caption=_T("wxPoem"));
|
||||
void PoetryError(const wxChar *, const wxChar *caption=wxT("wxPoem Error"));
|
||||
void PoetryNotify(const wxChar *Msg, const wxChar *caption=wxT("wxPoem"));
|
||||
void TryLoadIndex();
|
||||
bool LoadPoem(const wxChar *, long);
|
||||
int GetIndex();
|
||||
@@ -181,7 +181,7 @@ void MainWindow::ScanBuffer(wxDC *dc, bool DrawIt, int *max_x, int *max_y)
|
||||
dc->SetFont(*m_normalFont);
|
||||
wxCoord xx;
|
||||
wxCoord yy;
|
||||
dc->GetTextExtent(_T("X"), &xx, &yy);
|
||||
dc->GetTextExtent(wxT("X"), &xx, &yy);
|
||||
char_height = (int)yy;
|
||||
|
||||
if (current_page == 0)
|
||||
@@ -262,7 +262,7 @@ void MainWindow::ScanBuffer(wxDC *dc, bool DrawIt, int *max_x, int *max_y)
|
||||
line_ptr = line+3;
|
||||
|
||||
m_title = line_ptr;
|
||||
m_title << _T(" (cont'd)");
|
||||
m_title << wxT(" (cont'd)");
|
||||
|
||||
dc->GetTextExtent(line_ptr, &xx, &yy);
|
||||
FindMax(&curr_width, (int)xx);
|
||||
@@ -325,7 +325,7 @@ void MainWindow::ScanBuffer(wxDC *dc, bool DrawIt, int *max_x, int *max_y)
|
||||
// Write (cont'd)
|
||||
if (page_break)
|
||||
{
|
||||
const wxChar *cont = _T("(cont'd)");
|
||||
const wxChar *cont = wxT("(cont'd)");
|
||||
|
||||
dc->SetFont(* m_normalFont);
|
||||
|
||||
@@ -481,7 +481,7 @@ void MainWindow::Search(bool ask)
|
||||
|
||||
if (ask || m_searchString.empty())
|
||||
{
|
||||
wxString s = wxGetTextFromUser( _T("Enter search string"), _T("Search"), m_searchString);
|
||||
wxString s = wxGetTextFromUser( wxT("Enter search string"), wxT("Search"), m_searchString);
|
||||
if (!s.empty())
|
||||
{
|
||||
s.MakeLower();
|
||||
@@ -510,7 +510,7 @@ void MainWindow::Search(bool ask)
|
||||
else
|
||||
{
|
||||
last_poem_start = 0;
|
||||
PoetryNotify(_T("Search string not found."));
|
||||
PoetryNotify(wxT("Search string not found."));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -534,7 +534,7 @@ bool MyApp::OnInit()
|
||||
|
||||
TheMainWindow = new MainWindow(NULL,
|
||||
wxID_ANY,
|
||||
_T("wxPoem"),
|
||||
wxT("wxPoem"),
|
||||
wxPoint(XPos, YPos),
|
||||
wxDefaultSize,
|
||||
wxCAPTION|wxMINIMIZE_BOX|wxSYSTEM_MENU|wxCLOSE_BOX|wxFULL_REPAINT_ON_RESIZE
|
||||
@@ -549,8 +549,8 @@ bool MyApp::OnInit()
|
||||
}
|
||||
else
|
||||
{
|
||||
index_filename = _T(DEFAULT_POETRY_IND);
|
||||
data_filename = _T(DEFAULT_POETRY_DAT);
|
||||
index_filename = wxT(DEFAULT_POETRY_IND);
|
||||
data_filename = wxT(DEFAULT_POETRY_DAT);
|
||||
}
|
||||
TryLoadIndex();
|
||||
|
||||
@@ -593,20 +593,20 @@ MyCanvas::MyCanvas(wxFrame *frame):
|
||||
wxWindow(frame, wxID_ANY)
|
||||
{
|
||||
m_popupMenu = new wxMenu;
|
||||
m_popupMenu->Append(POEM_NEXT, _T("Next poem/page"));
|
||||
m_popupMenu->Append(POEM_PREVIOUS, _T("Previous page"));
|
||||
m_popupMenu->Append(POEM_NEXT, wxT("Next poem/page"));
|
||||
m_popupMenu->Append(POEM_PREVIOUS, wxT("Previous page"));
|
||||
m_popupMenu->AppendSeparator();
|
||||
m_popupMenu->Append(POEM_SEARCH, _T("Search"));
|
||||
m_popupMenu->Append(POEM_NEXT_MATCH, _T("Next match"));
|
||||
m_popupMenu->Append(POEM_COPY, _T("Copy to clipboard"));
|
||||
m_popupMenu->Append(POEM_MINIMIZE, _T("Minimize"));
|
||||
m_popupMenu->Append(POEM_SEARCH, wxT("Search"));
|
||||
m_popupMenu->Append(POEM_NEXT_MATCH, wxT("Next match"));
|
||||
m_popupMenu->Append(POEM_COPY, wxT("Copy to clipboard"));
|
||||
m_popupMenu->Append(POEM_MINIMIZE, wxT("Minimize"));
|
||||
m_popupMenu->AppendSeparator();
|
||||
m_popupMenu->Append(POEM_BIGGER_TEXT, _T("Bigger text"));
|
||||
m_popupMenu->Append(POEM_SMALLER_TEXT, _T("Smaller text"));
|
||||
m_popupMenu->Append(POEM_BIGGER_TEXT, wxT("Bigger text"));
|
||||
m_popupMenu->Append(POEM_SMALLER_TEXT, wxT("Smaller text"));
|
||||
m_popupMenu->AppendSeparator();
|
||||
m_popupMenu->Append(POEM_ABOUT, _T("About wxPoem"));
|
||||
m_popupMenu->Append(POEM_ABOUT, wxT("About wxPoem"));
|
||||
m_popupMenu->AppendSeparator();
|
||||
m_popupMenu->Append(POEM_EXIT, _T("Exit"));
|
||||
m_popupMenu->Append(POEM_EXIT, wxT("Exit"));
|
||||
}
|
||||
|
||||
MyCanvas::~MyCanvas()
|
||||
@@ -716,17 +716,17 @@ int LoadIndex(const wxChar *file_name)
|
||||
if (file_name == NULL)
|
||||
return 0;
|
||||
|
||||
wxSprintf(buf, _T("%s.idx"), file_name);
|
||||
wxSprintf(buf, wxT("%s.idx"), file_name);
|
||||
|
||||
index_file = wxFopen(buf, _T("r"));
|
||||
index_file = wxFopen(buf, wxT("r"));
|
||||
if (index_file == NULL)
|
||||
return 0;
|
||||
|
||||
wxFscanf(index_file, _T("%ld"), &nitems);
|
||||
wxFscanf(index_file, wxT("%ld"), &nitems);
|
||||
|
||||
for (int i = 0; i < nitems; i++)
|
||||
{
|
||||
wxFscanf(index_file, _T("%ld"), &data);
|
||||
wxFscanf(index_file, wxT("%ld"), &data);
|
||||
poem_index[i] = data;
|
||||
}
|
||||
|
||||
@@ -741,7 +741,7 @@ int GetIndex()
|
||||
int indexn = (int)(rand() % nitems);
|
||||
|
||||
if ((indexn < 0) || (indexn > nitems))
|
||||
{ PoetryError(_T("No such poem!"));
|
||||
{ PoetryError(wxT("No such poem!"));
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
@@ -753,9 +753,9 @@ void MainWindow::ReadPreferences()
|
||||
{
|
||||
/* TODO: convert this code to use wxConfig
|
||||
#if wxUSE_RESOURCES
|
||||
wxGetResource(_T("wxPoem"), _T("FontSize"), &pointSize);
|
||||
wxGetResource(_T("wxPoem"), _T("X"), &XPos);
|
||||
wxGetResource(_T("wxPoem"), _T("Y"), &YPos);
|
||||
wxGetResource(wxT("wxPoem"), wxT("FontSize"), &pointSize);
|
||||
wxGetResource(wxT("wxPoem"), wxT("X"), &XPos);
|
||||
wxGetResource(wxT("wxPoem"), wxT("Y"), &YPos);
|
||||
#endif
|
||||
*/
|
||||
}
|
||||
@@ -767,9 +767,9 @@ void MainWindow::WritePreferences()
|
||||
TheMainWindow->GetPosition(&XPos, &YPos);
|
||||
/* TODO: convert this code to use wxConfig
|
||||
#if wxUSE_RESOURCES
|
||||
wxWriteResource(_T("wxPoem"), _T("FontSize"), pointSize);
|
||||
wxWriteResource(_T("wxPoem"), _T("X"), XPos);
|
||||
wxWriteResource(_T("wxPoem"), _T("Y"), YPos);
|
||||
wxWriteResource(wxT("wxPoem"), wxT("FontSize"), pointSize);
|
||||
wxWriteResource(wxT("wxPoem"), wxT("X"), XPos);
|
||||
wxWriteResource(wxT("wxPoem"), wxT("Y"), YPos);
|
||||
#endif
|
||||
*/
|
||||
#endif
|
||||
@@ -791,17 +791,17 @@ bool LoadPoem(const wxChar *file_name, long position)
|
||||
|
||||
if (file_name == NULL)
|
||||
{
|
||||
wxSprintf(error_buf, _T("Error in Poem loading."));
|
||||
wxSprintf(error_buf, wxT("Error in Poem loading."));
|
||||
PoetryError(error_buf);
|
||||
return false;
|
||||
}
|
||||
|
||||
wxSprintf(buf, _T("%s.dat"), file_name);
|
||||
data_file = wxFopen(buf, _T("r"));
|
||||
wxSprintf(buf, wxT("%s.dat"), file_name);
|
||||
data_file = wxFopen(buf, wxT("r"));
|
||||
|
||||
if (data_file == NULL)
|
||||
{
|
||||
wxSprintf(error_buf, _T("Data file %s not found."), buf);
|
||||
wxSprintf(error_buf, wxT("Data file %s not found."), buf);
|
||||
PoetryError(error_buf);
|
||||
return false;
|
||||
}
|
||||
@@ -830,7 +830,7 @@ bool LoadPoem(const wxChar *file_name, long position)
|
||||
|
||||
if (i == BUFFER_SIZE)
|
||||
{
|
||||
wxSprintf(error_buf, _T("%s"), _T("Poetry buffer exceeded."));
|
||||
wxSprintf(error_buf, wxT("%s"), wxT("Poetry buffer exceeded."));
|
||||
PoetryError(error_buf);
|
||||
return false;
|
||||
}
|
||||
@@ -869,12 +869,12 @@ long MainWindow::DoSearch(void)
|
||||
}
|
||||
|
||||
if (data_filename)
|
||||
wxSprintf(buf, _T("%s.dat"), data_filename);
|
||||
wxSprintf(buf, wxT("%s.dat"), data_filename);
|
||||
|
||||
file = wxFopen(buf, _T("r"));
|
||||
file = wxFopen(buf, wxT("r"));
|
||||
if (! (data_filename && file))
|
||||
{
|
||||
wxSprintf(error_buf, _T("Poetry data file %s not found\n"), buf);
|
||||
wxSprintf(error_buf, wxT("Poetry data file %s not found\n"), buf);
|
||||
PoetryError(error_buf);
|
||||
return false;
|
||||
}
|
||||
@@ -928,7 +928,7 @@ void TryLoadIndex()
|
||||
index_ok = (LoadIndex(index_filename) != 0);
|
||||
if (!index_ok || (nitems == 0))
|
||||
{
|
||||
PoetryError(_T("Index file not found; will compile new one"), _T("wxPoem"));
|
||||
PoetryError(wxT("Index file not found; will compile new one"), wxT("wxPoem"));
|
||||
index_ok = Compile();
|
||||
}
|
||||
}
|
||||
@@ -955,12 +955,12 @@ bool Compile(void)
|
||||
wxChar buf[100];
|
||||
|
||||
if (data_filename)
|
||||
wxSprintf(buf, _T("%s.dat"), data_filename);
|
||||
wxSprintf(buf, wxT("%s.dat"), data_filename);
|
||||
|
||||
file = wxFopen(buf, _T("r"));
|
||||
file = wxFopen(buf, wxT("r"));
|
||||
if (! (data_filename && file))
|
||||
{
|
||||
wxSprintf(error_buf, _T("Poetry data file %s not found\n"), buf);
|
||||
wxSprintf(error_buf, wxT("Poetry data file %s not found\n"), buf);
|
||||
PoetryError(error_buf);
|
||||
return false;
|
||||
}
|
||||
@@ -987,22 +987,22 @@ bool Compile(void)
|
||||
fclose(file);
|
||||
|
||||
if (index_filename)
|
||||
wxSprintf(buf, _T("%s.idx"), index_filename);
|
||||
wxSprintf(buf, wxT("%s.idx"), index_filename);
|
||||
|
||||
file = wxFopen(buf, _T("w"));
|
||||
file = wxFopen(buf, wxT("w"));
|
||||
if (! (data_filename && file))
|
||||
{
|
||||
wxSprintf(error_buf, _T("Poetry index file %s cannot be created\n"), buf);
|
||||
wxSprintf(error_buf, wxT("Poetry index file %s cannot be created\n"), buf);
|
||||
PoetryError(error_buf);
|
||||
return false;
|
||||
}
|
||||
|
||||
wxFprintf(file, _T("%ld\n\n"), nitems);
|
||||
wxFprintf(file, wxT("%ld\n\n"), nitems);
|
||||
for (j = 0; j < nitems; j++)
|
||||
wxFprintf(file, _T("%ld\n"), poem_index[j]);
|
||||
wxFprintf(file, wxT("%ld\n"), poem_index[j]);
|
||||
|
||||
fclose(file);
|
||||
PoetryNotify(_T("Poetry index compiled."));
|
||||
PoetryNotify(wxT("Poetry index compiled."));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1036,18 +1036,18 @@ void MainWindow::OnPopup(wxCommandEvent& event)
|
||||
{
|
||||
static wxString s;
|
||||
s = poem_buffer;
|
||||
s.Replace( _T("@P"),wxEmptyString);
|
||||
s.Replace( _T("@A "),wxEmptyString);
|
||||
s.Replace( _T("@A"),wxEmptyString);
|
||||
s.Replace( _T("@T "),wxEmptyString);
|
||||
s.Replace( _T("@T"),wxEmptyString);
|
||||
s.Replace( wxT("@P"),wxEmptyString);
|
||||
s.Replace( wxT("@A "),wxEmptyString);
|
||||
s.Replace( wxT("@A"),wxEmptyString);
|
||||
s.Replace( wxT("@T "),wxEmptyString);
|
||||
s.Replace( wxT("@T"),wxEmptyString);
|
||||
wxTextDataObject *data = new wxTextDataObject( s.c_str() );
|
||||
if (!wxTheClipboard->SetData( data ))
|
||||
wxMessageBox(_T("Error while copying to the clipboard."));
|
||||
wxMessageBox(wxT("Error while copying to the clipboard."));
|
||||
}
|
||||
else
|
||||
{
|
||||
wxMessageBox(_T("Error opening the clipboard."));
|
||||
wxMessageBox(wxT("Error opening the clipboard."));
|
||||
}
|
||||
wxTheClipboard->Close();
|
||||
break;
|
||||
@@ -1066,8 +1066,8 @@ void MainWindow::OnPopup(wxCommandEvent& event)
|
||||
}
|
||||
break;
|
||||
case POEM_ABOUT:
|
||||
(void)wxMessageBox(_T("wxPoem Version 1.1\nJulian Smart (c) 1995"),
|
||||
_T("About wxPoem"), wxOK, TheMainWindow);
|
||||
(void)wxMessageBox(wxT("wxPoem Version 1.1\nJulian Smart (c) 1995"),
|
||||
wxT("About wxPoem"), wxOK, TheMainWindow);
|
||||
break;
|
||||
case POEM_EXIT:
|
||||
// Exit
|
||||
|
@@ -115,7 +115,7 @@ IMPLEMENT_APP(MyApp)
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
// create the main application window
|
||||
MyFrame *frame = new MyFrame(_T("Minimal wxWindows App"));
|
||||
MyFrame *frame = new MyFrame(wxT("Minimal wxWindows App"));
|
||||
|
||||
// and show it (the frames, unlike simple controls, are not shown when
|
||||
// created initially)
|
||||
@@ -143,14 +143,14 @@ MyFrame::MyFrame(const wxString& title)
|
||||
|
||||
// the "About" item should be in the help menu
|
||||
wxMenu *helpMenu = new wxMenu;
|
||||
helpMenu->Append(Minimal_About, _T("&About...\tF1"), _T("Show about dialog"));
|
||||
helpMenu->Append(Minimal_About, wxT("&About...\tF1"), wxT("Show about dialog"));
|
||||
|
||||
menuFile->Append(Minimal_Quit, _T("E&xit\tAlt-X"), _T("Quit this program"));
|
||||
menuFile->Append(Minimal_Quit, wxT("E&xit\tAlt-X"), wxT("Quit this program"));
|
||||
|
||||
// now append the freshly created menu to the menu bar...
|
||||
wxMenuBar *menuBar = new wxMenuBar();
|
||||
menuBar->Append(menuFile, _T("&File"));
|
||||
menuBar->Append(helpMenu, _T("&Help"));
|
||||
menuBar->Append(menuFile, wxT("&File"));
|
||||
menuBar->Append(helpMenu, wxT("&Help"));
|
||||
|
||||
// ... and attach this menu bar to the frame
|
||||
SetMenuBar(menuBar);
|
||||
@@ -159,7 +159,7 @@ MyFrame::MyFrame(const wxString& title)
|
||||
#if wxUSE_STATUSBAR
|
||||
// create a status bar just for fun (by default with 1 pane only)
|
||||
CreateStatusBar(2);
|
||||
SetStatusText(_T("Welcome to wxWindows!"));
|
||||
SetStatusText(wxT("Welcome to wxWindows!"));
|
||||
#endif // wxUSE_STATUSBAR
|
||||
}
|
||||
|
||||
@@ -175,8 +175,8 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxString msg;
|
||||
msg.Printf( _T("This is the About dialog of the minimal sample.\n")
|
||||
_T("Welcome to %s"), wxVERSION_STRING);
|
||||
msg.Printf( wxT("This is the About dialog of the minimal sample.\n")
|
||||
wxT("Welcome to %s"), wxVERSION_STRING);
|
||||
|
||||
wxMessageBox(msg, _T("About Minimal"), wxOK | wxICON_INFORMATION, this);
|
||||
wxMessageBox(msg, wxT("About Minimal"), wxOK | wxICON_INFORMATION, this);
|
||||
}
|
||||
|
@@ -288,6 +288,8 @@ for the GUI applications (i.e. those which don't define @c wxUSE_GUI as 0).
|
||||
defined when compiling code which uses wxWidgets as a DLL/shared library}
|
||||
@itemdef{WXBUILDING,
|
||||
defined when building wxWidgets itself, whether as a static or shared library}
|
||||
@itemdef{wxNO_T,
|
||||
may be predefined to prevent the library from defining _T() macro}
|
||||
@endDefList
|
||||
|
||||
*/
|
||||
|
@@ -50,16 +50,16 @@ archive, then write the entry's data. Another call to PutNextEntry() closes the
|
||||
current entry and begins the next. For example:
|
||||
|
||||
@code
|
||||
wxFFileOutputStream out(_T("test.zip"));
|
||||
wxFFileOutputStream out(wxT("test.zip"));
|
||||
wxZipOutputStream zip(out);
|
||||
wxTextOutputStream txt(zip);
|
||||
wxString sep(wxFileName::GetPathSeparator());
|
||||
|
||||
zip.PutNextEntry(_T("entry1.txt"));
|
||||
txt << _T("Some text for entry1.txt\n");
|
||||
zip.PutNextEntry(wxT("entry1.txt"));
|
||||
txt << wxT("Some text for entry1.txt\n");
|
||||
|
||||
zip.PutNextEntry(_T("subdir") + sep + _T("entry2.txt"));
|
||||
txt << _T("Some text for subdir/entry2.txt\n");
|
||||
zip.PutNextEntry(wxT("subdir") + sep + wxT("entry2.txt"));
|
||||
txt << wxT("Some text for subdir/entry2.txt\n");
|
||||
@endcode
|
||||
|
||||
The name of each entry can be a full path, which makes it possible to store
|
||||
@@ -80,7 +80,7 @@ When there are no more entries, GetNextEntry() returns @NULL and sets Eof().
|
||||
@code
|
||||
auto_ptr<wxZipEntry> entry;
|
||||
|
||||
wxFFileInputStream in(_T("test.zip"));
|
||||
wxFFileInputStream in(wxT("test.zip"));
|
||||
wxZipInputStream zip(in);
|
||||
|
||||
while (entry.reset(zip.GetNextEntry()), entry.get() != NULL)
|
||||
@@ -111,8 +111,8 @@ archive. wxTempFileOutputStream can be helpful to do this.
|
||||
For example to delete all entries matching the pattern "*.txt":
|
||||
|
||||
@code
|
||||
auto_ptr<wxFFileInputStream> in(new wxFFileInputStream(_T("test.zip")));
|
||||
wxTempFileOutputStream out(_T("test.zip"));
|
||||
auto_ptr<wxFFileInputStream> in(new wxFFileInputStream(wxT("test.zip")));
|
||||
wxTempFileOutputStream out(wxT("test.zip"));
|
||||
|
||||
wxZipInputStream inzip(*in);
|
||||
wxZipOutputStream outzip(out);
|
||||
@@ -125,7 +125,7 @@ outzip.CopyArchiveMetaData(inzip);
|
||||
|
||||
// call CopyEntry for each entry except those matching the pattern
|
||||
while (entry.reset(inzip.GetNextEntry()), entry.get() != NULL)
|
||||
if (!entry->GetName().Matches(_T("*.txt")))
|
||||
if (!entry->GetName().Matches(wxT("*.txt")))
|
||||
if (!outzip.CopyEntry(entry.release(), inzip))
|
||||
break;
|
||||
|
||||
@@ -167,7 +167,7 @@ auto_ptr<wxZipEntry> entry;
|
||||
wxString name = wxZipEntry::GetInternalName(localname);
|
||||
|
||||
// open the zip
|
||||
wxFFileInputStream in(_T("test.zip"));
|
||||
wxFFileInputStream in(wxT("test.zip"));
|
||||
wxZipInputStream zip(in);
|
||||
|
||||
// call GetNextEntry() until the required internal name is found
|
||||
@@ -195,7 +195,7 @@ wxZipEntry *entry;
|
||||
ZipCatalog cat;
|
||||
|
||||
// open the zip
|
||||
wxFFileInputStream in(_T("test.zip"));
|
||||
wxFFileInputStream in(wxT("test.zip"));
|
||||
wxZipInputStream zip(in);
|
||||
|
||||
// load the zip catalog
|
||||
@@ -222,7 +222,7 @@ stream on the same archive:
|
||||
@code
|
||||
// opening another entry without closing the first requires another
|
||||
// input stream for the same file
|
||||
wxFFileInputStream in2(_T("test.zip"));
|
||||
wxFFileInputStream in2(wxT("test.zip"));
|
||||
wxZipInputStream zip2(in2);
|
||||
if ((it = cat.find(wxZipEntry::GetInternalName(local2))) != cat.end())
|
||||
zip2.OpenEntry(*it->second);
|
||||
@@ -311,7 +311,7 @@ if (in->IsOk())
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogError(_T("can't handle '%s'"), filename.c_str());
|
||||
wxLogError(wxT("can't handle '%s'"), filename.c_str());
|
||||
}
|
||||
}
|
||||
@endcode
|
||||
|
@@ -123,7 +123,7 @@ English using message catalogs:
|
||||
@li Specify the source code language and charset as arguments to
|
||||
wxLocale::AddCatalog. For example:
|
||||
@code
|
||||
locale.AddCatalog(_T("myapp"), wxLANGUAGE_GERMAN, _T("iso-8859-1"));
|
||||
locale.AddCatalog(wxT("myapp"), wxLANGUAGE_GERMAN, wxT("iso-8859-1"));
|
||||
@endcode
|
||||
|
||||
|
||||
|
@@ -259,8 +259,8 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxString msg;
|
||||
msg.Printf( _T("This is the about dialog of XML resources demo.\n")
|
||||
_T("Welcome to %s"), wxVERSION_STRING);
|
||||
msg.Printf( wxT("This is the about dialog of XML resources demo.\n")
|
||||
wxT("Welcome to %s"), wxVERSION_STRING);
|
||||
|
||||
wxMessageBox(msg, "About XML resources demo",
|
||||
wxOK | wxICON_INFORMATION, this);
|
||||
|
@@ -109,7 +109,7 @@ public:
|
||||
// restore the old position to be able to test other formats and so on
|
||||
if ( stream.SeekI(posOld) == wxInvalidOffset )
|
||||
{
|
||||
wxLogDebug(_T("Failed to rewind the stream in wxAnimationDecoder!"));
|
||||
wxLogDebug(wxT("Failed to rewind the stream in wxAnimationDecoder!"));
|
||||
|
||||
// reading would fail anyhow as we're not at the right position
|
||||
return false;
|
||||
|
@@ -176,7 +176,7 @@ public:
|
||||
wxString& Item(size_t nIndex) const
|
||||
{
|
||||
wxASSERT_MSG( nIndex < m_nCount,
|
||||
_T("wxArrayString: index out of bounds") );
|
||||
wxT("wxArrayString: index out of bounds") );
|
||||
|
||||
return m_pItems[nIndex];
|
||||
}
|
||||
@@ -187,7 +187,7 @@ public:
|
||||
wxString& Last() const
|
||||
{
|
||||
wxASSERT_MSG( !IsEmpty(),
|
||||
_T("wxArrayString: index out of bounds") );
|
||||
wxT("wxArrayString: index out of bounds") );
|
||||
return Item(GetCount() - 1);
|
||||
}
|
||||
|
||||
|
@@ -28,10 +28,10 @@ class wxArtProviderModule;
|
||||
typedef wxString wxArtClient;
|
||||
typedef wxString wxArtID;
|
||||
|
||||
#define wxART_MAKE_CLIENT_ID_FROM_STR(id) (id + _T("_C"))
|
||||
#define wxART_MAKE_CLIENT_ID(id) _T(#id) _T("_C")
|
||||
#define wxART_MAKE_CLIENT_ID_FROM_STR(id) (id + wxT("_C"))
|
||||
#define wxART_MAKE_CLIENT_ID(id) wxT(#id) wxT("_C")
|
||||
#define wxART_MAKE_ART_ID_FROM_STR(id) (id)
|
||||
#define wxART_MAKE_ART_ID(id) _T(#id)
|
||||
#define wxART_MAKE_ART_ID(id) wxT(#id)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Art clients
|
||||
|
@@ -142,8 +142,8 @@ public:
|
||||
if ( m_data == GetNullData() )
|
||||
return NULL;
|
||||
|
||||
wxASSERT_MSG( m_data->m_owned, _T("can't release non-owned buffer") );
|
||||
wxASSERT_MSG( m_data->m_ref == 1, _T("can't release shared buffer") );
|
||||
wxASSERT_MSG( m_data->m_owned, wxT("can't release non-owned buffer") );
|
||||
wxASSERT_MSG( m_data->m_ref == 1, wxT("can't release shared buffer") );
|
||||
|
||||
CharType * const p = m_data->Get();
|
||||
|
||||
@@ -561,7 +561,7 @@ public:
|
||||
// Other ways to append to the buffer
|
||||
void AppendByte(char data)
|
||||
{
|
||||
wxCHECK_RET( m_bufdata->m_data, _T("invalid wxMemoryBuffer") );
|
||||
wxCHECK_RET( m_bufdata->m_data, wxT("invalid wxMemoryBuffer") );
|
||||
|
||||
m_bufdata->ResizeIfNeeded(m_bufdata->m_len + 1);
|
||||
*(((char*)m_bufdata->m_data) + m_bufdata->m_len) = data;
|
||||
|
@@ -222,7 +222,7 @@
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* define _T() and related macros */
|
||||
/* define wxT() and related macros */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
/* BSD systems define _T() to be something different in ctype.h, override it */
|
||||
@@ -231,15 +231,19 @@
|
||||
#undef _T
|
||||
#endif
|
||||
|
||||
/* could already be defined by tchar.h (it's quasi standard) */
|
||||
#ifndef _T
|
||||
/*
|
||||
wxT ("wx text") macro turns a literal string constant into a wide char
|
||||
constant. It is mostly unnecessary with wx 2.9 but defined for
|
||||
compatibility.
|
||||
*/
|
||||
#ifndef wxT
|
||||
#if !wxUSE_UNICODE
|
||||
#define _T(x) x
|
||||
#define wxT(x) x
|
||||
#else /* Unicode */
|
||||
/* use wxCONCAT_HELPER so that x could be expanded if it's a macro */
|
||||
#define _T(x) wxCONCAT_HELPER(L, x)
|
||||
#define wxT(x) wxCONCAT_HELPER(L, x)
|
||||
#endif /* ASCII/Unicode */
|
||||
#endif /* !defined(_T) */
|
||||
#endif /* !defined(wxT) */
|
||||
|
||||
/*
|
||||
wxS ("wx string") macro can be used to create literals using the same
|
||||
@@ -253,13 +257,25 @@
|
||||
#define wxS(x) x
|
||||
#endif
|
||||
|
||||
/* although global macros with such names are normally bad, we want to have */
|
||||
/* another name for _T() which should be used to avoid confusion between */
|
||||
/* _T() and _() in wxWidgets sources */
|
||||
#define wxT(x) _T(x)
|
||||
/*
|
||||
_T() is a synonym for wxT() familiar to Windows programmers. As this macro
|
||||
has even higher risk of conflicting with system headers, its use is
|
||||
discouraged and you may predefine wxNO__T to disable it. Additionally, we
|
||||
do it ourselves for Sun CC which is known to use it in its standard headers
|
||||
(see #10660).
|
||||
*/
|
||||
#if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||
#ifndef wxNO__T
|
||||
#define wxNO__T
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(_T) && !defined(wxNO__T)
|
||||
#define _T(x) wxT(x)
|
||||
#endif
|
||||
|
||||
/* a helper macro allowing to make another macro Unicode-friendly, see below */
|
||||
#define wxAPPLY_T(x) _T(x)
|
||||
#define wxAPPLY_T(x) wxT(x)
|
||||
|
||||
/* Unicode-friendly __FILE__, __DATE__ and __TIME__ analogs */
|
||||
#ifndef __TFILE__
|
||||
|
@@ -26,7 +26,7 @@ class WXDLLIMPEXP_CORE wxDirDialog: public wxDirDialogBase
|
||||
public:
|
||||
wxDirDialog(wxWindow *parent,
|
||||
const wxString& message = wxDirSelectorPromptStr,
|
||||
const wxString& defaultPath = _T(""),
|
||||
const wxString& defaultPath = wxT(""),
|
||||
long style = wxDD_DEFAULT_STYLE,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
|
@@ -32,13 +32,13 @@ class WXDLLIMPEXP_FWD_BASE wxArrayString;
|
||||
|
||||
/// separates group and entry names (probably shouldn't be changed)
|
||||
#ifndef wxCONFIG_PATH_SEPARATOR
|
||||
#define wxCONFIG_PATH_SEPARATOR _T('/')
|
||||
#define wxCONFIG_PATH_SEPARATOR wxT('/')
|
||||
#endif
|
||||
|
||||
/// introduces immutable entries
|
||||
// (i.e. the ones which can't be changed from the local config file)
|
||||
#ifndef wxCONFIG_IMMUTABLE_PREFIX
|
||||
#define wxCONFIG_IMMUTABLE_PREFIX _T('!')
|
||||
#define wxCONFIG_IMMUTABLE_PREFIX wxT('!')
|
||||
#endif
|
||||
|
||||
#if wxUSE_CONFIG
|
||||
|
@@ -49,7 +49,7 @@ public:
|
||||
|
||||
void SetContainerWindow(wxWindow *winParent)
|
||||
{
|
||||
wxASSERT_MSG( !m_winParent, _T("shouldn't be called twice") );
|
||||
wxASSERT_MSG( !m_winParent, wxT("shouldn't be called twice") );
|
||||
|
||||
m_winParent = winParent;
|
||||
}
|
||||
|
@@ -81,7 +81,7 @@
|
||||
if (Condition) \
|
||||
{ anyTest; } \
|
||||
else \
|
||||
wxLogInfo(wxString::Format(_T("skipping: %s.%s\n reason: %s equals false\n"), \
|
||||
wxLogInfo(wxString::Format(wxT("skipping: %s.%s\n reason: %s equals false\n"), \
|
||||
wxString(suiteName, wxConvUTF8).c_str(), \
|
||||
wxString(#testMethod, wxConvUTF8).c_str(), \
|
||||
wxString(#Condition, wxConvUTF8).c_str()))
|
||||
|
@@ -134,7 +134,7 @@ public:
|
||||
const wxPoint& pt,
|
||||
wxHelpEvent::Origin origin)
|
||||
{
|
||||
wxCHECK_MSG( window, false, _T("window must not be NULL") );
|
||||
wxCHECK_MSG( window, false, wxT("window must not be NULL") );
|
||||
|
||||
m_helptextAtPoint = pt;
|
||||
m_helptextOrigin = origin;
|
||||
|
@@ -122,7 +122,7 @@ private:
|
||||
int AppendItems(const wxArrayStringsAdapter& items, void **clientData)
|
||||
{
|
||||
wxASSERT_MSG( GetClientDataType() != wxClientData_Object,
|
||||
_T("can't mix different types of client data") );
|
||||
wxT("can't mix different types of client data") );
|
||||
|
||||
return AppendItems(items, clientData, wxClientData_Void);
|
||||
}
|
||||
@@ -131,7 +131,7 @@ private:
|
||||
wxClientData **clientData)
|
||||
{
|
||||
wxASSERT_MSG( GetClientDataType() != wxClientData_Void,
|
||||
_T("can't mix different types of client data") );
|
||||
wxT("can't mix different types of client data") );
|
||||
|
||||
return AppendItems(items, reinterpret_cast<void **>(clientData),
|
||||
wxClientData_Object);
|
||||
@@ -142,17 +142,17 @@ private:
|
||||
void **clientData,
|
||||
wxClientDataType type)
|
||||
{
|
||||
wxASSERT_MSG( !IsSorted(), _T("can't insert items in sorted control") );
|
||||
wxASSERT_MSG( !IsSorted(), wxT("can't insert items in sorted control") );
|
||||
|
||||
wxCHECK_MSG( pos <= GetCount(), wxNOT_FOUND,
|
||||
_T("position out of range") );
|
||||
wxT("position out of range") );
|
||||
|
||||
// not all derived classes handle empty arrays correctly in
|
||||
// DoInsertItems() and besides it really doesn't make much sense to do
|
||||
// this (for append it could correspond to creating an initially empty
|
||||
// control but why would anybody need to insert 0 items?)
|
||||
wxCHECK_MSG( !items.IsEmpty(), wxNOT_FOUND,
|
||||
_T("need something to insert") );
|
||||
wxT("need something to insert") );
|
||||
|
||||
return DoInsertItems(items, pos, clientData, type);
|
||||
}
|
||||
@@ -167,7 +167,7 @@ private:
|
||||
void **clientData)
|
||||
{
|
||||
wxASSERT_MSG( GetClientDataType() != wxClientData_Object,
|
||||
_T("can't mix different types of client data") );
|
||||
wxT("can't mix different types of client data") );
|
||||
|
||||
return InsertItems(items, pos, clientData, wxClientData_Void);
|
||||
}
|
||||
@@ -177,7 +177,7 @@ private:
|
||||
wxClientData **clientData)
|
||||
{
|
||||
wxASSERT_MSG( GetClientDataType() != wxClientData_Void,
|
||||
_T("can't mix different types of client data") );
|
||||
wxT("can't mix different types of client data") );
|
||||
|
||||
return InsertItems(items, pos,
|
||||
reinterpret_cast<void **>(clientData),
|
||||
|
@@ -19,7 +19,7 @@
|
||||
#include "wx/control.h" // the base class
|
||||
#include "wx/datetime.h"
|
||||
|
||||
#define wxDatePickerCtrlNameStr _T("datectrl")
|
||||
#define wxDatePickerCtrlNameStr wxT("datectrl")
|
||||
|
||||
// wxDatePickerCtrl styles
|
||||
enum
|
||||
|
@@ -985,37 +985,37 @@ public:
|
||||
|
||||
inline bool operator<(const wxDateTime& dt) const
|
||||
{
|
||||
wxASSERT_MSG( IsValid() && dt.IsValid(), _T("invalid wxDateTime") );
|
||||
wxASSERT_MSG( IsValid() && dt.IsValid(), wxT("invalid wxDateTime") );
|
||||
return GetValue() < dt.GetValue();
|
||||
}
|
||||
|
||||
inline bool operator<=(const wxDateTime& dt) const
|
||||
{
|
||||
wxASSERT_MSG( IsValid() && dt.IsValid(), _T("invalid wxDateTime") );
|
||||
wxASSERT_MSG( IsValid() && dt.IsValid(), wxT("invalid wxDateTime") );
|
||||
return GetValue() <= dt.GetValue();
|
||||
}
|
||||
|
||||
inline bool operator>(const wxDateTime& dt) const
|
||||
{
|
||||
wxASSERT_MSG( IsValid() && dt.IsValid(), _T("invalid wxDateTime") );
|
||||
wxASSERT_MSG( IsValid() && dt.IsValid(), wxT("invalid wxDateTime") );
|
||||
return GetValue() > dt.GetValue();
|
||||
}
|
||||
|
||||
inline bool operator>=(const wxDateTime& dt) const
|
||||
{
|
||||
wxASSERT_MSG( IsValid() && dt.IsValid(), _T("invalid wxDateTime") );
|
||||
wxASSERT_MSG( IsValid() && dt.IsValid(), wxT("invalid wxDateTime") );
|
||||
return GetValue() >= dt.GetValue();
|
||||
}
|
||||
|
||||
inline bool operator==(const wxDateTime& dt) const
|
||||
{
|
||||
wxASSERT_MSG( IsValid() && dt.IsValid(), _T("invalid wxDateTime") );
|
||||
wxASSERT_MSG( IsValid() && dt.IsValid(), wxT("invalid wxDateTime") );
|
||||
return GetValue() == dt.GetValue();
|
||||
}
|
||||
|
||||
inline bool operator!=(const wxDateTime& dt) const
|
||||
{
|
||||
wxASSERT_MSG( IsValid() && dt.IsValid(), _T("invalid wxDateTime") );
|
||||
wxASSERT_MSG( IsValid() && dt.IsValid(), wxT("invalid wxDateTime") );
|
||||
return GetValue() != dt.GetValue();
|
||||
}
|
||||
|
||||
@@ -1784,7 +1784,7 @@ inline wxDateTime::wxDateTime(double jdn)
|
||||
|
||||
inline wxDateTime& wxDateTime::Set(const Tm& tm)
|
||||
{
|
||||
wxASSERT_MSG( tm.IsValid(), _T("invalid broken down date/time") );
|
||||
wxASSERT_MSG( tm.IsValid(), wxT("invalid broken down date/time") );
|
||||
|
||||
return Set(tm.mday, (Month)tm.mon, tm.year,
|
||||
tm.hour, tm.min, tm.sec, tm.msec);
|
||||
@@ -1815,14 +1815,14 @@ inline wxDateTime::wxDateTime(wxDateTime_t day,
|
||||
|
||||
inline wxLongLong wxDateTime::GetValue() const
|
||||
{
|
||||
wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
|
||||
wxASSERT_MSG( IsValid(), wxT("invalid wxDateTime"));
|
||||
|
||||
return m_time;
|
||||
}
|
||||
|
||||
inline time_t wxDateTime::GetTicks() const
|
||||
{
|
||||
wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
|
||||
wxASSERT_MSG( IsValid(), wxT("invalid wxDateTime"));
|
||||
if ( !IsInStdRange() )
|
||||
{
|
||||
return (time_t)-1;
|
||||
@@ -1890,21 +1890,21 @@ inline wxDateTime wxDateTime::GetYearDay(wxDateTime_t yday) const
|
||||
|
||||
inline bool wxDateTime::IsEqualTo(const wxDateTime& datetime) const
|
||||
{
|
||||
wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime"));
|
||||
wxASSERT_MSG( IsValid() && datetime.IsValid(), wxT("invalid wxDateTime"));
|
||||
|
||||
return m_time == datetime.m_time;
|
||||
}
|
||||
|
||||
inline bool wxDateTime::IsEarlierThan(const wxDateTime& datetime) const
|
||||
{
|
||||
wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime"));
|
||||
wxASSERT_MSG( IsValid() && datetime.IsValid(), wxT("invalid wxDateTime"));
|
||||
|
||||
return m_time < datetime.m_time;
|
||||
}
|
||||
|
||||
inline bool wxDateTime::IsLaterThan(const wxDateTime& datetime) const
|
||||
{
|
||||
wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime"));
|
||||
wxASSERT_MSG( IsValid() && datetime.IsValid(), wxT("invalid wxDateTime"));
|
||||
|
||||
return m_time > datetime.m_time;
|
||||
}
|
||||
@@ -1961,14 +1961,14 @@ inline bool wxDateTime::IsEqualUpTo(const wxDateTime& dt,
|
||||
|
||||
inline wxDateTime wxDateTime::Add(const wxTimeSpan& diff) const
|
||||
{
|
||||
wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
|
||||
wxASSERT_MSG( IsValid(), wxT("invalid wxDateTime"));
|
||||
|
||||
return wxDateTime(m_time + diff.GetValue());
|
||||
}
|
||||
|
||||
inline wxDateTime& wxDateTime::Add(const wxTimeSpan& diff)
|
||||
{
|
||||
wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
|
||||
wxASSERT_MSG( IsValid(), wxT("invalid wxDateTime"));
|
||||
|
||||
m_time += diff.GetValue();
|
||||
|
||||
@@ -1982,14 +1982,14 @@ inline wxDateTime& wxDateTime::operator+=(const wxTimeSpan& diff)
|
||||
|
||||
inline wxDateTime wxDateTime::Subtract(const wxTimeSpan& diff) const
|
||||
{
|
||||
wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
|
||||
wxASSERT_MSG( IsValid(), wxT("invalid wxDateTime"));
|
||||
|
||||
return wxDateTime(m_time - diff.GetValue());
|
||||
}
|
||||
|
||||
inline wxDateTime& wxDateTime::Subtract(const wxTimeSpan& diff)
|
||||
{
|
||||
wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
|
||||
wxASSERT_MSG( IsValid(), wxT("invalid wxDateTime"));
|
||||
|
||||
m_time -= diff.GetValue();
|
||||
|
||||
@@ -2003,7 +2003,7 @@ inline wxDateTime& wxDateTime::operator-=(const wxTimeSpan& diff)
|
||||
|
||||
inline wxTimeSpan wxDateTime::Subtract(const wxDateTime& datetime) const
|
||||
{
|
||||
wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime"));
|
||||
wxASSERT_MSG( IsValid() && datetime.IsValid(), wxT("invalid wxDateTime"));
|
||||
|
||||
return wxTimeSpan(GetValue() - datetime.GetValue());
|
||||
}
|
||||
|
@@ -112,7 +112,7 @@ private:
|
||||
// common part of Init()s
|
||||
void InitCommon(wxDC *dc, int style)
|
||||
{
|
||||
wxASSERT_MSG( !m_dc, _T("wxBufferedDC already initialised") );
|
||||
wxASSERT_MSG( !m_dc, wxT("wxBufferedDC already initialised") );
|
||||
|
||||
m_dc = dc;
|
||||
m_style = style;
|
||||
|
@@ -127,7 +127,7 @@ protected:
|
||||
wxCoord x2, wxCoord y2,
|
||||
wxCoord xc, wxCoord yc)
|
||||
{
|
||||
wxFAIL_MSG( _T("this is probably wrong") );
|
||||
wxFAIL_MSG( wxT("this is probably wrong") );
|
||||
|
||||
m_dc.DoDrawArc(GetX(x1, y1), GetY(x1, y1),
|
||||
GetX(x2, y2), GetY(x2, y2),
|
||||
@@ -144,7 +144,7 @@ protected:
|
||||
virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
|
||||
double sa, double ea)
|
||||
{
|
||||
wxFAIL_MSG( _T("this is probably wrong") );
|
||||
wxFAIL_MSG( wxT("this is probably wrong") );
|
||||
|
||||
m_dc.DoDrawEllipticArc(GetX(x, y), GetY(x, y),
|
||||
GetX(w, h), GetY(w, h),
|
||||
@@ -249,7 +249,7 @@ protected:
|
||||
|
||||
virtual void DoSetDeviceClippingRegion(const wxRegion& WXUNUSED(region))
|
||||
{
|
||||
wxFAIL_MSG( _T("not implemented") );
|
||||
wxFAIL_MSG( wxT("not implemented") );
|
||||
}
|
||||
|
||||
virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
|
||||
|
@@ -161,7 +161,7 @@ public:
|
||||
wxDebugReportUpload(const wxString& url,
|
||||
const wxString& input,
|
||||
const wxString& action,
|
||||
const wxString& curl = _T("curl"));
|
||||
const wxString& curl = wxT("curl"));
|
||||
|
||||
protected:
|
||||
virtual bool DoProcess();
|
||||
|
@@ -978,28 +978,28 @@ typedef wxUint32 wxDword;
|
||||
#if (defined(__VISUALC__) && defined(__WIN32__))
|
||||
#define wxLongLong_t __int64
|
||||
#define wxLongLongSuffix i64
|
||||
#define wxLongLongFmtSpec _T("I64")
|
||||
#define wxLongLongFmtSpec wxT("I64")
|
||||
#elif defined(__BORLANDC__) && defined(__WIN32__) && (__BORLANDC__ >= 0x520)
|
||||
#define wxLongLong_t __int64
|
||||
#define wxLongLongSuffix i64
|
||||
#define wxLongLongFmtSpec _T("L")
|
||||
#define wxLongLongFmtSpec wxT("L")
|
||||
#elif (defined(__WATCOMC__) && (defined(__WIN32__) || defined(__DOS__) || defined(__OS2__)))
|
||||
#define wxLongLong_t __int64
|
||||
#define wxLongLongSuffix i64
|
||||
#define wxLongLongFmtSpec _T("L")
|
||||
#define wxLongLongFmtSpec wxT("L")
|
||||
#elif defined(__DIGITALMARS__)
|
||||
#define wxLongLong_t __int64
|
||||
#define wxLongLongSuffix LL
|
||||
#define wxLongLongFmtSpec _T("ll")
|
||||
#define wxLongLongFmtSpec wxT("ll")
|
||||
#elif defined(__MINGW32__)
|
||||
#define wxLongLong_t long long
|
||||
#define wxLongLongSuffix ll
|
||||
#define wxLongLongFmtSpec _T("I64")
|
||||
#define wxLongLongFmtSpec wxT("I64")
|
||||
#elif defined(__MWERKS__)
|
||||
#if __option(longlong)
|
||||
#define wxLongLong_t long long
|
||||
#define wxLongLongSuffix ll
|
||||
#define wxLongLongFmtSpec _T("ll")
|
||||
#define wxLongLongFmtSpec wxT("ll")
|
||||
#else
|
||||
#error "The 64 bit integer support in CodeWarrior has been disabled."
|
||||
#error "See the documentation on the 'longlong' pragma."
|
||||
@@ -1011,7 +1011,7 @@ typedef wxUint32 wxDword;
|
||||
#define wxLongLong_t long long
|
||||
#endif /* __WXPALMOS6__ */
|
||||
#define wxLongLongSuffix ll
|
||||
#define wxLongLongFmtSpec _T("ll")
|
||||
#define wxLongLongFmtSpec wxT("ll")
|
||||
#elif defined(__VISAGECPP__) && __IBMCPP__ >= 400
|
||||
#define wxLongLong_t long long
|
||||
#elif (defined(SIZEOF_LONG_LONG) && SIZEOF_LONG_LONG >= 8) || \
|
||||
@@ -1021,11 +1021,11 @@ typedef wxUint32 wxDword;
|
||||
(defined(__DJGPP__) && __DJGPP__ >= 2)
|
||||
#define wxLongLong_t long long
|
||||
#define wxLongLongSuffix ll
|
||||
#define wxLongLongFmtSpec _T("ll")
|
||||
#define wxLongLongFmtSpec wxT("ll")
|
||||
#elif defined(SIZEOF_LONG) && (SIZEOF_LONG == 8)
|
||||
#define wxLongLong_t long
|
||||
#define wxLongLongSuffix l
|
||||
#define wxLongLongFmtSpec _T("l")
|
||||
#define wxLongLongFmtSpec wxT("l")
|
||||
#define wxLongLongIsLong
|
||||
#endif
|
||||
|
||||
|
@@ -116,7 +116,7 @@ enum wxPluginCategory
|
||||
// type only once, as the first parameter, and creating a variable of this type
|
||||
// called "pfn<name>" initialized with the "name" from the "dynlib"
|
||||
#define wxDYNLIB_FUNCTION(type, name, dynlib) \
|
||||
type pfn ## name = (type)(dynlib).GetSymbol(_T(#name))
|
||||
type pfn ## name = (type)(dynlib).GetSymbol(wxT(#name))
|
||||
|
||||
|
||||
// a more convenient function replacing wxDYNLIB_FUNCTION above
|
||||
|
@@ -71,7 +71,7 @@ public:
|
||||
void RefObj() { ++m_objcount; }
|
||||
void UnrefObj()
|
||||
{
|
||||
wxASSERT_MSG( m_objcount > 0, _T("Too many objects deleted??") );
|
||||
wxASSERT_MSG( m_objcount > 0, wxT("Too many objects deleted??") );
|
||||
--m_objcount;
|
||||
}
|
||||
|
||||
|
@@ -1069,7 +1069,7 @@ public:
|
||||
wxPropagateOnce(wxEvent& event) : m_event(event)
|
||||
{
|
||||
wxASSERT_MSG( m_event.m_propagationLevel > 0,
|
||||
_T("shouldn't be used unless ShouldPropagate()!") );
|
||||
wxT("shouldn't be used unless ShouldPropagate()!") );
|
||||
|
||||
m_event.m_propagationLevel--;
|
||||
}
|
||||
@@ -1917,7 +1917,7 @@ public:
|
||||
// m_loggingOff flag is only used by wxEVT_[QUERY_]END_SESSION, it
|
||||
// doesn't make sense for wxEVT_CLOSE_WINDOW
|
||||
wxASSERT_MSG( m_eventType != wxEVT_CLOSE_WINDOW,
|
||||
_T("this flag is for end session events only") );
|
||||
wxT("this flag is for end session events only") );
|
||||
|
||||
return m_loggingOff;
|
||||
}
|
||||
|
@@ -37,13 +37,13 @@ public:
|
||||
// def ctor
|
||||
wxFFile() { m_fp = NULL; }
|
||||
// open specified file (may fail, use IsOpened())
|
||||
wxFFile(const wxString& filename, const wxString& mode = _T("r"));
|
||||
wxFFile(const wxString& filename, const wxString& mode = wxT("r"));
|
||||
// attach to (already opened) file
|
||||
wxFFile(FILE *lfp) { m_fp = lfp; }
|
||||
|
||||
// open/close
|
||||
// open a file (existing or not - the mode controls what happens)
|
||||
bool Open(const wxString& filename, const wxString& mode = _T("r"));
|
||||
bool Open(const wxString& filename, const wxString& mode = wxT("r"));
|
||||
// closes the opened file (this is a NOP if not opened)
|
||||
bool Close();
|
||||
|
||||
|
@@ -421,7 +421,7 @@ enum wxFileKind
|
||||
#define wxHAS_LARGE_FFILES
|
||||
#endif
|
||||
#else
|
||||
#define wxFileOffsetFmtSpec _T("")
|
||||
#define wxFileOffsetFmtSpec wxT("")
|
||||
#endif
|
||||
#define wxClose close
|
||||
#define wxRead ::read
|
||||
@@ -459,7 +459,7 @@ enum wxFileKind
|
||||
#define wxHAS_LARGE_FFILES
|
||||
#endif
|
||||
#else
|
||||
#define wxFileOffsetFmtSpec _T("")
|
||||
#define wxFileOffsetFmtSpec wxT("")
|
||||
#endif
|
||||
// functions
|
||||
#define wxClose close
|
||||
|
@@ -535,10 +535,10 @@ public:
|
||||
static wxULongLong GetSize(const wxString &file);
|
||||
|
||||
// returns the size in a human readable form
|
||||
wxString GetHumanReadableSize(const wxString &nullsize = wxGetTranslation(_T("Not available")),
|
||||
wxString GetHumanReadableSize(const wxString &nullsize = wxGetTranslation(wxT("Not available")),
|
||||
int precision = 1) const;
|
||||
static wxString GetHumanReadableSize(const wxULongLong &sz,
|
||||
const wxString &nullsize = wxGetTranslation(_T("Not available")),
|
||||
const wxString &nullsize = wxGetTranslation(wxT("Not available")),
|
||||
int precision = 1);
|
||||
#endif // wxUSE_LONGLONG
|
||||
|
||||
|
@@ -125,14 +125,14 @@ public:
|
||||
|
||||
virtual wxCalendarDateAttr *GetAttr(size_t day) const
|
||||
{
|
||||
wxCHECK_MSG( day > 0 && day < 32, NULL, _T("invalid day") );
|
||||
wxCHECK_MSG( day > 0 && day < 32, NULL, wxT("invalid day") );
|
||||
|
||||
return m_attrs[day - 1];
|
||||
}
|
||||
|
||||
virtual void SetAttr(size_t day, wxCalendarDateAttr *attr)
|
||||
{
|
||||
wxCHECK_RET( day > 0 && day < 32, _T("invalid day") );
|
||||
wxCHECK_RET( day > 0 && day < 32, wxT("invalid day") );
|
||||
|
||||
delete m_attrs[day - 1];
|
||||
m_attrs[day - 1] = attr;
|
||||
|
@@ -26,8 +26,8 @@
|
||||
// all actions of single line text controls are supported
|
||||
|
||||
// popup/dismiss the choice window
|
||||
#define wxACTION_COMBOBOX_POPUP _T("popup")
|
||||
#define wxACTION_COMBOBOX_DISMISS _T("dismiss")
|
||||
#define wxACTION_COMBOBOX_POPUP wxT("popup")
|
||||
#define wxACTION_COMBOBOX_DISMISS wxT("dismiss")
|
||||
|
||||
#endif
|
||||
|
||||
|
@@ -44,11 +44,11 @@ extern WXDLLIMPEXP_DATA_ADV(const char) wxGridNameStr[];
|
||||
#define WXGRID_DEFAULT_SCROLLBAR_WIDTH 16
|
||||
|
||||
// type names for grid table values
|
||||
#define wxGRID_VALUE_STRING _T("string")
|
||||
#define wxGRID_VALUE_BOOL _T("bool")
|
||||
#define wxGRID_VALUE_NUMBER _T("long")
|
||||
#define wxGRID_VALUE_FLOAT _T("double")
|
||||
#define wxGRID_VALUE_CHOICE _T("choice")
|
||||
#define wxGRID_VALUE_STRING wxT("string")
|
||||
#define wxGRID_VALUE_BOOL wxT("bool")
|
||||
#define wxGRID_VALUE_NUMBER wxT("long")
|
||||
#define wxGRID_VALUE_FLOAT wxT("double")
|
||||
#define wxGRID_VALUE_CHOICE wxT("choice")
|
||||
|
||||
#define wxGRID_VALUE_TEXT wxGRID_VALUE_STRING
|
||||
#define wxGRID_VALUE_LONG wxGRID_VALUE_NUMBER
|
||||
@@ -2144,7 +2144,7 @@ public:
|
||||
// more than once
|
||||
void Create(wxGrid *grid)
|
||||
{
|
||||
wxASSERT_MSG( !m_grid, _T("shouldn't be called more than once") );
|
||||
wxASSERT_MSG( !m_grid, wxT("shouldn't be called more than once") );
|
||||
|
||||
Init(grid);
|
||||
}
|
||||
|
@@ -16,8 +16,8 @@
|
||||
|
||||
#if wxUSE_GRID
|
||||
|
||||
#define wxGRID_VALUE_CHOICEINT _T("choiceint")
|
||||
#define wxGRID_VALUE_DATETIME _T("datetime")
|
||||
#define wxGRID_VALUE_CHOICEINT wxT("choiceint")
|
||||
#define wxGRID_VALUE_DATETIME wxT("datetime")
|
||||
|
||||
|
||||
// the default renderer for the cells containing string data
|
||||
|
@@ -143,7 +143,7 @@ protected:
|
||||
|
||||
// string representation of our value
|
||||
wxString GetString() const
|
||||
{ return wxString::Format(_T("%ld"), m_value); }
|
||||
{ return wxString::Format(wxT("%ld"), m_value); }
|
||||
|
||||
private:
|
||||
int m_min,
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
|
||||
// set the string values returned by GetValue() for the true and false
|
||||
// states, respectively
|
||||
static void UseStringValues(const wxString& valueTrue = _T("1"),
|
||||
static void UseStringValues(const wxString& valueTrue = wxT("1"),
|
||||
const wxString& valueFalse = wxEmptyString);
|
||||
|
||||
// return true if the given string is equal to the string representation of
|
||||
|
@@ -69,7 +69,7 @@ public:
|
||||
{
|
||||
wxString s = GetText();
|
||||
if ( s.empty() )
|
||||
s = _T('H');
|
||||
s = wxT('H');
|
||||
|
||||
return s;
|
||||
}
|
||||
@@ -188,7 +188,7 @@ public:
|
||||
void ExtendWidth(wxCoord w)
|
||||
{
|
||||
wxASSERT_MSG( m_rectAll.width <= w,
|
||||
_T("width can only be increased") );
|
||||
wxT("width can only be increased") );
|
||||
|
||||
m_rectAll.width = w;
|
||||
m_rectLabel.x = m_rectAll.x + (w - m_rectLabel.width) / 2;
|
||||
@@ -254,7 +254,7 @@ public:
|
||||
|
||||
bool IsHighlighted() const
|
||||
{
|
||||
wxASSERT_MSG( !IsVirtual(), _T("unexpected call to IsHighlighted") );
|
||||
wxASSERT_MSG( !IsVirtual(), wxT("unexpected call to IsHighlighted") );
|
||||
|
||||
return m_highlighted;
|
||||
}
|
||||
@@ -420,7 +420,7 @@ public:
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString &name = _T("listctrlmainwindow") );
|
||||
const wxString &name = wxT("listctrlmainwindow") );
|
||||
|
||||
virtual ~wxListMainWindow();
|
||||
|
||||
@@ -719,7 +719,7 @@ protected:
|
||||
// get the line data for the given index
|
||||
wxListLineData *GetLine(size_t n) const
|
||||
{
|
||||
wxASSERT_MSG( n != (size_t)-1, _T("invalid line index") );
|
||||
wxASSERT_MSG( n != (size_t)-1, wxT("invalid line index") );
|
||||
|
||||
if ( IsVirtual() )
|
||||
{
|
||||
|
@@ -53,7 +53,7 @@ public:
|
||||
long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
|
||||
double min = 0, double max = 100, double initial = 0,
|
||||
double inc = 1,
|
||||
const wxString& name = _T("wxSpinCtrl"));
|
||||
const wxString& name = wxT("wxSpinCtrl"));
|
||||
|
||||
virtual ~wxSpinCtrlGenericBase();
|
||||
|
||||
@@ -161,7 +161,7 @@ public:
|
||||
long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
|
||||
double min = 0, double max = 100, double initial = 0,
|
||||
double inc = 1,
|
||||
const wxString& name = _T("wxSpinCtrl"))
|
||||
const wxString& name = wxT("wxSpinCtrl"))
|
||||
{
|
||||
m_min = min;
|
||||
m_max = max;
|
||||
@@ -245,7 +245,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
|
||||
int min = 0, int max = 100, int initial = 0,
|
||||
const wxString& name = _T("wxSpinCtrl"))
|
||||
const wxString& name = wxT("wxSpinCtrl"))
|
||||
{
|
||||
Create(parent, id, value, pos, size, style, min, max, initial, name);
|
||||
}
|
||||
@@ -257,7 +257,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
|
||||
int min = 0, int max = 100, int initial = 0,
|
||||
const wxString& name = _T("wxSpinCtrl"))
|
||||
const wxString& name = wxT("wxSpinCtrl"))
|
||||
{
|
||||
return wxSpinCtrlGenericBase::Create(parent, id, value, pos, size,
|
||||
style, min, max, initial, 1, name);
|
||||
@@ -302,7 +302,7 @@ public:
|
||||
long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
|
||||
double min = 0, double max = 100, double initial = 0,
|
||||
double inc = 1,
|
||||
const wxString& name = _T("wxSpinCtrlDouble"))
|
||||
const wxString& name = wxT("wxSpinCtrlDouble"))
|
||||
{
|
||||
m_digits = 0;
|
||||
Create(parent, id, value, pos, size, style,
|
||||
@@ -317,7 +317,7 @@ public:
|
||||
long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
|
||||
double min = 0, double max = 100, double initial = 0,
|
||||
double inc = 1,
|
||||
const wxString& name = _T("wxSpinCtrlDouble"))
|
||||
const wxString& name = wxT("wxSpinCtrlDouble"))
|
||||
{
|
||||
return wxSpinCtrlGenericBase::Create(parent, id, value, pos, size,
|
||||
style, min, max, initial,
|
||||
|
@@ -91,7 +91,7 @@ public:
|
||||
void SetSplitMode(int mode)
|
||||
{
|
||||
wxASSERT_MSG( mode == wxSPLIT_VERTICAL || mode == wxSPLIT_HORIZONTAL,
|
||||
_T("invalid split mode") );
|
||||
wxT("invalid split mode") );
|
||||
|
||||
m_splitMode = (wxSplitMode)mode;
|
||||
}
|
||||
|
@@ -52,7 +52,7 @@ enum
|
||||
WX_GL_SAMPLES // 4 for 2x2 antialising supersampling on most graphics cards
|
||||
};
|
||||
|
||||
#define wxGLCanvasName _T("GLCanvas")
|
||||
#define wxGLCanvasName wxT("GLCanvas")
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGLContextBase: OpenGL rendering context
|
||||
|
@@ -18,10 +18,10 @@
|
||||
// there is no "right" choice of the checkbox indicators, so allow the user to
|
||||
// define them himself if he wants
|
||||
#ifndef wxCHECKLBOX_CHECKED
|
||||
#define wxCHECKLBOX_CHECKED _T('x')
|
||||
#define wxCHECKLBOX_UNCHECKED _T(' ')
|
||||
#define wxCHECKLBOX_CHECKED wxT('x')
|
||||
#define wxCHECKLBOX_UNCHECKED wxT(' ')
|
||||
|
||||
#define wxCHECKLBOX_STRING _T("[ ] ")
|
||||
#define wxCHECKLBOX_STRING wxT("[ ] ")
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@@ -33,7 +33,7 @@ public:
|
||||
long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
|
||||
double min = 0, double max = 100, double initial = 0,
|
||||
double inc = 1,
|
||||
const wxString& name = _T("wxSpinCtrlGTKBase"));
|
||||
const wxString& name = wxT("wxSpinCtrlGTKBase"));
|
||||
|
||||
// wxSpinCtrl(Double) methods call DoXXX functions of the same name
|
||||
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
|
||||
int min = 0, int max = 100, int initial = 0,
|
||||
const wxString& name = _T("wxSpinCtrl"))
|
||||
const wxString& name = wxT("wxSpinCtrl"))
|
||||
{
|
||||
Create(parent, id, value, pos, size, style, min, max, initial, name);
|
||||
}
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
|
||||
int min = 0, int max = 100, int initial = 0,
|
||||
const wxString& name = _T("wxSpinCtrl"))
|
||||
const wxString& name = wxT("wxSpinCtrl"))
|
||||
{
|
||||
return wxSpinCtrlGTKBase::Create(parent, id, value, pos, size,
|
||||
style, min, max, initial, 1, name);
|
||||
@@ -154,7 +154,7 @@ public:
|
||||
long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
|
||||
double min = 0, double max = 100, double initial = 0,
|
||||
double inc = 1,
|
||||
const wxString& name = _T("wxSpinCtrlDouble"))
|
||||
const wxString& name = wxT("wxSpinCtrlDouble"))
|
||||
{
|
||||
Create(parent, id, value, pos, size, style,
|
||||
min, max, initial, inc, name);
|
||||
@@ -168,7 +168,7 @@ public:
|
||||
long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
|
||||
double min = 0, double max = 100, double initial = 0,
|
||||
double inc = 1,
|
||||
const wxString& name = _T("wxSpinCtrlDouble"))
|
||||
const wxString& name = wxT("wxSpinCtrlDouble"))
|
||||
{
|
||||
return wxSpinCtrlGTKBase::Create(parent, id, value, pos, size,
|
||||
style, min, max, initial, inc, name);
|
||||
|
@@ -18,10 +18,10 @@
|
||||
// there is no "right" choice of the checkbox indicators, so allow the user to
|
||||
// define them himself if he wants
|
||||
#ifndef wxCHECKLBOX_CHECKED
|
||||
#define wxCHECKLBOX_CHECKED _T('x')
|
||||
#define wxCHECKLBOX_UNCHECKED _T(' ')
|
||||
#define wxCHECKLBOX_CHECKED wxT('x')
|
||||
#define wxCHECKLBOX_UNCHECKED wxT(' ')
|
||||
|
||||
#define wxCHECKLBOX_STRING _T("[ ] ")
|
||||
#define wxCHECKLBOX_STRING wxT("[ ] ")
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@@ -32,7 +32,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_ARROW_KEYS,
|
||||
int min = 0, int max = 100, int initial = 0,
|
||||
const wxString& name = _T("wxSpinCtrl"))
|
||||
const wxString& name = wxT("wxSpinCtrl"))
|
||||
{
|
||||
Create(parent, id, value, pos, size, style, min, max, initial, name);
|
||||
}
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_ARROW_KEYS,
|
||||
int min = 0, int max = 100, int initial = 0,
|
||||
const wxString& name = _T("wxSpinCtrl"));
|
||||
const wxString& name = wxT("wxSpinCtrl"));
|
||||
|
||||
void SetValue(const wxString& text);
|
||||
void SetSelection(long from, long to);
|
||||
|
@@ -14,7 +14,7 @@
|
||||
|
||||
// defines for saving the BMP file in different formats, Bits Per Pixel
|
||||
// USE: wximage.SetOption( wxIMAGE_OPTION_BMP_FORMAT, wxBMP_xBPP );
|
||||
#define wxIMAGE_OPTION_BMP_FORMAT wxString(_T("wxBMP_FORMAT"))
|
||||
#define wxIMAGE_OPTION_BMP_FORMAT wxString(wxT("wxBMP_FORMAT"))
|
||||
|
||||
// These two options are filled in upon reading CUR file and can (should) be
|
||||
// specified when saving a CUR file - they define the hotspot of the cursor:
|
||||
@@ -45,10 +45,10 @@ class WXDLLIMPEXP_CORE wxBMPHandler : public wxImageHandler
|
||||
public:
|
||||
wxBMPHandler()
|
||||
{
|
||||
m_name = _T("Windows bitmap file");
|
||||
m_extension = _T("bmp");
|
||||
m_name = wxT("Windows bitmap file");
|
||||
m_extension = wxT("bmp");
|
||||
m_type = wxBITMAP_TYPE_BMP;
|
||||
m_mime = _T("image/x-bmp");
|
||||
m_mime = wxT("image/x-bmp");
|
||||
}
|
||||
|
||||
#if wxUSE_STREAMS
|
||||
@@ -79,10 +79,10 @@ class WXDLLIMPEXP_CORE wxICOHandler : public wxBMPHandler
|
||||
public:
|
||||
wxICOHandler()
|
||||
{
|
||||
m_name = _T("Windows icon file");
|
||||
m_extension = _T("ico");
|
||||
m_name = wxT("Windows icon file");
|
||||
m_extension = wxT("ico");
|
||||
m_type = wxBITMAP_TYPE_ICO;
|
||||
m_mime = _T("image/x-ico");
|
||||
m_mime = wxT("image/x-ico");
|
||||
}
|
||||
|
||||
#if wxUSE_STREAMS
|
||||
@@ -109,10 +109,10 @@ class WXDLLIMPEXP_CORE wxCURHandler : public wxICOHandler
|
||||
public:
|
||||
wxCURHandler()
|
||||
{
|
||||
m_name = _T("Windows cursor file");
|
||||
m_extension = _T("cur");
|
||||
m_name = wxT("Windows cursor file");
|
||||
m_extension = wxT("cur");
|
||||
m_type = wxBITMAP_TYPE_CUR;
|
||||
m_mime = _T("image/x-cur");
|
||||
m_mime = wxT("image/x-cur");
|
||||
}
|
||||
|
||||
// VS: This handler's meat is implemented inside wxICOHandler (the two
|
||||
@@ -136,10 +136,10 @@ class WXDLLIMPEXP_CORE wxANIHandler : public wxCURHandler
|
||||
public:
|
||||
wxANIHandler()
|
||||
{
|
||||
m_name = _T("Windows animated cursor file");
|
||||
m_extension = _T("ani");
|
||||
m_name = wxT("Windows animated cursor file");
|
||||
m_extension = wxT("ani");
|
||||
m_type = wxBITMAP_TYPE_ANI;
|
||||
m_mime = _T("image/x-ani");
|
||||
m_mime = wxT("image/x-ani");
|
||||
}
|
||||
|
||||
|
||||
|
@@ -28,17 +28,17 @@
|
||||
// which breaks the compilation below
|
||||
#undef index
|
||||
|
||||
#define wxIMAGE_OPTION_QUALITY wxString(_T("quality"))
|
||||
#define wxIMAGE_OPTION_FILENAME wxString(_T("FileName"))
|
||||
#define wxIMAGE_OPTION_QUALITY wxString(wxT("quality"))
|
||||
#define wxIMAGE_OPTION_FILENAME wxString(wxT("FileName"))
|
||||
|
||||
#define wxIMAGE_OPTION_RESOLUTION wxString(_T("Resolution"))
|
||||
#define wxIMAGE_OPTION_RESOLUTIONX wxString(_T("ResolutionX"))
|
||||
#define wxIMAGE_OPTION_RESOLUTIONY wxString(_T("ResolutionY"))
|
||||
#define wxIMAGE_OPTION_RESOLUTION wxString(wxT("Resolution"))
|
||||
#define wxIMAGE_OPTION_RESOLUTIONX wxString(wxT("ResolutionX"))
|
||||
#define wxIMAGE_OPTION_RESOLUTIONY wxString(wxT("ResolutionY"))
|
||||
|
||||
#define wxIMAGE_OPTION_RESOLUTIONUNIT wxString(_T("ResolutionUnit"))
|
||||
#define wxIMAGE_OPTION_RESOLUTIONUNIT wxString(wxT("ResolutionUnit"))
|
||||
|
||||
#define wxIMAGE_OPTION_MAX_WIDTH wxString(_T("MaxWidth"))
|
||||
#define wxIMAGE_OPTION_MAX_HEIGHT wxString(_T("MaxHeight"))
|
||||
#define wxIMAGE_OPTION_MAX_WIDTH wxString(wxT("MaxWidth"))
|
||||
#define wxIMAGE_OPTION_MAX_HEIGHT wxString(wxT("MaxHeight"))
|
||||
|
||||
// constants used with wxIMAGE_OPTION_RESOLUTIONUNIT
|
||||
//
|
||||
|
@@ -21,10 +21,10 @@
|
||||
#include "wx/image.h"
|
||||
|
||||
// defines for wxImage::SetOption
|
||||
#define wxIMAGE_OPTION_BITSPERSAMPLE wxString(_T("BitsPerSample"))
|
||||
#define wxIMAGE_OPTION_SAMPLESPERPIXEL wxString(_T("SamplesPerPixel"))
|
||||
#define wxIMAGE_OPTION_COMPRESSION wxString(_T("Compression"))
|
||||
#define wxIMAGE_OPTION_IMAGEDESCRIPTOR wxString(_T("ImageDescriptor"))
|
||||
#define wxIMAGE_OPTION_BITSPERSAMPLE wxString(wxT("BitsPerSample"))
|
||||
#define wxIMAGE_OPTION_SAMPLESPERPIXEL wxString(wxT("SamplesPerPixel"))
|
||||
#define wxIMAGE_OPTION_COMPRESSION wxString(wxT("Compression"))
|
||||
#define wxIMAGE_OPTION_IMAGEDESCRIPTOR wxString(wxT("ImageDescriptor"))
|
||||
|
||||
class WXDLLIMPEXP_CORE wxTIFFHandler: public wxImageHandler
|
||||
{
|
||||
|
@@ -186,7 +186,7 @@ inline const void *wxListCastElementToVoidPtr(const wxString& str)
|
||||
bool operator==(const compatibility_iterator& i) const \
|
||||
{ \
|
||||
wxASSERT_MSG( m_list && i.m_list, \
|
||||
_T("comparing invalid iterators is illegal") ); \
|
||||
wxT("comparing invalid iterators is illegal") ); \
|
||||
return (m_list == i.m_list) && (m_iter == i.m_iter); \
|
||||
} \
|
||||
bool operator!=(const compatibility_iterator& i) const \
|
||||
|
@@ -177,7 +177,7 @@ public:
|
||||
long ToLong() const
|
||||
{
|
||||
wxASSERT_MSG( (m_ll >= LONG_MIN) && (m_ll <= LONG_MAX),
|
||||
_T("wxLongLong to long conversion loss of precision") );
|
||||
wxT("wxLongLong to long conversion loss of precision") );
|
||||
|
||||
return wx_truncate_cast(long, m_ll);
|
||||
}
|
||||
@@ -405,7 +405,7 @@ public:
|
||||
unsigned long ToULong() const
|
||||
{
|
||||
wxASSERT_MSG( m_ll <= LONG_MAX,
|
||||
_T("wxULongLong to long conversion loss of precision") );
|
||||
wxT("wxULongLong to long conversion loss of precision") );
|
||||
|
||||
return wx_truncate_cast(unsigned long, m_ll);
|
||||
}
|
||||
@@ -683,7 +683,7 @@ public:
|
||||
long ToLong() const
|
||||
{
|
||||
wxASSERT_MSG( (m_hi == 0l) || (m_hi == -1l),
|
||||
_T("wxLongLong to long conversion loss of precision") );
|
||||
wxT("wxLongLong to long conversion loss of precision") );
|
||||
|
||||
return (long)m_lo;
|
||||
}
|
||||
@@ -908,7 +908,7 @@ public:
|
||||
unsigned long ToULong() const
|
||||
{
|
||||
wxASSERT_MSG( m_hi == 0ul,
|
||||
_T("wxULongLong to long conversion loss of precision") );
|
||||
wxT("wxULongLong to long conversion loss of precision") );
|
||||
|
||||
return (unsigned long)m_lo;
|
||||
}
|
||||
|
@@ -115,7 +115,7 @@
|
||||
inline int wxRound(double x)
|
||||
{
|
||||
wxASSERT_MSG( x > INT_MIN - 0.5 && x < INT_MAX + 0.5,
|
||||
_T("argument out of supported range") );
|
||||
wxT("argument out of supported range") );
|
||||
|
||||
#if defined(HAVE_ROUND)
|
||||
return int(round(x));
|
||||
|
@@ -53,12 +53,12 @@ class WXDLLIMPEXP_BASE wxMimeType : public wxString
|
||||
public:
|
||||
// all string ctors here
|
||||
|
||||
wxString GetType() const { return BeforeFirst(_T('/')); }
|
||||
wxString GetSubType() const { return AfterFirst(_T('/')); }
|
||||
wxString GetType() const { return BeforeFirst(wxT('/')); }
|
||||
wxString GetSubType() const { return AfterFirst(wxT('/')); }
|
||||
|
||||
void SetSubType(const wxString& subtype)
|
||||
{
|
||||
*this = GetType() + _T('/') + subtype;
|
||||
*this = GetType() + wxT('/') + subtype;
|
||||
}
|
||||
|
||||
bool Matches(const wxMimeType& wildcard)
|
||||
|
@@ -69,7 +69,7 @@ protected:
|
||||
// after that
|
||||
void AddDependency(wxClassInfo *dep)
|
||||
{
|
||||
wxCHECK_RET( dep, _T("NULL module dependency") );
|
||||
wxCHECK_RET( dep, wxT("NULL module dependency") );
|
||||
|
||||
m_dependencies.Add(dep);
|
||||
}
|
||||
|
@@ -52,7 +52,7 @@ public:
|
||||
|
||||
// this suffix should be appended to all our Win32 class names to obtain a
|
||||
// variant registered without CS_[HV]REDRAW styles
|
||||
static const wxChar *GetNoRedrawClassSuffix() { return _T("NR"); }
|
||||
static const wxChar *GetNoRedrawClassSuffix() { return wxT("NR"); }
|
||||
|
||||
// get the name of the registered Win32 class with the given (unique) base
|
||||
// name: this function constructs the unique class name using this name as
|
||||
|
@@ -338,7 +338,7 @@ public:
|
||||
virtual void DoGetSize(int *w, int *h) const
|
||||
{
|
||||
wxASSERT_MSG( m_size.IsFullySpecified(),
|
||||
_T("size of this DC hadn't been set and is unknown") );
|
||||
wxT("size of this DC hadn't been set and is unknown") );
|
||||
|
||||
if ( w )
|
||||
*w = m_size.x;
|
||||
|
@@ -145,7 +145,7 @@ protected:
|
||||
virtual wxGDIRefData *
|
||||
CloneGDIRefData(const wxGDIRefData *WXUNUSED(data)) const
|
||||
{
|
||||
wxFAIL_MSG( _T("must be implemented if used") );
|
||||
wxFAIL_MSG( wxT("must be implemented if used") );
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@@ -59,7 +59,7 @@ public:
|
||||
|
||||
#define wxGetFormatName(format) wxDataObject::GetFormatName(format)
|
||||
#else // !Debug
|
||||
#define wxGetFormatName(format) _T("")
|
||||
#define wxGetFormatName(format) wxT("")
|
||||
#endif // Debug/!Debug
|
||||
// they need to be accessed from wxIDataObject, so made them public,
|
||||
// or wxIDataObject friend
|
||||
|
@@ -30,7 +30,7 @@ class WXDLLIMPEXP_FWD_CORE wxWindow;
|
||||
// the cursor 'name' from the resources under MSW, but will expand to
|
||||
// something else under GTK. If you don't use it, you will have to use #ifdef
|
||||
// in the application code.
|
||||
#define wxDROP_ICON(name) wxCursor(_T(#name))
|
||||
#define wxDROP_ICON(name) wxCursor(wxT(#name))
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxDropSource is used to start the drag-&-drop operation on associated
|
||||
|
@@ -143,7 +143,7 @@ private:
|
||||
#define IMPLEMENT_IUNKNOWN_METHODS(classname) \
|
||||
STDMETHODIMP classname::QueryInterface(REFIID riid, void **ppv) \
|
||||
{ \
|
||||
wxLogQueryInterface(_T(#classname), riid); \
|
||||
wxLogQueryInterface(wxT(#classname), riid); \
|
||||
\
|
||||
if ( IsIidFromList(riid, ms_aIids, WXSIZEOF(ms_aIids)) ) { \
|
||||
*ppv = this; \
|
||||
@@ -160,14 +160,14 @@ private:
|
||||
\
|
||||
STDMETHODIMP_(ULONG) classname::AddRef() \
|
||||
{ \
|
||||
wxLogAddRef(_T(#classname), m_cRef); \
|
||||
wxLogAddRef(wxT(#classname), m_cRef); \
|
||||
\
|
||||
return ++m_cRef; \
|
||||
} \
|
||||
\
|
||||
STDMETHODIMP_(ULONG) classname::Release() \
|
||||
{ \
|
||||
wxLogRelease(_T(#classname), m_cRef); \
|
||||
wxLogRelease(wxT(#classname), m_cRef); \
|
||||
\
|
||||
if ( --m_cRef == wxAutoULong(0) ) { \
|
||||
delete this; \
|
||||
|
@@ -369,7 +369,7 @@ inline RECT wxGetWindowRect(HWND hwnd)
|
||||
|
||||
if ( !::GetWindowRect(hwnd, &rect) )
|
||||
{
|
||||
wxLogLastError(_T("GetWindowRect"));
|
||||
wxLogLastError(wxT("GetWindowRect"));
|
||||
}
|
||||
|
||||
return rect;
|
||||
@@ -381,7 +381,7 @@ inline RECT wxGetClientRect(HWND hwnd)
|
||||
|
||||
if ( !::GetClientRect(hwnd, &rect) )
|
||||
{
|
||||
wxLogLastError(_T("GetClientRect"));
|
||||
wxLogLastError(wxT("GetClientRect"));
|
||||
}
|
||||
|
||||
return rect;
|
||||
@@ -452,7 +452,7 @@ public:
|
||||
|
||||
void Init(HDC hdc, HGDIOBJ hgdiobj)
|
||||
{
|
||||
wxASSERT_MSG( !m_hdc, _T("initializing twice?") );
|
||||
wxASSERT_MSG( !m_hdc, wxT("initializing twice?") );
|
||||
|
||||
m_hdc = hdc;
|
||||
|
||||
@@ -481,7 +481,7 @@ protected:
|
||||
|
||||
void InitGdiobj(HGDIOBJ gdiobj)
|
||||
{
|
||||
wxASSERT_MSG( !m_gdiobj, _T("initializing twice?") );
|
||||
wxASSERT_MSG( !m_gdiobj, wxT("initializing twice?") );
|
||||
|
||||
m_gdiobj = gdiobj;
|
||||
}
|
||||
@@ -575,7 +575,7 @@ public:
|
||||
{
|
||||
if ( !::SelectClipRgn(hdc, hrgn) )
|
||||
{
|
||||
wxLogLastError(_T("SelectClipRgn"));
|
||||
wxLogLastError(wxT("SelectClipRgn"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -606,7 +606,7 @@ private:
|
||||
m_modeOld = ::SetMapMode(hdc, mm);
|
||||
if ( !m_modeOld )
|
||||
{
|
||||
wxLogLastError(_T("SelectClipRgn"));
|
||||
wxLogLastError(wxT("SelectClipRgn"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -643,7 +643,7 @@ public:
|
||||
m_hGlobal = ::GlobalAlloc(flags, size);
|
||||
if ( !m_hGlobal )
|
||||
{
|
||||
wxLogLastError(_T("GlobalAlloc"));
|
||||
wxLogLastError(wxT("GlobalAlloc"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -656,7 +656,7 @@ public:
|
||||
{
|
||||
if ( m_hGlobal && ::GlobalFree(m_hGlobal) )
|
||||
{
|
||||
wxLogLastError(_T("GlobalFree"));
|
||||
wxLogLastError(wxT("GlobalFree"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -694,7 +694,7 @@ public:
|
||||
m_ptr = GlobalLock(hGlobal);
|
||||
if ( !m_ptr )
|
||||
{
|
||||
wxLogLastError(_T("GlobalLock"));
|
||||
wxLogLastError(wxT("GlobalLock"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -712,7 +712,7 @@ public:
|
||||
DWORD dwLastError = ::GetLastError();
|
||||
if ( dwLastError != NO_ERROR )
|
||||
{
|
||||
wxLogApiError(_T("GlobalUnlock"), dwLastError);
|
||||
wxLogApiError(wxT("GlobalUnlock"), dwLastError);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -745,12 +745,12 @@ public:
|
||||
{
|
||||
// we should only be called if we hadn't been initialized yet
|
||||
wxASSERT_MSG( m_registered == -1,
|
||||
_T("calling ClassRegistrar::Register() twice?") );
|
||||
wxT("calling ClassRegistrar::Register() twice?") );
|
||||
|
||||
m_registered = ::RegisterClass(&wc) ? 1 : 0;
|
||||
if ( !IsRegistered() )
|
||||
{
|
||||
wxLogLastError(_T("RegisterClassEx()"));
|
||||
wxLogLastError(wxT("RegisterClassEx()"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -771,7 +771,7 @@ public:
|
||||
{
|
||||
if ( !::UnregisterClass(m_clsname.wx_str(), wxhInstance) )
|
||||
{
|
||||
wxLogLastError(_T("UnregisterClass"));
|
||||
wxLogLastError(wxT("UnregisterClass"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -857,7 +857,7 @@ inline wxString wxGetFullModuleName(HMODULE hmod)
|
||||
MAX_PATH
|
||||
) )
|
||||
{
|
||||
wxLogLastError(_T("GetModuleFileName"));
|
||||
wxLogLastError(wxT("GetModuleFileName"));
|
||||
}
|
||||
|
||||
return fullname;
|
||||
|
@@ -38,7 +38,7 @@ namespace wxMSWButton
|
||||
// returns BS_MULTILINE if the label contains new lines or 0 otherwise
|
||||
inline int GetMultilineStyle(const wxString& label)
|
||||
{
|
||||
return label.find(_T('\n')) == wxString::npos ? 0 : BS_MULTILINE;
|
||||
return label.find(wxT('\n')) == wxString::npos ? 0 : BS_MULTILINE;
|
||||
}
|
||||
|
||||
// update the style of the specified HWND to include or exclude BS_MULTILINE
|
||||
|
@@ -72,7 +72,7 @@ protected:
|
||||
m_oldColFg = ::SetTextColor(m_hdc, colFg);
|
||||
if ( m_oldColFg == CLR_INVALID )
|
||||
{
|
||||
wxLogLastError(_T("SetTextColor"));
|
||||
wxLogLastError(wxT("SetTextColor"));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -85,7 +85,7 @@ protected:
|
||||
m_oldColBg = ::SetBkColor(m_hdc, colBg);
|
||||
if ( m_oldColBg == CLR_INVALID )
|
||||
{
|
||||
wxLogLastError(_T("SetBkColor"));
|
||||
wxLogLastError(wxT("SetBkColor"));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -131,7 +131,7 @@ protected:
|
||||
: OPAQUE);
|
||||
if ( !m_oldMode )
|
||||
{
|
||||
wxLogLastError(_T("SetBkMode"));
|
||||
wxLogLastError(wxT("SetBkMode"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -36,7 +36,7 @@ inline const NONCLIENTMETRICS& GetNonClientMetrics()
|
||||
#endif // WINVER >= 0x0600
|
||||
{
|
||||
// maybe we should initialize the struct with some defaults?
|
||||
wxLogLastError(_T("SystemParametersInfo(SPI_GETNONCLIENTMETRICS)"));
|
||||
wxLogLastError(wxT("SystemParametersInfo(SPI_GETNONCLIENTMETRICS)"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -101,7 +101,7 @@ protected:
|
||||
void Init();
|
||||
|
||||
// format an integer value as string
|
||||
static wxString Format(int n) { return wxString::Format(_T("%d"), n); }
|
||||
static wxString Format(int n) { return wxString::Format(wxT("%d"), n); }
|
||||
|
||||
// get the boundig box for the slider and possible labels
|
||||
wxRect GetBoundingBox() const;
|
||||
|
@@ -39,7 +39,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
|
||||
int min = 0, int max = 100, int initial = 0,
|
||||
const wxString& name = _T("wxSpinCtrl"))
|
||||
const wxString& name = wxT("wxSpinCtrl"))
|
||||
{
|
||||
Create(parent, id, value, pos, size, style, min, max, initial, name);
|
||||
}
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
|
||||
int min = 0, int max = 100, int initial = 0,
|
||||
const wxString& name = _T("wxSpinCtrl"));
|
||||
const wxString& name = wxT("wxSpinCtrl"));
|
||||
|
||||
// a wxTextCtrl-like method (but we can't have GetValue returning wxString
|
||||
// because the base class already has one returning int!)
|
||||
|
@@ -28,7 +28,7 @@ public:
|
||||
// allocate enough space for the given number of windows
|
||||
void Create(size_t n)
|
||||
{
|
||||
wxASSERT_MSG( !m_hwnds, _T("Create() called twice?") );
|
||||
wxASSERT_MSG( !m_hwnds, wxT("Create() called twice?") );
|
||||
|
||||
m_count = n;
|
||||
m_hwnds = (HWND *)calloc(n, sizeof(HWND));
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
// access a given window
|
||||
HWND& Get(size_t n)
|
||||
{
|
||||
wxASSERT_MSG( n < m_count, _T("subwindow index out of range") );
|
||||
wxASSERT_MSG( n < m_count, wxT("subwindow index out of range") );
|
||||
|
||||
return m_hwnds[n];
|
||||
}
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
// that it is not reused while this object exists
|
||||
void Set(size_t n, HWND hwnd, wxWindowID id)
|
||||
{
|
||||
wxASSERT_MSG( n < m_count, _T("subwindow index out of range") );
|
||||
wxASSERT_MSG( n < m_count, wxT("subwindow index out of range") );
|
||||
|
||||
m_hwnds[n] = hwnd;
|
||||
m_ids[n] = id;
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
void SetFont(const wxFont& font)
|
||||
{
|
||||
HFONT hfont = GetHfontOf(font);
|
||||
wxCHECK_RET( hfont, _T("invalid font") );
|
||||
wxCHECK_RET( hfont, wxT("invalid font") );
|
||||
|
||||
for ( size_t n = 0; n < m_count; n++ )
|
||||
{
|
||||
|
@@ -72,7 +72,7 @@ public:
|
||||
wxString path;
|
||||
if ( !SHGetPathFromIDList(m_pidl, wxStringBuffer(path, MAX_PATH)) )
|
||||
{
|
||||
wxLogLastError(_T("SHGetPathFromIDList"));
|
||||
wxLogLastError(wxT("SHGetPathFromIDList"));
|
||||
}
|
||||
|
||||
return path;
|
||||
|
@@ -241,7 +241,7 @@ protected:
|
||||
virtual wxGDIRefData *
|
||||
CloneGDIRefData(const wxGDIRefData *WXUNUSED(data)) const
|
||||
{
|
||||
wxFAIL_MSG( _T("must be implemented if used") );
|
||||
wxFAIL_MSG( wxT("must be implemented if used") );
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@@ -169,12 +169,12 @@ typedef MRESULT (APIENTRY * WndProcCast) (HWND, ULONG, MPARAM, MPARAM);
|
||||
* for this combination of CTl3D/FAFA settings
|
||||
*/
|
||||
|
||||
#define STATIC_CLASS _T("STATIC")
|
||||
#define STATIC_CLASS wxT("STATIC")
|
||||
#define STATIC_FLAGS (SS_TEXT|DT_LEFT|SS_LEFT|WS_VISIBLE)
|
||||
#define CHECK_CLASS _T("BUTTON")
|
||||
#define CHECK_CLASS wxT("BUTTON")
|
||||
#define CHECK_FLAGS (BS_AUTOCHECKBOX|WS_TABSTOP)
|
||||
#define CHECK_IS_FAFA FALSE
|
||||
#define RADIO_CLASS _T("BUTTON" )
|
||||
#define RADIO_CLASS wxT("BUTTON" )
|
||||
#define RADIO_FLAGS (BS_AUTORADIOBUTTON|WS_VISIBLE)
|
||||
#define RADIO_SIZE 20
|
||||
#define RADIO_IS_FAFA FALSE
|
||||
|
@@ -36,7 +36,7 @@ public:
|
||||
,int nMin = 0
|
||||
,int nMax = 100
|
||||
,int nInitial = 0
|
||||
,const wxString& rsName = _T("wxSpinCtrl")
|
||||
,const wxString& rsName = wxT("wxSpinCtrl")
|
||||
)
|
||||
{
|
||||
Create(pParent, vId, rsValue, rPos, rSize, lStyle, nMin, nMax, nInitial, rsName);
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
,int nMin = 0
|
||||
,int nMax = 100
|
||||
,int nInitial = 0
|
||||
,const wxString& rsName = _T("wxSpinCtrl")
|
||||
,const wxString& rsName = wxT("wxSpinCtrl")
|
||||
);
|
||||
|
||||
//
|
||||
|
@@ -17,7 +17,7 @@ class WXDLLIMPEXP_CORE wxDirDialog : public wxDirDialogBase
|
||||
public:
|
||||
wxDirDialog(wxWindow *parent,
|
||||
const wxString& message = wxDirSelectorPromptStr,
|
||||
const wxString& defaultPath = _T(""),
|
||||
const wxString& defaultPath = wxT(""),
|
||||
long style = wxDD_DEFAULT_STYLE,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
|
@@ -15,7 +15,7 @@
|
||||
#include "wx/window.h"
|
||||
|
||||
#if wxUSE_SYSTEM_OPTIONS
|
||||
#define wxMAC_WINDOW_PLAIN_TRANSITION _T("mac.window-plain-transition")
|
||||
#define wxMAC_WINDOW_PLAIN_TRANSITION wxT("mac.window-plain-transition")
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@@ -45,7 +45,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
|
||||
int min = 0, int max = 100, int initial = 0,
|
||||
const wxString& name = _T("wxSpinCtrl"))
|
||||
const wxString& name = wxT("wxSpinCtrl"))
|
||||
{
|
||||
Init();
|
||||
Create(parent, id, value, pos, size, style, min, max, initial, name);
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
|
||||
int min = 0, int max = 100, int initial = 0,
|
||||
const wxString& name = _T("wxSpinCtrl"));
|
||||
const wxString& name = wxT("wxSpinCtrl"));
|
||||
|
||||
// wxTextCtrl-like method
|
||||
void SetSelection(long from, long to);
|
||||
@@ -137,7 +137,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
|
||||
int min = 0, int max = 100, int initial = 0,
|
||||
const wxString& name = _T("wxSpinCtrl"))
|
||||
const wxString& name = wxT("wxSpinCtrl"))
|
||||
{
|
||||
Create(parent, id, value, pos, size, style, min, max, initial, name);
|
||||
}
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
|
||||
int min = 0, int max = 100, int initial = 0,
|
||||
const wxString& name = _T("wxSpinCtrl"))
|
||||
const wxString& name = wxT("wxSpinCtrl"))
|
||||
{
|
||||
SetRange(min, max);
|
||||
|
||||
|
@@ -25,7 +25,7 @@ class WXDLLIMPEXP_CORE wxPaletteBase: public wxGDIObject
|
||||
public:
|
||||
virtual ~wxPaletteBase() { }
|
||||
|
||||
virtual int GetColoursCount() const { wxFAIL_MSG( _T("not implemented") ); return 0; }
|
||||
virtual int GetColoursCount() const { wxFAIL_MSG( wxT("not implemented") ); return 0; }
|
||||
};
|
||||
|
||||
#if defined(__WXPALMOS__)
|
||||
|
@@ -335,7 +335,7 @@ public:
|
||||
virtual void DoGetSize(int *w, int *h) const
|
||||
{
|
||||
wxASSERT_MSG( m_size.IsFullySpecified(),
|
||||
_T("size of this DC hadn't been set and is unknown") );
|
||||
wxT("size of this DC hadn't been set and is unknown") );
|
||||
|
||||
if ( w )
|
||||
*w = m_size.x;
|
||||
|
@@ -180,7 +180,7 @@ protected:
|
||||
virtual wxGDIRefData *
|
||||
CloneGDIRefData(const wxGDIRefData *WXUNUSED(data)) const
|
||||
{
|
||||
wxFAIL_MSG( _T("must be implemented if used") );
|
||||
wxFAIL_MSG( wxT("must be implemented if used") );
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@@ -37,7 +37,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_ARROW_KEYS,
|
||||
int min = 0, int max = 100, int initial = 0,
|
||||
const wxString& name = _T("wxSpinCtrl"))
|
||||
const wxString& name = wxT("wxSpinCtrl"))
|
||||
{
|
||||
Create(parent, id, value, pos, size, style, min, max, initial, name);
|
||||
}
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_ARROW_KEYS,
|
||||
int min = 0, int max = 100, int initial = 0,
|
||||
const wxString& name = _T("wxSpinCtrl"));
|
||||
const wxString& name = wxT("wxSpinCtrl"));
|
||||
|
||||
// a wxTextCtrl-like method (but we can't have GetValue returning wxString
|
||||
// because the base class already has one returning int!)
|
||||
|
@@ -54,14 +54,14 @@ public:
|
||||
// vice versa
|
||||
wxIcon GetIcon() const
|
||||
{
|
||||
wxASSERT_MSG( m_isIcon, _T("no icon in this wxStaticBitmap") );
|
||||
wxASSERT_MSG( m_isIcon, wxT("no icon in this wxStaticBitmap") );
|
||||
|
||||
return *(wxIcon *)m_image;
|
||||
}
|
||||
|
||||
wxBitmap GetBitmap() const
|
||||
{
|
||||
wxASSERT_MSG( !m_isIcon, _T("no bitmap in this wxStaticBitmap") );
|
||||
wxASSERT_MSG( !m_isIcon, wxT("no bitmap in this wxStaticBitmap") );
|
||||
|
||||
return *(wxBitmap *)m_image;
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@ public:
|
||||
// backing file is never created and the backing is done with memory.
|
||||
wxBackingFile(wxInputStream *stream,
|
||||
size_t bufsize = DefaultBufSize,
|
||||
const wxString& prefix = _T("wxbf"));
|
||||
const wxString& prefix = wxT("wxbf"));
|
||||
|
||||
wxBackingFile() : m_impl(NULL) { }
|
||||
~wxBackingFile();
|
||||
|
@@ -514,7 +514,7 @@ void wxPrintfConvSpec<CharType>::ReplaceAsteriskWith(int width)
|
||||
|
||||
// find the first * in our flag buffer
|
||||
char *pwidth = strchr(m_szFlags, '*');
|
||||
wxCHECK_RET(pwidth, _T("field width must be specified"));
|
||||
wxCHECK_RET(pwidth, wxT("field width must be specified"));
|
||||
|
||||
// save what follows the * (the +1 is to skip the asterisk itself!)
|
||||
strcpy(temp, pwidth+1);
|
||||
@@ -685,13 +685,13 @@ int wxPrintfConvSpec<CharType>::Process(CharType *buf, size_t lenMax, wxPrintfAr
|
||||
|
||||
if (!m_bAlignLeft)
|
||||
for (i = 1; i < (size_t)m_nMinWidth; i++)
|
||||
APPEND_CH(_T(' '));
|
||||
APPEND_CH(wxT(' '));
|
||||
|
||||
APPEND_CH(val);
|
||||
|
||||
if (m_bAlignLeft)
|
||||
for (i = 1; i < (size_t)m_nMinWidth; i++)
|
||||
APPEND_CH(_T(' '));
|
||||
APPEND_CH(wxT(' '));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -716,7 +716,7 @@ int wxPrintfConvSpec<CharType>::Process(CharType *buf, size_t lenMax, wxPrintfAr
|
||||
if (!m_bAlignLeft)
|
||||
{
|
||||
for (i = len; i < m_nMinWidth; i++)
|
||||
APPEND_CH(_T(' '));
|
||||
APPEND_CH(wxT(' '));
|
||||
}
|
||||
|
||||
len = wxMin((unsigned int)len, lenMax-lenCur);
|
||||
@@ -726,7 +726,7 @@ int wxPrintfConvSpec<CharType>::Process(CharType *buf, size_t lenMax, wxPrintfAr
|
||||
if (m_bAlignLeft)
|
||||
{
|
||||
for (i = len; i < m_nMinWidth; i++)
|
||||
APPEND_CH(_T(' '));
|
||||
APPEND_CH(wxT(' '));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@@ -169,7 +169,7 @@ protected:
|
||||
|
||||
// the trace mask used by assorted wxLogTrace() in ftp code, do
|
||||
// wxLog::AddTraceMask(FTP_TRACE_MASK) to see them in output
|
||||
#define FTP_TRACE_MASK _T("ftp")
|
||||
#define FTP_TRACE_MASK wxT("ftp")
|
||||
|
||||
#endif // wxUSE_PROTOCOL_FTP
|
||||
|
||||
|
@@ -35,7 +35,7 @@ public:
|
||||
|
||||
~wxRecursionGuard()
|
||||
{
|
||||
wxASSERT_MSG( m_flag > 0, _T("unbalanced wxRecursionGuards!?") );
|
||||
wxASSERT_MSG( m_flag > 0, wxT("unbalanced wxRecursionGuards!?") );
|
||||
|
||||
m_flag--;
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ class wxRichTextCtrl;
|
||||
|
||||
////@begin control identifiers
|
||||
#define SYMBOL_WXRICHTEXTBULLETSPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
|
||||
#define SYMBOL_WXRICHTEXTBULLETSPAGE_TITLE _T("")
|
||||
#define SYMBOL_WXRICHTEXTBULLETSPAGE_TITLE wxT("")
|
||||
#define SYMBOL_WXRICHTEXTBULLETSPAGE_IDNAME ID_RICHTEXTBULLETSPAGE
|
||||
#define SYMBOL_WXRICHTEXTBULLETSPAGE_SIZE wxSize(400, 300)
|
||||
#define SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION wxDefaultPosition
|
||||
|
@@ -35,7 +35,7 @@ class wxRichTextFontPreviewCtrl;
|
||||
|
||||
////@begin control identifiers
|
||||
#define SYMBOL_WXRICHTEXTFONTPAGE_STYLE wxTAB_TRAVERSAL
|
||||
#define SYMBOL_WXRICHTEXTFONTPAGE_TITLE _T("")
|
||||
#define SYMBOL_WXRICHTEXTFONTPAGE_TITLE wxT("")
|
||||
#define SYMBOL_WXRICHTEXTFONTPAGE_IDNAME ID_RICHTEXTFONTPAGE
|
||||
#define SYMBOL_WXRICHTEXTFONTPAGE_SIZE wxSize(200, 100)
|
||||
#define SYMBOL_WXRICHTEXTFONTPAGE_POSITION wxDefaultPosition
|
||||
|
@@ -34,7 +34,7 @@ class wxRichTextCtrl;
|
||||
|
||||
////@begin control identifiers
|
||||
#define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
|
||||
#define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_TITLE _T("")
|
||||
#define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_TITLE wxT("")
|
||||
#define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_IDNAME ID_RICHTEXTINDENTSSPACINGPAGE
|
||||
#define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_SIZE wxSize(400, 300)
|
||||
#define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_POSITION wxDefaultPosition
|
||||
|
@@ -28,7 +28,7 @@
|
||||
|
||||
////@begin control identifiers
|
||||
#define SYMBOL_WXRICHTEXTLISTSTYLEPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
|
||||
#define SYMBOL_WXRICHTEXTLISTSTYLEPAGE_TITLE _T("")
|
||||
#define SYMBOL_WXRICHTEXTLISTSTYLEPAGE_TITLE wxT("")
|
||||
#define SYMBOL_WXRICHTEXTLISTSTYLEPAGE_IDNAME ID_RICHTEXTLISTSTYLEPAGE
|
||||
#define SYMBOL_WXRICHTEXTLISTSTYLEPAGE_SIZE wxSize(400, 300)
|
||||
#define SYMBOL_WXRICHTEXTLISTSTYLEPAGE_POSITION wxDefaultPosition
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
////@begin control identifiers
|
||||
#define SYMBOL_WXRICHTEXTSTYLEPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
|
||||
#define SYMBOL_WXRICHTEXTSTYLEPAGE_TITLE _T("")
|
||||
#define SYMBOL_WXRICHTEXTSTYLEPAGE_TITLE wxT("")
|
||||
#define SYMBOL_WXRICHTEXTSTYLEPAGE_IDNAME ID_RICHTEXTSTYLEPAGE
|
||||
#define SYMBOL_WXRICHTEXTSTYLEPAGE_SIZE wxSize(400, 300)
|
||||
#define SYMBOL_WXRICHTEXTSTYLEPAGE_POSITION wxDefaultPosition
|
||||
|
@@ -32,7 +32,7 @@
|
||||
|
||||
////@begin control identifiers
|
||||
#define SYMBOL_WXRICHTEXTTABSPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
|
||||
#define SYMBOL_WXRICHTEXTTABSPAGE_TITLE _T("")
|
||||
#define SYMBOL_WXRICHTEXTTABSPAGE_TITLE wxT("")
|
||||
#define SYMBOL_WXRICHTEXTTABSPAGE_IDNAME ID_RICHTEXTTABSPAGE
|
||||
#define SYMBOL_WXRICHTEXTTABSPAGE_SIZE wxSize(400, 300)
|
||||
#define SYMBOL_WXRICHTEXTTABSPAGE_POSITION wxDefaultPosition
|
||||
|
@@ -49,7 +49,7 @@ public:
|
||||
void Clear() { m_itemsSel.Clear(); m_count = 0; m_defaultState = false; }
|
||||
|
||||
// must be called when a new item is inserted/added
|
||||
void OnItemAdd(unsigned WXUNUSED(item)) { wxFAIL_MSG( _T("TODO") ); }
|
||||
void OnItemAdd(unsigned WXUNUSED(item)) { wxFAIL_MSG( wxT("TODO") ); }
|
||||
|
||||
// must be called when an item is deleted
|
||||
void OnItemDelete(unsigned item);
|
||||
|
@@ -857,7 +857,7 @@ public:
|
||||
m_totalProportion = 0;
|
||||
|
||||
wxASSERT_MSG( m_orient == wxHORIZONTAL || m_orient == wxVERTICAL,
|
||||
_T("invalid value for wxBoxSizer orientation") );
|
||||
wxT("invalid value for wxBoxSizer orientation") );
|
||||
}
|
||||
|
||||
int GetOrientation() const { return m_orient; }
|
||||
|
@@ -40,7 +40,7 @@ public:
|
||||
{
|
||||
wxASSERT_MSG( (flags & wxSOUND_LOOP) == 0 ||
|
||||
(flags & wxSOUND_ASYNC) != 0,
|
||||
_T("sound can only be looped asynchronously") );
|
||||
wxT("sound can only be looped asynchronously") );
|
||||
return DoPlay(flags);
|
||||
}
|
||||
|
||||
|
@@ -23,7 +23,7 @@
|
||||
#include "wx/control.h"
|
||||
#include "wx/event.h"
|
||||
|
||||
#define wxSPIN_BUTTON_NAME _T("wxSpinButton")
|
||||
#define wxSPIN_BUTTON_NAME wxT("wxSpinButton")
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// The wxSpinButton is like a small scrollbar than is often placed next
|
||||
|
@@ -40,7 +40,7 @@ public:
|
||||
void Resume()
|
||||
{
|
||||
wxASSERT_MSG( m_pauseCount > 0,
|
||||
_T("Resuming stop watch which is not paused") );
|
||||
wxT("Resuming stop watch which is not paused") );
|
||||
|
||||
if ( --m_pauseCount == 0 )
|
||||
Start(m_pause);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user