replaced T() makro with wxT() due to namespace probs, _T() exists, too

fixed compilation problems, mainly in html code
compiles and links fine on Solaris, runs with samples and Mahogany


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Karsten Ballüder
1999-10-08 14:35:56 +00:00
parent b4a2ab728b
commit 223d09f6b5
336 changed files with 3755 additions and 3776 deletions

View File

@@ -66,7 +66,7 @@ bool wxControl::OS2CreateControl(const wxChar *classname, WXDWORD style)
if ( !m_hWnd )
{
#ifdef __WXDEBUG__
wxLogError(T("Failed to create a control of class '%s'"), classname);
wxLogError(wxT("Failed to create a control of class '%s'"), classname);
#endif // DEBUG
return FALSE;

View File

@@ -114,50 +114,50 @@ wxFont wxNullFont;
wxColour wxNullColour;
// Default window names
const wxChar *wxButtonNameStr = T("button");
const wxChar *wxCanvasNameStr = T("canvas");
const wxChar *wxCheckBoxNameStr = T("check");
const wxChar *wxChoiceNameStr = T("choice");
const wxChar *wxComboBoxNameStr = T("comboBox");
const wxChar *wxDialogNameStr = T("dialog");
const wxChar *wxFrameNameStr = T("frame");
const wxChar *wxGaugeNameStr = T("gauge");
const wxChar *wxStaticBoxNameStr = T("groupBox");
const wxChar *wxListBoxNameStr = T("listBox");
const wxChar *wxStaticTextNameStr = T("message");
const wxChar *wxStaticBitmapNameStr = T("message");
const wxChar *wxMultiTextNameStr = T("multitext");
const wxChar *wxPanelNameStr = T("panel");
const wxChar *wxRadioBoxNameStr = T("radioBox");
const wxChar *wxRadioButtonNameStr = T("radioButton");
const wxChar *wxBitmapRadioButtonNameStr = T("radioButton");
const wxChar *wxScrollBarNameStr = T("scrollBar");
const wxChar *wxSliderNameStr = T("slider");
const wxChar *wxStaticNameStr = T("static");
const wxChar *wxTextCtrlWindowNameStr = T("textWindow");
const wxChar *wxTextCtrlNameStr = T("text");
const wxChar *wxVirtListBoxNameStr = T("virtListBox");
const wxChar *wxButtonBarNameStr = T("buttonbar");
const wxChar *wxEnhDialogNameStr = T("Shell");
const wxChar *wxToolBarNameStr = T("toolbar");
const wxChar *wxStatusLineNameStr = T("status_line");
const wxChar *wxEmptyString = T("");
const wxChar *wxGetTextFromUserPromptStr = T("Input Text");
const wxChar *wxMessageBoxCaptionStr = T("Message");
const wxChar *wxFileSelectorPromptStr = T("Select a file");
const wxChar *wxFileSelectorDefaultWildcardStr = T("*.*");
const wxChar *wxInternalErrorStr = T("wxWindows Internal Error");
const wxChar *wxFatalErrorStr = T("wxWindows Fatal Error");
const wxChar *wxTreeCtrlNameStr = T("treeCtrl");
const wxChar *wxDirDialogNameStr = T("wxDirCtrl");
const wxChar *wxDirDialogDefaultFolderStr = T("/");
const wxChar *wxButtonNameStr = wxT("button");
const wxChar *wxCanvasNameStr = wxT("canvas");
const wxChar *wxCheckBoxNameStr = wxT("check");
const wxChar *wxChoiceNameStr = wxT("choice");
const wxChar *wxComboBoxNameStr = wxT("comboBox");
const wxChar *wxDialogNameStr = wxT("dialog");
const wxChar *wxFrameNameStr = wxT("frame");
const wxChar *wxGaugeNameStr = wxT("gauge");
const wxChar *wxStaticBoxNameStr = wxT("groupBox");
const wxChar *wxListBoxNameStr = wxT("listBox");
const wxChar *wxStaticTextNameStr = wxT("message");
const wxChar *wxStaticBitmapNameStr = wxT("message");
const wxChar *wxMultiTextNameStr = wxT("multitext");
const wxChar *wxPanelNameStr = wxT("panel");
const wxChar *wxRadioBoxNameStr = wxT("radioBox");
const wxChar *wxRadioButtonNameStr = wxT("radioButton");
const wxChar *wxBitmapRadioButtonNameStr = wxT("radioButton");
const wxChar *wxScrollBarNameStr = wxT("scrollBar");
const wxChar *wxSliderNameStr = wxT("slider");
const wxChar *wxStaticNameStr = wxT("static");
const wxChar *wxTextCtrlWindowNameStr = wxT("textWindow");
const wxChar *wxTextCtrlNameStr = wxT("text");
const wxChar *wxVirtListBoxNameStr = wxT("virtListBox");
const wxChar *wxButtonBarNameStr = wxT("buttonbar");
const wxChar *wxEnhDialogNameStr = wxT("Shell");
const wxChar *wxToolBarNameStr = wxT("toolbar");
const wxChar *wxStatusLineNameStr = wxT("status_line");
const wxChar *wxEmptyString = wxT("");
const wxChar *wxGetTextFromUserPromptStr = wxT("Input Text");
const wxChar *wxMessageBoxCaptionStr = wxT("Message");
const wxChar *wxFileSelectorPromptStr = wxT("Select a file");
const wxChar *wxFileSelectorDefaultWildcardStr = wxT("*.*");
const wxChar *wxInternalErrorStr = wxT("wxWindows Internal Error");
const wxChar *wxFatalErrorStr = wxT("wxWindows Fatal Error");
const wxChar *wxTreeCtrlNameStr = wxT("treeCtrl");
const wxChar *wxDirDialogNameStr = wxT("wxDirCtrl");
const wxChar *wxDirDialogDefaultFolderStr = wxT("/");
// See wx/utils.h
const wxChar *wxFloatToStringStr = T("%.2f");
const wxChar *wxDoubleToStringStr = T("%.2f");
const wxChar *wxFloatToStringStr = wxT("%.2f");
const wxChar *wxDoubleToStringStr = wxT("%.2f");
#ifdef __WXMSW__
const wxChar *wxUserResourceStr = T("TEXT");
const wxChar *wxUserResourceStr = wxT("TEXT");
#endif
#if wxUSE_SHARED_LIBRARY

View File

@@ -203,12 +203,12 @@ wxPaintDC::wxPaintDC()
wxPaintDC::wxPaintDC(wxWindow *canvas)
{
wxCHECK_RET( canvas, T("NULL canvas in wxPaintDC ctor") );
wxCHECK_RET( canvas, wxT("NULL canvas in wxPaintDC ctor") );
#ifdef __WXDEBUG__
if ( g_isPainting <= 0 )
{
wxFAIL_MSG( T("wxPaintDC may be created only in EVT_PAINT handler!") );
wxFAIL_MSG( wxT("wxPaintDC may be created only in EVT_PAINT handler!") );
return;
}
@@ -240,7 +240,7 @@ wxPaintDC::~wxPaintDC()
size_t index;
wxPaintDCInfo *info = FindInCache(&index);
wxCHECK_RET( info, T("existing DC should have a cache entry") );
wxCHECK_RET( info, wxT("existing DC should have a cache entry") );
if ( !--info->count )
{

View File

@@ -52,7 +52,7 @@ wxPrinterDC::wxPrinterDC(const wxString& driver_name, const wxString& device_nam
m_isInteractive = interactive;
if (!file.IsNull() && file != T(""))
if (!file.IsNull() && file != wxT(""))
m_printData.SetFilename(file);
/*
@@ -90,9 +90,9 @@ wxPrinterDC::wxPrinterDC(const wxString& driver_name, const wxString& device_nam
else
#endif
*/
if ((!driver_name.IsNull() && driver_name != T("")) &&
(!device_name.IsNull() && device_name != T("")) &&
(!file.IsNull() && file != T("")))
if ((!driver_name.IsNull() && driver_name != wxT("")) &&
(!device_name.IsNull() && device_name != wxT("")) &&
(!file.IsNull() && file != wxT("")))
{
m_hDC = (WXHDC) ::DevOpenDC( hab
,OD_QUEUED
@@ -199,7 +199,7 @@ bool wxPrinterDC::StartDoc(const wxString& message)
if (ret <= 0)
{
DWORD lastError = GetLastError();
wxLogDebug(T("wxDC::StartDoc failed with error: %d\n"), lastError);
wxLogDebug(wxT("wxDC::StartDoc failed with error: %d\n"), lastError);
}
#endif
return (ret > 0);
@@ -278,7 +278,7 @@ static bool wxGetDefaultDeviceName(wxString& deviceName, wxString& portName)
GlobalFree(pd.hDevMode);
pd.hDevMode=NULL;
}
return ( deviceName != T("") );
return ( deviceName != wxT("") );
*/
return(TRUE);
}
@@ -297,7 +297,7 @@ WXHDC WXDLLEXPORT wxGetPrinterDC(const wxPrintData& printDataConst)
wxChar* deviceName;
wxChar* portName = (wxChar*) NULL; // Obsolete in WIN32
if (devNameStr == T(""))
if (devNameStr == wxT(""))
deviceName = (wxChar*) NULL;
else
deviceName = WXSTRINGCAST devNameStr;
@@ -309,13 +309,13 @@ WXHDC WXDLLEXPORT wxGetPrinterDC(const wxPrintData& printDataConst)
if ( hDevMode )
lpDevMode = (DEVMODE*) GlobalLock(hDevMode);
if (devNameStr == T(""))
if (devNameStr == wxT(""))
{
// Retrieve the default device name
wxString portName;
bool ret = wxGetDefaultDeviceName(devNameStr, portName);
wxASSERT_MSG( ret, T("Could not get default device name.") );
wxASSERT_MSG( ret, wxT("Could not get default device name.") );
deviceName = WXSTRINGCAST devNameStr;
}

View File

@@ -116,11 +116,11 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
// otherwise it would look too strange)
// const wxChar *dlg;
// if ( style & wxRESIZE_BORDER )
// dlg = T("wxResizeableDialog");
// dlg = wxT("wxResizeableDialog");
// else if ( style & wxCAPTION )
// dlg = T("wxCaptionDialog");
// dlg = wxT("wxCaptionDialog");
// else
// dlg = T("wxNoCaptionDialog");
// dlg = wxT("wxNoCaptionDialog");
// MSWCreate(m_windowId, parent, NULL, this, NULL,
// x, y, width, height,
// 0, // style is not used if we have dlg template
@@ -131,7 +131,7 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
//
// if ( !hwnd )
// {
// wxLogError(T("Failed to create dialog."));
// wxLogError(wxT("Failed to create dialog."));
//
// return FALSE;
// }

View File

@@ -193,7 +193,7 @@ bool wxFont::RealizeResource()
{
// VZ: the old code returned FALSE in this case, but it doesn't seem
// to make sense because the font _was_ created
wxLogDebug(T("Calling wxFont::RealizeResource() twice"));
wxLogDebug(wxT("Calling wxFont::RealizeResource() twice"));
return TRUE;
}
@@ -207,7 +207,7 @@ bool wxFont::RealizeResource()
{
case wxSCRIPT:
// ff_family = FF_SCRIPT ;
ff_face = T("Script") ;
ff_face = wxT("Script") ;
break ;
case wxDECORATIVE:
@@ -216,24 +216,24 @@ bool wxFont::RealizeResource()
case wxROMAN:
// ff_family = FF_ROMAN;
ff_face = T("Times New Roman") ;
ff_face = wxT("Times New Roman") ;
break;
case wxTELETYPE:
case wxMODERN:
// ff_family = FF_MODERN;
ff_face = T("Courier New") ;
ff_face = wxT("Courier New") ;
break;
case wxSWISS:
// ff_family = FF_SWISS;
ff_face = T("Arial") ;
ff_face = wxT("Arial") ;
break;
case wxDEFAULT:
default:
// ff_family = FF_SWISS;
ff_face = T("Arial") ;
ff_face = wxT("Arial") ;
}
BYTE ff_italic;
@@ -245,7 +245,7 @@ bool wxFont::RealizeResource()
break;
default:
wxFAIL_MSG(T("unknown font slant"));
wxFAIL_MSG(wxT("unknown font slant"));
// fall through
case wxNORMAL:
@@ -256,7 +256,7 @@ bool wxFont::RealizeResource()
switch ( M_FONTDATA->m_weight )
{
default:
wxFAIL_MSG(T("unknown font weight"));
wxFAIL_MSG(wxT("unknown font weight"));
// fall through
case wxNORMAL:
@@ -378,7 +378,7 @@ bool wxFont::RealizeResource()
break;
default:
wxFAIL_MSG(T("unsupported encoding"));
wxFAIL_MSG(wxT("unsupported encoding"));
// fall through
case wxFONTENCODING_SYSTEM:

View File

@@ -339,7 +339,7 @@ wxStatusBar* wxFrame::CreateStatusBar(int number, long style, wxWindowID id,
{
// VZ: calling CreateStatusBar twice is an error - why anyone would do it?
wxCHECK_MSG( m_frameStatusBar == NULL, FALSE,
T("recreating status bar in wxFrame") );
wxT("recreating status bar in wxFrame") );
m_frameStatusBar = OnCreateStatusBar(number, style, id,
name);
@@ -354,14 +354,14 @@ wxStatusBar* wxFrame::CreateStatusBar(int number, long style, wxWindowID id,
void wxFrame::SetStatusText(const wxString& text, int number)
{
wxCHECK_RET( m_frameStatusBar != NULL, T("no statusbar to set text for") );
wxCHECK_RET( m_frameStatusBar != NULL, wxT("no statusbar to set text for") );
m_frameStatusBar->SetStatusText(text, number);
}
void wxFrame::SetStatusWidths(int n, const int widths_field[])
{
wxCHECK_RET( m_frameStatusBar != NULL, T("no statusbar to set widths for") );
wxCHECK_RET( m_frameStatusBar != NULL, wxT("no statusbar to set widths for") );
m_frameStatusBar->SetStatusWidths(n, widths_field);
PositionStatusBar();
@@ -401,7 +401,7 @@ void wxFrame::SetMenuBar(wxMenuBar *menu_bar)
return;
}
// Fix this in wxMenuBar wxCHECK_RET( !menu_bar->GetFrame(), T("this menubar is already attached") );
// Fix this in wxMenuBar wxCHECK_RET( !menu_bar->GetFrame(), wxT("this menubar is already attached") );
if (m_frameMenuBar)
delete m_frameMenuBar;
@@ -711,7 +711,7 @@ void wxFrame::ClientToScreen(int *x, int *y) const
wxToolBar* wxFrame::CreateToolBar(long style, wxWindowID id, const wxString& name)
{
wxCHECK_MSG( m_frameToolBar == NULL, FALSE,
T("recreating toolbar in wxFrame") );
wxT("recreating toolbar in wxFrame") );
wxToolBar* toolBar = OnCreateToolBar(style, id, name);
if (toolBar)

View File

@@ -99,7 +99,7 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id,
msFlags |= ZYZGS_3D;
HWND wx_button =
CreateWindowEx(MakeExtendedStyle(m_windowStyle), T("zYzGauge"), NULL, msFlags,
CreateWindowEx(MakeExtendedStyle(m_windowStyle), wxT("zYzGauge"), NULL, msFlags,
0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId,
wxGetInstance(), NULL);
@@ -636,7 +636,7 @@ bool wxGauge::SetBackgroundColour(const wxColour& col)
/* static global variables */
//static wxChar gszzYzGaugeClass[] = T("zYzGauge");
//static wxChar gszzYzGaugeClass[] = wxT("zYzGauge");
/* window word position definitions */
@@ -748,7 +748,7 @@ bool wxGauge::SetBackgroundColour(const wxColour& col)
/* Get a DC to determine whether device is mono or not, and set
* default foreground/background colors as appropriate.
*/
// hdc = CreateIC(T("DISPLAY"), NULL, NULL, 0L) ;
// hdc = CreateIC(wxT("DISPLAY"), NULL, NULL, 0L) ;
// if (hdc)
// {
/* check for mono-display */
@@ -903,7 +903,7 @@ bool wxGauge::SetBackgroundColour(const wxColour& col)
// hFont = (HFONT) SelectObject(hdc, pgauge->hFont);
/* build up a string to blit out--ie the meaning of life: "42%" */
// wsprintf(ach, T("%3d%%"), (WORD)((DWORD)iPos * 100 / iRange));
// wsprintf(ach, wxT("%3d%%"), (WORD)((DWORD)iPos * 100 / iRange));
/* Win32s has no GetTextExtent(); let's try GetTextExtentPoint() instead */
//#if defined(__WIN32__)
// GetTextExtentPoint(hdc, ach, wGomerX = lstrlen(ach), &size);

View File

@@ -93,4 +93,3 @@ void wxMenuItem::Check(bool bDoCheck)
// TODO
m_bChecked = bDoCheck;
}
}

View File

@@ -151,7 +151,7 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id,
long style,
const wxString& name)
{
wxCHECK_MSG( parent, FALSE, T("can't create wxWindow without parent") );
wxCHECK_MSG( parent, FALSE, wxT("can't create wxWindow without parent") );
if ( !CreateBase(parent, id, pos, size, style, wxDefaultValidator, name) )
return FALSE;
@@ -174,7 +174,7 @@ wxWindow::~wxWindow()
if (m_hWnd)
{
if(!WinDestroyWindow(GetHWND()))
wxLogLastError(T("DestroyWindow"));
wxLogLastError(wxT("DestroyWindow"));
// remove hWnd <-> wxWindow association
wxRemoveHandleAssociation(this);
}
@@ -509,12 +509,12 @@ void wxWindow::PMDetachWindowMenu()
int chars = (int)WinSendMsg(hMenu, MM_QUERYITEMTEXT, MPFROM2SHORT(i, N), buf);
if ( !chars )
{
wxLogLastError(T("GetMenuString"));
wxLogLastError(wxT("GetMenuString"));
continue;
}
if ( wxStrcmp(buf, T("&Window")) == 0 )
if ( wxStrcmp(buf, wxT("&Window")) == 0 )
{
WinSendMsg(hMenu, MM_DELETEITEM, MPFROM2SHORT(i, TRUE), 0);
break;
@@ -528,7 +528,7 @@ void wxAssociateWinWithHandle(HWND hWnd, wxWindow *win)
// adding NULL hWnd is (first) surely a result of an error and
// (secondly) breaks menu command processing
wxCHECK_RET( hWnd != (HWND)NULL,
T("attempt to add a NULL hWnd to window list ignored") );
wxT("attempt to add a NULL hWnd to window list ignored") );
if ( !wxWinHandleList->Find((long)hWnd) )
wxWinHandleList->Append((long)hWnd, win);
@@ -549,12 +549,12 @@ void wxRemoveHandleAssociation(wxWindow *win)
void wxWindow::SubclassWin(WXHWND hWnd)
{
wxASSERT_MSG( !m_oldWndProc, T("subclassing window twice?") );
wxASSERT_MSG( !m_oldWndProc, wxT("subclassing window twice?") );
HWND hwnd = (HWND)hWnd;
/*
* TODO: implement something like this:
* wxCHECK_RET( ::IsWindow(hwnd), T("invalid HWND in SubclassWin") );
* wxCHECK_RET( ::IsWindow(hwnd), wxT("invalid HWND in SubclassWin") );
*
* wxAssociateWinWithHandle(hwnd, this);
*
@@ -576,7 +576,7 @@ void wxWindow::UnsubclassWin()
{
m_hWnd = 0;
wxCHECK_RET( ::IsWindow(hwnd), T("invalid HWND in UnsubclassWin") );
wxCHECK_RET( ::IsWindow(hwnd), wxT("invalid HWND in UnsubclassWin") );
FARPROC farProc = (FARPROC) GetWindowLong(hwnd, GWL_WNDPROC);
if ( (m_oldWndProc != 0) && (farProc != (FARPROC) m_oldWndProc) )