All files compile in Unicode mode, but I have only converted things near
points of compiler warnings/errors, they have not been exhaustively reviewed. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
9aa521548d
commit
87138c520c
@ -34,17 +34,17 @@
|
||||
#include "wx/generic/choicdgg.h"
|
||||
|
||||
// Split message, using constraints to position controls
|
||||
static void wxSplitMessage2(const char *message, wxList *messageList, wxWindow *parent, wxRowColSizer *sizer)
|
||||
static void wxSplitMessage2(const wxChar *message, wxList *messageList, wxWindow *parent, wxRowColSizer *sizer)
|
||||
{
|
||||
char *copyMessage = copystring(message);
|
||||
wxChar *copyMessage = copystring(message);
|
||||
size_t i = 0;
|
||||
size_t len = strlen(copyMessage);
|
||||
char *currentMessage = copyMessage;
|
||||
size_t len = wxStrlen(copyMessage);
|
||||
wxChar *currentMessage = copyMessage;
|
||||
|
||||
// wxWindow *lastWindow = parent;
|
||||
|
||||
while (i < len) {
|
||||
while ((i < len) && (copyMessage[i] != '\n')) i++;
|
||||
while ((i < len) && (copyMessage[i] != _T('\n'))) i++;
|
||||
if (i < len) copyMessage[i] = 0;
|
||||
wxStaticText *mess = new wxStaticText(parent, -1, currentMessage);
|
||||
|
||||
@ -114,7 +114,7 @@ int wxGetSingleChoiceIndex( const wxString& message, const wxString& caption, in
|
||||
|
||||
// Overloaded for backward compatibility
|
||||
int wxGetSingleChoiceIndex( const wxString& message, const wxString& caption, int n,
|
||||
char *choices[], wxWindow *parent,
|
||||
wxChar *choices[], wxWindow *parent,
|
||||
int x, int y, bool centre,
|
||||
int width, int height )
|
||||
{
|
||||
@ -130,8 +130,8 @@ int wxGetSingleChoiceIndex( const wxString& message, const wxString& caption, in
|
||||
return ans;
|
||||
}
|
||||
|
||||
char *wxGetSingleChoiceData( const wxString& message, const wxString& caption, int n,
|
||||
const wxString *choices, char **client_data, wxWindow *parent,
|
||||
wxChar *wxGetSingleChoiceData( const wxString& message, const wxString& caption, int n,
|
||||
const wxString *choices, wxChar **client_data, wxWindow *parent,
|
||||
int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(centre),
|
||||
int WXUNUSED(width), int WXUNUSED(height) )
|
||||
{
|
||||
@ -145,8 +145,8 @@ char *wxGetSingleChoiceData( const wxString& message, const wxString& caption, i
|
||||
}
|
||||
|
||||
// Overloaded for backward compatibility
|
||||
char *wxGetSingleChoiceData( const wxString& message, const wxString& caption, int n,
|
||||
char *choices[], char **client_data, wxWindow *parent,
|
||||
wxChar *wxGetSingleChoiceData( const wxString& message, const wxString& caption, int n,
|
||||
wxChar *choices[], wxChar **client_data, wxWindow *parent,
|
||||
int x, int y, bool centre,
|
||||
int width, int height )
|
||||
{
|
||||
@ -156,7 +156,7 @@ char *wxGetSingleChoiceData( const wxString& message, const wxString& caption, i
|
||||
{
|
||||
strings[i] = choices[i];
|
||||
}
|
||||
char *data = wxGetSingleChoiceData(message, caption, n, (const wxString *)strings, client_data, parent,
|
||||
wxChar *data = wxGetSingleChoiceData(message, caption, n, (const wxString *)strings, client_data, parent,
|
||||
x, y, centre, width, height);
|
||||
delete[] strings;
|
||||
return data;
|
||||
@ -202,21 +202,21 @@ IMPLEMENT_CLASS(wxSingleChoiceDialog, wxDialog)
|
||||
#endif
|
||||
|
||||
wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption,
|
||||
int n, const wxString *choices, char **clientData, long style, const wxPoint& pos):
|
||||
int n, const wxString *choices, wxChar **clientData, long style, const wxPoint& pos):
|
||||
wxDialog(parent, -1, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL|wxTAB_TRAVERSAL)
|
||||
{
|
||||
Create(parent, message, caption, n, choices, clientData, style);
|
||||
}
|
||||
|
||||
wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption,
|
||||
const wxStringList& choices, char **clientData, long style, const wxPoint& pos):
|
||||
const wxStringList& choices, wxChar **clientData, long style, const wxPoint& pos):
|
||||
wxDialog(parent, -1, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL)
|
||||
{
|
||||
Create(parent, message, caption, choices, clientData, style);
|
||||
}
|
||||
|
||||
bool wxSingleChoiceDialog::Create(wxWindow *parent, const wxString& message, const wxString& caption,
|
||||
const wxStringList& choices, char **clientData, long style, const wxPoint& pos)
|
||||
const wxStringList& choices, wxChar **clientData, long style, const wxPoint& pos)
|
||||
{
|
||||
wxString *strings = new wxString[choices.Number()];
|
||||
int i;
|
||||
@ -231,12 +231,12 @@ bool wxSingleChoiceDialog::Create(wxWindow *parent, const wxString& message, con
|
||||
|
||||
bool wxSingleChoiceDialog::Create( wxWindow *WXUNUSED(parent), const wxString& message,
|
||||
const wxString& WXUNUSED(caption), int n,
|
||||
const wxString *choices, char **clientData, long style,
|
||||
const wxString *choices, wxChar **clientData, long style,
|
||||
const wxPoint& WXUNUSED(pos) )
|
||||
{
|
||||
m_dialogStyle = style;
|
||||
m_selection = 0;
|
||||
m_stringSelection = "";
|
||||
m_stringSelection = _T("");
|
||||
m_clientData = NULL;
|
||||
|
||||
wxBeginBusyCursor();
|
||||
@ -245,7 +245,7 @@ bool wxSingleChoiceDialog::Create( wxWindow *WXUNUSED(parent), const wxString& m
|
||||
topSizer->SetBorder(10, 10);
|
||||
|
||||
wxRowColSizer *messageSizer = new wxRowColSizer(topSizer, wxSIZER_COLS, 100);
|
||||
messageSizer->SetName("messageSizer");
|
||||
messageSizer->SetName(_T("messageSizer"));
|
||||
|
||||
// bool centre = ((style & wxCENTRE) == wxCENTRE);
|
||||
|
||||
@ -269,7 +269,7 @@ bool wxSingleChoiceDialog::Create( wxWindow *WXUNUSED(parent), const wxString& m
|
||||
|
||||
wxRowColSizer *listBoxSizer = new wxRowColSizer(topSizer, wxSIZER_ROWS);
|
||||
listBoxSizer->AddSizerChild(listBox);
|
||||
listBoxSizer->SetName("listBoxSizer");
|
||||
listBoxSizer->SetName(_T("listBoxSizer"));
|
||||
|
||||
// Create constraints for the text sizer
|
||||
wxLayoutConstraints *textC = new wxLayoutConstraints;
|
||||
@ -279,11 +279,11 @@ bool wxSingleChoiceDialog::Create( wxWindow *WXUNUSED(parent), const wxString& m
|
||||
|
||||
// Insert another spacer
|
||||
wxSpacingSizer *spacingSizer2 = new wxSpacingSizer(topSizer, wxBelow, listBoxSizer, 10);
|
||||
spacingSizer->SetName("spacingSizer2");
|
||||
spacingSizer->SetName(_T("spacingSizer2"));
|
||||
|
||||
// Insert a sizer for the buttons
|
||||
wxRowColSizer *buttonSizer = new wxRowColSizer(topSizer, wxSIZER_ROWS);
|
||||
buttonSizer->SetName("buttonSizer");
|
||||
buttonSizer->SetName(_T("buttonSizer"));
|
||||
buttonSizer->SetSpacing(12,0);
|
||||
|
||||
// Specify constraints for the button sizer
|
||||
@ -339,7 +339,7 @@ void wxSingleChoiceDialog::OnOK(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
m_selection = listBox->GetSelection();
|
||||
m_stringSelection = listBox->GetStringSelection();
|
||||
m_clientData = (char*)listBox->GetClientData(m_selection);
|
||||
m_clientData = (wxChar*)listBox->GetClientData(m_selection);
|
||||
}
|
||||
|
||||
EndModal(wxID_OK);
|
||||
@ -352,7 +352,7 @@ void wxSingleChoiceDialog::OnListBoxDClick(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
m_selection = listBox->GetSelection();
|
||||
m_stringSelection = listBox->GetStringSelection();
|
||||
m_clientData = (char*)listBox->GetClientData(m_selection);
|
||||
m_clientData = (wxChar*)listBox->GetClientData(m_selection);
|
||||
}
|
||||
|
||||
EndModal(wxID_OK);
|
||||
|
@ -347,21 +347,21 @@ bool wxPostScriptDC::PrinterDialog(wxWindow *parent)
|
||||
// For PS_PRINTER action this depends on a Unix-style print spooler
|
||||
// since the wx_printer_file can be destroyed during a session
|
||||
// @@@ TODO: a Windows-style answer for non-Unix
|
||||
char userId[256];
|
||||
wxChar userId[256];
|
||||
wxGetUserId (userId, sizeof (userId) / sizeof (char));
|
||||
char tmp[256];
|
||||
strcpy (tmp, "/tmp/preview_");
|
||||
strcat (tmp, userId);
|
||||
wxChar tmp[256];
|
||||
wxStrcpy (tmp, _T("/tmp/preview_"));
|
||||
wxStrcat (tmp, userId);
|
||||
m_printData.SetFilename(tmp);
|
||||
#endif
|
||||
char tmp2[256];
|
||||
strcpy(tmp2, m_printData.GetFilename());
|
||||
strcat (tmp2, ".ps");
|
||||
wxChar tmp2[256];
|
||||
wxStrcpy(tmp2, m_printData.GetFilename());
|
||||
wxStrcat (tmp2, _T(".ps"));
|
||||
m_printData.SetFilename(tmp2);
|
||||
}
|
||||
else if ((m_printData.GetFilename() == "") && (m_printData.GetPrintMode() == wxPRINT_MODE_FILE))
|
||||
else if ((m_printData.GetFilename() == _T("")) && (m_printData.GetPrintMode() == wxPRINT_MODE_FILE))
|
||||
{
|
||||
wxString file = wxSaveFileSelector (_("PostScript"), "ps");
|
||||
wxString file = wxSaveFileSelector (_("PostScript"), _T("ps"));
|
||||
if ( file.IsEmpty() )
|
||||
{
|
||||
m_ok = FALSE;
|
||||
@ -377,7 +377,7 @@ bool wxPostScriptDC::PrinterDialog(wxWindow *parent)
|
||||
|
||||
void wxPostScriptDC::SetClippingRegion (long x, long y, long w, long h)
|
||||
{
|
||||
wxCHECK_RET( m_ok && m_pstream, "invalid postscript dc" );
|
||||
wxCHECK_RET( m_ok && m_pstream, _T("invalid postscript dc") );
|
||||
|
||||
if (m_clipping) return;
|
||||
|
||||
@ -399,7 +399,7 @@ void wxPostScriptDC::SetClippingRegion( const wxRegion &WXUNUSED(region) )
|
||||
|
||||
void wxPostScriptDC::DestroyClippingRegion()
|
||||
{
|
||||
wxCHECK_RET( m_ok && m_pstream, "invalid postscript dc" );
|
||||
wxCHECK_RET( m_ok && m_pstream, _T("invalid postscript dc") );
|
||||
|
||||
wxDC::DestroyClippingRegion();
|
||||
|
||||
@ -412,28 +412,28 @@ void wxPostScriptDC::DestroyClippingRegion()
|
||||
|
||||
void wxPostScriptDC::Clear()
|
||||
{
|
||||
wxFAIL_MSG( "wxPostScriptDC::Clear not implemented." );
|
||||
wxFAIL_MSG( _T("wxPostScriptDC::Clear not implemented.") );
|
||||
}
|
||||
|
||||
void wxPostScriptDC::FloodFill (long WXUNUSED(x), long WXUNUSED(y), const wxColour &WXUNUSED(col), int WXUNUSED(style))
|
||||
{
|
||||
wxFAIL_MSG( "wxPostScriptDC::FloodFill not implemented." );
|
||||
wxFAIL_MSG( _T("wxPostScriptDC::FloodFill not implemented.") );
|
||||
}
|
||||
|
||||
bool wxPostScriptDC::GetPixel (long WXUNUSED(x), long WXUNUSED(y), wxColour * WXUNUSED(col)) const
|
||||
{
|
||||
wxFAIL_MSG( "wxPostScriptDC::GetPixel not implemented." );
|
||||
wxFAIL_MSG( _T("wxPostScriptDC::GetPixel not implemented.") );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void wxPostScriptDC::CrossHair (long WXUNUSED(x), long WXUNUSED(y))
|
||||
{
|
||||
wxFAIL_MSG( "wxPostScriptDC::CrossHair not implemented." );
|
||||
wxFAIL_MSG( _T("wxPostScriptDC::CrossHair not implemented.") );
|
||||
}
|
||||
|
||||
void wxPostScriptDC::DrawLine (long x1, long y1, long x2, long y2)
|
||||
{
|
||||
wxCHECK_RET( m_ok && m_pstream, "invalid postscript dc" );
|
||||
wxCHECK_RET( m_ok && m_pstream, _T("invalid postscript dc") );
|
||||
|
||||
if (m_pen.GetStyle() == wxTRANSPARENT) return;
|
||||
|
||||
@ -452,7 +452,7 @@ void wxPostScriptDC::DrawLine (long x1, long y1, long x2, long y2)
|
||||
|
||||
void wxPostScriptDC::DrawArc (long x1, long y1, long x2, long y2, long xc, long yc)
|
||||
{
|
||||
wxCHECK_RET( m_ok && m_pstream, "invalid postscript dc" );
|
||||
wxCHECK_RET( m_ok && m_pstream, _T("invalid postscript dc") );
|
||||
|
||||
long dx = x1 - xc;
|
||||
long dy = y1 - yc;
|
||||
@ -515,7 +515,7 @@ void wxPostScriptDC::DrawArc (long x1, long y1, long x2, long y2, long xc, long
|
||||
|
||||
void wxPostScriptDC::DrawEllipticArc(long x,long y,long w,long h,double sa,double ea)
|
||||
{
|
||||
wxCHECK_RET( m_ok && m_pstream, "invalid postscript dc" );
|
||||
wxCHECK_RET( m_ok && m_pstream, _T("invalid postscript dc") );
|
||||
|
||||
if (sa>=360 || sa<=-360) sa=sa-int(sa/360)*360;
|
||||
if (ea>=360 || ea<=-360) ea=ea-int(ea/360)*360;
|
||||
@ -557,7 +557,7 @@ void wxPostScriptDC::DrawEllipticArc(long x,long y,long w,long h,double sa,doubl
|
||||
|
||||
void wxPostScriptDC::DrawPoint (long x, long y)
|
||||
{
|
||||
wxCHECK_RET( m_ok && m_pstream, "invalid postscript dc" );
|
||||
wxCHECK_RET( m_ok && m_pstream, _T("invalid postscript dc") );
|
||||
|
||||
if (m_pen.GetStyle() == wxTRANSPARENT) return;
|
||||
|
||||
@ -573,7 +573,7 @@ void wxPostScriptDC::DrawPoint (long x, long y)
|
||||
|
||||
void wxPostScriptDC::DrawPolygon (int n, wxPoint points[], long xoffset, long yoffset, int WXUNUSED(fillStyle))
|
||||
{
|
||||
wxCHECK_RET( m_ok && m_pstream, "invalid postscript dc" );
|
||||
wxCHECK_RET( m_ok && m_pstream, _T("invalid postscript dc") );
|
||||
|
||||
if (n <= 0) return;
|
||||
|
||||
@ -623,7 +623,7 @@ void wxPostScriptDC::DrawPolygon (int n, wxPoint points[], long xoffset, long yo
|
||||
|
||||
void wxPostScriptDC::DrawLines (int n, wxPoint points[], long xoffset, long yoffset)
|
||||
{
|
||||
wxCHECK_RET( m_ok && m_pstream, "invalid postscript dc" );
|
||||
wxCHECK_RET( m_ok && m_pstream, _T("invalid postscript dc") );
|
||||
|
||||
if (m_pen.GetStyle() == wxTRANSPARENT)
|
||||
return;
|
||||
@ -653,7 +653,7 @@ void wxPostScriptDC::DrawLines (int n, wxPoint points[], long xoffset, long yoff
|
||||
|
||||
void wxPostScriptDC::DrawRectangle (long x, long y, long width, long height)
|
||||
{
|
||||
wxCHECK_RET( m_ok && m_pstream, "invalid postscript dc" );
|
||||
wxCHECK_RET( m_ok && m_pstream, _T("invalid postscript dc") );
|
||||
|
||||
if (m_brush.GetStyle () != wxTRANSPARENT)
|
||||
{
|
||||
@ -690,7 +690,7 @@ void wxPostScriptDC::DrawRectangle (long x, long y, long width, long height)
|
||||
|
||||
void wxPostScriptDC::DrawRoundedRectangle (long x, long y, long width, long height, double radius)
|
||||
{
|
||||
wxCHECK_RET( m_ok && m_pstream, "invalid postscript dc" );
|
||||
wxCHECK_RET( m_ok && m_pstream, _T("invalid postscript dc") );
|
||||
|
||||
if (radius < 0.0)
|
||||
{
|
||||
@ -751,7 +751,7 @@ void wxPostScriptDC::DrawRoundedRectangle (long x, long y, long width, long heig
|
||||
|
||||
void wxPostScriptDC::DrawEllipse (long x, long y, long width, long height)
|
||||
{
|
||||
wxCHECK_RET( m_ok && m_pstream, "invalid postscript dc" );
|
||||
wxCHECK_RET( m_ok && m_pstream, _T("invalid postscript dc") );
|
||||
|
||||
if (m_brush.GetStyle () != wxTRANSPARENT)
|
||||
{
|
||||
@ -787,7 +787,7 @@ void wxPostScriptDC::DrawIcon( const wxIcon& icon, long x, long y )
|
||||
|
||||
void wxPostScriptDC::DrawBitmap( const wxBitmap& bitmap, long x, long y, bool WXUNUSED(useMask) )
|
||||
{
|
||||
wxCHECK_RET( m_ok && m_pstream, "invalid postscript dc" );
|
||||
wxCHECK_RET( m_ok && m_pstream, _T("invalid postscript dc") );
|
||||
|
||||
if (!bitmap.Ok()) return;
|
||||
|
||||
@ -822,7 +822,7 @@ void wxPostScriptDC::DrawBitmap( const wxBitmap& bitmap, long x, long y, bool WX
|
||||
{
|
||||
for (int i = 0; i < ww; i++)
|
||||
{
|
||||
char buffer[5];
|
||||
wxChar buffer[5];
|
||||
buffer[2] = 0;
|
||||
wxDecToHex( image.GetRed(i,j), buffer );
|
||||
*m_pstream << buffer;
|
||||
@ -841,7 +841,7 @@ void wxPostScriptDC::DrawBitmap( const wxBitmap& bitmap, long x, long y, bool WX
|
||||
|
||||
void wxPostScriptDC::SetFont( const wxFont& font )
|
||||
{
|
||||
wxCHECK_RET( m_ok && m_pstream, "invalid postscript dc" );
|
||||
wxCHECK_RET( m_ok && m_pstream, _T("invalid postscript dc") );
|
||||
|
||||
if (!font.Ok()) return;
|
||||
|
||||
@ -930,7 +930,7 @@ void wxPostScriptDC::SetFont( const wxFont& font )
|
||||
|
||||
void wxPostScriptDC::SetPen( const wxPen& pen )
|
||||
{
|
||||
wxCHECK_RET( m_ok && m_pstream, "invalid postscript dc" );
|
||||
wxCHECK_RET( m_ok && m_pstream, _T("invalid postscript dc") );
|
||||
|
||||
if (!pen.Ok()) return;
|
||||
|
||||
@ -1008,7 +1008,7 @@ void wxPostScriptDC::SetPen( const wxPen& pen )
|
||||
|
||||
void wxPostScriptDC::SetBrush( const wxBrush& brush )
|
||||
{
|
||||
wxCHECK_RET( m_ok && m_pstream, "invalid postscript dc" );
|
||||
wxCHECK_RET( m_ok && m_pstream, _T("invalid postscript dc") );
|
||||
|
||||
if (!brush.Ok()) return;
|
||||
|
||||
@ -1047,7 +1047,7 @@ void wxPostScriptDC::SetBrush( const wxBrush& brush )
|
||||
|
||||
void wxPostScriptDC::DrawText( const wxString& text, long x, long y, bool WXUNUSED(use16bit) )
|
||||
{
|
||||
wxCHECK_RET( m_ok && m_pstream, "invalid postscript dc" );
|
||||
wxCHECK_RET( m_ok && m_pstream, _T("invalid postscript dc") );
|
||||
|
||||
SetFont( m_font );
|
||||
|
||||
@ -1090,11 +1090,12 @@ void wxPostScriptDC::DrawText( const wxString& text, long x, long y, bool WXUNUS
|
||||
*m_pstream << XLOG2DEV(x) << " " << YLOG2DEV(by) << " moveto\n";
|
||||
|
||||
*m_pstream << "(";
|
||||
int len = strlen ((char *)(const char *)text);
|
||||
wxWX2MBbuf textbuf = text.mb_str();
|
||||
int len = strlen (textbuf);
|
||||
int i;
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
int c = (unsigned char) text[i];
|
||||
int c = (unsigned char) textbuf[i];
|
||||
if ( c == ')' || c == '(' || c == '\\')
|
||||
{
|
||||
*m_pstream << "\\" << (char) c;
|
||||
@ -1137,12 +1138,12 @@ void wxPostScriptDC::SetBackground (const wxBrush& brush)
|
||||
|
||||
void wxPostScriptDC::SetLogicalFunction (int WXUNUSED(function))
|
||||
{
|
||||
wxFAIL_MSG( "wxPostScriptDC::SetLogicalFunction not implemented." );
|
||||
wxFAIL_MSG( _T("wxPostScriptDC::SetLogicalFunction not implemented.") );
|
||||
}
|
||||
|
||||
void wxPostScriptDC::DrawSpline( wxList *points )
|
||||
{
|
||||
wxCHECK_RET( m_ok && m_pstream, "invalid postscript dc" );
|
||||
wxCHECK_RET( m_ok && m_pstream, _T("invalid postscript dc") );
|
||||
|
||||
SetPen( m_pen );
|
||||
|
||||
@ -1205,7 +1206,7 @@ long wxPostScriptDC::GetCharWidth ()
|
||||
|
||||
void wxPostScriptDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp )
|
||||
{
|
||||
wxCHECK_RET( m_ok && m_pstream, "invalid postscript dc" );
|
||||
wxCHECK_RET( m_ok && m_pstream, _T("invalid postscript dc") );
|
||||
|
||||
m_signX = (xLeftRight ? 1 : -1);
|
||||
m_signY = (yBottomUp ? 1 : -1);
|
||||
@ -1218,7 +1219,7 @@ void wxPostScriptDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp )
|
||||
|
||||
void wxPostScriptDC::SetDeviceOrigin( long x, long y )
|
||||
{
|
||||
wxCHECK_RET( m_ok && m_pstream, "invalid postscript dc" );
|
||||
wxCHECK_RET( m_ok && m_pstream, _T("invalid postscript dc") );
|
||||
|
||||
int h = 0;
|
||||
int w = 0;
|
||||
@ -1276,7 +1277,7 @@ wxSize wxPostScriptDC::GetPPI(void) const
|
||||
|
||||
bool wxPostScriptDC::StartDoc (const wxString& message)
|
||||
{
|
||||
wxCHECK_MSG( m_ok, FALSE, "invalid postscript dc" );
|
||||
wxCHECK_MSG( m_ok, FALSE, _T("invalid postscript dc") );
|
||||
|
||||
if (m_printData.GetFilename() == "")
|
||||
{
|
||||
@ -1286,7 +1287,7 @@ bool wxPostScriptDC::StartDoc (const wxString& message)
|
||||
m_ok = TRUE;
|
||||
}
|
||||
|
||||
m_pstream = new ofstream (m_printData.GetFilename());
|
||||
m_pstream = new ofstream (m_printData.GetFilename().fn_str());
|
||||
|
||||
if (!m_pstream || !m_pstream->good())
|
||||
{
|
||||
@ -1313,7 +1314,7 @@ bool wxPostScriptDC::StartDoc (const wxString& message)
|
||||
|
||||
void wxPostScriptDC::EndDoc ()
|
||||
{
|
||||
wxCHECK_RET( m_ok && m_pstream, "invalid postscript dc" );
|
||||
wxCHECK_RET( m_ok && m_pstream, _T("invalid postscript dc") );
|
||||
|
||||
if (m_clipping)
|
||||
{
|
||||
@ -1327,27 +1328,27 @@ void wxPostScriptDC::EndDoc ()
|
||||
m_pstream = (ofstream *) NULL;
|
||||
}
|
||||
|
||||
char *header_file = wxGetTempFileName("ps");
|
||||
wxChar *header_file = wxGetTempFileName("ps");
|
||||
|
||||
m_pstream = new ofstream( header_file );
|
||||
m_pstream = new ofstream( wxConv_file.cWX2MB(header_file) );
|
||||
|
||||
*m_pstream << "%!PS-Adobe-2.0\n"; /* PostScript magic strings */
|
||||
*m_pstream << "%%Title: " << (const char *) m_title << "\n";
|
||||
*m_pstream << "%%Title: " << m_title.mb_str() << "\n";
|
||||
*m_pstream << "%%Creator: " << wxTheApp->argv[0] << "\n";
|
||||
*m_pstream << "%%CreationDate: " << wxNow() << "\n";
|
||||
|
||||
char userID[256];
|
||||
wxChar userID[256];
|
||||
if ( wxGetEmailAddress(userID, sizeof(userID)) )
|
||||
{
|
||||
*m_pstream << "%%For: " << (char *)userID;
|
||||
char userName[245];
|
||||
*m_pstream << "%%For: " << MBSTRINGCAST wxConv_libc.cWX2MB(userID);
|
||||
wxChar userName[245];
|
||||
if (wxGetUserName(userName, sizeof(userName)))
|
||||
*m_pstream << " (" << (char *)userName << ")";
|
||||
*m_pstream << " (" << MBSTRINGCAST wxConv_libc.cWX2MB(userName) << ")";
|
||||
*m_pstream << "\n";
|
||||
}
|
||||
else if ( wxGetUserName(userID, sizeof(userID)) )
|
||||
{
|
||||
*m_pstream << "%%For: " << (char *)userID << "\n";
|
||||
*m_pstream << "%%For: " << MBSTRINGCAST wxConv_libc.cWX2MB(userID) << "\n";
|
||||
}
|
||||
|
||||
// THE FOLLOWING HAS BEEN CONTRIBUTED BY Andy Fyfe <andy@hyperparallel.com>
|
||||
@ -1424,7 +1425,7 @@ void wxPostScriptDC::EndDoc ()
|
||||
delete m_pstream;
|
||||
m_pstream = (ofstream *) NULL;
|
||||
|
||||
char *tmp_file = wxGetTempFileName("ps");
|
||||
wxChar *tmp_file = wxGetTempFileName("ps");
|
||||
|
||||
// Paste header Before wx_printer_file
|
||||
wxConcatFiles (header_file, m_printData.GetFilename(), tmp_file);
|
||||
@ -1444,10 +1445,10 @@ void wxPostScriptDC::EndDoc ()
|
||||
|
||||
case wxPRINT_MODE_PREVIEW:
|
||||
{
|
||||
char *argv[3];
|
||||
argv[0] = (char*) (const char*) previewCommand;
|
||||
argv[1] = (char*) (const char*) filename;
|
||||
argv[2] = (char*) (char *) NULL;
|
||||
wxChar *argv[3];
|
||||
argv[0] = WXSTRINGCAST previewCommand;
|
||||
argv[1] = WXSTRINGCAST filename;
|
||||
argv[2] = (wxChar*) NULL;
|
||||
wxExecute (argv, TRUE);
|
||||
wxRemoveFile(m_printData.GetFilename());
|
||||
}
|
||||
@ -1455,18 +1456,18 @@ void wxPostScriptDC::EndDoc ()
|
||||
|
||||
case wxPRINT_MODE_PRINTER:
|
||||
{
|
||||
char *argv[4];
|
||||
wxChar *argv[4];
|
||||
int argc = 0;
|
||||
argv[argc++] = (char*) (const char*) printerCommand;
|
||||
argv[argc++] = WXSTRINGCAST printerCommand;
|
||||
|
||||
// !SM! If we simply assign to argv[1] here, if printer options
|
||||
// are blank, we get an annoying and confusing message from lpr.
|
||||
char * opts = (char*) (const char*) printerOptions;
|
||||
wxChar * opts = WXSTRINGCAST printerOptions;
|
||||
if (opts && *opts)
|
||||
argv[argc++] = opts;
|
||||
|
||||
argv[argc++] = (char*) (const char*) filename;
|
||||
argv[argc++] = (char *) NULL;
|
||||
argv[argc++] = WXSTRINGCAST filename;
|
||||
argv[argc++] = (wxChar *) NULL;
|
||||
wxExecute (argv, TRUE);
|
||||
wxRemoveFile(filename);
|
||||
}
|
||||
@ -1482,7 +1483,7 @@ void wxPostScriptDC::EndDoc ()
|
||||
|
||||
void wxPostScriptDC::StartPage ()
|
||||
{
|
||||
wxCHECK_RET( m_ok && m_pstream, "invalid postscript dc" );
|
||||
wxCHECK_RET( m_ok && m_pstream, _T("invalid postscript dc") );
|
||||
|
||||
*m_pstream << "%%Page: " << (wxPageNumber++) << "\n";
|
||||
|
||||
@ -1521,7 +1522,7 @@ void wxPostScriptDC::StartPage ()
|
||||
|
||||
void wxPostScriptDC::EndPage ()
|
||||
{
|
||||
wxCHECK_RET( m_ok && m_pstream, "invalid postscript dc" );
|
||||
wxCHECK_RET( m_ok && m_pstream, _T("invalid postscript dc") );
|
||||
|
||||
*m_pstream << "showpage\n";
|
||||
}
|
||||
@ -1532,9 +1533,9 @@ bool wxPostScriptDC::Blit( long xdest, long ydest,
|
||||
long xsrc, long ysrc,
|
||||
int rop, bool WXUNUSED(useMask) )
|
||||
{
|
||||
wxCHECK_MSG( m_ok && m_pstream, FALSE, "invalid postscript dc" );
|
||||
wxCHECK_MSG( m_ok && m_pstream, FALSE, _T("invalid postscript dc") );
|
||||
|
||||
wxCHECK_MSG( source, FALSE, "invalid source dc" );
|
||||
wxCHECK_MSG( source, FALSE, _T("invalid source dc") );
|
||||
|
||||
/* blit into a bitmap */
|
||||
|
||||
@ -1567,9 +1568,11 @@ void wxPostScriptDC::GetTextExtent( const wxString& string, long *x, long *y,
|
||||
|
||||
if (!fontToUse) fontToUse = (wxFont*) &m_font;
|
||||
|
||||
wxCHECK_RET( fontToUse, "GetTextExtent: no font defined" );
|
||||
wxCHECK_RET( x, "GetTextExtent: x == NULL" );
|
||||
wxCHECK_RET( y, "GetTextExtent: y == NULL" );
|
||||
wxCHECK_RET( fontToUse, _T("GetTextExtent: no font defined") );
|
||||
wxCHECK_RET( x, _T("GetTextExtent: x == NULL") );
|
||||
wxCHECK_RET( y, _T("GetTextExtent: y == NULL") );
|
||||
|
||||
wxWX2MBbuf strbuf = string.mb_str();
|
||||
|
||||
#if !USE_AFM_FOR_POSTSCRIPT
|
||||
/* Provide a VERY rough estimate (avoid using it).
|
||||
@ -1581,7 +1584,7 @@ void wxPostScriptDC::GetTextExtent( const wxString& string, long *x, long *y,
|
||||
{
|
||||
height = fontToUse->GetPointSize();
|
||||
}
|
||||
*x = strlen (string) * height * 72 / 120;
|
||||
*x = strlen (strbuf) * height * 72 / 120;
|
||||
*y = (long) (height * 1.32); /* allow for descender */
|
||||
if (descent) *descent = 0;
|
||||
if (externalLeading) *externalLeading = 0;
|
||||
@ -1813,7 +1816,7 @@ void wxPostScriptDC::GetTextExtent( const wxString& string, long *x, long *y,
|
||||
long widthSum=0;
|
||||
long height=Size; /* by default */
|
||||
unsigned char *p;
|
||||
for(p=(unsigned char *)(const char *)string; *p; p++)
|
||||
for(p=(unsigned char *)strbuf; *p; p++)
|
||||
{
|
||||
if(lastWidths[*p]== INT_MIN)
|
||||
{
|
||||
|
@ -220,15 +220,15 @@ void wxDirCtrl::SetupSections()
|
||||
|
||||
m_paths.Clear();
|
||||
m_names.Clear();
|
||||
ADD_SECTION("/", _("The Computer") )
|
||||
ADD_SECTION(_T("/"), _("The Computer") )
|
||||
wxGetHomeDir(&home);
|
||||
ADD_SECTION(home, _("My Home") )
|
||||
ADD_SECTION("/mnt", _("Mounted Devices") )
|
||||
ADD_SECTION("/usr", _("User") )
|
||||
ADD_SECTION("/usr/local", _("User Local") )
|
||||
ADD_SECTION("/var", _("Variables") )
|
||||
ADD_SECTION("/etc", _("Etcetera") )
|
||||
ADD_SECTION("/tmp", _("Temporary") )
|
||||
ADD_SECTION(_T("/mnt"), _("Mounted Devices") )
|
||||
ADD_SECTION(_T("/usr"), _("User") )
|
||||
ADD_SECTION(_T("/usr/local"), _("User Local") )
|
||||
ADD_SECTION(_T("/var"), _("Variables") )
|
||||
ADD_SECTION(_T("/etc"), _("Etcetera") )
|
||||
ADD_SECTION(_T("/tmp"), _("Temporary") )
|
||||
}
|
||||
#undef ADD_SECTION
|
||||
|
||||
|
@ -343,11 +343,11 @@ void wxGenericFontDialog::OnChangeFont(wxCommandEvent& WXUNUSED(event))
|
||||
fontWeight = wxFontWeightStringToInt(WXSTRINGCAST weightChoice->GetStringSelection());
|
||||
int fontStyle = 0;
|
||||
fontStyle = wxFontStyleStringToInt(WXSTRINGCAST styleChoice->GetStringSelection());
|
||||
int fontSize = atoi(pointSizeChoice->GetStringSelection());
|
||||
int fontSize = wxAtoi(pointSizeChoice->GetStringSelection());
|
||||
int fontUnderline = underLineCheckBox->GetValue();
|
||||
|
||||
dialogFont = wxFont(fontSize, fontFamily, fontStyle, fontWeight, (fontUnderline != 0));
|
||||
if (colourChoice->GetStringSelection() != "")
|
||||
if (colourChoice->GetStringSelection() != _T(""))
|
||||
{
|
||||
wxColour *col = (wxColour*) NULL;
|
||||
col = wxTheColourDatabase->FindColour(colourChoice->GetStringSelection());
|
||||
@ -361,94 +361,94 @@ void wxGenericFontDialog::OnChangeFont(wxCommandEvent& WXUNUSED(event))
|
||||
PaintFont(dc);
|
||||
}
|
||||
|
||||
char *wxFontWeightIntToString(int weight)
|
||||
wxChar *wxFontWeightIntToString(int weight)
|
||||
{
|
||||
switch (weight)
|
||||
{
|
||||
case wxLIGHT:
|
||||
return "Light";
|
||||
return _T("Light");
|
||||
case wxBOLD:
|
||||
return "Bold";
|
||||
return _T("Bold");
|
||||
case wxNORMAL:
|
||||
default:
|
||||
return "Normal";
|
||||
return _T("Normal");
|
||||
}
|
||||
return "Normal";
|
||||
return _T("Normal");
|
||||
}
|
||||
|
||||
char *wxFontStyleIntToString(int style)
|
||||
wxChar *wxFontStyleIntToString(int style)
|
||||
{
|
||||
switch (style)
|
||||
{
|
||||
case wxITALIC:
|
||||
return "Italic";
|
||||
return _T("Italic");
|
||||
case wxSLANT:
|
||||
return "Slant";
|
||||
return _T("Slant");
|
||||
case wxNORMAL:
|
||||
default:
|
||||
return "Normal";
|
||||
return _T("Normal");
|
||||
}
|
||||
return "Normal";
|
||||
return _T("Normal");
|
||||
}
|
||||
|
||||
char *wxFontFamilyIntToString(int family)
|
||||
wxChar *wxFontFamilyIntToString(int family)
|
||||
{
|
||||
switch (family)
|
||||
{
|
||||
case wxROMAN:
|
||||
return "Roman";
|
||||
return _T("Roman");
|
||||
case wxDECORATIVE:
|
||||
return "Decorative";
|
||||
return _T("Decorative");
|
||||
case wxMODERN:
|
||||
return "Modern";
|
||||
return _T("Modern");
|
||||
case wxSCRIPT:
|
||||
return "Script";
|
||||
return _T("Script");
|
||||
case wxTELETYPE:
|
||||
return "Teletype";
|
||||
return _T("Teletype");
|
||||
case wxSWISS:
|
||||
default:
|
||||
return "Swiss";
|
||||
return _T("Swiss");
|
||||
}
|
||||
return "Swiss";
|
||||
return _T("Swiss");
|
||||
}
|
||||
|
||||
int wxFontFamilyStringToInt(char *family)
|
||||
int wxFontFamilyStringToInt(wxChar *family)
|
||||
{
|
||||
if (!family)
|
||||
return wxSWISS;
|
||||
|
||||
if (strcmp(family, "Roman") == 0)
|
||||
if (wxStrcmp(family, _T("Roman")) == 0)
|
||||
return wxROMAN;
|
||||
else if (strcmp(family, "Decorative") == 0)
|
||||
else if (wxStrcmp(family, _T("Decorative")) == 0)
|
||||
return wxDECORATIVE;
|
||||
else if (strcmp(family, "Modern") == 0)
|
||||
else if (wxStrcmp(family, _T("Modern")) == 0)
|
||||
return wxMODERN;
|
||||
else if (strcmp(family, "Script") == 0)
|
||||
else if (wxStrcmp(family, _T("Script")) == 0)
|
||||
return wxSCRIPT;
|
||||
else if (strcmp(family, "Teletype") == 0)
|
||||
else if (wxStrcmp(family, _T("Teletype")) == 0)
|
||||
return wxTELETYPE;
|
||||
else return wxSWISS;
|
||||
}
|
||||
|
||||
int wxFontStyleStringToInt(char *style)
|
||||
int wxFontStyleStringToInt(wxChar *style)
|
||||
{
|
||||
if (!style)
|
||||
return wxNORMAL;
|
||||
if (strcmp(style, "Italic") == 0)
|
||||
if (wxStrcmp(style, _T("Italic")) == 0)
|
||||
return wxITALIC;
|
||||
else if (strcmp(style, "Slant") == 0)
|
||||
else if (wxStrcmp(style, _T("Slant")) == 0)
|
||||
return wxSLANT;
|
||||
else
|
||||
return wxNORMAL;
|
||||
}
|
||||
|
||||
int wxFontWeightStringToInt(char *weight)
|
||||
int wxFontWeightStringToInt(wxChar *weight)
|
||||
{
|
||||
if (!weight)
|
||||
return wxNORMAL;
|
||||
if (strcmp(weight, "Bold") == 0)
|
||||
if (wxStrcmp(weight, _T("Bold")) == 0)
|
||||
return wxBOLD;
|
||||
else if (strcmp(weight, "Light") == 0)
|
||||
else if (wxStrcmp(weight, _T("Light")) == 0)
|
||||
return wxLIGHT;
|
||||
else
|
||||
return wxNORMAL;
|
||||
|
@ -1512,7 +1512,7 @@ void wxGenericGrid::DrawCellText(void)
|
||||
if (!cell)
|
||||
return;
|
||||
|
||||
static char szEdit[300];
|
||||
static wxChar szEdit[300];
|
||||
|
||||
wxClientDC dc(this);
|
||||
dc.BeginDrawing();
|
||||
@ -1522,7 +1522,7 @@ void wxGenericGrid::DrawCellText(void)
|
||||
dc.SetBackgroundMode(wxTRANSPARENT);
|
||||
dc.SetBrush(cell->GetBackgroundBrush());
|
||||
|
||||
strcpy(szEdit, m_textItem->GetValue());
|
||||
wxStrcpy(szEdit, m_textItem->GetValue());
|
||||
|
||||
wxRect rect;
|
||||
rect = m_currentRect;
|
||||
@ -1531,7 +1531,7 @@ void wxGenericGrid::DrawCellText(void)
|
||||
rect.width -= 5;
|
||||
rect.height -= 4;
|
||||
|
||||
DrawTextRect(& dc, " ", &rect, wxLEFT);
|
||||
DrawTextRect(& dc, _T(" "), &rect, wxLEFT);
|
||||
DrawTextRect(& dc, szEdit, &rect, cell->GetAlignment());
|
||||
|
||||
dc.DestroyClippingRegion();
|
||||
|
@ -66,23 +66,23 @@ wxExtHelpController::DisplayHelp(wxString const &relativeURL)
|
||||
{
|
||||
wxString lockfile;
|
||||
wxGetHomeDir(&lockfile);
|
||||
lockfile << WXEXTHELP_SEPARATOR << ".netscape/lock";
|
||||
lockfile << WXEXTHELP_SEPARATOR << _T(".netscape/lock");
|
||||
struct stat statbuf;
|
||||
if(lstat(lockfile.c_str(), &statbuf) == 0)
|
||||
if(lstat(lockfile.fn_str(), &statbuf) == 0)
|
||||
// cannot use wxFileExists, because it's a link pointing to a
|
||||
// non-existing location if(wxFileExists(lockfile))
|
||||
{
|
||||
long success;
|
||||
command << m_BrowserName << " -remote openURL("
|
||||
<< "file://" << m_MapFile
|
||||
<< WXEXTHELP_SEPARATOR << relativeURL << ")";
|
||||
command << m_BrowserName << _T(" -remote openURL(")
|
||||
<< _T("file://") << m_MapFile
|
||||
<< WXEXTHELP_SEPARATOR << relativeURL << _T(")");
|
||||
success = wxExecute(command);
|
||||
if(success != 0 ) // returns PID on success
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
command = m_BrowserName;
|
||||
command << " file://"
|
||||
command << _T(" file://")
|
||||
<< m_MapFile << WXEXTHELP_SEPARATOR << relativeURL;
|
||||
return wxExecute(command) != 0;
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ wxHTMLHelpControllerBase::LoadFile(const wxString& ifile)
|
||||
file = ifile;
|
||||
if(! wxIsAbsolutePath(file))
|
||||
{
|
||||
char* f = wxGetWorkingDirectory();
|
||||
wxChar* f = wxGetWorkingDirectory();
|
||||
file = f;
|
||||
delete[] f; // wxGetWorkingDirectory returns new memory
|
||||
file << WXEXTHELP_SEPARATOR << ifile;
|
||||
@ -118,8 +118,8 @@ wxHTMLHelpControllerBase::LoadFile(const wxString& ifile)
|
||||
else
|
||||
{
|
||||
newfile = WXEXTHELP_SEPARATOR;
|
||||
const char *cptr = wxGetLocale()->GetName().c_str();
|
||||
while(*cptr && *cptr != '_')
|
||||
const wxChar *cptr = wxGetLocale()->GetName().c_str();
|
||||
while(*cptr && *cptr != _T('_'))
|
||||
newfile << *(cptr++);
|
||||
if(wxDirExists(newfile))
|
||||
file = newfile;
|
||||
@ -141,7 +141,7 @@ wxHTMLHelpControllerBase::LoadFile(const wxString& ifile)
|
||||
m_MapList = new wxList;
|
||||
m_NumOfEntries = 0;
|
||||
|
||||
FILE *input = fopen(mapFile.c_str(),"rt");
|
||||
FILE *input = fopen(mapFile.fn_str(),"rt");
|
||||
if(! input)
|
||||
return FALSE;
|
||||
do
|
||||
|
@ -61,7 +61,7 @@ const wxBitmap *wxImageList::GetBitmap( int index ) const
|
||||
{
|
||||
wxNode *node = m_images.Nth( index );
|
||||
|
||||
wxCHECK_MSG( node, (wxBitmap *) NULL, "wrong index in image list" );
|
||||
wxCHECK_MSG( node, (wxBitmap *) NULL, _T("wrong index in image list") );
|
||||
|
||||
return (wxBitmap*)node->Data();
|
||||
}
|
||||
@ -70,7 +70,7 @@ bool wxImageList::Replace( int index, const wxBitmap &bitmap )
|
||||
{
|
||||
wxNode *node = m_images.Nth( index );
|
||||
|
||||
wxCHECK_MSG( node, FALSE, "wrong index in image list" );
|
||||
wxCHECK_MSG( node, FALSE, _T("wrong index in image list") );
|
||||
|
||||
wxBitmap* newBitmap = NULL;
|
||||
if (bitmap.IsKindOf(CLASSINFO(wxIcon)))
|
||||
@ -97,7 +97,7 @@ bool wxImageList::Remove( int index )
|
||||
{
|
||||
wxNode *node = m_images.Nth( index );
|
||||
|
||||
wxCHECK_MSG( node, FALSE, "wrong index in image list" );
|
||||
wxCHECK_MSG( node, FALSE, _T("wrong index in image list") );
|
||||
|
||||
m_images.DeleteNode( node );
|
||||
|
||||
@ -118,7 +118,7 @@ bool wxImageList::GetSize( int index, int &width, int &height ) const
|
||||
|
||||
wxNode *node = m_images.Nth( index );
|
||||
|
||||
wxCHECK_MSG( node, FALSE, "wrong index in image list" );
|
||||
wxCHECK_MSG( node, FALSE, _T("wrong index in image list") );
|
||||
|
||||
wxBitmap *bm = (wxBitmap*)node->Data();
|
||||
width = bm->GetWidth();
|
||||
@ -132,7 +132,7 @@ bool wxImageList::Draw( int index, wxDC &dc, int x, int y,
|
||||
{
|
||||
wxNode *node = m_images.Nth( index );
|
||||
|
||||
wxCHECK_MSG( node, FALSE, "wrong index in image list" );
|
||||
wxCHECK_MSG( node, FALSE, _T("wrong index in image list") );
|
||||
|
||||
wxBitmap *bm = (wxBitmap*)node->Data();
|
||||
|
||||
|
@ -2063,7 +2063,7 @@ void wxListMainWindow::DeleteItem( long index )
|
||||
void wxListMainWindow::DeleteColumn( int col )
|
||||
{
|
||||
wxCHECK_RET( col < (int)m_columns.GetCount(),
|
||||
"attempting to delete inexistent column in wxListView" );
|
||||
_T("attempting to delete inexistent column in wxListView") );
|
||||
|
||||
m_dirty = TRUE;
|
||||
wxNode *node = m_columns.Nth( col );
|
||||
|
@ -39,17 +39,17 @@
|
||||
// New dialog box implementations
|
||||
|
||||
// Split message, using constraints to position controls
|
||||
void wxSplitMessage2(const char *message, wxList *messageList, wxWindow *parent, wxRowColSizer *sizer)
|
||||
void wxSplitMessage2(const wxChar *message, wxList *messageList, wxWindow *parent, wxRowColSizer *sizer)
|
||||
{
|
||||
char *copyMessage = copystring(message);
|
||||
wxChar *copyMessage = copystring(message);
|
||||
size_t i = 0;
|
||||
size_t len = strlen(copyMessage);
|
||||
char *currentMessage = copyMessage;
|
||||
size_t len = wxStrlen(copyMessage);
|
||||
wxChar *currentMessage = copyMessage;
|
||||
|
||||
// wxWindow *lastWindow = parent;
|
||||
|
||||
while (i < len) {
|
||||
while ((i < len) && (copyMessage[i] != '\n')) i++;
|
||||
while ((i < len) && (copyMessage[i] != _T('\n'))) i++;
|
||||
if (i < len) copyMessage[i] = 0;
|
||||
wxStaticText *mess = new wxStaticText(parent, -1, currentMessage);
|
||||
|
||||
@ -99,7 +99,7 @@ wxGenericMessageDialog::wxGenericMessageDialog(wxWindow *parent, const wxString&
|
||||
topSizer->SetBorder(10, 10);
|
||||
|
||||
wxRowColSizer *messageSizer = new wxRowColSizer(topSizer, wxSIZER_COLS, 100);
|
||||
messageSizer->SetName("messageSizer");
|
||||
messageSizer->SetName(_T("messageSizer"));
|
||||
|
||||
// bool centre = ((style & wxCENTRE) == wxCENTRE);
|
||||
|
||||
@ -110,7 +110,7 @@ wxGenericMessageDialog::wxGenericMessageDialog(wxWindow *parent, const wxString&
|
||||
wxSpacingSizer *spacingSizer = new wxSpacingSizer(topSizer, wxBelow, messageSizer, 20);
|
||||
|
||||
wxRowColSizer *buttonSizer = new wxRowColSizer(topSizer, wxSIZER_ROWS);
|
||||
buttonSizer->SetName("buttonSizer");
|
||||
buttonSizer->SetName(_T("buttonSizer"));
|
||||
buttonSizer->SetSpacing(12,0);
|
||||
|
||||
// Specify constraints for the button sizer
|
||||
|
@ -234,7 +234,7 @@ void wxGenericPrintDialog::OnOK(wxCommandEvent& WXUNUSED(event))
|
||||
wxString f = wxFileSelector(_("PostScript file"),
|
||||
wxPathOnly(wxThePrintSetupData->GetPrinterFile()),
|
||||
wxFileNameFromPath(wxThePrintSetupData->GetPrinterFile()),
|
||||
"ps", "*.ps", 0, this);
|
||||
_T("ps"), _T("*.ps"), 0, this);
|
||||
if ( f.IsEmpty() )
|
||||
return;
|
||||
|
||||
@ -325,8 +325,8 @@ bool wxGenericPrintDialog::TransferDataFromWindow()
|
||||
{
|
||||
if (m_printDialogData.GetEnablePageNumbers())
|
||||
{
|
||||
if(m_fromText) m_printDialogData.SetFromPage(atoi(m_fromText->GetValue()));
|
||||
if(m_toText) m_printDialogData.SetToPage(atoi(m_toText->GetValue()));
|
||||
if(m_fromText) m_printDialogData.SetFromPage(wxAtoi(m_fromText->GetValue()));
|
||||
if(m_toText) m_printDialogData.SetToPage(wxAtoi(m_toText->GetValue()));
|
||||
}
|
||||
if(m_rangeRadioBox)
|
||||
{
|
||||
@ -341,7 +341,7 @@ bool wxGenericPrintDialog::TransferDataFromWindow()
|
||||
m_printDialogData.SetFromPage(1);
|
||||
m_printDialogData.SetToPage(32000);
|
||||
}
|
||||
m_printDialogData.SetNoCopies(atoi(m_noCopiesText->GetValue()));
|
||||
m_printDialogData.SetNoCopies(wxAtoi(m_noCopiesText->GetValue()));
|
||||
m_printDialogData.SetPrintToFile(m_printToFileCheckBox->GetValue());
|
||||
|
||||
return TRUE;
|
||||
@ -690,9 +690,9 @@ bool wxGenericPageSetupDialog::TransferDataToWindow()
|
||||
bool wxGenericPageSetupDialog::TransferDataFromWindow()
|
||||
{
|
||||
if (m_marginLeftText && m_marginTopText)
|
||||
m_pageData.SetMarginTopLeft(wxPoint(atoi((const char *)m_marginLeftText->GetValue()),atoi((const char *)m_marginTopText->GetValue())));
|
||||
m_pageData.SetMarginTopLeft(wxPoint(wxAtoi((const wxChar *)m_marginLeftText->GetValue()),wxAtoi((const wxChar *)m_marginTopText->GetValue())));
|
||||
if (m_marginRightText && m_marginBottomText)
|
||||
m_pageData.SetMarginBottomRight(wxPoint(atoi((const char *)m_marginRightText->GetValue()),atoi((const char *)m_marginBottomText->GetValue())));
|
||||
m_pageData.SetMarginBottomRight(wxPoint(wxAtoi((const wxChar *)m_marginRightText->GetValue()),wxAtoi((const wxChar *)m_marginBottomText->GetValue())));
|
||||
|
||||
if (m_orientationRadioBox)
|
||||
{
|
||||
|
@ -63,7 +63,7 @@ wxPropertyValue::wxPropertyValue(const wxPropertyValue& copyFrom)
|
||||
Copy((wxPropertyValue& )copyFrom);
|
||||
}
|
||||
|
||||
wxPropertyValue::wxPropertyValue(const char *val)
|
||||
wxPropertyValue::wxPropertyValue(const wxChar *val)
|
||||
{
|
||||
m_modifiedFlag = FALSE;
|
||||
m_type = wxPropertyValueString;
|
||||
@ -79,7 +79,7 @@ wxPropertyValue::wxPropertyValue(const wxString& val)
|
||||
m_modifiedFlag = FALSE;
|
||||
m_type = wxPropertyValueString;
|
||||
|
||||
m_value.string = copystring((const char *)val);
|
||||
m_value.string = copystring((const wxChar *)val);
|
||||
m_clientData = NULL;
|
||||
m_next = NULL;
|
||||
m_last = NULL;
|
||||
@ -122,7 +122,7 @@ wxPropertyValue::wxPropertyValue(double the_real)
|
||||
}
|
||||
|
||||
// Pointer versions: we have a pointer to the real C++ value.
|
||||
wxPropertyValue::wxPropertyValue(char **val)
|
||||
wxPropertyValue::wxPropertyValue(wxChar **val)
|
||||
{
|
||||
m_modifiedFlag = FALSE;
|
||||
m_type = wxPropertyValueStringPtr;
|
||||
@ -382,7 +382,7 @@ void wxPropertyValue::Copy(wxPropertyValue& copyFrom)
|
||||
return ;
|
||||
case wxPropertyValueStringPtr:
|
||||
{
|
||||
char** s = copyFrom.StringValuePtr();
|
||||
wxChar** s = copyFrom.StringValuePtr();
|
||||
(*this) = s;
|
||||
return ;
|
||||
}
|
||||
@ -515,7 +515,7 @@ void wxPropertyValue::WritePropertyType(ostream& stream) // Write as any othe
|
||||
case wxPropertyValueReal:
|
||||
{
|
||||
float f = m_value.real;
|
||||
sprintf(wxBuffer, "%.6g", (double)f);
|
||||
wxSprintf(wxBuffer, _T("%.6g"), (double)f);
|
||||
stream << wxBuffer;
|
||||
break;
|
||||
}
|
||||
@ -527,7 +527,7 @@ void wxPropertyValue::WritePropertyType(ostream& stream) // Write as any othe
|
||||
if (fabs(f) < 0.00001)
|
||||
f = 0.0;
|
||||
*/
|
||||
sprintf(wxBuffer, "%.6g", f);
|
||||
wxSprintf(wxBuffer, _T("%.6g"), f);
|
||||
stream << wxBuffer;
|
||||
break;
|
||||
}
|
||||
@ -535,10 +535,11 @@ void wxPropertyValue::WritePropertyType(ostream& stream) // Write as any othe
|
||||
{
|
||||
// stream << "\"";
|
||||
int i;
|
||||
int len = strlen(m_value.string);
|
||||
wxWX2MBbuf strbuf = wxConv_libc.cWX2MB(m_value.string);
|
||||
int len = strlen(strbuf);
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
char ch = m_value.string[i];
|
||||
char ch = strbuf[i];
|
||||
// if (ch == '"' || ch == '\\')
|
||||
// stream << "\\";
|
||||
stream << ch;
|
||||
@ -549,7 +550,7 @@ void wxPropertyValue::WritePropertyType(ostream& stream) // Write as any othe
|
||||
}
|
||||
case wxPropertyValueStringPtr:
|
||||
{
|
||||
wxFAIL_MSG( "wxPropertyValue::WritePropertyType( wxPropertyValueStringPtr ) not implemented" );
|
||||
wxFAIL_MSG( _T("wxPropertyValue::WritePropertyType( wxPropertyValueStringPtr ) not implemented") );
|
||||
/*
|
||||
int i;
|
||||
int len = strlen(*(m_value.stringPtr));
|
||||
@ -607,7 +608,7 @@ void wxPropertyValue::operator=(const wxPropertyValue& val)
|
||||
// void wxPropertyValue::operator=(const char *val)
|
||||
void wxPropertyValue::operator=(const wxString& val1)
|
||||
{
|
||||
const char *val = (const char *)val1;
|
||||
const wxChar *val = (const wxChar *)val1;
|
||||
|
||||
m_modifiedFlag = TRUE;
|
||||
if (m_type == wxPropertyValueNull)
|
||||
@ -689,13 +690,13 @@ void wxPropertyValue::operator=(const float val)
|
||||
m_next = NULL;
|
||||
}
|
||||
|
||||
void wxPropertyValue::operator=(const char **val)
|
||||
void wxPropertyValue::operator=(const wxChar **val)
|
||||
{
|
||||
m_modifiedFlag = TRUE;
|
||||
m_type = wxPropertyValueStringPtr;
|
||||
|
||||
if (val)
|
||||
m_value.stringPtr = (char **)val;
|
||||
m_value.stringPtr = (wxChar **)val;
|
||||
else
|
||||
m_value.stringPtr = NULL;
|
||||
m_clientData = NULL;
|
||||
@ -787,7 +788,7 @@ bool *wxPropertyValue::BoolValuePtr(void) const
|
||||
return m_value.boolPtr;
|
||||
}
|
||||
|
||||
char *wxPropertyValue::StringValue(void) const {
|
||||
wxChar *wxPropertyValue::StringValue(void) const {
|
||||
if (m_type == wxPropertyValueString)
|
||||
return m_value.string;
|
||||
else if (m_type == wxPropertyValueStringPtr)
|
||||
@ -795,7 +796,7 @@ char *wxPropertyValue::StringValue(void) const {
|
||||
else return NULL;
|
||||
}
|
||||
|
||||
char **wxPropertyValue::StringValuePtr(void) const
|
||||
wxChar **wxPropertyValue::StringValuePtr(void) const
|
||||
{
|
||||
return m_value.stringPtr;
|
||||
}
|
||||
@ -968,13 +969,13 @@ void wxPropertySheet::UpdateAllViews( wxPropertyView *WXUNUSED(thisView) )
|
||||
// Add a property
|
||||
void wxPropertySheet::AddProperty(wxProperty *property)
|
||||
{
|
||||
m_properties.Append((const char*) property->GetName(), property);
|
||||
m_properties.Append((const wxChar*) property->GetName(), property);
|
||||
}
|
||||
|
||||
// Get property by name
|
||||
wxProperty *wxPropertySheet::GetProperty(const wxString& name) const
|
||||
{
|
||||
wxNode *node = m_properties.Find((const char*) name);
|
||||
wxNode *node = m_properties.Find((const wxChar*) name);
|
||||
if (!node)
|
||||
return NULL;
|
||||
else
|
||||
@ -1052,12 +1053,12 @@ wxPropertyValidatorRegistry::~wxPropertyValidatorRegistry(void)
|
||||
|
||||
void wxPropertyValidatorRegistry::RegisterValidator(const wxString& typeName, wxPropertyValidator *validator)
|
||||
{
|
||||
Put((const char*) typeName, validator);
|
||||
Put((const wxChar*) typeName, validator);
|
||||
}
|
||||
|
||||
wxPropertyValidator *wxPropertyValidatorRegistry::GetValidator(const wxString& typeName)
|
||||
{
|
||||
return (wxPropertyValidator *)Get((const char*) typeName);
|
||||
return (wxPropertyValidator *)Get((const wxChar*) typeName);
|
||||
}
|
||||
|
||||
void wxPropertyValidatorRegistry::ClearRegistry(void)
|
||||
@ -1086,66 +1087,64 @@ wxPropertyValidator::wxPropertyValidator(long flags)
|
||||
wxPropertyValidator::~wxPropertyValidator(void)
|
||||
{}
|
||||
|
||||
bool wxPropertyValidator::StringToFloat (char *s, float *number) {
|
||||
bool wxPropertyValidator::StringToFloat (wxChar *s, float *number) {
|
||||
double num;
|
||||
bool ok = StringToDouble (s, &num);
|
||||
*number = (float) num;
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool wxPropertyValidator::StringToDouble (char *s, double *number) {
|
||||
bool wxPropertyValidator::StringToDouble (wxChar *s, double *number) {
|
||||
bool ok = TRUE;
|
||||
char *value_ptr;
|
||||
*number = strtod (s, &value_ptr);
|
||||
wxChar *value_ptr;
|
||||
*number = wxStrtod (s, &value_ptr);
|
||||
if (value_ptr) {
|
||||
int len = strlen (value_ptr);
|
||||
int len = wxStrlen (value_ptr);
|
||||
for (int i = 0; i < len; i++) {
|
||||
ok = (isspace (value_ptr[i]) != 0);
|
||||
ok = (wxIsspace (value_ptr[i]) != 0);
|
||||
if (!ok) return FALSE;
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool wxPropertyValidator::StringToInt (char *s, int *number) {
|
||||
bool wxPropertyValidator::StringToInt (wxChar *s, int *number) {
|
||||
long num;
|
||||
bool ok = StringToLong (s, &num);
|
||||
*number = (int) num;
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool wxPropertyValidator::StringToLong (char *s, long *number) {
|
||||
bool wxPropertyValidator::StringToLong (wxChar *s, long *number) {
|
||||
bool ok = TRUE;
|
||||
char *value_ptr;
|
||||
*number = strtol (s, &value_ptr, 10);
|
||||
wxChar *value_ptr;
|
||||
*number = wxStrtol (s, &value_ptr, 10);
|
||||
if (value_ptr) {
|
||||
int len = strlen (value_ptr);
|
||||
int len = wxStrlen (value_ptr);
|
||||
for (int i = 0; i < len; i++) {
|
||||
ok = (isspace (value_ptr[i]) != 0);
|
||||
ok = (wxIsspace (value_ptr[i]) != 0);
|
||||
if (!ok) return FALSE;
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
char *wxPropertyValidator::FloatToString (float number) {
|
||||
static char buf[20];
|
||||
sprintf (buf, "%.6g", number);
|
||||
wxChar *wxPropertyValidator::FloatToString (float number) {
|
||||
static wxChar buf[20];
|
||||
wxSprintf (buf, _T("%.6g"), number);
|
||||
return buf;
|
||||
}
|
||||
|
||||
char *wxPropertyValidator::DoubleToString (double number) {
|
||||
static char buf[20];
|
||||
sprintf (buf, "%.6g", number);
|
||||
wxChar *wxPropertyValidator::DoubleToString (double number) {
|
||||
static wxChar buf[20];
|
||||
wxSprintf (buf, _T("%.6g"), number);
|
||||
return buf;
|
||||
}
|
||||
|
||||
char *wxPropertyValidator::IntToString (int number) {
|
||||
wxChar *wxPropertyValidator::IntToString (int number) {
|
||||
return ::IntToString (number);
|
||||
}
|
||||
|
||||
char *wxPropertyValidator::LongToString (long number) {
|
||||
wxChar *wxPropertyValidator::LongToString (long number) {
|
||||
return ::LongToString (number);
|
||||
}
|
||||
|
||||
|
||||
|
@ -222,15 +222,15 @@ void wxPropertyFormView::OnCommand(wxWindow& win, wxCommandEvent& event)
|
||||
if (win.GetName() == "")
|
||||
return;
|
||||
|
||||
if (strcmp(win.GetName(), "ok") == 0)
|
||||
if (wxStrcmp(win.GetName(), _T("ok")) == 0)
|
||||
OnOk(event);
|
||||
else if (strcmp(win.GetName(), "cancel") == 0)
|
||||
else if (wxStrcmp(win.GetName(), _T("cancel")) == 0)
|
||||
OnCancel(event);
|
||||
else if (strcmp(win.GetName(), "help") == 0)
|
||||
else if (wxStrcmp(win.GetName(), _T("help")) == 0)
|
||||
OnHelp(event);
|
||||
else if (strcmp(win.GetName(), "update") == 0)
|
||||
else if (wxStrcmp(win.GetName(), _T("update")) == 0)
|
||||
OnUpdate(event);
|
||||
else if (strcmp(win.GetName(), "revert") == 0)
|
||||
else if (wxStrcmp(win.GetName(), _T("revert")) == 0)
|
||||
OnRevert(event);
|
||||
else
|
||||
{
|
||||
@ -424,17 +424,17 @@ bool wxRealFormValidator::OnCheckValue( wxProperty *property, wxPropertyFormView
|
||||
float val = 0.0;
|
||||
if (!StringToFloat(WXSTRINGCAST value, &val))
|
||||
{
|
||||
char buf[200];
|
||||
sprintf(buf, "Value %s is not a valid real number!", (const char *)value);
|
||||
wxMessageBox(buf, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow);
|
||||
wxChar buf[200];
|
||||
wxSprintf(buf, _T("Value %s is not a valid real number!"), (const wxChar *)value);
|
||||
wxMessageBox(buf, _T("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (val < m_realMin || val > m_realMax)
|
||||
{
|
||||
char buf[200];
|
||||
sprintf(buf, "Value must be a real number between %.2f and %.2f!", m_realMin, m_realMax);
|
||||
wxMessageBox(buf, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow);
|
||||
wxChar buf[200];
|
||||
wxSprintf(buf, _T("Value must be a real number between %.2f and %.2f!"), m_realMin, m_realMax);
|
||||
wxMessageBox(buf, _T("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow);
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
@ -453,7 +453,7 @@ bool wxRealFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormVi
|
||||
if (value.Length() == 0)
|
||||
return FALSE;
|
||||
|
||||
float f = (float)atof((const char *)value);
|
||||
float f = (float)wxAtof((const wxChar *)value);
|
||||
property->GetValue() = f;
|
||||
return TRUE;
|
||||
}
|
||||
@ -495,9 +495,9 @@ bool wxIntegerFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormVi
|
||||
|
||||
if (!StringToLong(WXSTRINGCAST value, &val))
|
||||
{
|
||||
char buf[200];
|
||||
sprintf(buf, "Value %s is not a valid integer!", (const char *)value);
|
||||
wxMessageBox(buf, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow);
|
||||
wxChar buf[200];
|
||||
wxSprintf(buf, _T("Value %s is not a valid integer!"), (const wxChar *)value);
|
||||
wxMessageBox(buf, _T("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@ -533,7 +533,7 @@ bool wxIntegerFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFor
|
||||
if (value.Length() == 0)
|
||||
return FALSE;
|
||||
|
||||
long i = atol((const char *)value);
|
||||
long i = wxAtol((const wxChar *)value);
|
||||
property->GetValue() = i;
|
||||
}
|
||||
else if (m_propertyWindow->IsKindOf(CLASSINFO(wxSlider)))
|
||||
|
@ -1027,9 +1027,9 @@ bool wxRealListValidator::OnCheckValue(wxProperty *WXUNUSED(property), wxPropert
|
||||
float val = 0.0;
|
||||
if (!StringToFloat(WXSTRINGCAST value, &val))
|
||||
{
|
||||
char buf[200];
|
||||
sprintf(buf, "Value %s is not a valid real number!", value.GetData());
|
||||
wxMessageBox(buf, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow);
|
||||
wxChar buf[200];
|
||||
wxSprintf(buf, _T("Value %s is not a valid real number!"), value.GetData());
|
||||
wxMessageBox(buf, _T("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -1051,11 +1051,11 @@ bool wxRealListValidator::OnRetrieveValue(wxProperty *property, wxPropertyListVi
|
||||
if (!view->GetValueText())
|
||||
return FALSE;
|
||||
|
||||
if (strlen(view->GetValueText()->GetValue()) == 0)
|
||||
if (wxStrlen(view->GetValueText()->GetValue()) == 0)
|
||||
return FALSE;
|
||||
|
||||
wxString value(view->GetValueText()->GetValue());
|
||||
float f = (float)atof(value.GetData());
|
||||
float f = (float)wxAtof(value.GetData());
|
||||
property->GetValue() = f;
|
||||
return TRUE;
|
||||
}
|
||||
@ -1090,16 +1090,16 @@ bool wxIntegerListValidator::OnCheckValue(wxProperty *WXUNUSED(property), wxProp
|
||||
long val = 0;
|
||||
if (!StringToLong(WXSTRINGCAST value, &val))
|
||||
{
|
||||
char buf[200];
|
||||
sprintf(buf, "Value %s is not a valid integer!", value.GetData());
|
||||
wxMessageBox(buf, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow);
|
||||
wxChar buf[200];
|
||||
wxSprintf(buf, _T("Value %s is not a valid integer!"), value.GetData());
|
||||
wxMessageBox(buf, _T("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow);
|
||||
return FALSE;
|
||||
}
|
||||
if (val < m_integerMin || val > m_integerMax)
|
||||
{
|
||||
char buf[200];
|
||||
sprintf(buf, "Value must be an integer between %ld and %ld!", m_integerMin, m_integerMax);
|
||||
wxMessageBox(buf, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow);
|
||||
wxChar buf[200];
|
||||
wxSprintf(buf, _T("Value must be an integer between %ld and %ld!"), m_integerMin, m_integerMax);
|
||||
wxMessageBox(buf, _T("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow);
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
@ -1113,11 +1113,11 @@ bool wxIntegerListValidator::OnRetrieveValue(wxProperty *property, wxPropertyLis
|
||||
if (!view->GetValueText())
|
||||
return FALSE;
|
||||
|
||||
if (strlen(view->GetValueText()->GetValue()) == 0)
|
||||
if (wxStrlen(view->GetValueText()->GetValue()) == 0)
|
||||
return FALSE;
|
||||
|
||||
wxString value(view->GetValueText()->GetValue());
|
||||
long val = (long)atoi(value.GetData());
|
||||
long val = (long)wxAtoi(value.GetData());
|
||||
property->GetValue() = (long)val;
|
||||
return TRUE;
|
||||
}
|
||||
@ -1145,9 +1145,9 @@ bool wxBoolListValidator::OnCheckValue(wxProperty *WXUNUSED(property), wxPropert
|
||||
if (!view->GetValueText())
|
||||
return FALSE;
|
||||
wxString value(view->GetValueText()->GetValue());
|
||||
if (value != "True" && value != "False")
|
||||
if (value != _T("True") && value != _T("False"))
|
||||
{
|
||||
wxMessageBox("Value must be True or False!", "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow);
|
||||
wxMessageBox(_T("Value must be True or False!"), _T("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow);
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
@ -1161,12 +1161,12 @@ bool wxBoolListValidator::OnRetrieveValue(wxProperty *property, wxPropertyListVi
|
||||
if (!view->GetValueText())
|
||||
return FALSE;
|
||||
|
||||
if (strlen(view->GetValueText()->GetValue()) == 0)
|
||||
if (wxStrlen(view->GetValueText()->GetValue()) == 0)
|
||||
return FALSE;
|
||||
|
||||
wxString value(view->GetValueText()->GetValue());
|
||||
bool boolValue = FALSE;
|
||||
if (value == "True")
|
||||
if (value == _T("True"))
|
||||
boolValue = TRUE;
|
||||
else
|
||||
boolValue = FALSE;
|
||||
@ -1209,9 +1209,9 @@ bool wxBoolListValidator::OnPrepareDetailControls(wxProperty *WXUNUSED(property)
|
||||
view->ShowListBoxControl(TRUE);
|
||||
view->GetValueList()->Enable(TRUE);
|
||||
|
||||
view->GetValueList()->Append("True");
|
||||
view->GetValueList()->Append("False");
|
||||
char *currentString = copystring(view->GetValueText()->GetValue());
|
||||
view->GetValueList()->Append(_T("True"));
|
||||
view->GetValueList()->Append(_T("False"));
|
||||
wxChar *currentString = copystring(view->GetValueText()->GetValue());
|
||||
view->GetValueList()->SetStringSelection(currentString);
|
||||
delete[] currentString;
|
||||
}
|
||||
@ -1346,11 +1346,11 @@ bool wxStringListValidator::OnPrepareDetailControls(wxProperty *property, wxProp
|
||||
wxNode *node = m_strings->First();
|
||||
while (node)
|
||||
{
|
||||
char *s = (char *)node->Data();
|
||||
wxChar *s = (wxChar *)node->Data();
|
||||
view->GetValueList()->Append(s);
|
||||
node = node->Next();
|
||||
}
|
||||
char *currentString = property->GetValue().StringValue();
|
||||
wxChar *currentString = property->GetValue().StringValue();
|
||||
view->GetValueList()->SetStringSelection(currentString);
|
||||
}
|
||||
return TRUE;
|
||||
@ -1382,17 +1382,17 @@ bool wxStringListValidator::OnDoubleClick(wxProperty *property, wxPropertyListVi
|
||||
return FALSE;
|
||||
|
||||
wxNode *node = m_strings->First();
|
||||
char *currentString = property->GetValue().StringValue();
|
||||
wxChar *currentString = property->GetValue().StringValue();
|
||||
while (node)
|
||||
{
|
||||
char *s = (char *)node->Data();
|
||||
if (strcmp(s, currentString) == 0)
|
||||
wxChar *s = (wxChar *)node->Data();
|
||||
if (wxStrcmp(s, currentString) == 0)
|
||||
{
|
||||
char *nextString = NULL;
|
||||
wxChar *nextString = NULL;
|
||||
if (node->Next())
|
||||
nextString = (char *)node->Next()->Data();
|
||||
nextString = (wxChar *)node->Next()->Data();
|
||||
else
|
||||
nextString = (char *)m_strings->First()->Data();
|
||||
nextString = (wxChar *)m_strings->First()->Data();
|
||||
property->GetValue() = wxString(nextString);
|
||||
view->DisplayProperty(property);
|
||||
view->UpdatePropertyDisplayInList(property);
|
||||
@ -1564,7 +1564,7 @@ void wxColourListValidator::OnEdit(wxProperty *property, wxPropertyListView *vie
|
||||
if (!view->GetValueText())
|
||||
return;
|
||||
|
||||
char *s = property->GetValue().StringValue();
|
||||
wxChar *s = property->GetValue().StringValue();
|
||||
int r = 0;
|
||||
int g = 0;
|
||||
int b = 0;
|
||||
@ -1593,7 +1593,7 @@ void wxColourListValidator::OnEdit(wxProperty *property, wxPropertyListView *vie
|
||||
wxColourData retData = dialog.GetColourData();
|
||||
col = retData.GetColour();
|
||||
|
||||
char buf[7];
|
||||
wxChar buf[7];
|
||||
wxDecToHex(col.Red(), buf);
|
||||
wxDecToHex(col.Green(), buf+2);
|
||||
wxDecToHex(col.Blue(), buf+4);
|
||||
@ -1670,13 +1670,13 @@ void wxListOfStringsListValidator::OnEdit(wxProperty *property, wxPropertyListVi
|
||||
wxPropertyValue *expr = property->GetValue().GetFirst();
|
||||
while (expr)
|
||||
{
|
||||
char *s = expr->StringValue();
|
||||
wxChar *s = expr->StringValue();
|
||||
if (s)
|
||||
stringList->Add(s);
|
||||
expr = expr->GetNext();
|
||||
}
|
||||
|
||||
wxString title("Editing ");
|
||||
wxString title(_T("Editing "));
|
||||
title += property->GetName();
|
||||
|
||||
if (EditStringList(parentWindow, stringList, title.GetData()))
|
||||
@ -1686,7 +1686,7 @@ void wxListOfStringsListValidator::OnEdit(wxProperty *property, wxPropertyListVi
|
||||
wxNode *node = stringList->First();
|
||||
while (node)
|
||||
{
|
||||
char *s = (char *)node->Data();
|
||||
wxChar *s = (wxChar *)node->Data();
|
||||
oldValue.Append(new wxPropertyValue(s));
|
||||
|
||||
node = node->Next();
|
||||
@ -1768,7 +1768,7 @@ class wxPropertyStringListEditorText: public wxTextCtrl
|
||||
bool wxPropertyStringListEditorDialog::sm_dialogCancelled = FALSE;
|
||||
|
||||
// Edit the string list.
|
||||
bool wxListOfStringsListValidator::EditStringList(wxWindow *parent, wxStringList *stringList, const char *title)
|
||||
bool wxListOfStringsListValidator::EditStringList(wxWindow *parent, wxStringList *stringList, const wxChar *title)
|
||||
{
|
||||
int largeButtonWidth = 60;
|
||||
int largeButtonHeight = 25;
|
||||
@ -1884,7 +1884,7 @@ void wxPropertyStringListEditorDialog::OnDelete(wxCommandEvent& WXUNUSED(event))
|
||||
return;
|
||||
|
||||
m_listBox->Delete(sel);
|
||||
delete[] (char *)node->Data();
|
||||
delete[] (wxChar *)node->Data();
|
||||
delete node;
|
||||
m_currentSelection = -1;
|
||||
m_stringText->SetValue("");
|
||||
@ -1894,9 +1894,9 @@ void wxPropertyStringListEditorDialog::OnAdd(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
SaveCurrentSelection();
|
||||
|
||||
char *initialText = "";
|
||||
wxChar *initialText = _T("");
|
||||
wxNode *node = m_stringList->Add(initialText);
|
||||
m_listBox->Append(initialText, (char *)node);
|
||||
m_listBox->Append(initialText, (wxChar *)node);
|
||||
m_currentSelection = m_stringList->Number() - 1;
|
||||
m_listBox->SetSelection(m_currentSelection);
|
||||
ShowCurrentSelection();
|
||||
|
@ -604,7 +604,7 @@ bool wxSplitterWindow::Unsplit(wxWindow *toRemove)
|
||||
}
|
||||
else
|
||||
{
|
||||
wxFAIL_MSG("splitter: attempt to remove a non-existent window");
|
||||
wxFAIL_MSG(_T("splitter: attempt to remove a non-existent window"));
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@ -619,8 +619,8 @@ bool wxSplitterWindow::Unsplit(wxWindow *toRemove)
|
||||
// Replace a window with another one
|
||||
bool wxSplitterWindow::ReplaceWindow(wxWindow *winOld, wxWindow *winNew)
|
||||
{
|
||||
wxCHECK_MSG( winOld, FALSE, "use one of Split() functions instead" );
|
||||
wxCHECK_MSG( winNew, FALSE, "use Unsplit() functions instead" );
|
||||
wxCHECK_MSG( winOld, FALSE, _T("use one of Split() functions instead") );
|
||||
wxCHECK_MSG( winNew, FALSE, _T("use Unsplit() functions instead") );
|
||||
|
||||
if ( winOld == m_windowTwo )
|
||||
{
|
||||
@ -632,7 +632,7 @@ bool wxSplitterWindow::ReplaceWindow(wxWindow *winOld, wxWindow *winNew)
|
||||
}
|
||||
else
|
||||
{
|
||||
wxFAIL_MSG("splitter: attempt to replace a non-existent window");
|
||||
wxFAIL_MSG(_T("splitter: attempt to replace a non-existent window"));
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -45,17 +45,17 @@ IMPLEMENT_CLASS(wxTextEntryDialog, wxDialog)
|
||||
#endif
|
||||
|
||||
// Split message, using constraints to position controls
|
||||
static void wxSplitMessage2(const char *message, wxList *messageList, wxWindow *parent, wxRowColSizer *sizer)
|
||||
static void wxSplitMessage2(const wxChar *message, wxList *messageList, wxWindow *parent, wxRowColSizer *sizer)
|
||||
{
|
||||
char *copyMessage = copystring(message);
|
||||
wxChar *copyMessage = copystring(message);
|
||||
size_t i = 0;
|
||||
size_t len = strlen(copyMessage);
|
||||
char *currentMessage = copyMessage;
|
||||
size_t len = wxStrlen(copyMessage);
|
||||
wxChar *currentMessage = copyMessage;
|
||||
|
||||
// wxWindow *lastWindow = parent;
|
||||
|
||||
while (i < len) {
|
||||
while ((i < len) && (copyMessage[i] != '\n')) i++;
|
||||
while ((i < len) && (copyMessage[i] != _T('\n'))) i++;
|
||||
if (i < len) copyMessage[i] = 0;
|
||||
wxStaticText *mess = new wxStaticText(parent, -1, currentMessage);
|
||||
|
||||
|
@ -197,7 +197,7 @@ wxGenericTreeItem::~wxGenericTreeItem()
|
||||
delete m_data;
|
||||
|
||||
wxASSERT_MSG( m_children.IsEmpty(),
|
||||
"please call DeleteChildren() before deleting the item" );
|
||||
_T("please call DeleteChildren() before deleting the item") );
|
||||
}
|
||||
|
||||
void wxGenericTreeItem::DeleteChildren(wxTreeCtrl *tree)
|
||||
@ -408,7 +408,7 @@ void wxTreeCtrl::SetIndent(unsigned int indent)
|
||||
|
||||
size_t wxTreeCtrl::GetChildrenCount(const wxTreeItemId& item, bool recursively)
|
||||
{
|
||||
wxCHECK_MSG( item.IsOk(), 0u, "invalid tree item" );
|
||||
wxCHECK_MSG( item.IsOk(), 0u, _T("invalid tree item") );
|
||||
|
||||
return item.m_pItem->GetChildrenCount(recursively);
|
||||
}
|
||||
@ -419,35 +419,35 @@ size_t wxTreeCtrl::GetChildrenCount(const wxTreeItemId& item, bool recursively)
|
||||
|
||||
wxString wxTreeCtrl::GetItemText(const wxTreeItemId& item) const
|
||||
{
|
||||
wxCHECK_MSG( item.IsOk(), "", "invalid tree item" );
|
||||
wxCHECK_MSG( item.IsOk(), _T(""), _T("invalid tree item") );
|
||||
|
||||
return item.m_pItem->GetText();
|
||||
}
|
||||
|
||||
int wxTreeCtrl::GetItemImage(const wxTreeItemId& item) const
|
||||
{
|
||||
wxCHECK_MSG( item.IsOk(), -1, "invalid tree item" );
|
||||
wxCHECK_MSG( item.IsOk(), -1, _T("invalid tree item") );
|
||||
|
||||
return item.m_pItem->GetImage();
|
||||
}
|
||||
|
||||
int wxTreeCtrl::GetItemSelectedImage(const wxTreeItemId& item) const
|
||||
{
|
||||
wxCHECK_MSG( item.IsOk(), -1, "invalid tree item" );
|
||||
wxCHECK_MSG( item.IsOk(), -1, _T("invalid tree item") );
|
||||
|
||||
return item.m_pItem->GetSelectedImage();
|
||||
}
|
||||
|
||||
wxTreeItemData *wxTreeCtrl::GetItemData(const wxTreeItemId& item) const
|
||||
{
|
||||
wxCHECK_MSG( item.IsOk(), NULL, "invalid tree item" );
|
||||
wxCHECK_MSG( item.IsOk(), NULL, _T("invalid tree item") );
|
||||
|
||||
return item.m_pItem->GetData();
|
||||
}
|
||||
|
||||
void wxTreeCtrl::SetItemText(const wxTreeItemId& item, const wxString& text)
|
||||
{
|
||||
wxCHECK_RET( item.IsOk(), "invalid tree item" );
|
||||
wxCHECK_RET( item.IsOk(), _T("invalid tree item") );
|
||||
|
||||
wxClientDC dc(this);
|
||||
wxGenericTreeItem *pItem = item.m_pItem;
|
||||
@ -457,7 +457,7 @@ void wxTreeCtrl::SetItemText(const wxTreeItemId& item, const wxString& text)
|
||||
|
||||
void wxTreeCtrl::SetItemImage(const wxTreeItemId& item, int image)
|
||||
{
|
||||
wxCHECK_RET( item.IsOk(), "invalid tree item" );
|
||||
wxCHECK_RET( item.IsOk(), _T("invalid tree item") );
|
||||
|
||||
wxGenericTreeItem *pItem = item.m_pItem;
|
||||
pItem->SetImage(image);
|
||||
@ -466,7 +466,7 @@ void wxTreeCtrl::SetItemImage(const wxTreeItemId& item, int image)
|
||||
|
||||
void wxTreeCtrl::SetItemSelectedImage(const wxTreeItemId& item, int image)
|
||||
{
|
||||
wxCHECK_RET( item.IsOk(), "invalid tree item" );
|
||||
wxCHECK_RET( item.IsOk(), _T("invalid tree item") );
|
||||
|
||||
wxGenericTreeItem *pItem = item.m_pItem;
|
||||
pItem->SetSelectedImage(image);
|
||||
@ -475,14 +475,14 @@ void wxTreeCtrl::SetItemSelectedImage(const wxTreeItemId& item, int image)
|
||||
|
||||
void wxTreeCtrl::SetItemData(const wxTreeItemId& item, wxTreeItemData *data)
|
||||
{
|
||||
wxCHECK_RET( item.IsOk(), "invalid tree item" );
|
||||
wxCHECK_RET( item.IsOk(), _T("invalid tree item") );
|
||||
|
||||
item.m_pItem->SetData(data);
|
||||
}
|
||||
|
||||
void wxTreeCtrl::SetItemHasChildren(const wxTreeItemId& item, bool has)
|
||||
{
|
||||
wxCHECK_RET( item.IsOk(), "invalid tree item" );
|
||||
wxCHECK_RET( item.IsOk(), _T("invalid tree item") );
|
||||
|
||||
wxGenericTreeItem *pItem = item.m_pItem;
|
||||
pItem->SetHasPlus(has);
|
||||
@ -491,7 +491,7 @@ void wxTreeCtrl::SetItemHasChildren(const wxTreeItemId& item, bool has)
|
||||
|
||||
void wxTreeCtrl::SetItemBold(const wxTreeItemId& item, bool bold)
|
||||
{
|
||||
wxCHECK_RET( item.IsOk(), "invalid tree item" );
|
||||
wxCHECK_RET( item.IsOk(), _T("invalid tree item") );
|
||||
|
||||
// avoid redrawing the tree if no real change
|
||||
wxGenericTreeItem *pItem = item.m_pItem;
|
||||
@ -508,35 +508,35 @@ void wxTreeCtrl::SetItemBold(const wxTreeItemId& item, bool bold)
|
||||
|
||||
bool wxTreeCtrl::IsVisible(const wxTreeItemId& WXUNUSED(item)) const
|
||||
{
|
||||
wxFAIL_MSG("not implemented");
|
||||
wxFAIL_MSG(_T("not implemented"));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxTreeCtrl::ItemHasChildren(const wxTreeItemId& item) const
|
||||
{
|
||||
wxCHECK_MSG( item.IsOk(), FALSE, "invalid tree item" );
|
||||
wxCHECK_MSG( item.IsOk(), FALSE, _T("invalid tree item") );
|
||||
|
||||
return !item.m_pItem->GetChildren().IsEmpty();
|
||||
}
|
||||
|
||||
bool wxTreeCtrl::IsExpanded(const wxTreeItemId& item) const
|
||||
{
|
||||
wxCHECK_MSG( item.IsOk(), FALSE, "invalid tree item" );
|
||||
wxCHECK_MSG( item.IsOk(), FALSE, _T("invalid tree item") );
|
||||
|
||||
return item.m_pItem->IsExpanded();
|
||||
}
|
||||
|
||||
bool wxTreeCtrl::IsSelected(const wxTreeItemId& item) const
|
||||
{
|
||||
wxCHECK_MSG( item.IsOk(), FALSE, "invalid tree item" );
|
||||
wxCHECK_MSG( item.IsOk(), FALSE, _T("invalid tree item") );
|
||||
|
||||
return item.m_pItem->HasHilight();
|
||||
}
|
||||
|
||||
bool wxTreeCtrl::IsBold(const wxTreeItemId& item) const
|
||||
{
|
||||
wxCHECK_MSG( item.IsOk(), FALSE, "invalid tree item" );
|
||||
wxCHECK_MSG( item.IsOk(), FALSE, _T("invalid tree item") );
|
||||
|
||||
return item.m_pItem->IsBold();
|
||||
}
|
||||
@ -547,14 +547,14 @@ bool wxTreeCtrl::IsBold(const wxTreeItemId& item) const
|
||||
|
||||
wxTreeItemId wxTreeCtrl::GetParent(const wxTreeItemId& item) const
|
||||
{
|
||||
wxCHECK_MSG( item.IsOk(), wxTreeItemId(), "invalid tree item" );
|
||||
wxCHECK_MSG( item.IsOk(), wxTreeItemId(), _T("invalid tree item") );
|
||||
|
||||
return item.m_pItem->GetParent();
|
||||
}
|
||||
|
||||
wxTreeItemId wxTreeCtrl::GetFirstChild(const wxTreeItemId& item, long& cookie) const
|
||||
{
|
||||
wxCHECK_MSG( item.IsOk(), wxTreeItemId(), "invalid tree item" );
|
||||
wxCHECK_MSG( item.IsOk(), wxTreeItemId(), _T("invalid tree item") );
|
||||
|
||||
cookie = 0;
|
||||
return GetNextChild(item, cookie);
|
||||
@ -562,7 +562,7 @@ wxTreeItemId wxTreeCtrl::GetFirstChild(const wxTreeItemId& item, long& cookie) c
|
||||
|
||||
wxTreeItemId wxTreeCtrl::GetNextChild(const wxTreeItemId& item, long& cookie) const
|
||||
{
|
||||
wxCHECK_MSG( item.IsOk(), wxTreeItemId(), "invalid tree item" );
|
||||
wxCHECK_MSG( item.IsOk(), wxTreeItemId(), _T("invalid tree item") );
|
||||
|
||||
wxArrayTreeItems& children = item.m_pItem->GetChildren();
|
||||
if ( (size_t)cookie < children.Count() )
|
||||
@ -578,7 +578,7 @@ wxTreeItemId wxTreeCtrl::GetNextChild(const wxTreeItemId& item, long& cookie) co
|
||||
|
||||
wxTreeItemId wxTreeCtrl::GetLastChild(const wxTreeItemId& item) const
|
||||
{
|
||||
wxCHECK_MSG( item.IsOk(), wxTreeItemId(), "invalid tree item" );
|
||||
wxCHECK_MSG( item.IsOk(), wxTreeItemId(), _T("invalid tree item") );
|
||||
|
||||
wxArrayTreeItems& children = item.m_pItem->GetChildren();
|
||||
return (children.IsEmpty() ? wxTreeItemId() : wxTreeItemId(children.Last()));
|
||||
@ -586,7 +586,7 @@ wxTreeItemId wxTreeCtrl::GetLastChild(const wxTreeItemId& item) const
|
||||
|
||||
wxTreeItemId wxTreeCtrl::GetNextSibling(const wxTreeItemId& item) const
|
||||
{
|
||||
wxCHECK_MSG( item.IsOk(), wxTreeItemId(), "invalid tree item" );
|
||||
wxCHECK_MSG( item.IsOk(), wxTreeItemId(), _T("invalid tree item") );
|
||||
|
||||
wxGenericTreeItem *i = item.m_pItem;
|
||||
wxGenericTreeItem *parent = i->GetParent();
|
||||
@ -606,7 +606,7 @@ wxTreeItemId wxTreeCtrl::GetNextSibling(const wxTreeItemId& item) const
|
||||
|
||||
wxTreeItemId wxTreeCtrl::GetPrevSibling(const wxTreeItemId& item) const
|
||||
{
|
||||
wxCHECK_MSG( item.IsOk(), wxTreeItemId(), "invalid tree item" );
|
||||
wxCHECK_MSG( item.IsOk(), wxTreeItemId(), _T("invalid tree item") );
|
||||
|
||||
wxGenericTreeItem *i = item.m_pItem;
|
||||
wxGenericTreeItem *parent = i->GetParent();
|
||||
@ -626,25 +626,25 @@ wxTreeItemId wxTreeCtrl::GetPrevSibling(const wxTreeItemId& item) const
|
||||
|
||||
wxTreeItemId wxTreeCtrl::GetFirstVisibleItem() const
|
||||
{
|
||||
wxFAIL_MSG("not implemented");
|
||||
wxFAIL_MSG(_T("not implemented"));
|
||||
|
||||
return wxTreeItemId();
|
||||
}
|
||||
|
||||
wxTreeItemId wxTreeCtrl::GetNextVisible(const wxTreeItemId& item) const
|
||||
{
|
||||
wxCHECK_MSG( item.IsOk(), wxTreeItemId(), "invalid tree item" );
|
||||
wxCHECK_MSG( item.IsOk(), wxTreeItemId(), _T("invalid tree item") );
|
||||
|
||||
wxFAIL_MSG("not implemented");
|
||||
wxFAIL_MSG(_T("not implemented"));
|
||||
|
||||
return wxTreeItemId();
|
||||
}
|
||||
|
||||
wxTreeItemId wxTreeCtrl::GetPrevVisible(const wxTreeItemId& item) const
|
||||
{
|
||||
wxCHECK_MSG( item.IsOk(), wxTreeItemId(), "invalid tree item" );
|
||||
wxCHECK_MSG( item.IsOk(), wxTreeItemId(), _T("invalid tree item") );
|
||||
|
||||
wxFAIL_MSG("not implemented");
|
||||
wxFAIL_MSG(_T("not implemented"));
|
||||
|
||||
return wxTreeItemId();
|
||||
}
|
||||
@ -688,7 +688,7 @@ wxTreeItemId wxTreeCtrl::AddRoot(const wxString& text,
|
||||
int image, int selImage,
|
||||
wxTreeItemData *data)
|
||||
{
|
||||
wxCHECK_MSG( !m_anchor, wxTreeItemId(), "tree can have only one root" );
|
||||
wxCHECK_MSG( !m_anchor, wxTreeItemId(), _T("tree can have only one root") );
|
||||
|
||||
wxClientDC dc(this);
|
||||
m_anchor = new wxGenericTreeItem((wxGenericTreeItem *)NULL, text, dc,
|
||||
@ -727,7 +727,7 @@ wxTreeItemId wxTreeCtrl::InsertItem(const wxTreeItemId& parentId,
|
||||
|
||||
int index = parent->GetChildren().Index(idPrevious.m_pItem);
|
||||
wxASSERT_MSG( index != wxNOT_FOUND,
|
||||
"previous item in wxTreeCtrl::InsertItem() is not a sibling" );
|
||||
_T("previous item in wxTreeCtrl::InsertItem() is not a sibling") );
|
||||
return DoInsertItem(parentId, (size_t)index, text, image, selImage, data);
|
||||
}
|
||||
|
||||
@ -954,27 +954,27 @@ void wxTreeCtrl::EnsureVisible(const wxTreeItemId& item)
|
||||
|
||||
void wxTreeCtrl::ScrollTo(const wxTreeItemId& WXUNUSED(item))
|
||||
{
|
||||
wxFAIL_MSG("not implemented");
|
||||
wxFAIL_MSG(_T("not implemented"));
|
||||
}
|
||||
|
||||
wxTextCtrl *wxTreeCtrl::EditLabel( const wxTreeItemId& WXUNUSED(item),
|
||||
wxClassInfo* WXUNUSED(textCtrlClass) )
|
||||
{
|
||||
wxFAIL_MSG("not implemented");
|
||||
wxFAIL_MSG(_T("not implemented"));
|
||||
|
||||
return (wxTextCtrl*)NULL;
|
||||
}
|
||||
|
||||
wxTextCtrl *wxTreeCtrl::GetEditControl() const
|
||||
{
|
||||
wxFAIL_MSG("not implemented");
|
||||
wxFAIL_MSG(_T("not implemented"));
|
||||
|
||||
return (wxTextCtrl*)NULL;
|
||||
}
|
||||
|
||||
void wxTreeCtrl::EndEditLabel(const wxTreeItemId& WXUNUSED(item), bool WXUNUSED(discardChanges))
|
||||
{
|
||||
wxFAIL_MSG("not implemented");
|
||||
wxFAIL_MSG(_T("not implemented"));
|
||||
}
|
||||
|
||||
// FIXME: tree sorting functions are not reentrant and not MT-safe!
|
||||
@ -983,7 +983,7 @@ static wxTreeCtrl *s_treeBeingSorted = NULL;
|
||||
static int tree_ctrl_compare_func(wxGenericTreeItem **item1,
|
||||
wxGenericTreeItem **item2)
|
||||
{
|
||||
wxCHECK_MSG( s_treeBeingSorted, 0, "bug in wxTreeCtrl::SortChildren()" );
|
||||
wxCHECK_MSG( s_treeBeingSorted, 0, _T("bug in wxTreeCtrl::SortChildren()") );
|
||||
|
||||
return s_treeBeingSorted->OnCompareItems(*item1, *item2);
|
||||
}
|
||||
@ -991,17 +991,17 @@ static int tree_ctrl_compare_func(wxGenericTreeItem **item1,
|
||||
int wxTreeCtrl::OnCompareItems(const wxTreeItemId& item1,
|
||||
const wxTreeItemId& item2)
|
||||
{
|
||||
return strcmp(GetItemText(item1), GetItemText(item2));
|
||||
return wxStrcmp(GetItemText(item1), GetItemText(item2));
|
||||
}
|
||||
|
||||
void wxTreeCtrl::SortChildren(const wxTreeItemId& itemId)
|
||||
{
|
||||
wxCHECK_RET( itemId.IsOk(), "invalid tree item" );
|
||||
wxCHECK_RET( itemId.IsOk(), _T("invalid tree item") );
|
||||
|
||||
wxGenericTreeItem *item = itemId.m_pItem;
|
||||
|
||||
wxCHECK_RET( !s_treeBeingSorted,
|
||||
"wxTreeCtrl::SortChildren is not reentrant" );
|
||||
_T("wxTreeCtrl::SortChildren is not reentrant") );
|
||||
|
||||
wxArrayTreeItems& children = item->GetChildren();
|
||||
if ( children.Count() > 1 )
|
||||
@ -1092,7 +1092,7 @@ void wxTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc)
|
||||
}
|
||||
else
|
||||
{
|
||||
wxFAIL_MSG("wxDC::GetFont() failed!");
|
||||
wxFAIL_MSG(_T("wxDC::GetFont() failed!"));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user