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

@@ -206,7 +206,7 @@ gint wxapp_idle_callback( gpointer WXUNUSED(data) )
void wxapp_install_idle_handler()
{
wxASSERT_MSG( wxTheApp->m_idleTag == 0, T("attempt to install idle handler twice") );
wxASSERT_MSG( wxTheApp->m_idleTag == 0, wxT("attempt to install idle handler twice") );
/* this routine gets called by all event handlers
indicating that the idle is over. */
@@ -397,7 +397,7 @@ bool wxApp::OnInitGui()
index |= (g >> (5 - vis->green_prec)) << vis->green_shift;
index |= (b >> (5 - vis->blue_prec)) << vis->blue_shift;
#else
wxFAIL_MSG( T("Unsupported graphics hardware") );
wxFAIL_MSG( wxT("Unsupported graphics hardware") );
#endif
}
m_colorCube[ (r*1024) + (g*32) + b ] = index;
@@ -640,7 +640,7 @@ void wxApp::CleanUp()
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
if (wxDebugContext::CountObjectsLeft() > 0)
{
wxLogDebug(T("There were memory leaks.\n"));
wxLogDebug(wxT("There were memory leaks.\n"));
wxDebugContext::Dump();
wxDebugContext::PrintStatistics();
}
@@ -681,7 +681,7 @@ int wxEntry( int argc, char *argv[] )
if (!wxTheApp)
{
wxCHECK_MSG( wxApp::GetInitializerFunction(), -1,
T("wxWindows error: No initializer - use IMPLEMENT_APP macro.\n") );
wxT("wxWindows error: No initializer - use IMPLEMENT_APP macro.\n") );
wxAppInitializerFunction app_ini = wxApp::GetInitializerFunction();
@@ -690,7 +690,7 @@ int wxEntry( int argc, char *argv[] )
wxTheApp = (wxApp*) test_app;
}
wxCHECK_MSG( wxTheApp, -1, T("wxWindows error: no application object") );
wxCHECK_MSG( wxTheApp, -1, wxT("wxWindows error: no application object") );
wxTheApp->argc = argc;
#if wxUSE_UNICODE
@@ -794,7 +794,7 @@ wxApp::GetStdIcon(int which) const
return wxIcon(warning_xpm);
default:
wxFAIL_MSG(T("requested non existent standard icon"));
wxFAIL_MSG(wxT("requested non existent standard icon"));
// still fall through
case wxICON_HAND:

View File

@@ -60,7 +60,7 @@ bool wxMask::Create( const wxBitmap& WXUNUSED(bitmap),
m_bitmap = (GdkBitmap*) NULL;
}
wxFAIL_MSG( T("TODO") );
wxFAIL_MSG( wxT("TODO") );
return FALSE;
}
@@ -74,7 +74,7 @@ bool wxMask::Create( const wxBitmap& WXUNUSED(bitmap),
m_bitmap = (GdkBitmap*) NULL;
}
wxFAIL_MSG( T("not implemented") );
wxFAIL_MSG( wxT("not implemented") );
return FALSE;
}
@@ -89,7 +89,7 @@ bool wxMask::Create( const wxBitmap& bitmap )
if (!bitmap.Ok()) return FALSE;
wxCHECK_MSG( bitmap.GetBitmap(), FALSE, T("Cannot create mask from colour bitmap") );
wxCHECK_MSG( bitmap.GetBitmap(), FALSE, wxT("Cannot create mask from colour bitmap") );
m_bitmap = gdk_pixmap_new( (GdkWindow*) &gdk_root_parent, bitmap.GetWidth(), bitmap.GetHeight(), 1 );
@@ -160,13 +160,13 @@ wxBitmap::wxBitmap()
wxBitmap::wxBitmap( int width, int height, int depth )
{
wxCHECK_RET( (width > 0) && (height > 0), T("invalid bitmap size") )
wxCHECK_RET( (width > 0) && (height > 0), wxT("invalid bitmap size") )
GdkWindow *parent = (GdkWindow*) &gdk_root_parent;
if (depth == -1) depth = gdk_window_get_visual( parent )->depth;
wxCHECK_RET( (depth == gdk_window_get_visual( parent )->depth) ||
(depth == 1), T("invalid bitmap depth") )
(depth == 1), wxT("invalid bitmap depth") )
m_refData = new wxBitmapRefData();
M_BMPDATA->m_mask = (wxMask *) NULL;
@@ -188,7 +188,7 @@ wxBitmap::wxBitmap( int width, int height, int depth )
wxBitmap::wxBitmap( const char **bits )
{
wxCHECK_RET( bits != NULL, T("invalid bitmap data") )
wxCHECK_RET( bits != NULL, wxT("invalid bitmap data") )
m_refData = new wxBitmapRefData();
@@ -211,7 +211,7 @@ wxBitmap::wxBitmap( const char **bits )
wxBitmap::wxBitmap( char **bits )
{
wxCHECK_RET( bits != NULL, T("invalid bitmap data") )
wxCHECK_RET( bits != NULL, wxT("invalid bitmap data") )
m_refData = new wxBitmapRefData();
@@ -220,7 +220,7 @@ wxBitmap::wxBitmap( char **bits )
M_BMPDATA->m_pixmap = gdk_pixmap_create_from_xpm_d( parent, &mask, NULL, (gchar **) bits );
wxCHECK_RET( M_BMPDATA->m_pixmap, T("couldn't create pixmap") );
wxCHECK_RET( M_BMPDATA->m_pixmap, wxT("couldn't create pixmap") );
if (mask)
{
@@ -259,7 +259,7 @@ wxBitmap::wxBitmap( const char bits[], int width, int height, int WXUNUSED(depth
M_BMPDATA->m_height = height;
M_BMPDATA->m_bpp = 1;
wxCHECK_RET( M_BMPDATA->m_bitmap, T("couldn't create bitmap") );
wxCHECK_RET( M_BMPDATA->m_bitmap, wxT("couldn't create bitmap") );
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
}
@@ -293,35 +293,35 @@ bool wxBitmap::Ok() const
int wxBitmap::GetHeight() const
{
wxCHECK_MSG( Ok(), -1, T("invalid bitmap") );
wxCHECK_MSG( Ok(), -1, wxT("invalid bitmap") );
return M_BMPDATA->m_height;
}
int wxBitmap::GetWidth() const
{
wxCHECK_MSG( Ok(), -1, T("invalid bitmap") );
wxCHECK_MSG( Ok(), -1, wxT("invalid bitmap") );
return M_BMPDATA->m_width;
}
int wxBitmap::GetDepth() const
{
wxCHECK_MSG( Ok(), -1, T("invalid bitmap") );
wxCHECK_MSG( Ok(), -1, wxT("invalid bitmap") );
return M_BMPDATA->m_bpp;
}
wxMask *wxBitmap::GetMask() const
{
wxCHECK_MSG( Ok(), (wxMask *) NULL, T("invalid bitmap") );
wxCHECK_MSG( Ok(), (wxMask *) NULL, wxT("invalid bitmap") );
return M_BMPDATA->m_mask;
}
void wxBitmap::SetMask( wxMask *mask )
{
wxCHECK_RET( Ok(), T("invalid bitmap") );
wxCHECK_RET( Ok(), wxT("invalid bitmap") );
if (M_BMPDATA->m_mask) delete M_BMPDATA->m_mask;
@@ -330,7 +330,7 @@ void wxBitmap::SetMask( wxMask *mask )
bool wxBitmap::SaveFile( const wxString &name, int type, wxPalette *WXUNUSED(palette) )
{
wxCHECK_MSG( Ok(), FALSE, T("invalid bitmap") );
wxCHECK_MSG( Ok(), FALSE, wxT("invalid bitmap") );
if (type == wxBITMAP_TYPE_PNG)
{
@@ -420,14 +420,14 @@ void wxBitmap::SetPixmap( GdkPixmap *pixmap )
GdkPixmap *wxBitmap::GetPixmap() const
{
wxCHECK_MSG( Ok(), (GdkPixmap *) NULL, T("invalid bitmap") );
wxCHECK_MSG( Ok(), (GdkPixmap *) NULL, wxT("invalid bitmap") );
return M_BMPDATA->m_pixmap;
}
GdkBitmap *wxBitmap::GetBitmap() const
{
wxCHECK_MSG( Ok(), (GdkBitmap *) NULL, T("invalid bitmap") );
wxCHECK_MSG( Ok(), (GdkBitmap *) NULL, wxT("invalid bitmap") );
return M_BMPDATA->m_bitmap;
}

View File

@@ -121,7 +121,7 @@ bool wxBitmapButton::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, validator, name ))
{
wxFAIL_MSG( T("wxBitmapButton creation failed") );
wxFAIL_MSG( wxT("wxBitmapButton creation failed") );
return FALSE;
}
@@ -190,14 +190,14 @@ void wxBitmapButton::SetDefault()
void wxBitmapButton::SetLabel( const wxString &label )
{
wxCHECK_RET( m_widget != NULL, T("invalid button") );
wxCHECK_RET( m_widget != NULL, wxT("invalid button") );
wxControl::SetLabel( label );
}
wxString wxBitmapButton::GetLabel() const
{
wxCHECK_MSG( m_widget != NULL, T(""), T("invalid button") );
wxCHECK_MSG( m_widget != NULL, wxT(""), wxT("invalid button") );
return wxControl::GetLabel();
}
@@ -208,7 +208,7 @@ void wxBitmapButton::ApplyWidgetStyle()
void wxBitmapButton::SetBitmap()
{
wxCHECK_RET( m_widget != NULL, T("invalid button") );
wxCHECK_RET( m_widget != NULL, wxT("invalid button") );
wxBitmap the_one;
@@ -243,7 +243,7 @@ void wxBitmapButton::SetBitmap()
void wxBitmapButton::SetBitmapDisabled( const wxBitmap& bitmap )
{
wxCHECK_RET( m_widget != NULL, T("invalid button") );
wxCHECK_RET( m_widget != NULL, wxT("invalid button") );
if ( ! m_disabled.Ok() ) return;
m_disabled = bitmap;
@@ -253,7 +253,7 @@ void wxBitmapButton::SetBitmapDisabled( const wxBitmap& bitmap )
void wxBitmapButton::SetBitmapFocus( const wxBitmap& bitmap )
{
wxCHECK_RET( m_widget != NULL, T("invalid button") );
wxCHECK_RET( m_widget != NULL, wxT("invalid button") );
if ( ! m_focus.Ok() ) return;
m_focus = bitmap;
@@ -263,7 +263,7 @@ void wxBitmapButton::SetBitmapFocus( const wxBitmap& bitmap )
void wxBitmapButton::SetBitmapLabel( const wxBitmap& bitmap )
{
wxCHECK_RET( m_widget != NULL, T("invalid button") );
wxCHECK_RET( m_widget != NULL, wxT("invalid button") );
if (!m_bitmap.Ok()) return;
m_bitmap = bitmap;
@@ -273,7 +273,7 @@ void wxBitmapButton::SetBitmapLabel( const wxBitmap& bitmap )
void wxBitmapButton::SetBitmapSelected( const wxBitmap& bitmap )
{
wxCHECK_RET( m_widget != NULL, T("invalid button") );
wxCHECK_RET( m_widget != NULL, wxT("invalid button") );
if ( ! m_selected.Ok() ) return;
m_selected = bitmap;
@@ -314,5 +314,5 @@ void wxBitmapButton::EndSelect()
m_isSelected = FALSE;
SetBitmap();
}
#endif
#endif

View File

@@ -111,7 +111,7 @@ int wxBrush::GetStyle() const
{
if (m_refData == NULL)
{
wxFAIL_MSG( T("invalid brush") );
wxFAIL_MSG( wxT("invalid brush") );
return 0;
}
@@ -122,7 +122,7 @@ wxColour &wxBrush::GetColour() const
{
if (m_refData == NULL)
{
wxFAIL_MSG( T("invalid brush") );
wxFAIL_MSG( wxT("invalid brush") );
return wxNullColour;
}
@@ -133,7 +133,7 @@ wxBitmap *wxBrush::GetStipple() const
{
if (m_refData == NULL)
{
wxFAIL_MSG( T("invalid brush") );
wxFAIL_MSG( wxT("invalid brush") );
return &wxNullBitmap;
}

View File

@@ -78,7 +78,7 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label,
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, validator, name ))
{
wxFAIL_MSG( T("wxButton creation failed") );
wxFAIL_MSG( wxT("wxButton creation failed") );
return FALSE;
}
@@ -142,7 +142,7 @@ wxSize wxButton::GetDefaultSize()
void wxButton::SetLabel( const wxString &label )
{
wxCHECK_RET( m_widget != NULL, T("invalid button") );
wxCHECK_RET( m_widget != NULL, wxT("invalid button") );
wxControl::SetLabel( label );

View File

@@ -75,7 +75,7 @@ bool wxCheckBox::Create(wxWindow *parent,
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, validator, name ))
{
wxFAIL_MSG( T("wxCheckBox creation failed") );
wxFAIL_MSG( wxT("wxCheckBox creation failed") );
return FALSE;
}
@@ -136,7 +136,7 @@ bool wxCheckBox::Create(wxWindow *parent,
void wxCheckBox::SetValue( bool state )
{
wxCHECK_RET( m_widgetCheckbox != NULL, T("invalid checkbox") );
wxCHECK_RET( m_widgetCheckbox != NULL, wxT("invalid checkbox") );
if (state == GetValue())
return;
@@ -155,14 +155,14 @@ void wxCheckBox::SetValue( bool state )
bool wxCheckBox::GetValue() const
{
wxCHECK_MSG( m_widgetCheckbox != NULL, FALSE, T("invalid checkbox") );
wxCHECK_MSG( m_widgetCheckbox != NULL, FALSE, wxT("invalid checkbox") );
return GTK_TOGGLE_BUTTON(m_widgetCheckbox)->active;
}
void wxCheckBox::SetLabel( const wxString& label )
{
wxCHECK_RET( m_widgetLabel != NULL, T("invalid checkbox") );
wxCHECK_RET( m_widgetLabel != NULL, wxT("invalid checkbox") );
wxControl::SetLabel( label );

View File

@@ -44,7 +44,7 @@ wxCheckListBox::wxCheckListBox(wxWindow *parent, wxWindowID id,
bool wxCheckListBox::IsChecked( int index ) const
{
wxCHECK_MSG( m_list != NULL, FALSE, T("invalid checklistbox") );
wxCHECK_MSG( m_list != NULL, FALSE, wxT("invalid checklistbox") );
GList *child = g_list_nth( m_list->children, index );
if (child)
@@ -54,16 +54,16 @@ bool wxCheckListBox::IsChecked( int index ) const
wxString str = wxString(label->label,*wxConvCurrent);
return (str[1] == T('X'));
return (str[1] == wxT('X'));
}
wxFAIL_MSG(T("wrong checklistbox index"));
wxFAIL_MSG(wxT("wrong checklistbox index"));
return FALSE;
}
void wxCheckListBox::Check( int index, bool check )
{
wxCHECK_RET( m_list != NULL, T("invalid checklistbox") );
wxCHECK_RET( m_list != NULL, wxT("invalid checklistbox") );
GList *child = g_list_nth( m_list->children, index );
if (child)
@@ -73,19 +73,19 @@ void wxCheckListBox::Check( int index, bool check )
wxString str = wxString(label->label,*wxConvCurrent);
if (check == (str[1] == T('X'))) return;
if (check == (str[1] == wxT('X'))) return;
if (check)
str.SetChar( 1, T('X') );
str.SetChar( 1, wxT('X') );
else
str.SetChar( 1, T('-') );
str.SetChar( 1, wxT('-') );
gtk_label_set( label, str.mbc_str() );
return;
}
wxFAIL_MSG(T("wrong checklistbox index"));
wxFAIL_MSG(wxT("wrong checklistbox index"));
}
int wxCheckListBox::GetItemHeight() const

View File

@@ -75,7 +75,7 @@ bool wxChoice::Create( wxWindow *parent, wxWindowID id,
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, validator, name ))
{
wxFAIL_MSG( T("wxChoice creation failed") );
wxFAIL_MSG( wxT("wxChoice creation failed") );
return FALSE;
}
@@ -125,7 +125,7 @@ wxChoice::~wxChoice()
void wxChoice::AppendCommon( const wxString &item )
{
wxCHECK_RET( m_widget != NULL, T("invalid choice") );
wxCHECK_RET( m_widget != NULL, wxT("invalid choice") );
GtkWidget *menu = gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) );
GtkWidget *menu_item = gtk_menu_item_new_with_label( item.mbc_str() );
@@ -172,7 +172,7 @@ void wxChoice::Append( const wxString &item, wxClientData *clientData )
void wxChoice::SetClientData( int n, void* clientData )
{
wxCHECK_RET( m_widget != NULL, T("invalid combobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
wxNode *node = m_clientDataList.Nth( n );
if (!node) return;
@@ -182,7 +182,7 @@ void wxChoice::SetClientData( int n, void* clientData )
void* wxChoice::GetClientData( int n )
{
wxCHECK_MSG( m_widget != NULL, NULL, T("invalid combobox") );
wxCHECK_MSG( m_widget != NULL, NULL, wxT("invalid combobox") );
wxNode *node = m_clientDataList.Nth( n );
if (!node) return NULL;
@@ -192,7 +192,7 @@ void* wxChoice::GetClientData( int n )
void wxChoice::SetClientObject( int n, wxClientData* clientData )
{
wxCHECK_RET( m_widget != NULL, T("invalid combobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
wxNode *node = m_clientObjectList.Nth( n );
if (!node) return;
@@ -205,7 +205,7 @@ void wxChoice::SetClientObject( int n, wxClientData* clientData )
wxClientData* wxChoice::GetClientObject( int n )
{
wxCHECK_MSG( m_widget != NULL, (wxClientData*) NULL, T("invalid combobox") );
wxCHECK_MSG( m_widget != NULL, (wxClientData*) NULL, wxT("invalid combobox") );
wxNode *node = m_clientObjectList.Nth( n );
if (!node) return (wxClientData*) NULL;
@@ -215,7 +215,7 @@ wxClientData* wxChoice::GetClientObject( int n )
void wxChoice::Clear()
{
wxCHECK_RET( m_widget != NULL, T("invalid choice") );
wxCHECK_RET( m_widget != NULL, wxT("invalid choice") );
gtk_option_menu_remove_menu( GTK_OPTION_MENU(m_widget) );
GtkWidget *menu = gtk_menu_new();
@@ -235,12 +235,12 @@ void wxChoice::Clear()
void wxChoice::Delete( int WXUNUSED(n) )
{
wxFAIL_MSG( T("wxChoice:Delete not implemented") );
wxFAIL_MSG( wxT("wxChoice:Delete not implemented") );
}
int wxChoice::FindString( const wxString &string ) const
{
wxCHECK_MSG( m_widget != NULL, -1, T("invalid choice") );
wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid choice") );
// If you read this code once and you think you understand
// it, then you are very wrong. Robert Roebling.
@@ -255,7 +255,7 @@ int wxChoice::FindString( const wxString &string ) const
if (bin->child) label = GTK_LABEL(bin->child);
if (!label) label = GTK_LABEL( GTK_BUTTON(m_widget)->child );
wxASSERT_MSG( label != NULL , T("wxChoice: invalid label") );
wxASSERT_MSG( label != NULL , wxT("wxChoice: invalid label") );
if (string == wxString(label->label,*wxConvCurrent))
return count;
@@ -274,7 +274,7 @@ int wxChoice::GetColumns() const
int wxChoice::GetSelection()
{
wxCHECK_MSG( m_widget != NULL, -1, T("invalid choice") );
wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid choice") );
GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) );
int count = 0;
@@ -292,7 +292,7 @@ int wxChoice::GetSelection()
wxString wxChoice::GetString( int n ) const
{
wxCHECK_MSG( m_widget != NULL, T(""), T("invalid choice") );
wxCHECK_MSG( m_widget != NULL, wxT(""), wxT("invalid choice") );
GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) );
int count = 0;
@@ -306,7 +306,7 @@ wxString wxChoice::GetString( int n ) const
if (bin->child) label = GTK_LABEL(bin->child);
if (!label) label = GTK_LABEL( GTK_BUTTON(m_widget)->child );
wxASSERT_MSG( label != NULL , T("wxChoice: invalid label") );
wxASSERT_MSG( label != NULL , wxT("wxChoice: invalid label") );
return wxString(label->label,*wxConvCurrent);
}
@@ -314,25 +314,25 @@ wxString wxChoice::GetString( int n ) const
count++;
}
wxFAIL_MSG( T("wxChoice: invalid index in GetString()") );
wxFAIL_MSG( wxT("wxChoice: invalid index in GetString()") );
return T("");
return wxT("");
}
wxString wxChoice::GetStringSelection() const
{
wxCHECK_MSG( m_widget != NULL, T(""), T("invalid choice") );
wxCHECK_MSG( m_widget != NULL, wxT(""), wxT("invalid choice") );
GtkLabel *label = GTK_LABEL( GTK_BUTTON(m_widget)->child );
wxASSERT_MSG( label != NULL , T("wxChoice: invalid label") );
wxASSERT_MSG( label != NULL , wxT("wxChoice: invalid label") );
return wxString(label->label,*wxConvCurrent);
}
int wxChoice::Number() const
{
wxCHECK_MSG( m_widget != NULL, 0, T("invalid choice") );
wxCHECK_MSG( m_widget != NULL, 0, wxT("invalid choice") );
GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) );
int count = 0;
@@ -351,7 +351,7 @@ void wxChoice::SetColumns( int WXUNUSED(n) )
void wxChoice::SetSelection( int n )
{
wxCHECK_RET( m_widget != NULL, T("invalid choice") );
wxCHECK_RET( m_widget != NULL, wxT("invalid choice") );
int tmp = n;
gtk_option_menu_set_history( GTK_OPTION_MENU(m_widget), (gint)tmp );
@@ -359,7 +359,7 @@ void wxChoice::SetSelection( int n )
void wxChoice::SetStringSelection( const wxString &string )
{
wxCHECK_RET( m_widget != NULL, T("invalid choice") );
wxCHECK_RET( m_widget != NULL, wxT("invalid choice") );
int n = FindString( string );
if (n != -1) SetSelection( n );

View File

@@ -450,7 +450,7 @@ void wxClipboard::Clear()
bool wxClipboard::Open()
{
wxCHECK_MSG( !m_open, FALSE, T("clipboard already open") );
wxCHECK_MSG( !m_open, FALSE, wxT("clipboard already open") );
m_open = TRUE;
@@ -459,9 +459,9 @@ bool wxClipboard::Open()
bool wxClipboard::SetData( wxDataObject *data )
{
wxCHECK_MSG( m_open, FALSE, T("clipboard not open") );
wxCHECK_MSG( m_open, FALSE, wxT("clipboard not open") );
wxCHECK_MSG( data, FALSE, T("data is invalid") );
wxCHECK_MSG( data, FALSE, wxT("data is invalid") );
Clear();
@@ -470,9 +470,9 @@ bool wxClipboard::SetData( wxDataObject *data )
bool wxClipboard::AddData( wxDataObject *data )
{
wxCHECK_MSG( m_open, FALSE, T("clipboard not open") );
wxCHECK_MSG( m_open, FALSE, wxT("clipboard not open") );
wxCHECK_MSG( data, FALSE, T("data is invalid") );
wxCHECK_MSG( data, FALSE, wxT("data is invalid") );
/* if clipboard has been cleared before, create new data broker */
if (!m_dataBroker) m_dataBroker = new wxDataBroker();
@@ -483,7 +483,7 @@ bool wxClipboard::AddData( wxDataObject *data )
/* get native format id of new data object */
GdkAtom format = data->GetFormat().GetAtom();
wxCHECK_MSG( format, FALSE, T("data has invalid format") );
wxCHECK_MSG( format, FALSE, wxT("data has invalid format") );
/* This should happen automatically, but to be on the safe side */
m_ownsClipboard = FALSE;
@@ -563,20 +563,20 @@ bool wxClipboard::AddData( wxDataObject *data )
void wxClipboard::Close()
{
wxCHECK_RET( m_open, T("clipboard not open") );
wxCHECK_RET( m_open, wxT("clipboard not open") );
m_open = FALSE;
}
bool wxClipboard::IsSupported( wxDataFormat format )
{
wxCHECK_MSG( m_open, FALSE, T("clipboard not open") );
wxCHECK_MSG( m_open, FALSE, wxT("clipboard not open") );
/* store requested format to be asked for by callbacks */
m_targetRequested = format.GetAtom();
wxCHECK_MSG( m_targetRequested, FALSE, T("invalid clipboard format") );
wxCHECK_MSG( m_targetRequested, FALSE, wxT("invalid clipboard format") );
m_formatSupported = FALSE;
@@ -604,7 +604,7 @@ bool wxClipboard::IsSupported( wxDataFormat format )
bool wxClipboard::GetData( wxDataObject *data )
{
wxCHECK_MSG( m_open, FALSE, T("clipboard not open") );
wxCHECK_MSG( m_open, FALSE, wxT("clipboard not open") );
/* is data supported by clipboard ? */
@@ -618,7 +618,7 @@ bool wxClipboard::GetData( wxDataObject *data )
m_targetRequested = data->GetFormat().GetAtom();
wxCHECK_MSG( m_targetRequested, FALSE, T("invalid clipboard format") );
wxCHECK_MSG( m_targetRequested, FALSE, wxT("invalid clipboard format") );
/* start query */
@@ -644,7 +644,7 @@ bool wxClipboard::GetData( wxDataObject *data )
/* this is a true error as we checked for the presence of such data before */
wxCHECK_MSG( m_formatSupported, FALSE, T("error retrieving data from clipboard") );
wxCHECK_MSG( m_formatSupported, FALSE, wxT("error retrieving data from clipboard") );
return TRUE;
}

View File

@@ -91,8 +91,8 @@ void wxColour::InitFromName( const wxString &colourName )
m_refData = new wxColourRefData();
if (!gdk_color_parse( colourName.mb_str(), &M_COLDATA->m_color ))
{
wxFAIL_MSG( T("wxColour: couldn't find colour") );
wxPrintf( T("Colourname %s.\n"), WXSTRINGCAST colourName );
wxFAIL_MSG( wxT("wxColour: couldn't find colour") );
wxPrintf( wxT("Colourname %s.\n"), WXSTRINGCAST colourName );
delete m_refData;
m_refData = (wxObjectRefData *) NULL;
@@ -149,21 +149,21 @@ void wxColour::Set( unsigned char red, unsigned char green, unsigned char blue )
unsigned char wxColour::Red() const
{
wxCHECK_MSG( Ok(), 0, T("invalid colour") );
wxCHECK_MSG( Ok(), 0, wxT("invalid colour") );
return (unsigned char)(M_COLDATA->m_color.red >> SHIFT);
}
unsigned char wxColour::Green() const
{
wxCHECK_MSG( Ok(), 0, T("invalid colour") );
wxCHECK_MSG( Ok(), 0, wxT("invalid colour") );
return (unsigned char)(M_COLDATA->m_color.green >> SHIFT);
}
unsigned char wxColour::Blue() const
{
wxCHECK_MSG( Ok(), 0, T("invalid colour") );
wxCHECK_MSG( Ok(), 0, wxT("invalid colour") );
return (unsigned char)(M_COLDATA->m_color.blue >> SHIFT);
}
@@ -211,14 +211,14 @@ void wxColour::CalcPixel( GdkColormap *cmap )
int wxColour::GetPixel() const
{
wxCHECK_MSG( Ok(), 0, T("invalid colour") );
wxCHECK_MSG( Ok(), 0, wxT("invalid colour") );
return M_COLDATA->m_color.pixel;
}
GdkColor *wxColour::GetColor() const
{
wxCHECK_MSG( Ok(), (GdkColor *) NULL, T("invalid colour") );
wxCHECK_MSG( Ok(), (GdkColor *) NULL, wxT("invalid colour") );
return &M_COLDATA->m_color;
}

View File

@@ -104,7 +104,7 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, validator, name ))
{
wxFAIL_MSG( T("wxComboBox creation failed") );
wxFAIL_MSG( wxT("wxComboBox creation failed") );
return FALSE;
}
@@ -180,7 +180,7 @@ wxComboBox::~wxComboBox()
void wxComboBox::AppendCommon( const wxString &item )
{
wxCHECK_RET( m_widget != NULL, T("invalid combobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
GtkWidget *list = GTK_COMBO(m_widget)->list;
@@ -228,7 +228,7 @@ void wxComboBox::Append( const wxString &item, wxClientData *clientData )
void wxComboBox::SetClientData( int n, void* clientData )
{
wxCHECK_RET( m_widget != NULL, T("invalid combobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
wxNode *node = m_clientDataList.Nth( n );
if (!node) return;
@@ -238,7 +238,7 @@ void wxComboBox::SetClientData( int n, void* clientData )
void* wxComboBox::GetClientData( int n )
{
wxCHECK_MSG( m_widget != NULL, NULL, T("invalid combobox") );
wxCHECK_MSG( m_widget != NULL, NULL, wxT("invalid combobox") );
wxNode *node = m_clientDataList.Nth( n );
if (!node) return NULL;
@@ -248,7 +248,7 @@ void* wxComboBox::GetClientData( int n )
void wxComboBox::SetClientObject( int n, wxClientData* clientData )
{
wxCHECK_RET( m_widget != NULL, T("invalid combobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
wxNode *node = m_clientObjectList.Nth( n );
if (!node) return;
@@ -261,7 +261,7 @@ void wxComboBox::SetClientObject( int n, wxClientData* clientData )
wxClientData* wxComboBox::GetClientObject( int n )
{
wxCHECK_MSG( m_widget != NULL, (wxClientData*)NULL, T("invalid combobox") );
wxCHECK_MSG( m_widget != NULL, (wxClientData*)NULL, wxT("invalid combobox") );
wxNode *node = m_clientDataList.Nth( n );
if (!node) return (wxClientData*) NULL;
@@ -271,7 +271,7 @@ wxClientData* wxComboBox::GetClientObject( int n )
void wxComboBox::Clear()
{
wxCHECK_RET( m_widget != NULL, T("invalid combobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
GtkWidget *list = GTK_COMBO(m_widget)->list;
gtk_list_clear_items( GTK_LIST(list), 0, Number() );
@@ -290,7 +290,7 @@ void wxComboBox::Clear()
void wxComboBox::Delete( int n )
{
wxCHECK_RET( m_widget != NULL, T("invalid combobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
GtkList *listbox = GTK_LIST( GTK_COMBO(m_widget)->list );
@@ -298,7 +298,7 @@ void wxComboBox::Delete( int n )
if (!child)
{
wxFAIL_MSG(T("wrong index"));
wxFAIL_MSG(wxT("wrong index"));
return;
}
@@ -323,7 +323,7 @@ void wxComboBox::Delete( int n )
int wxComboBox::FindString( const wxString &item )
{
wxCHECK_MSG( m_widget != NULL, -1, T("invalid combobox") );
wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid combobox") );
GtkWidget *list = GTK_COMBO(m_widget)->list;
@@ -344,7 +344,7 @@ int wxComboBox::FindString( const wxString &item )
int wxComboBox::GetSelection() const
{
wxCHECK_MSG( m_widget != NULL, -1, T("invalid combobox") );
wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid combobox") );
GtkWidget *list = GTK_COMBO(m_widget)->list;
@@ -366,7 +366,7 @@ int wxComboBox::GetSelection() const
wxString wxComboBox::GetString( int n ) const
{
wxCHECK_MSG( m_widget != NULL, T(""), T("invalid combobox") );
wxCHECK_MSG( m_widget != NULL, wxT(""), wxT("invalid combobox") );
GtkWidget *list = GTK_COMBO(m_widget)->list;
@@ -380,7 +380,7 @@ wxString wxComboBox::GetString( int n ) const
}
else
{
wxFAIL_MSG( T("wxComboBox: wrong index") );
wxFAIL_MSG( wxT("wxComboBox: wrong index") );
}
return str;
@@ -388,7 +388,7 @@ wxString wxComboBox::GetString( int n ) const
wxString wxComboBox::GetStringSelection() const
{
wxCHECK_MSG( m_widget != NULL, T(""), T("invalid combobox") );
wxCHECK_MSG( m_widget != NULL, wxT(""), wxT("invalid combobox") );
GtkWidget *list = GTK_COMBO(m_widget)->list;
@@ -400,14 +400,14 @@ wxString wxComboBox::GetStringSelection() const
return tmp;
}
wxFAIL_MSG( T("wxComboBox: no selection") );
wxFAIL_MSG( wxT("wxComboBox: no selection") );
return T("");
return wxT("");
}
int wxComboBox::Number() const
{
wxCHECK_MSG( m_widget != NULL, 0, T("invalid combobox") );
wxCHECK_MSG( m_widget != NULL, 0, wxT("invalid combobox") );
GtkWidget *list = GTK_COMBO(m_widget)->list;
@@ -419,7 +419,7 @@ int wxComboBox::Number() const
void wxComboBox::SetSelection( int n )
{
wxCHECK_RET( m_widget != NULL, T("invalid combobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
DisableEvents();
@@ -431,7 +431,7 @@ void wxComboBox::SetSelection( int n )
void wxComboBox::SetStringSelection( const wxString &string )
{
wxCHECK_RET( m_widget != NULL, T("invalid combobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
int res = FindString( string );
if (res == -1) return;
@@ -447,17 +447,17 @@ wxString wxComboBox::GetValue() const
void wxComboBox::SetValue( const wxString& value )
{
wxCHECK_RET( m_widget != NULL, T("invalid combobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
GtkWidget *entry = GTK_COMBO(m_widget)->entry;
wxString tmp = T("");
wxString tmp = wxT("");
if (!value.IsNull()) tmp = value;
gtk_entry_set_text( GTK_ENTRY(entry), tmp.mbc_str() );
}
void wxComboBox::Copy()
{
wxCHECK_RET( m_widget != NULL, T("invalid combobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
GtkWidget *entry = GTK_COMBO(m_widget)->entry;
#if (GTK_MINOR_VERSION > 0)
@@ -469,7 +469,7 @@ void wxComboBox::Copy()
void wxComboBox::Cut()
{
wxCHECK_RET( m_widget != NULL, T("invalid combobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
GtkWidget *entry = GTK_COMBO(m_widget)->entry;
#if (GTK_MINOR_VERSION > 0)
@@ -481,7 +481,7 @@ void wxComboBox::Cut()
void wxComboBox::Paste()
{
wxCHECK_RET( m_widget != NULL, T("invalid combobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
GtkWidget *entry = GTK_COMBO(m_widget)->entry;
#if (GTK_MINOR_VERSION > 0)
@@ -493,7 +493,7 @@ void wxComboBox::Paste()
void wxComboBox::SetInsertionPoint( long pos )
{
wxCHECK_RET( m_widget != NULL, T("invalid combobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
GtkWidget *entry = GTK_COMBO(m_widget)->entry;
gtk_entry_set_position( GTK_ENTRY(entry), (int)pos );
@@ -501,7 +501,7 @@ void wxComboBox::SetInsertionPoint( long pos )
void wxComboBox::SetInsertionPointEnd()
{
wxCHECK_RET( m_widget != NULL, T("invalid combobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
SetInsertionPoint( -1 );
}
@@ -521,7 +521,7 @@ long wxComboBox::GetLastPosition() const
void wxComboBox::Replace( long from, long to, const wxString& value )
{
wxCHECK_RET( m_widget != NULL, T("invalid combobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
// FIXME: not quite sure how to do this method right in multibyte mode
GtkWidget *entry = GTK_COMBO(m_widget)->entry;
@@ -533,7 +533,7 @@ void wxComboBox::Replace( long from, long to, const wxString& value )
void wxComboBox::Remove(long from, long to)
{
wxCHECK_RET( m_widget != NULL, T("invalid combobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
GtkWidget *entry = GTK_COMBO(m_widget)->entry;
gtk_editable_delete_text( GTK_EDITABLE(entry), (gint)from, (gint)to );

View File

@@ -39,13 +39,13 @@ wxControl::wxControl( wxWindow *parent,
void wxControl::SetLabel( const wxString &label )
{
m_label.Empty();
for ( const wxChar *pc = label; *pc != T('\0'); pc++ )
for ( const wxChar *pc = label; *pc != wxT('\0'); pc++ )
{
if ( *pc == T('&') )
if ( *pc == wxT('&') )
{
pc++; // skip it
#if 0 // it would be unused anyhow for now - kbd interface not done yet
if ( *pc != T('&') ) m_chAccel = *pc;
if ( *pc != wxT('&') ) m_chAccel = *pc;
#endif
}
m_label << *pc;

View File

@@ -95,7 +95,7 @@ wxCursor::wxCursor( int cursorId )
case wxCURSOR_BASED_ARROW_DOWN: gdk_cur = GDK_BASED_ARROW_DOWN; break;
*/
default:
wxFAIL_MSG(T("unsupported cursor type"));
wxFAIL_MSG(wxT("unsupported cursor type"));
// will use the standard one
case wxCURSOR_ARROW:
@@ -170,7 +170,7 @@ void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
return;
wxASSERT_MSG( !gs_savedCursor.Ok(),
T("forgot to call wxEndBusyCursor, will leak memory") );
wxT("forgot to call wxEndBusyCursor, will leak memory") );
gs_savedCursor = g_globalCursor;

View File

@@ -142,45 +142,45 @@ wxColour wxNullColour;
wxPalette wxNullPalette;
/* 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 *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 *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 *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 *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");
/* Dafaults for wxWindow etc. */
const wxSize wxDefaultSize(-1, -1);

View File

@@ -87,7 +87,7 @@ wxDataFormat::wxDataFormat( const GdkAtom atom )
m_type = wxDF_PRIVATE;
m_id = gdk_atom_name( m_atom );
if (m_id == T("file:ALL"))
if (m_id == wxT("file:ALL"))
{
m_type = wxDF_FILENAME;
}
@@ -100,21 +100,21 @@ void wxDataFormat::SetType( wxDataFormatId type )
if (m_type == wxDF_TEXT)
{
m_id = T("STRING");
m_id = wxT("STRING");
}
else
if (m_type == wxDF_BITMAP)
{
m_id = T("image/png");
m_id = wxT("image/png");
}
else
if (m_type == wxDF_FILENAME)
{
m_id = T("file:ALL");
m_id = wxT("file:ALL");
}
else
{
wxFAIL_MSG( T("invalid dataformat") );
wxFAIL_MSG( wxT("invalid dataformat") );
}
m_hasAtom = FALSE;
@@ -484,7 +484,7 @@ void wxPrivateDataObject::Free()
wxPrivateDataObject::wxPrivateDataObject()
{
wxString id = T("application/");
wxString id = wxT("application/");
id += wxTheApp->GetAppName();
m_format.SetId( id );

View File

@@ -112,11 +112,11 @@ wxWindowDC::wxWindowDC( wxWindow *window )
m_isMemDC = FALSE;
m_font = window->GetFont();
wxASSERT_MSG( window, T("DC needs a window") );
wxASSERT_MSG( window, wxT("DC needs a window") );
GtkWidget *widget = window->m_wxwindow;
wxASSERT_MSG( widget, T("DC needs a widget") );
wxASSERT_MSG( widget, wxT("DC needs a widget") );
m_window = widget->window;
@@ -154,18 +154,18 @@ wxWindowDC::~wxWindowDC()
void wxWindowDC::DoFloodFill( long WXUNUSED(x), long WXUNUSED(y),
const wxColour &WXUNUSED(col), int WXUNUSED(style) )
{
wxFAIL_MSG( T("wxWindowDC::DoFloodFill not implemented") );
wxFAIL_MSG( wxT("wxWindowDC::DoFloodFill not implemented") );
}
bool wxWindowDC::DoGetPixel( long WXUNUSED(x1), long WXUNUSED(y1), wxColour *WXUNUSED(col) ) const
{
wxFAIL_MSG( T("wxWindowDC::DoGetPixel not implemented") );
wxFAIL_MSG( wxT("wxWindowDC::DoGetPixel not implemented") );
return FALSE;
}
void wxWindowDC::DoDrawLine( long x1, long y1, long x2, long y2 )
{
wxCHECK_RET( Ok(), T("invalid window dc") );
wxCHECK_RET( Ok(), wxT("invalid window dc") );
if (m_pen.GetStyle() != wxTRANSPARENT)
{
@@ -179,7 +179,7 @@ void wxWindowDC::DoDrawLine( long x1, long y1, long x2, long y2 )
void wxWindowDC::DoCrossHair( long x, long y )
{
wxCHECK_RET( Ok(), T("invalid window dc") );
wxCHECK_RET( Ok(), wxT("invalid window dc") );
if (m_pen.GetStyle() != wxTRANSPARENT)
{
@@ -199,7 +199,7 @@ void wxWindowDC::DoCrossHair( long x, long y )
void wxWindowDC::DoDrawArc( long x1, long y1, long x2, long y2,
long xc, long yc )
{
wxCHECK_RET( Ok(), T("invalid window dc") );
wxCHECK_RET( Ok(), wxT("invalid window dc") );
long xx1 = XLOG2DEV(x1);
long yy1 = YLOG2DEV(y1);
@@ -252,7 +252,7 @@ void wxWindowDC::DoDrawArc( long x1, long y1, long x2, long y2,
void wxWindowDC::DoDrawEllipticArc( long x, long y, long width, long height, double sa, double ea )
{
wxCHECK_RET( Ok(), T("invalid window dc") );
wxCHECK_RET( Ok(), wxT("invalid window dc") );
long xx = XLOG2DEV(x);
long yy = YLOG2DEV(y);
@@ -281,7 +281,7 @@ void wxWindowDC::DoDrawEllipticArc( long x, long y, long width, long height, dou
void wxWindowDC::DoDrawPoint( long x, long y )
{
wxCHECK_RET( Ok(), T("invalid window dc") );
wxCHECK_RET( Ok(), wxT("invalid window dc") );
if ((m_pen.GetStyle() != wxTRANSPARENT) && m_window)
gdk_draw_point( m_window, m_penGC, XLOG2DEV(x), YLOG2DEV(y) );
@@ -291,7 +291,7 @@ void wxWindowDC::DoDrawPoint( long x, long y )
void wxWindowDC::DoDrawLines( int n, wxPoint points[], long xoffset, long yoffset )
{
wxCHECK_RET( Ok(), T("invalid window dc") );
wxCHECK_RET( Ok(), wxT("invalid window dc") );
if (m_pen.GetStyle() == wxTRANSPARENT) return;
if (n <= 0) return;
@@ -314,7 +314,7 @@ void wxWindowDC::DoDrawLines( int n, wxPoint points[], long xoffset, long yoffse
void wxWindowDC::DoDrawPolygon( int n, wxPoint points[], long xoffset, long yoffset, int WXUNUSED(fillStyle) )
{
wxCHECK_RET( Ok(), T("invalid window dc") );
wxCHECK_RET( Ok(), wxT("invalid window dc") );
if (n <= 0) return;
@@ -350,7 +350,7 @@ void wxWindowDC::DoDrawPolygon( int n, wxPoint points[], long xoffset, long yoff
void wxWindowDC::DoDrawRectangle( long x, long y, long width, long height )
{
wxCHECK_RET( Ok(), T("invalid window dc") );
wxCHECK_RET( Ok(), wxT("invalid window dc") );
long xx = XLOG2DEV(x);
long yy = YLOG2DEV(y);
@@ -379,7 +379,7 @@ void wxWindowDC::DoDrawRectangle( long x, long y, long width, long height )
void wxWindowDC::DoDrawRoundedRectangle( long x, long y, long width, long height, double radius )
{
wxCHECK_RET( Ok(), T("invalid window dc") );
wxCHECK_RET( Ok(), wxT("invalid window dc") );
if (radius < 0.0) radius = - radius * ((width < height) ? width : height);
@@ -451,7 +451,7 @@ void wxWindowDC::DoDrawRoundedRectangle( long x, long y, long width, long height
void wxWindowDC::DoDrawEllipse( long x, long y, long width, long height )
{
wxCHECK_RET( Ok(), T("invalid window dc") );
wxCHECK_RET( Ok(), wxT("invalid window dc") );
long xx = XLOG2DEV(x);
long yy = YLOG2DEV(y);
@@ -485,9 +485,9 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap,
long x, long y,
bool useMask )
{
wxCHECK_RET( Ok(), T("invalid window dc") );
wxCHECK_RET( Ok(), wxT("invalid window dc") );
wxCHECK_RET( bitmap.Ok(), T("invalid bitmap") );
wxCHECK_RET( bitmap.Ok(), wxT("invalid bitmap") );
/* scale/translate size and position */
@@ -566,9 +566,9 @@ bool wxWindowDC::DoBlit( long xdest, long ydest, long width, long height,
of the source dc, but scales correctly on the target dc and
knows about possible mask information in a memory dc. */
wxCHECK_MSG( Ok(), FALSE, T("invalid window dc") );
wxCHECK_MSG( Ok(), FALSE, wxT("invalid window dc") );
wxCHECK_MSG( source, FALSE, T("invalid source dc") );
wxCHECK_MSG( source, FALSE, wxT("invalid source dc") );
if (!m_window) return FALSE;
@@ -754,7 +754,7 @@ bool wxWindowDC::DoBlit( long xdest, long ydest, long width, long height,
void wxWindowDC::DoDrawText( const wxString &text, long x, long y )
{
wxCHECK_RET( Ok(), T("invalid window dc") );
wxCHECK_RET( Ok(), wxT("invalid window dc") );
if (!m_window) return;
@@ -819,7 +819,7 @@ long wxWindowDC::GetCharHeight() const
void wxWindowDC::Clear()
{
wxCHECK_RET( Ok(), T("invalid window dc") );
wxCHECK_RET( Ok(), wxT("invalid window dc") );
if (!m_window) return;
@@ -854,7 +854,7 @@ void wxWindowDC::SetFont( const wxFont &font )
void wxWindowDC::SetPen( const wxPen &pen )
{
wxCHECK_RET( Ok(), T("invalid window dc") );
wxCHECK_RET( Ok(), wxT("invalid window dc") );
if (m_pen == pen) return;
@@ -985,7 +985,7 @@ void wxWindowDC::SetPen( const wxPen &pen )
void wxWindowDC::SetBrush( const wxBrush &brush )
{
wxCHECK_RET( Ok(), T("invalid window dc") );
wxCHECK_RET( Ok(), wxT("invalid window dc") );
if (m_brush == brush) return;
@@ -1027,7 +1027,7 @@ void wxWindowDC::SetBackground( const wxBrush &brush )
/* CMB 21/7/98: Added SetBackground. Sets background brush
* for Clear() and bg colour for shapes filled with cross-hatch brush */
wxCHECK_RET( Ok(), T("invalid window dc") );
wxCHECK_RET( Ok(), wxT("invalid window dc") );
if (m_backgroundBrush == brush) return;
@@ -1069,7 +1069,7 @@ void wxWindowDC::SetBackground( const wxBrush &brush )
void wxWindowDC::SetLogicalFunction( int function )
{
wxCHECK_RET( Ok(), T("invalid window dc") );
wxCHECK_RET( Ok(), wxT("invalid window dc") );
if (m_logicalFunction == function) return;
@@ -1097,7 +1097,7 @@ void wxWindowDC::SetLogicalFunction( int function )
#endif
default:
{
wxFAIL_MSG( T("unsupported logical function") );
wxFAIL_MSG( wxT("unsupported logical function") );
break;
}
}
@@ -1113,7 +1113,7 @@ void wxWindowDC::SetLogicalFunction( int function )
void wxWindowDC::SetTextForeground( const wxColour &col )
{
wxCHECK_RET( Ok(), T("invalid window dc") );
wxCHECK_RET( Ok(), wxT("invalid window dc") );
if (m_textForegroundColour == col) return;
@@ -1128,7 +1128,7 @@ void wxWindowDC::SetTextForeground( const wxColour &col )
void wxWindowDC::SetTextBackground( const wxColour &col )
{
wxCHECK_RET( Ok(), T("invalid window dc") );
wxCHECK_RET( Ok(), wxT("invalid window dc") );
if (m_textBackgroundColour == col) return;
@@ -1143,7 +1143,7 @@ void wxWindowDC::SetTextBackground( const wxColour &col )
void wxWindowDC::SetBackgroundMode( int mode )
{
wxCHECK_RET( Ok(), T("invalid window dc") );
wxCHECK_RET( Ok(), wxT("invalid window dc") );
m_backgroundMode = mode;
@@ -1161,12 +1161,12 @@ void wxWindowDC::SetBackgroundMode( int mode )
void wxWindowDC::SetPalette( const wxPalette& WXUNUSED(palette) )
{
wxFAIL_MSG( T("wxWindowDC::SetPalette not implemented") );
wxFAIL_MSG( wxT("wxWindowDC::SetPalette not implemented") );
}
void wxWindowDC::DoSetClippingRegion( long x, long y, long width, long height )
{
wxCHECK_RET( Ok(), T("invalid window dc") );
wxCHECK_RET( Ok(), wxT("invalid window dc") );
wxDC::DoSetClippingRegion( x, y, width, height );
@@ -1185,7 +1185,7 @@ void wxWindowDC::DoSetClippingRegion( long x, long y, long width, long height )
void wxWindowDC::DoSetClippingRegionAsRegion( const wxRegion &region )
{
wxCHECK_RET( Ok(), T("invalid window dc") );
wxCHECK_RET( Ok(), wxT("invalid window dc") );
if (region.Empty())
{
@@ -1203,7 +1203,7 @@ void wxWindowDC::DoSetClippingRegionAsRegion( const wxRegion &region )
void wxWindowDC::DestroyClippingRegion()
{
wxCHECK_RET( Ok(), T("invalid window dc") );
wxCHECK_RET( Ok(), wxT("invalid window dc") );
wxDC::DestroyClippingRegion();
@@ -1306,7 +1306,7 @@ wxSize wxWindowDC::GetPPI() const
int wxWindowDC::GetDepth() const
{
wxFAIL_MSG(T("not implemented"));
wxFAIL_MSG(wxT("not implemented"));
return -1;
}
@@ -1429,7 +1429,7 @@ static void wx_spline_draw_point_array(wxDC *dc)
void wxWindowDC::DoDrawSpline( wxList *points )
{
wxCHECK_RET( Ok(), T("invalid window dc") );
wxCHECK_RET( Ok(), wxT("invalid window dc") );
wxPoint *p;
double cx1, cy1, cx2, cy2, cx3, cy3, cx4, cy4;

View File

@@ -288,7 +288,7 @@ bool wxDialog::Create( wxWindow *parent,
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
{
wxFAIL_MSG( T("wxDialog creation failed") );
wxFAIL_MSG( wxT("wxDialog creation failed") );
return FALSE;
}
@@ -356,7 +356,7 @@ wxDialog::~wxDialog()
void wxDialog::SetTitle( const wxString& title )
{
m_title = title;
if (m_title.IsNull()) m_title = T("");
if (m_title.IsNull()) m_title = wxT("");
gtk_window_set_title( GTK_WINDOW(m_widget), m_title.mbc_str() );
}
@@ -442,7 +442,7 @@ bool wxDialog::Destroy()
void wxDialog::OnSize( wxSizeEvent &WXUNUSED(event) )
{
wxASSERT_MSG( (m_widget != NULL), T("invalid dialog") );
wxASSERT_MSG( (m_widget != NULL), wxT("invalid dialog") );
#if wxUSE_CONSTRAINTS
if (GetAutoLayout())
@@ -477,8 +477,8 @@ void wxDialog::OnSize( wxSizeEvent &WXUNUSED(event) )
void wxDialog::DoSetSize( int x, int y, int width, int height, int sizeFlags )
{
wxASSERT_MSG( (m_widget != NULL), T("invalid dialog") );
wxASSERT_MSG( (m_wxwindow != NULL), T("invalid dialog") );
wxASSERT_MSG( (m_widget != NULL), wxT("invalid dialog") );
wxASSERT_MSG( (m_wxwindow != NULL), wxT("invalid dialog") );
if (m_resizing) return; /* I don't like recursions */
m_resizing = TRUE;
@@ -567,7 +567,7 @@ void wxDialog::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int heigh
void wxDialog::Centre( int direction )
{
wxASSERT_MSG( (m_widget != NULL), T("invalid dialog") );
wxASSERT_MSG( (m_widget != NULL), wxT("invalid dialog") );
int x = 0;
int y = 0;
@@ -623,14 +623,14 @@ void wxDialog::SetModal( bool WXUNUSED(flag) )
else
if (m_windowStyle & wxDIALOG_MODAL) m_windowStyle -= wxDIALOG_MODAL;
*/
wxFAIL_MSG( T("wxDialog:SetModal obsolete now") );
wxFAIL_MSG( wxT("wxDialog:SetModal obsolete now") );
}
int wxDialog::ShowModal()
{
if (IsModal())
{
wxFAIL_MSG( T("wxDialog:ShowModal called twice") );
wxFAIL_MSG( wxT("wxDialog:ShowModal called twice") );
return GetReturnCode();
}
@@ -653,7 +653,7 @@ void wxDialog::EndModal( int retCode )
if (!IsModal())
{
wxFAIL_MSG( T("wxDialog:EndModal called twice") );
wxFAIL_MSG( wxT("wxDialog:EndModal called twice") );
return;
}

View File

@@ -367,9 +367,9 @@ bool wxDropTarget::RequestData( wxDataFormat format )
if (!m_dragWidget) return FALSE;
/*
wxPrintf( T("format: %s.\n"), format.GetId().c_str() );
if (format.GetType() == wxDF_PRIVATE) wxPrintf( T("private data.\n") );
if (format.GetType() == wxDF_TEXT) wxPrintf( T("text data.\n") );
wxPrintf( wxT("format: %s.\n"), format.GetId().c_str() );
if (format.GetType() == wxDF_PRIVATE) wxPrintf( wxT("private data.\n") );
if (format.GetType() == wxDF_TEXT) wxPrintf( wxT("text data.\n") );
*/
#if wxUSE_THREADS
@@ -437,7 +437,7 @@ bool wxDropTarget::GetData( wxDataObject *data_object )
void wxDropTarget::UnregisterWidget( GtkWidget *widget )
{
wxCHECK_RET( widget != NULL, T("unregister widget is NULL") );
wxCHECK_RET( widget != NULL, wxT("unregister widget is NULL") );
gtk_drag_dest_unset( widget );
@@ -456,7 +456,7 @@ void wxDropTarget::UnregisterWidget( GtkWidget *widget )
void wxDropTarget::RegisterWidget( GtkWidget *widget )
{
wxCHECK_RET( widget != NULL, T("register widget is NULL") );
wxCHECK_RET( widget != NULL, wxT("register widget is NULL") );
/* gtk_drag_dest_set() determines what default behaviour we'd like
GTK to supply. we don't want to specify out targets (=formats)
@@ -817,7 +817,7 @@ wxDropSource::~wxDropSource(void)
wxDragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) )
{
wxASSERT_MSG( m_data, T("wxDragSource: no data") );
wxASSERT_MSG( m_data, wxT("wxDragSource: no data") );
if (!m_data) return (wxDragResult) wxDragNone;

View File

@@ -117,14 +117,14 @@ wxFileDialog::wxFileDialog( wxWindow *parent, const wxString& message,
m_needParent = FALSE;
if (!PreCreation( parent, pos, wxDefaultSize ) ||
!CreateBase( parent, -1, pos, wxDefaultSize, style | wxDIALOG_MODAL, wxDefaultValidator, T("filedialog") ))
!CreateBase( parent, -1, pos, wxDefaultSize, style | wxDIALOG_MODAL, wxDefaultValidator, wxT("filedialog") ))
{
wxFAIL_MSG( T("wxXX creation failed") );
wxFAIL_MSG( wxT("wxXX creation failed") );
return;
}
m_message = message;
m_path = T("");
m_path = wxT("");
m_fileName = defaultFileName;
m_dir = defaultDir;
m_wildCard = wildCard;
@@ -141,7 +141,7 @@ wxFileDialog::wxFileDialog( wxWindow *parent, const wxString& message,
gtk_file_selection_hide_fileop_buttons( sel ); // they don't work anyway
m_path.Append(m_dir);
if( ! m_path.IsEmpty() && m_path.Last()!=T('/') )
if( ! m_path.IsEmpty() && m_path.Last()!=wxT('/') )
m_path.Append('/');
m_path.Append(m_fileName);
@@ -173,7 +173,7 @@ void wxFileDialog::SetPath(const wxString& path)
wxSplitPath(path, &m_dir, &m_fileName, &ext);
if (!ext.IsEmpty())
{
m_fileName += T(".");
m_fileName += wxT(".");
m_fileName += ext;
}
}
@@ -194,7 +194,7 @@ wxFileSelectorEx(const wxChar *message,
int x, int y)
{
// TODO: implement this somehow
return wxFileSelector(message, default_path, default_filename, T(""),
return wxFileSelector(message, default_path, default_filename, wxT(""),
wildcard, flags, parent, x, y);
}
@@ -205,7 +205,7 @@ wxString wxFileSelector( const wxChar *title,
{
wxString filter2;
if ( defaultExtension && !filter )
filter2 = wxString(T("*.")) + wxString(defaultExtension) ;
filter2 = wxString(wxT("*.")) + wxString(defaultExtension) ;
else if ( filter )
filter2 = filter;
@@ -237,9 +237,9 @@ wxString wxLoadFileSelector( const wxChar *what, const wxChar *extension, const
wxString str = _("Load %s file");
wxSprintf(prompt, str, what);
if (*ext == T('.')) ext++;
if (*ext == wxT('.')) ext++;
wxChar wild[60];
wxSprintf(wild, T("*.%s"), ext);
wxSprintf(wild, wxT("*.%s"), ext);
return wxFileSelector (prompt, (const wxChar *) NULL, default_name, ext, wild, 0, parent);
}
@@ -253,9 +253,9 @@ wxString wxSaveFileSelector(const wxChar *what, const wxChar *extension, const w
wxString str = _("Save %s file");
wxSprintf(prompt, str, what);
if (*ext == T('.')) ext++;
if (*ext == wxT('.')) ext++;
wxChar wild[60];
wxSprintf(wild, T("*.%s"), ext);
wxSprintf(wild, wxT("*.%s"), ext);
return wxFileSelector (prompt, (const wxChar *) NULL, default_name, ext, wild, 0, parent);
}

View File

@@ -162,18 +162,18 @@ wxFont::wxFont( GdkFont *WXUNUSED(font), char *xFontName )
wxString tmp;
wxString fontname( xFontName );
wxStringTokenizer tn( fontname, T("-") );
wxStringTokenizer tn( fontname, wxT("-") );
tn.GetNextToken(); // foundry
M_FONTDATA->m_faceName = tn.GetNextToken(); // courier
tmp = tn.GetNextToken().MakeUpper();
if (tmp == T("BOLD")) M_FONTDATA->m_weight = wxBOLD;
if (tmp == wxT("BOLD")) M_FONTDATA->m_weight = wxBOLD;
tmp = tn.GetNextToken().MakeUpper();
if (tmp == T("I")) M_FONTDATA->m_style = wxITALIC;
if (tmp == T("O")) M_FONTDATA->m_style = wxITALIC;
if (tmp == wxT("I")) M_FONTDATA->m_style = wxITALIC;
if (tmp == wxT("O")) M_FONTDATA->m_style = wxITALIC;
tn.GetNextToken(); // set width
tn.GetNextToken(); // ?
@@ -187,12 +187,12 @@ wxFont::wxFont( GdkFont *WXUNUSED(font), char *xFontName )
tn.GetNextToken(); // y-res
tmp = tn.GetNextToken().MakeUpper();
if (tmp == T("M")) M_FONTDATA->m_family = wxMODERN;
else if (M_FONTDATA->m_faceName == T("TIMES")) M_FONTDATA->m_family = wxROMAN;
else if (M_FONTDATA->m_faceName == T("HELVETICA")) M_FONTDATA->m_family = wxSWISS;
else if (M_FONTDATA->m_faceName == T("LUCIDATYPEWRITER")) M_FONTDATA->m_family = wxTELETYPE;
else if (M_FONTDATA->m_faceName == T("LUCIDA")) M_FONTDATA->m_family = wxDECORATIVE;
else if (M_FONTDATA->m_faceName == T("UTOPIA")) M_FONTDATA->m_family = wxSCRIPT;
if (tmp == wxT("M")) M_FONTDATA->m_family = wxMODERN;
else if (M_FONTDATA->m_faceName == wxT("TIMES")) M_FONTDATA->m_family = wxROMAN;
else if (M_FONTDATA->m_faceName == wxT("HELVETICA")) M_FONTDATA->m_family = wxSWISS;
else if (M_FONTDATA->m_faceName == wxT("LUCIDATYPEWRITER")) M_FONTDATA->m_family = wxTELETYPE;
else if (M_FONTDATA->m_faceName == wxT("LUCIDA")) M_FONTDATA->m_family = wxDECORATIVE;
else if (M_FONTDATA->m_faceName == wxT("UTOPIA")) M_FONTDATA->m_family = wxSCRIPT;
}
bool wxFont::Create( int pointSize,
@@ -235,42 +235,42 @@ wxFont::~wxFont()
int wxFont::GetPointSize() const
{
wxCHECK_MSG( Ok(), 0, T("invalid font") );
wxCHECK_MSG( Ok(), 0, wxT("invalid font") );
return M_FONTDATA->m_pointSize;
}
wxString wxFont::GetFaceName() const
{
wxCHECK_MSG( Ok(), T(""), T("invalid font") );
wxCHECK_MSG( Ok(), wxT(""), wxT("invalid font") );
return M_FONTDATA->m_faceName;
}
int wxFont::GetFamily() const
{
wxCHECK_MSG( Ok(), 0, T("invalid font") );
wxCHECK_MSG( Ok(), 0, wxT("invalid font") );
return M_FONTDATA->m_family;
}
int wxFont::GetStyle() const
{
wxCHECK_MSG( Ok(), 0, T("invalid font") );
wxCHECK_MSG( Ok(), 0, wxT("invalid font") );
return M_FONTDATA->m_style;
}
int wxFont::GetWeight() const
{
wxCHECK_MSG( Ok(), 0, T("invalid font") );
wxCHECK_MSG( Ok(), 0, wxT("invalid font") );
return M_FONTDATA->m_weight;
}
bool wxFont::GetUnderlined() const
{
wxCHECK_MSG( Ok(), FALSE, T("invalid font") );
wxCHECK_MSG( Ok(), FALSE, wxT("invalid font") );
return M_FONTDATA->m_underlined;
}
@@ -278,7 +278,7 @@ bool wxFont::GetUnderlined() const
wxFontEncoding wxFont::GetEncoding() const
{
wxCHECK_MSG( Ok(), wxFONTENCODING_DEFAULT, T("invalid font") );
wxCHECK_MSG( Ok(), wxFONTENCODING_DEFAULT, wxT("invalid font") );
return M_FONTDATA->m_encoding;
}
@@ -344,7 +344,7 @@ GdkFont *wxFont::GetInternalFont( float scale ) const
{
if (!Ok())
{
wxFAIL_MSG( T("invalid font") );
wxFAIL_MSG( wxT("invalid font") );
return (GdkFont*) NULL;
}
@@ -387,7 +387,7 @@ GdkFont *wxFont::GetInternalFont( float scale ) const
if (!font)
{
wxLogError(T("could not load any font"));
wxLogError(wxT("could not load any font"));
}
return font;

View File

@@ -106,13 +106,13 @@ wxFontDialog::wxFontDialog( wxWindow *parent, wxFontData *WXUNUSED(data) )
if (!PreCreation( parent, wxDefaultPosition, wxDefaultSize ) ||
!CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE,
wxDefaultValidator, T("fontdialog") ))
wxDefaultValidator, wxT("fontdialog") ))
{
wxFAIL_MSG( T("wxXX creation failed") );
wxFAIL_MSG( wxT("wxXX creation failed") );
return;
}
#ifndef __WXGTK12__
wxFAIL_MSG( T("TODO") );
wxFAIL_MSG( wxT("TODO") );
#else // GTK+ 1.2
wxString m_message( _("Choose font") );
m_widget = gtk_font_selection_dialog_new( m_message.mbc_str() );

View File

@@ -365,7 +365,7 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
{
wxFAIL_MSG( T("wxFrame creation failed") );
wxFAIL_MSG( wxT("wxFrame creation failed") );
return FALSE;
}
@@ -382,7 +382,7 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
gtk_window_set_wmclass( GTK_WINDOW(m_widget), name.mb_str(), name.mb_str() );
#ifdef __WXDEBUG__
debug_focus_in( m_widget, T("wxFrame::m_widget"), name );
debug_focus_in( m_widget, wxT("wxFrame::m_widget"), name );
#endif
gtk_window_set_title( GTK_WINDOW(m_widget), title.mbc_str() );
@@ -398,7 +398,7 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
gtk_container_add( GTK_CONTAINER(m_widget), m_mainWidget );
#ifdef __WXDEBUG__
debug_focus_in( m_mainWidget, T("wxFrame::m_mainWidget"), name );
debug_focus_in( m_mainWidget, wxT("wxFrame::m_mainWidget"), name );
#endif
/* m_wxwindow only represents the client area without toolbar and menubar */
@@ -407,7 +407,7 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
gtk_container_add( GTK_CONTAINER(m_mainWidget), m_wxwindow );
#ifdef __WXDEBUG__
debug_focus_in( m_wxwindow, T("wxFrame::m_wxwindow"), name );
debug_focus_in( m_wxwindow, wxT("wxFrame::m_wxwindow"), name );
#endif
/* we donm't allow the frame to get the focus as otherwise
@@ -462,7 +462,7 @@ wxFrame::~wxFrame()
bool wxFrame::Show( bool show )
{
wxASSERT_MSG( (m_widget != NULL), T("invalid frame") );
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
if (show && !m_sizeSet)
{
@@ -479,7 +479,7 @@ bool wxFrame::Show( bool show )
bool wxFrame::Destroy()
{
wxASSERT_MSG( (m_widget != NULL), T("invalid frame") );
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
if (!wxPendingDelete.Member(this)) wxPendingDelete.Append(this);
@@ -488,10 +488,10 @@ bool wxFrame::Destroy()
void wxFrame::DoSetSize( int x, int y, int width, int height, int sizeFlags )
{
wxASSERT_MSG( (m_widget != NULL), T("invalid frame") );
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
/* this shouldn't happen: wxFrame, wxMDIParentFrame and wxMDIChildFrame have m_wxwindow */
wxASSERT_MSG( (m_wxwindow != NULL), T("invalid frame") );
wxASSERT_MSG( (m_wxwindow != NULL), wxT("invalid frame") );
/* avoid recursions */
if (m_resizing) return;
@@ -553,7 +553,7 @@ void wxFrame::DoSetSize( int x, int y, int width, int height, int sizeFlags )
void wxFrame::Centre( int direction )
{
wxASSERT_MSG( (m_widget != NULL), T("invalid frame") );
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
int x = 0;
int y = 0;
@@ -566,7 +566,7 @@ void wxFrame::Centre( int direction )
void wxFrame::DoGetClientSize( int *width, int *height ) const
{
wxASSERT_MSG( (m_widget != NULL), T("invalid frame") );
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
wxWindow::DoGetClientSize( width, height );
if (height)
@@ -611,7 +611,7 @@ void wxFrame::DoGetClientSize( int *width, int *height ) const
void wxFrame::DoSetClientSize( int width, int height )
{
wxASSERT_MSG( (m_widget != NULL), T("invalid frame") );
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
/* menu bar */
if (m_frameMenuBar)
@@ -656,7 +656,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
m_resizing = TRUE;
/* this shouldn't happen: wxFrame, wxMDIParentFrame and wxMDIChildFrame have m_wxwindow */
wxASSERT_MSG( (m_wxwindow != NULL), T("invalid frame") );
wxASSERT_MSG( (m_wxwindow != NULL), wxT("invalid frame") );
m_width = width;
m_height = height;
@@ -813,7 +813,7 @@ void wxFrame::OnCloseWindow( wxCloseEvent& WXUNUSED(event) )
void wxFrame::OnSize( wxSizeEvent &WXUNUSED(event) )
{
wxASSERT_MSG( (m_widget != NULL), T("invalid frame") );
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
#if wxUSE_CONSTRAINTS
if (GetAutoLayout())
@@ -853,8 +853,8 @@ void wxFrame::OnSize( wxSizeEvent &WXUNUSED(event) )
void wxFrame::SetMenuBar( wxMenuBar *menuBar )
{
wxASSERT_MSG( (m_widget != NULL), T("invalid frame") );
wxASSERT_MSG( (m_wxwindow != NULL), T("invalid frame") );
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
wxASSERT_MSG( (m_wxwindow != NULL), wxT("invalid frame") );
m_frameMenuBar = menuBar;
@@ -920,9 +920,9 @@ void wxFrame::OnMenuHighlight(wxMenuEvent& event)
#if wxUSE_TOOLBAR
wxToolBar* wxFrame::CreateToolBar( long style, wxWindowID id, const wxString& name )
{
wxASSERT_MSG( (m_widget != NULL), T("invalid frame") );
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
wxCHECK_MSG( m_frameToolBar == NULL, FALSE, T("recreating toolbar in wxFrame") );
wxCHECK_MSG( m_frameToolBar == NULL, FALSE, wxT("recreating toolbar in wxFrame") );
m_insertInClientArea = FALSE;
@@ -951,9 +951,9 @@ wxToolBar *wxFrame::GetToolBar() const
#if wxUSE_STATUSBAR
wxStatusBar* wxFrame::CreateStatusBar( int number, long style, wxWindowID id, const wxString& name )
{
wxASSERT_MSG( (m_widget != NULL), T("invalid frame") );
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
wxCHECK_MSG( m_frameStatusBar == NULL, FALSE, T("recreating status bar in wxFrame") );
wxCHECK_MSG( m_frameStatusBar == NULL, FALSE, wxT("recreating status bar in wxFrame") );
m_frameStatusBar = OnCreateStatusBar( number, style, id, name );
@@ -990,18 +990,18 @@ wxStatusBar *wxFrame::GetStatusBar() const
void wxFrame::SetStatusText(const wxString& text, int number)
{
wxASSERT_MSG( (m_widget != NULL), T("invalid frame") );
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
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[] )
{
wxASSERT_MSG( (m_widget != NULL), T("invalid frame") );
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
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);
}
@@ -1029,16 +1029,16 @@ void wxFrame::Command( int id )
void wxFrame::SetTitle( const wxString &title )
{
wxASSERT_MSG( (m_widget != NULL), T("invalid frame") );
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
m_title = title;
if (m_title.IsNull()) m_title = T("");
if (m_title.IsNull()) m_title = wxT("");
gtk_window_set_title( GTK_WINDOW(m_widget), title.mbc_str() );
}
void wxFrame::SetIcon( const wxIcon &icon )
{
wxASSERT_MSG( (m_widget != NULL), T("invalid frame") );
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
m_icon = icon;
if (!icon.Ok()) return;

View File

@@ -33,7 +33,7 @@ bool wxGauge::Create( wxWindow *parent, wxWindowID id, int range,
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, validator, name ))
{
wxFAIL_MSG( T("wxGauge creation failed") );
wxFAIL_MSG( wxT("wxGauge creation failed") );
return FALSE;
}

View File

@@ -259,7 +259,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, validator, name ))
{
wxFAIL_MSG( T("wxListBox creation failed") );
wxFAIL_MSG( wxT("wxListBox creation failed") );
return FALSE;
}
@@ -369,11 +369,11 @@ wxListBox::~wxListBox()
void wxListBox::InsertItems(int nItems, const wxString items[], int pos)
{
wxCHECK_RET( m_list != NULL, T("invalid listbox") );
wxCHECK_RET( m_list != NULL, wxT("invalid listbox") );
GList *children = m_list->children;
int length = g_list_length(children);
wxCHECK_RET( pos <= length, T("invalid index in wxListBox::InsertItems") );
wxCHECK_RET( pos <= length, wxT("invalid index in wxListBox::InsertItems") );
// VZ: it seems that GTK 1.0.6 doesn't has a function to insert an item
// into a listbox at the given position, this is why we first delete
@@ -471,7 +471,7 @@ void wxListBox::InsertItems(int nItems, const wxString items[], int pos)
void wxListBox::AppendCommon( const wxString &item )
{
wxCHECK_RET( m_list != NULL, T("invalid listbox") );
wxCHECK_RET( m_list != NULL, wxT("invalid listbox") );
GtkWidget *list_item;
@@ -570,7 +570,7 @@ void wxListBox::Append( const wxString &item, wxClientData *clientData )
void wxListBox::SetClientData( int n, void* clientData )
{
wxCHECK_RET( m_widget != NULL, T("invalid combobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
wxNode *node = m_clientDataList.Nth( n );
if (!node) return;
@@ -580,7 +580,7 @@ void wxListBox::SetClientData( int n, void* clientData )
void* wxListBox::GetClientData( int n )
{
wxCHECK_MSG( m_widget != NULL, NULL, T("invalid combobox") );
wxCHECK_MSG( m_widget != NULL, NULL, wxT("invalid combobox") );
wxNode *node = m_clientDataList.Nth( n );
if (!node) return NULL;
@@ -590,7 +590,7 @@ void* wxListBox::GetClientData( int n )
void wxListBox::SetClientObject( int n, wxClientData* clientData )
{
wxCHECK_RET( m_widget != NULL, T("invalid combobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
wxNode *node = m_clientObjectList.Nth( n );
if (!node) return;
@@ -603,7 +603,7 @@ void wxListBox::SetClientObject( int n, wxClientData* clientData )
wxClientData* wxListBox::GetClientObject( int n )
{
wxCHECK_MSG( m_widget != NULL, (wxClientData*)NULL, T("invalid combobox") );
wxCHECK_MSG( m_widget != NULL, (wxClientData*)NULL, wxT("invalid combobox") );
wxNode *node = m_clientObjectList.Nth( n );
if (!node) return (wxClientData*) NULL;
@@ -613,7 +613,7 @@ wxClientData* wxListBox::GetClientObject( int n )
void wxListBox::Clear()
{
wxCHECK_RET( m_list != NULL, T("invalid listbox") );
wxCHECK_RET( m_list != NULL, wxT("invalid listbox") );
gtk_list_clear_items( m_list, 0, Number() );
@@ -631,11 +631,11 @@ void wxListBox::Clear()
void wxListBox::Delete( int n )
{
wxCHECK_RET( m_list != NULL, T("invalid listbox") );
wxCHECK_RET( m_list != NULL, wxT("invalid listbox") );
GList *child = g_list_nth( m_list->children, n );
wxCHECK_RET( child, T("wrong listbox index") );
wxCHECK_RET( child, wxT("wrong listbox index") );
GList *list = g_list_append( (GList*) NULL, child->data );
gtk_list_remove_items( m_list, list );
@@ -658,7 +658,7 @@ void wxListBox::Delete( int n )
void wxListBox::Deselect( int n )
{
wxCHECK_RET( m_list != NULL, T("invalid listbox") );
wxCHECK_RET( m_list != NULL, wxT("invalid listbox") );
DisableEvents();
@@ -669,7 +669,7 @@ void wxListBox::Deselect( int n )
int wxListBox::FindString( const wxString &item ) const
{
wxCHECK_MSG( m_list != NULL, -1, T("invalid listbox") );
wxCHECK_MSG( m_list != NULL, -1, wxT("invalid listbox") );
GList *child = m_list->children;
int count = 0;
@@ -694,7 +694,7 @@ int wxListBox::FindString( const wxString &item ) const
int wxListBox::GetSelection() const
{
wxCHECK_MSG( m_list != NULL, -1, T("invalid listbox") );
wxCHECK_MSG( m_list != NULL, -1, wxT("invalid listbox") );
GList *child = m_list->children;
int count = 0;
@@ -709,7 +709,7 @@ int wxListBox::GetSelection() const
int wxListBox::GetSelections( wxArrayInt& aSelections ) const
{
wxCHECK_MSG( m_list != NULL, -1, T("invalid listbox") );
wxCHECK_MSG( m_list != NULL, -1, wxT("invalid listbox") );
// get the number of selected items first
GList *child = m_list->children;
@@ -739,7 +739,7 @@ int wxListBox::GetSelections( wxArrayInt& aSelections ) const
wxString wxListBox::GetString( int n ) const
{
wxCHECK_MSG( m_list != NULL, T(""), T("invalid listbox") );
wxCHECK_MSG( m_list != NULL, wxT(""), wxT("invalid listbox") );
GList *child = g_list_nth( m_list->children, n );
if (child)
@@ -752,14 +752,14 @@ wxString wxListBox::GetString( int n ) const
return str;
}
wxFAIL_MSG(T("wrong listbox index"));
wxFAIL_MSG(wxT("wrong listbox index"));
return T("");
return wxT("");
}
wxString wxListBox::GetStringSelection() const
{
wxCHECK_MSG( m_list != NULL, T(""), T("invalid listbox") );
wxCHECK_MSG( m_list != NULL, wxT(""), wxT("invalid listbox") );
GList *selection = m_list->selection;
if (selection)
@@ -772,13 +772,13 @@ wxString wxListBox::GetStringSelection() const
return str;
}
wxFAIL_MSG(T("no listbox selection available"));
return T("");
wxFAIL_MSG(wxT("no listbox selection available"));
return wxT("");
}
int wxListBox::Number()
{
wxCHECK_MSG( m_list != NULL, -1, T("invalid listbox") );
wxCHECK_MSG( m_list != NULL, -1, wxT("invalid listbox") );
GList *child = m_list->children;
int count = 0;
@@ -788,7 +788,7 @@ int wxListBox::Number()
bool wxListBox::Selected( int n )
{
wxCHECK_MSG( m_list != NULL, FALSE, T("invalid listbox") );
wxCHECK_MSG( m_list != NULL, FALSE, wxT("invalid listbox") );
GList *target = g_list_nth( m_list->children, n );
if (target)
@@ -800,28 +800,28 @@ bool wxListBox::Selected( int n )
child = child->next;
}
}
wxFAIL_MSG(T("wrong listbox index"));
wxFAIL_MSG(wxT("wrong listbox index"));
return FALSE;
}
void wxListBox::Set( int WXUNUSED(n), const wxString *WXUNUSED(choices) )
{
wxFAIL_MSG(T("wxListBox::Set not implemented"));
wxFAIL_MSG(wxT("wxListBox::Set not implemented"));
}
void wxListBox::SetFirstItem( int WXUNUSED(n) )
{
wxFAIL_MSG(T("wxListBox::SetFirstItem not implemented"));
wxFAIL_MSG(wxT("wxListBox::SetFirstItem not implemented"));
}
void wxListBox::SetFirstItem( const wxString &WXUNUSED(item) )
{
wxFAIL_MSG(T("wxListBox::SetFirstItem not implemented"));
wxFAIL_MSG(wxT("wxListBox::SetFirstItem not implemented"));
}
void wxListBox::SetSelection( int n, bool select )
{
wxCHECK_RET( m_list != NULL, T("invalid listbox") );
wxCHECK_RET( m_list != NULL, wxT("invalid listbox") );
DisableEvents();
@@ -835,7 +835,7 @@ void wxListBox::SetSelection( int n, bool select )
void wxListBox::SetString( int n, const wxString &string )
{
wxCHECK_RET( m_list != NULL, T("invalid listbox") );
wxCHECK_RET( m_list != NULL, wxT("invalid listbox") );
GList *child = g_list_nth( m_list->children, n );
if (child)
@@ -854,13 +854,13 @@ void wxListBox::SetString( int n, const wxString &string )
}
else
{
wxFAIL_MSG(T("wrong listbox index"));
wxFAIL_MSG(wxT("wrong listbox index"));
}
}
void wxListBox::SetStringSelection( const wxString &string, bool select )
{
wxCHECK_RET( m_list != NULL, T("invalid listbox") );
wxCHECK_RET( m_list != NULL, wxT("invalid listbox") );
SetSelection( FindString(string), select );
}
@@ -896,7 +896,7 @@ void wxListBox::ApplyToolTip( GtkTooltips *tips, const wxChar *tip )
#if wxUSE_DRAG_AND_DROP
void wxListBox::SetDropTarget( wxDropTarget *dropTarget )
{
wxCHECK_RET( m_list != NULL, T("invalid listbox") );
wxCHECK_RET( m_list != NULL, wxT("invalid listbox") );
#ifndef NEW_GTK_DND_CODE
if (m_dropTarget)

View File

@@ -319,7 +319,7 @@ void wxMDIChildFrame::AddChild( wxWindowBase *child )
void wxMDIChildFrame::SetMenuBar( wxMenuBar *menu_bar )
{
wxASSERT_MSG( m_menuBar == NULL, T("Only one menubar allowed") );
wxASSERT_MSG( m_menuBar == NULL, wxT("Only one menubar allowed") );
m_menuBar = menu_bar;
@@ -431,9 +431,9 @@ bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, long style )
m_insertCallback = (wxInsertChildFunction)wxInsertChildInMDI;
if (!PreCreation( parent, wxDefaultPosition, wxDefaultSize ) ||
!CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, T("wxMDIClientWindow") ))
!CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, wxT("wxMDIClientWindow") ))
{
wxFAIL_MSG( T("wxMDIClientWindow creation failed") );
wxFAIL_MSG( wxT("wxMDIClientWindow creation failed") );
return FALSE;
}

View File

@@ -41,9 +41,9 @@ wxMenuBar::wxMenuBar( long style )
m_invokingWindow = (wxWindow*) NULL;
if (!PreCreation( (wxWindow*) NULL, wxDefaultPosition, wxDefaultSize ) ||
!CreateBase( (wxWindow*) NULL, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, T("menubar") ))
!CreateBase( (wxWindow*) NULL, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, wxT("menubar") ))
{
wxFAIL_MSG( T("wxMenuBar creation failed") );
wxFAIL_MSG( wxT("wxMenuBar creation failed") );
return;
}
@@ -80,9 +80,9 @@ wxMenuBar::wxMenuBar()
m_invokingWindow = (wxWindow*) NULL;
if (!PreCreation( (wxWindow*) NULL, wxDefaultPosition, wxDefaultSize ) ||
!CreateBase( (wxWindow*) NULL, -1, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, T("menubar") ))
!CreateBase( (wxWindow*) NULL, -1, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, wxT("menubar") ))
{
wxFAIL_MSG( T("wxMenuBar creation failed") );
wxFAIL_MSG( wxT("wxMenuBar creation failed") );
return;
}
@@ -202,22 +202,22 @@ void wxMenuBar::Append( wxMenu *menu, const wxString &title )
/* GTK 1.2 wants to have "_" instead of "&" for accelerators */
wxString str;
for ( pc = title; *pc != T('\0'); pc++ )
for ( pc = title; *pc != wxT('\0'); pc++ )
{
if (*pc == T('&'))
if (*pc == wxT('&'))
{
#if (GTK_MINOR_VERSION > 0) && (GTK_MICRO_VERSION > 0)
str << T('_');
str << wxT('_');
}
else if (*pc == T('/'))
else if (*pc == wxT('/'))
{
str << T('\\');
str << wxT('\\');
#endif
}
else
{
#if __WXGTK12__
if ( *pc == T('_') )
if ( *pc == wxT('_') )
{
// underscores must be doubled to prevent them from being
// interpreted as accelerator character prefix by GTK
@@ -237,7 +237,7 @@ void wxMenuBar::Append( wxMenu *menu, const wxString &title )
/* local buffer in multibyte form */
wxString buf;
buf << T('/') << str.c_str();
buf << wxT('/') << str.c_str();
char *cbuf = new char[buf.Length()+1];
strcpy(cbuf, buf.mbc_str());
@@ -251,13 +251,13 @@ void wxMenuBar::Append( wxMenu *menu, const wxString &title )
gtk_item_factory_create_item( m_factory, &entry, (gpointer) this, 2 ); /* what is 2 ? */
/* in order to get the pointer to the item we need the item text _without_ underscores */
wxString tmp = T("<main>/");
for ( pc = str; *pc != T('\0'); pc++ )
wxString tmp = wxT("<main>/");
for ( pc = str; *pc != wxT('\0'); pc++ )
{
// contrary to the common sense, we must throw out _all_ underscores,
// (i.e. "Hello__World" => "HelloWorld" and not "Hello_World" as we
// might naively think). IMHO it's a bug in GTK+ (VZ)
while (*pc == T('_'))
while (*pc == wxT('_'))
pc++;
tmp << *pc;
}
@@ -364,7 +364,7 @@ void wxMenuBar::Check( int id, bool check )
{
wxMenuItem* item = FindMenuItemById( id );
wxCHECK_RET( item, T("wxMenuBar::Check: no such item") );
wxCHECK_RET( item, wxT("wxMenuBar::Check: no such item") );
item->Check(check);
}
@@ -373,7 +373,7 @@ bool wxMenuBar::IsChecked( int id ) const
{
wxMenuItem* item = FindMenuItemById( id );
wxCHECK_MSG( item, FALSE, T("wxMenuBar::IsChecked: no such item") );
wxCHECK_MSG( item, FALSE, wxT("wxMenuBar::IsChecked: no such item") );
return item->IsChecked();
}
@@ -382,7 +382,7 @@ void wxMenuBar::Enable( int id, bool enable )
{
wxMenuItem* item = FindMenuItemById( id );
wxCHECK_RET( item, T("wxMenuBar::Enable: no such item") );
wxCHECK_RET( item, wxT("wxMenuBar::Enable: no such item") );
item->Enable(enable);
}
@@ -391,7 +391,7 @@ bool wxMenuBar::IsEnabled( int id ) const
{
wxMenuItem* item = FindMenuItemById( id );
wxCHECK_MSG( item, FALSE, T("wxMenuBar::IsEnabled: no such item") );
wxCHECK_MSG( item, FALSE, wxT("wxMenuBar::IsEnabled: no such item") );
return item->IsEnabled();
}
@@ -400,7 +400,7 @@ wxString wxMenuBar::GetLabel( int id ) const
{
wxMenuItem* item = FindMenuItemById( id );
wxCHECK_MSG( item, T(""), T("wxMenuBar::GetLabel: no such item") );
wxCHECK_MSG( item, wxT(""), wxT("wxMenuBar::GetLabel: no such item") );
return item->GetText();
}
@@ -409,7 +409,7 @@ void wxMenuBar::SetLabel( int id, const wxString &label )
{
wxMenuItem* item = FindMenuItemById( id );
wxCHECK_RET( item, T("wxMenuBar::SetLabel: no such item") );
wxCHECK_RET( item, wxT("wxMenuBar::SetLabel: no such item") );
item->SetText( label );
}
@@ -418,7 +418,7 @@ void wxMenuBar::EnableTop( int pos, bool flag )
{
wxNode *node = m_menus.Nth( pos );
wxCHECK_RET( node, T("menu not found") );
wxCHECK_RET( node, wxT("menu not found") );
wxMenu* menu = (wxMenu*)node->Data();
@@ -430,7 +430,7 @@ wxString wxMenuBar::GetLabelTop( int pos ) const
{
wxNode *node = m_menus.Nth( pos );
wxCHECK_MSG( node, T("invalid"), T("menu not found") );
wxCHECK_MSG( node, wxT("invalid"), wxT("menu not found") );
wxMenu* menu = (wxMenu*)node->Data();
@@ -441,7 +441,7 @@ void wxMenuBar::SetLabelTop( int pos, const wxString& label )
{
wxNode *node = m_menus.Nth( pos );
wxCHECK_RET( node, T("menu not found") );
wxCHECK_RET( node, wxT("menu not found") );
wxMenu* menu = (wxMenu*)node->Data();
@@ -452,7 +452,7 @@ void wxMenuBar::SetHelpString( int id, const wxString& helpString )
{
wxMenuItem* item = FindMenuItemById( id );
wxCHECK_RET( item, T("wxMenuBar::SetHelpString: no such item") );
wxCHECK_RET( item, wxT("wxMenuBar::SetHelpString: no such item") );
item->SetHelp( helpString );
}
@@ -461,7 +461,7 @@ wxString wxMenuBar::GetHelpString( int id ) const
{
wxMenuItem* item = FindMenuItemById( id );
wxCHECK_MSG( item, T(""), T("wxMenuBar::GetHelpString: no such item") );
wxCHECK_MSG( item, wxT(""), wxT("wxMenuBar::GetHelpString: no such item") );
return item->GetHelp();
}
@@ -483,7 +483,7 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu )
return;
wxMenuItem* item = menu->FindItem( id );
wxCHECK_RET( item, T("error in menu item callback") );
wxCHECK_RET( item, wxT("error in menu item callback") );
if (item->IsCheckable())
{
@@ -588,22 +588,22 @@ wxMenuItem::wxMenuItem()
void wxMenuItem::SetName( const wxString& str )
{
/* '\t' is the deliminator indicating a hot key */
m_text = T("");
m_text = wxT("");
const wxChar *pc = str;
for (; (*pc != T('\0')) && (*pc != T('\t')); pc++ )
for (; (*pc != wxT('\0')) && (*pc != wxT('\t')); pc++ )
{
if (*pc == T('&'))
if (*pc == wxT('&'))
{
#if (GTK_MINOR_VERSION > 0)
m_text << T('_');
m_text << wxT('_');
}
else if ( *pc == T('_') ) // escape underscores
else if ( *pc == wxT('_') ) // escape underscores
{
m_text << T("__");
m_text << wxT("__");
}
else if (*pc == T('/')) /* we have to filter out slashes ... */
else if (*pc == wxT('/')) /* we have to filter out slashes ... */
{
m_text << T('\\'); /* ... and replace them with back slashes */
m_text << wxT('\\'); /* ... and replace them with back slashes */
#endif
}
else
@@ -611,9 +611,9 @@ void wxMenuItem::SetName( const wxString& str )
}
/* only GTK 1.2 knows about hot keys */
m_hotKey = T("");
m_hotKey = wxT("");
#if (GTK_MINOR_VERSION > 0)
if(*pc == T('\t'))
if(*pc == wxT('\t'))
{
pc++;
m_hotKey = pc;
@@ -629,9 +629,9 @@ void wxMenuItem::SetName( const wxString& str )
void wxMenuItem::Check( bool check )
{
wxCHECK_RET( m_menuItem, T("invalid menu item") );
wxCHECK_RET( m_menuItem, wxT("invalid menu item") );
wxCHECK_RET( IsCheckable(), T("Can't check uncheckable item!") )
wxCHECK_RET( IsCheckable(), wxT("Can't check uncheckable item!") )
if (check == m_isChecked) return;
@@ -641,7 +641,7 @@ void wxMenuItem::Check( bool check )
void wxMenuItem::Enable( bool enable )
{
wxCHECK_RET( m_menuItem, T("invalid menu item") );
wxCHECK_RET( m_menuItem, wxT("invalid menu item") );
gtk_widget_set_sensitive( m_menuItem, enable );
m_isEnabled = enable;
@@ -649,7 +649,7 @@ void wxMenuItem::Enable( bool enable )
bool wxMenuItem::IsChecked() const
{
wxCHECK_MSG( m_menuItem, FALSE, T("invalid menu item") );
wxCHECK_MSG( m_menuItem, FALSE, wxT("invalid menu item") );
wxCHECK( IsCheckable(), FALSE ); // can't get state of uncheckable item!
@@ -688,8 +688,8 @@ wxMenu::Init( const wxString& title,
m_eventHandler = this;
m_clientData = (void*) NULL;
if (m_title.IsNull()) m_title = T("");
if (m_title != T(""))
if (m_title.IsNull()) m_title = wxT("");
if (m_title != wxT(""))
{
Append(-2, m_title);
AppendSeparator();
@@ -767,27 +767,27 @@ static char* GetHotKey( const wxString &hotkey, char *hotbuf )
switch (hotkey[0])
{
case T('a'): /* Alt */
case T('A'):
case T('m'): /* Meta */
case T('M'):
case wxT('a'): /* Alt */
case wxT('A'):
case wxT('m'): /* Meta */
case wxT('M'):
{
strcpy( hotbuf, "<alt>" );
wxString last = hotkey.Right(1);
strcat( hotbuf, last.mb_str() );
return hotbuf;
}
case T('c'): /* Ctrl */
case T('C'):
case T('s'): /* Strg, yeah man, I'm German */
case T('S'):
case wxT('c'): /* Ctrl */
case wxT('C'):
case wxT('s'): /* Strg, yeah man, I'm German */
case wxT('S'):
{
strcpy( hotbuf, "<control>" );
wxString last = hotkey.Right(1);
strcat( hotbuf, last.mb_str() );
return hotbuf;
}
case T('F'): /* function keys */
case wxT('F'): /* function keys */
{
strcpy( hotbuf, hotkey.mb_str() );
return hotbuf;
@@ -832,10 +832,10 @@ void wxMenu::Append( int id, const wxString &item, const wxString &helpStr, bool
gtk_item_factory_create_item( m_factory, &entry, (gpointer) this, 2 ); /* what is 2 ? */
/* in order to get the pointer to the item we need the item text _without_ underscores */
wxString s = T("<main>/");
for ( const wxChar *pc = text; *pc != T('\0'); pc++ )
wxString s = wxT("<main>/");
for ( const wxChar *pc = text; *pc != wxT('\0'); pc++ )
{
while (*pc == T('_')) pc++; /* skip it */
while (*pc == wxT('_')) pc++; /* skip it */
s << *pc;
}
@@ -893,10 +893,10 @@ void wxMenu::Append( int id, const wxString &item, wxMenu *subMenu, const wxStri
gtk_item_factory_create_item( m_factory, &entry, (gpointer) this, 2 ); /* what is 2 ? */
/* in order to get the pointer to the item we need the item text _without_ underscores */
wxString s = T("<main>/");
for ( const wxChar *pc = text; *pc != T('\0'); pc++ )
wxString s = wxT("<main>/");
for ( const wxChar *pc = text; *pc != wxT('\0'); pc++ )
{
if (*pc == T('_')) pc++; /* skip it */
if (*pc == wxT('_')) pc++; /* skip it */
s << *pc;
}
@@ -966,14 +966,14 @@ void wxMenu::Append( wxMenuItem *item )
int wxMenu::FindItem( const wxString itemString ) const
{
wxString s = T("");
for ( const wxChar *pc = itemString; *pc != T('\0'); pc++ )
wxString s = wxT("");
for ( const wxChar *pc = itemString; *pc != wxT('\0'); pc++ )
{
if (*pc == T('&'))
if (*pc == wxT('&'))
{
pc++; /* skip it */
#if (GTK_MINOR_VERSION > 0)
s << T('_');
s << wxT('_');
#endif
}
s << *pc;
@@ -997,7 +997,7 @@ void wxMenu::Enable( int id, bool enable )
{
wxMenuItem *item = FindItem(id);
wxCHECK_RET( item, T("wxMenu::Enable: no such item") );
wxCHECK_RET( item, wxT("wxMenu::Enable: no such item") );
item->Enable(enable);
}
@@ -1006,7 +1006,7 @@ bool wxMenu::IsEnabled( int id ) const
{
wxMenuItem *item = FindItem(id);
wxCHECK_MSG( item, FALSE, T("wxMenu::IsEnabled: no such item") );
wxCHECK_MSG( item, FALSE, wxT("wxMenu::IsEnabled: no such item") );
return item->IsEnabled();
}
@@ -1015,7 +1015,7 @@ void wxMenu::Check( int id, bool enable )
{
wxMenuItem *item = FindItem(id);
wxCHECK_RET( item, T("wxMenu::Check: no such item") );
wxCHECK_RET( item, wxT("wxMenu::Check: no such item") );
item->Check(enable);
}
@@ -1024,7 +1024,7 @@ bool wxMenu::IsChecked( int id ) const
{
wxMenuItem *item = FindItem(id);
wxCHECK_MSG( item, FALSE, T("wxMenu::IsChecked: no such item") );
wxCHECK_MSG( item, FALSE, wxT("wxMenu::IsChecked: no such item") );
return item->IsChecked();
}
@@ -1033,7 +1033,7 @@ void wxMenu::SetLabel( int id, const wxString &label )
{
wxMenuItem *item = FindItem(id);
wxCHECK_RET( item, T("wxMenu::SetLabel: no such item") );
wxCHECK_RET( item, wxT("wxMenu::SetLabel: no such item") );
item->SetText(label);
}
@@ -1042,7 +1042,7 @@ wxString wxMenu::GetLabel( int id ) const
{
wxMenuItem *item = FindItem(id);
wxCHECK_MSG( item, T(""), T("wxMenu::GetLabel: no such item") );
wxCHECK_MSG( item, wxT(""), wxT("wxMenu::GetLabel: no such item") );
return item->GetText();
}
@@ -1051,7 +1051,7 @@ void wxMenu::SetHelpString( int id, const wxString& helpString )
{
wxMenuItem *item = FindItem(id);
wxCHECK_RET( item, T("wxMenu::SetHelpString: no such item") );
wxCHECK_RET( item, wxT("wxMenu::SetHelpString: no such item") );
item->SetHelp( helpString );
}
@@ -1060,7 +1060,7 @@ wxString wxMenu::GetHelpString( int id ) const
{
wxMenuItem *item = FindItem(id);
wxCHECK_MSG( item, T(""), T("wxMenu::GetHelpString: no such item") );
wxCHECK_MSG( item, wxT(""), wxT("wxMenu::GetHelpString: no such item") );
return item->GetHelp();
}

View File

@@ -186,7 +186,7 @@ bool wxNotebook::Create(wxWindow *parent, wxWindowID id,
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
{
wxFAIL_MSG( T("wxNoteBook creation failed") );
wxFAIL_MSG( wxT("wxNoteBook creation failed") );
return FALSE;
}
@@ -194,7 +194,7 @@ bool wxNotebook::Create(wxWindow *parent, wxWindowID id,
m_widget = gtk_notebook_new();
#ifdef __WXDEBUG__
debug_focus_in( m_widget, T("wxNotebook::m_widget"), name );
debug_focus_in( m_widget, wxT("wxNotebook::m_widget"), name );
#endif
gtk_notebook_set_scrollable( GTK_NOTEBOOK(m_widget), 1 );
@@ -233,7 +233,7 @@ void wxNotebook::SetFocus()
int wxNotebook::GetSelection() const
{
wxCHECK_MSG( m_widget != NULL, -1, T("invalid notebook") );
wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid notebook") );
GList *pages = GTK_NOTEBOOK(m_widget)->children;
@@ -258,18 +258,18 @@ int wxNotebook::GetRowCount() const
wxString wxNotebook::GetPageText( int page ) const
{
wxCHECK_MSG( m_widget != NULL, T(""), T("invalid notebook") );
wxCHECK_MSG( m_widget != NULL, wxT(""), wxT("invalid notebook") );
wxNotebookPage* nb_page = GetNotebookPage(page);
if (nb_page)
return nb_page->m_text;
else
return T("");
return wxT("");
}
int wxNotebook::GetPageImage( int page ) const
{
wxCHECK_MSG( m_widget != NULL, -1, T("invalid notebook") );
wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid notebook") );
wxNotebookPage* nb_page = GetNotebookPage(page);
if (nb_page)
@@ -280,9 +280,9 @@ int wxNotebook::GetPageImage( int page ) const
wxNotebookPage* wxNotebook::GetNotebookPage( int page ) const
{
wxCHECK_MSG( m_widget != NULL, (wxNotebookPage*) NULL, T("invalid notebook") );
wxCHECK_MSG( m_widget != NULL, (wxNotebookPage*) NULL, wxT("invalid notebook") );
wxCHECK_MSG( page < (int)m_pages.GetCount(), (wxNotebookPage*) NULL, T("invalid notebook index") );
wxCHECK_MSG( page < (int)m_pages.GetCount(), (wxNotebookPage*) NULL, wxT("invalid notebook index") );
wxNode *node = m_pages.Nth( page );
@@ -291,9 +291,9 @@ wxNotebookPage* wxNotebook::GetNotebookPage( int page ) const
int wxNotebook::SetSelection( int page )
{
wxCHECK_MSG( m_widget != NULL, -1, T("invalid notebook") );
wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid notebook") );
wxCHECK_MSG( page < (int)m_pages.GetCount(), -1, T("invalid notebook index") );
wxCHECK_MSG( page < (int)m_pages.GetCount(), -1, wxT("invalid notebook index") );
int selOld = GetSelection();
@@ -304,7 +304,7 @@ int wxNotebook::SetSelection( int page )
void wxNotebook::AdvanceSelection( bool forward )
{
wxCHECK_RET( m_widget != NULL, T("invalid notebook") );
wxCHECK_RET( m_widget != NULL, wxT("invalid notebook") );
int sel = GetSelection();
int max = GetPageCount();
@@ -322,11 +322,11 @@ void wxNotebook::SetImageList( wxImageList* imageList )
bool wxNotebook::SetPageText( int page, const wxString &text )
{
wxCHECK_MSG( m_widget != NULL, FALSE, T("invalid notebook") );
wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid notebook") );
wxNotebookPage* nb_page = GetNotebookPage(page);
wxCHECK_MSG( nb_page, FALSE, T("SetPageText: invalid page index") );
wxCHECK_MSG( nb_page, FALSE, wxT("SetPageText: invalid page index") );
nb_page->m_text = text;
@@ -422,22 +422,22 @@ bool wxNotebook::SetPageImage( int page, int image )
void wxNotebook::SetPageSize( const wxSize &WXUNUSED(size) )
{
wxFAIL_MSG( T("wxNotebook::SetPageSize not implemented") );
wxFAIL_MSG( wxT("wxNotebook::SetPageSize not implemented") );
}
void wxNotebook::SetPadding( const wxSize &WXUNUSED(padding) )
{
wxFAIL_MSG( T("wxNotebook::SetPadding not implemented") );
wxFAIL_MSG( wxT("wxNotebook::SetPadding not implemented") );
}
void wxNotebook::SetTabSize(const wxSize& WXUNUSED(sz))
{
wxFAIL_MSG( T("wxNotebook::SetTabSize not implemented") );
wxFAIL_MSG( wxT("wxNotebook::SetTabSize not implemented") );
}
bool wxNotebook::DeleteAllPages()
{
wxCHECK_MSG( m_widget != NULL, FALSE, T("invalid notebook") );
wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid notebook") );
while (m_pages.GetCount() > 0)
DeletePage( m_pages.GetCount()-1 );
@@ -478,10 +478,10 @@ bool wxNotebook::RemovePage( int page )
bool wxNotebook::InsertPage( int position, wxWindow* win, const wxString& text,
bool select, int imageId )
{
wxCHECK_MSG( m_widget != NULL, FALSE, T("invalid notebook") );
wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid notebook") );
wxCHECK_MSG( win->GetParent() == this, FALSE,
T("Can't add a page whose parent is not the notebook!") );
wxT("Can't add a page whose parent is not the notebook!") );
/* don't receive switch page during addition */
gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget),
@@ -535,7 +535,7 @@ bool wxNotebook::InsertPage( int position, wxWindow* win, const wxString& text,
/* set the label text */
page->m_text = text;
if (page->m_text.IsEmpty()) page->m_text = T("");
if (page->m_text.IsEmpty()) page->m_text = wxT("");
page->m_label = GTK_LABEL( gtk_label_new(page->m_text.mbc_str()) );
gtk_box_pack_end( GTK_BOX(page->m_box), GTK_WIDGET(page->m_label), FALSE, FALSE, 3 );
@@ -573,7 +573,7 @@ void wxNotebook::OnNavigationKey(wxNavigationKeyEvent& event)
wxWindow *wxNotebook::GetPage( int page ) const
{
wxCHECK_MSG( m_widget != NULL, (wxWindow*) NULL, T("invalid notebook") );
wxCHECK_MSG( m_widget != NULL, (wxWindow*) NULL, wxT("invalid notebook") );
wxNotebookPage* nb_page = GetNotebookPage(page);
if (!nb_page)

View File

@@ -93,7 +93,7 @@ bool wxPalette::Create( int WXUNUSED(n),
const unsigned char *WXUNUSED(green),
const unsigned char *WXUNUSED(blue) )
{
wxFAIL_MSG(T("not implemented"));
wxFAIL_MSG(wxT("not implemented"));
return FALSE;
}
@@ -102,7 +102,7 @@ int wxPalette::GetPixel( const unsigned char WXUNUSED(red),
const unsigned char WXUNUSED(green),
const unsigned char WXUNUSED(blue) ) const
{
wxFAIL_MSG(T("not implemented"));
wxFAIL_MSG(wxT("not implemented"));
return 0;
}
@@ -112,7 +112,7 @@ bool wxPalette::GetRGB( int WXUNUSED(pixel),
unsigned char *WXUNUSED(green),
unsigned char *WXUNUSED(blue) ) const
{
wxFAIL_MSG(T("not implemented"));
wxFAIL_MSG(wxT("not implemented"));
return 0;
}

View File

@@ -171,35 +171,35 @@ wxDash* wxPen::GetDash() const
int wxPen::GetCap() const
{
wxCHECK_MSG( Ok(), -1, T("invalid pen") );
wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
return M_PENDATA->m_capStyle;
}
int wxPen::GetJoin() const
{
wxCHECK_MSG( Ok(), -1, T("invalid pen") );
wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
return M_PENDATA->m_joinStyle;
}
int wxPen::GetStyle() const
{
wxCHECK_MSG( Ok(), -1, T("invalid pen") );
wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
return M_PENDATA->m_style;
}
int wxPen::GetWidth() const
{
wxCHECK_MSG( Ok(), -1, T("invalid pen") );
wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
return M_PENDATA->m_width;
}
wxColour &wxPen::GetColour() const
{
wxCHECK_MSG( Ok(), wxNullColour, T("invalid pen") );
wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") );
return M_PENDATA->m_colour;
}

View File

@@ -88,7 +88,7 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, validator, name ))
{
wxFAIL_MSG( T("wxRadioBox creation failed") );
wxFAIL_MSG( wxT("wxRadioBox creation failed") );
return FALSE;
}
@@ -108,7 +108,7 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
label.Empty();
for ( const wxChar *pc = choices[i]; *pc; pc++ )
{
if ( *pc != T('&') )
if ( *pc != wxT('&') )
label += *pc;
}
@@ -176,7 +176,7 @@ wxSize wxRadioBox::LayoutItems()
if ( m_majorDim == 0 )
{
// avoid dividing by 0 below
wxFAIL_MSG( T("dimension of radiobox should not be 0!") );
wxFAIL_MSG( wxT("dimension of radiobox should not be 0!") );
m_majorDim = 1;
}
@@ -279,7 +279,7 @@ wxSize wxRadioBox::LayoutItems()
bool wxRadioBox::Show( bool show )
{
wxCHECK_MSG( m_widget != NULL, FALSE, T("invalid radiobox") );
wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid radiobox") );
wxWindow::Show( show );
@@ -301,7 +301,7 @@ bool wxRadioBox::Show( bool show )
int wxRadioBox::FindString( const wxString &s ) const
{
wxCHECK_MSG( m_widget != NULL, -1, T("invalid radiobox") );
wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid radiobox") );
int count = 0;
@@ -322,7 +322,7 @@ int wxRadioBox::FindString( const wxString &s ) const
void wxRadioBox::SetFocus()
{
wxCHECK_RET( m_widget != NULL, T("invalid radiobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid radiobox") );
if (m_boxes.GetCount() == 0) return;
@@ -343,11 +343,11 @@ void wxRadioBox::SetFocus()
void wxRadioBox::SetSelection( int n )
{
wxCHECK_RET( m_widget != NULL, T("invalid radiobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid radiobox") );
wxNode *node = m_boxes.Nth( n );
wxCHECK_RET( node, T("radiobox wrong index") );
wxCHECK_RET( node, wxT("radiobox wrong index") );
GtkToggleButton *button = GTK_TOGGLE_BUTTON( node->Data() );
@@ -360,7 +360,7 @@ void wxRadioBox::SetSelection( int n )
int wxRadioBox::GetSelection(void) const
{
wxCHECK_MSG( m_widget != NULL, -1, T("invalid radiobox") );
wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid radiobox") );
int count = 0;
@@ -373,18 +373,18 @@ int wxRadioBox::GetSelection(void) const
node = node->Next();
}
wxFAIL_MSG( T("wxRadioBox none selected") );
wxFAIL_MSG( wxT("wxRadioBox none selected") );
return -1;
}
wxString wxRadioBox::GetString( int n ) const
{
wxCHECK_MSG( m_widget != NULL, T(""), T("invalid radiobox") );
wxCHECK_MSG( m_widget != NULL, wxT(""), wxT("invalid radiobox") );
wxNode *node = m_boxes.Nth( n );
wxCHECK_MSG( node, T(""), T("radiobox wrong index") );
wxCHECK_MSG( node, wxT(""), wxT("radiobox wrong index") );
GtkButton *button = GTK_BUTTON( node->Data() );
GtkLabel *label = GTK_LABEL( button->child );
@@ -394,14 +394,14 @@ wxString wxRadioBox::GetString( int n ) const
wxString wxRadioBox::GetLabel( int item ) const
{
wxCHECK_MSG( m_widget != NULL, T(""), T("invalid radiobox") );
wxCHECK_MSG( m_widget != NULL, wxT(""), wxT("invalid radiobox") );
return GetString( item );
}
void wxRadioBox::SetLabel( const wxString& label )
{
wxCHECK_RET( m_widget != NULL, T("invalid radiobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid radiobox") );
wxControl::SetLabel( label );
@@ -410,11 +410,11 @@ void wxRadioBox::SetLabel( const wxString& label )
void wxRadioBox::SetLabel( int item, const wxString& label )
{
wxCHECK_RET( m_widget != NULL, T("invalid radiobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid radiobox") );
wxNode *node = m_boxes.Nth( item );
wxCHECK_RET( node, T("radiobox wrong index") );
wxCHECK_RET( node, wxT("radiobox wrong index") );
GtkButton *button = GTK_BUTTON( node->Data() );
GtkLabel *g_label = GTK_LABEL( button->child );
@@ -424,7 +424,7 @@ void wxRadioBox::SetLabel( int item, const wxString& label )
void wxRadioBox::SetLabel( int WXUNUSED(item), wxBitmap *WXUNUSED(bitmap) )
{
wxFAIL_MSG(T("wxRadioBox::SetLabel not implemented."));
wxFAIL_MSG(wxT("wxRadioBox::SetLabel not implemented."));
}
bool wxRadioBox::Enable( bool enable )
@@ -447,11 +447,11 @@ bool wxRadioBox::Enable( bool enable )
void wxRadioBox::Enable( int item, bool enable )
{
wxCHECK_RET( m_widget != NULL, T("invalid radiobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid radiobox") );
wxNode *node = m_boxes.Nth( item );
wxCHECK_RET( node, T("radiobox wrong index") );
wxCHECK_RET( node, wxT("radiobox wrong index") );
GtkButton *button = GTK_BUTTON( node->Data() );
GtkWidget *label = button->child;
@@ -461,11 +461,11 @@ void wxRadioBox::Enable( int item, bool enable )
void wxRadioBox::Show( int item, bool show )
{
wxCHECK_RET( m_widget != NULL, T("invalid radiobox") );
wxCHECK_RET( m_widget != NULL, wxT("invalid radiobox") );
wxNode *node = m_boxes.Nth( item );
wxCHECK_RET( node, T("radiobox wrong index") );
wxCHECK_RET( node, wxT("radiobox wrong index") );
GtkWidget *button = GTK_WIDGET( node->Data() );
@@ -477,7 +477,7 @@ void wxRadioBox::Show( int item, bool show )
wxString wxRadioBox::GetStringSelection() const
{
wxCHECK_MSG( m_widget != NULL, T(""), T("invalid radiobox") );
wxCHECK_MSG( m_widget != NULL, wxT(""), wxT("invalid radiobox") );
wxNode *node = m_boxes.First();
while (node)
@@ -491,13 +491,13 @@ wxString wxRadioBox::GetStringSelection() const
node = node->Next();
}
wxFAIL_MSG( T("wxRadioBox none selected") );
return T("");
wxFAIL_MSG( wxT("wxRadioBox none selected") );
return wxT("");
}
bool wxRadioBox::SetStringSelection( const wxString &s )
{
wxCHECK_MSG( m_widget != NULL, FALSE, T("invalid radiobox") );
wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid radiobox") );
int res = FindString( s );
if (res == -1) return FALSE;
@@ -518,7 +518,7 @@ int wxRadioBox::GetNumberOfRowsOrCols() const
void wxRadioBox::SetNumberOfRowsOrCols( int WXUNUSED(n) )
{
wxFAIL_MSG(T("wxRadioBox::SetNumberOfRowsOrCols not implemented."));
wxFAIL_MSG(wxT("wxRadioBox::SetNumberOfRowsOrCols not implemented."));
}
void wxRadioBox::DisableEvents()

View File

@@ -68,7 +68,7 @@ bool wxRadioButton::Create( wxWindow *parent, wxWindowID id, const wxString& lab
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, validator, name ))
{
wxFAIL_MSG( T("wxRadioButton creation failed") );
wxFAIL_MSG( wxT("wxRadioButton creation failed") );
return FALSE;
}
@@ -131,7 +131,7 @@ bool wxRadioButton::Create( wxWindow *parent, wxWindowID id, const wxString& lab
void wxRadioButton::SetLabel( const wxString& label )
{
wxCHECK_RET( m_widget != NULL, T("invalid radiobutton") );
wxCHECK_RET( m_widget != NULL, wxT("invalid radiobutton") );
wxControl::SetLabel( label );
GtkButton *bin = GTK_BUTTON( m_widget );
@@ -141,7 +141,7 @@ void wxRadioButton::SetLabel( const wxString& label )
void wxRadioButton::SetValue( bool val )
{
wxCHECK_RET( m_widget != NULL, T("invalid radiobutton") );
wxCHECK_RET( m_widget != NULL, wxT("invalid radiobutton") );
if (val == GetValue())
return;
@@ -164,7 +164,7 @@ void wxRadioButton::SetValue( bool val )
bool wxRadioButton::GetValue() const
{
wxCHECK_MSG( m_widget != NULL, FALSE, T("invalid radiobutton") );
wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid radiobutton") );
return GTK_TOGGLE_BUTTON(m_widget)->active;
}

View File

@@ -129,7 +129,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, validator, name ))
{
wxFAIL_MSG( T("wxScrollBar creation failed") );
wxFAIL_MSG( wxT("wxScrollBar creation failed") );
return FALSE;
}

View File

@@ -191,7 +191,7 @@ int wxSystemSettings::GetSystemMetric( int index )
case wxSYS_VSCROLL_X: return 15;
}
wxCHECK_MSG( index, 0, T("wxSystemSettings::GetSystemMetric not fully implemented") );
wxCHECK_MSG( index, 0, wxT("wxSystemSettings::GetSystemMetric not fully implemented") );
return 0;
}

View File

@@ -97,7 +97,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, validator, name ))
{
wxFAIL_MSG( T("wxSlider creation failed") );
wxFAIL_MSG( wxT("wxSlider creation failed") );
return FALSE;
}

View File

@@ -106,7 +106,7 @@ bool wxSpinButton::Create(wxWindow *parent,
if (!PreCreation( parent, pos, new_size ) ||
!CreateBase( parent, id, pos, new_size, style, wxDefaultValidator, name ))
{
wxFAIL_MSG( T("wxXX creation failed") );
wxFAIL_MSG( wxT("wxXX creation failed") );
return FALSE;
}
@@ -140,28 +140,28 @@ wxSpinButton::~wxSpinButton()
int wxSpinButton::GetMin() const
{
wxCHECK_MSG( (m_widget != NULL), 0, T("invalid spin button") );
wxCHECK_MSG( (m_widget != NULL), 0, wxT("invalid spin button") );
return (int)ceil(m_adjust->lower);
}
int wxSpinButton::GetMax() const
{
wxCHECK_MSG( (m_widget != NULL), 0, T("invalid spin button") );
wxCHECK_MSG( (m_widget != NULL), 0, wxT("invalid spin button") );
return (int)ceil(m_adjust->upper);
}
int wxSpinButton::GetValue() const
{
wxCHECK_MSG( (m_widget != NULL), 0, T("invalid spin button") );
wxCHECK_MSG( (m_widget != NULL), 0, wxT("invalid spin button") );
return (int)ceil(m_adjust->value);
}
void wxSpinButton::SetValue( int value )
{
wxCHECK_RET( (m_widget != NULL), T("invalid spin button") );
wxCHECK_RET( (m_widget != NULL), wxT("invalid spin button") );
float fpos = (float)value;
m_oldPos = fpos;
@@ -174,7 +174,7 @@ void wxSpinButton::SetValue( int value )
void wxSpinButton::SetRange(int minVal, int maxVal)
{
wxCHECK_RET( (m_widget != NULL), T("invalid spin button") );
wxCHECK_RET( (m_widget != NULL), wxT("invalid spin button") );
float fmin = (float)minVal;
float fmax = (float)maxVal;
@@ -197,7 +197,7 @@ void wxSpinButton::SetRange(int minVal, int maxVal)
void wxSpinButton::OnSize( wxSizeEvent &WXUNUSED(event) )
{
wxCHECK_RET( (m_widget != NULL), T("invalid spin button") );
wxCHECK_RET( (m_widget != NULL), wxT("invalid spin button") );
m_width = 15;
gtk_widget_set_usize( m_widget, m_width, m_height );

View File

@@ -37,7 +37,7 @@ wxStaticBitmap::wxStaticBitmap( wxWindow *parent, wxWindowID id, const wxBitmap
void wxStaticBitmap::CreatePixmapWidget()
{
wxCHECK_RET( m_bitmap.Ok(), T("should only be called if we have a bitmap") );
wxCHECK_RET( m_bitmap.Ok(), wxT("should only be called if we have a bitmap") );
GdkBitmap *mask = (GdkBitmap *) NULL;
if ( m_bitmap.GetMask() )
@@ -61,7 +61,7 @@ bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
{
wxFAIL_MSG( T("wxXX creation failed") );
wxFAIL_MSG( wxT("wxXX creation failed") );
return FALSE;
}

View File

@@ -44,7 +44,7 @@ bool wxStaticBox::Create( wxWindow *parent, wxWindowID id, const wxString &label
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
{
wxFAIL_MSG( T("wxStaticBox creation failed") );
wxFAIL_MSG( wxT("wxStaticBox creation failed") );
return FALSE;
}

View File

@@ -44,7 +44,7 @@ bool wxStaticLine::Create( wxWindow *parent, wxWindowID id,
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
{
wxFAIL_MSG( T("wxStaticLine creation failed") );
wxFAIL_MSG( wxT("wxStaticLine creation failed") );
return FALSE;
}

View File

@@ -51,7 +51,7 @@ bool wxStaticText::Create(wxWindow *parent,
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
{
wxFAIL_MSG( T("wxXX creation failed") );
wxFAIL_MSG( wxT("wxXX creation failed") );
return FALSE;
}

View File

@@ -151,7 +151,7 @@ bool wxToolBar::Create( wxWindow *parent, wxWindowID id,
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
{
wxFAIL_MSG( T("wxToolBar creation failed") );
wxFAIL_MSG( wxT("wxToolBar creation failed") );
return FALSE;
}
@@ -263,13 +263,13 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap,
m_hasToolAlready = TRUE;
wxCHECK_MSG( bitmap.Ok(), (wxToolBarTool *)NULL,
T("invalid bitmap for wxToolBar icon") );
wxT("invalid bitmap for wxToolBar icon") );
wxCHECK_MSG( bitmap.GetBitmap() == NULL, (wxToolBarTool *)NULL,
T("wxToolBar doesn't support GdkBitmap") );
wxT("wxToolBar doesn't support GdkBitmap") );
wxCHECK_MSG( bitmap.GetPixmap() != NULL, (wxToolBarTool *)NULL,
T("wxToolBar::Add needs a wxBitmap") );
wxT("wxToolBar::Add needs a wxBitmap") );
GtkWidget *tool_pixmap = (GtkWidget *)NULL;
@@ -326,7 +326,7 @@ void wxToolBar::AddSeparator()
void wxToolBar::ClearTools()
{
wxFAIL_MSG( T("wxToolBar::ClearTools not implemented") );
wxFAIL_MSG( wxT("wxToolBar::ClearTools not implemented") );
}
bool wxToolBar::Realize()
@@ -376,7 +376,7 @@ void wxToolBar::EnableTool(int toolIndex, bool enable)
node = node->Next();
}
wxFAIL_MSG( T("wrong toolbar index") );
wxFAIL_MSG( wxT("wrong toolbar index") );
}
void wxToolBar::ToggleTool( int toolIndex, bool toggle )
@@ -418,7 +418,7 @@ void wxToolBar::ToggleTool( int toolIndex, bool toggle )
node = node->Next();
}
wxFAIL_MSG( T("wrong toolbar index") );
wxFAIL_MSG( wxT("wrong toolbar index") );
}
wxObject *wxToolBar::GetToolClientData( int index ) const
@@ -431,7 +431,7 @@ wxObject *wxToolBar::GetToolClientData( int index ) const
node = node->Next();
}
wxFAIL_MSG( T("wrong toolbar index") );
wxFAIL_MSG( wxT("wrong toolbar index") );
return (wxObject*)NULL;
}
@@ -446,7 +446,7 @@ bool wxToolBar::GetToolState(int toolIndex) const
node = node->Next();
}
wxFAIL_MSG( T("wrong toolbar index") );
wxFAIL_MSG( wxT("wrong toolbar index") );
return FALSE;
}
@@ -461,14 +461,14 @@ bool wxToolBar::GetToolEnabled(int toolIndex) const
node = node->Next();
}
wxFAIL_MSG( T("wrong toolbar index") );
wxFAIL_MSG( wxT("wrong toolbar index") );
return FALSE;
}
void wxToolBar::SetMargins( int x, int y )
{
wxCHECK_RET( !m_hasToolAlready, T("wxToolBar::SetMargins must be called before adding tool.") );
wxCHECK_RET( !m_hasToolAlready, wxT("wxToolBar::SetMargins must be called before adding tool.") );
if (x > 2) gtk_toolbar_append_space( m_toolbar ); // oh well
@@ -478,7 +478,7 @@ void wxToolBar::SetMargins( int x, int y )
void wxToolBar::SetToolPacking( int WXUNUSED(packing) )
{
wxFAIL_MSG( T("wxToolBar::SetToolPacking not implemented") );
wxFAIL_MSG( wxT("wxToolBar::SetToolPacking not implemented") );
}
void wxToolBar::SetToolSeparation( int separation )
@@ -510,9 +510,9 @@ wxString wxToolBar::GetToolLongHelp(int toolIndex)
node = node->Next();
}
wxFAIL_MSG( T("wrong toolbar index") );
wxFAIL_MSG( wxT("wrong toolbar index") );
return T("");
return wxT("");
}
wxString wxToolBar::GetToolShortHelp(int toolIndex)
@@ -528,9 +528,9 @@ wxString wxToolBar::GetToolShortHelp(int toolIndex)
node = node->Next();
}
wxFAIL_MSG( T("wrong toolbar index") );
wxFAIL_MSG( wxT("wrong toolbar index") );
return T("");
return wxT("");
}
void wxToolBar::SetToolLongHelp(int toolIndex, const wxString& helpString)
@@ -547,7 +547,7 @@ void wxToolBar::SetToolLongHelp(int toolIndex, const wxString& helpString)
node = node->Next();
}
wxFAIL_MSG( T("wrong toolbar index") );
wxFAIL_MSG( wxT("wrong toolbar index") );
return;
}
@@ -566,7 +566,7 @@ void wxToolBar::SetToolShortHelp(int toolIndex, const wxString& helpString)
node = node->Next();
}
wxFAIL_MSG( T("wrong toolbar index") );
wxFAIL_MSG( wxT("wrong toolbar index") );
return;
}

View File

@@ -118,7 +118,7 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, validator, name ))
{
wxFAIL_MSG( T("wxTextCtrl creation failed") );
wxFAIL_MSG( wxT("wxTextCtrl creation failed") );
return FALSE;
}
@@ -282,7 +282,7 @@ void wxTextCtrl::CalculateScrollbar()
wxString wxTextCtrl::GetValue() const
{
wxCHECK_MSG( m_text != NULL, T(""), T("invalid text ctrl") );
wxCHECK_MSG( m_text != NULL, wxT(""), wxT("invalid text ctrl") );
wxString tmp;
if (m_windowStyle & wxTE_MULTILINE)
@@ -301,9 +301,9 @@ wxString wxTextCtrl::GetValue() const
void wxTextCtrl::SetValue( const wxString &value )
{
wxCHECK_RET( m_text != NULL, T("invalid text ctrl") );
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
wxString tmp = T("");
wxString tmp = wxT("");
if (!value.IsNull()) tmp = value;
if (m_windowStyle & wxTE_MULTILINE)
{
@@ -325,7 +325,7 @@ void wxTextCtrl::SetValue( const wxString &value )
void wxTextCtrl::WriteText( const wxString &text )
{
wxCHECK_RET( m_text != NULL, T("invalid text ctrl") );
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
if (text.IsEmpty()) return;
@@ -365,7 +365,7 @@ void wxTextCtrl::WriteText( const wxString &text )
void wxTextCtrl::AppendText( const wxString &text )
{
wxCHECK_RET( m_text != NULL, T("invalid text ctrl") );
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
if (text.IsEmpty()) return;
@@ -413,7 +413,7 @@ wxString wxTextCtrl::GetLineText( long lineNo ) const
if (text)
{
wxString buf(T(""));
wxString buf(wxT(""));
long i;
int currentLine = 0;
for (i = 0; currentLine != lineNo && text[i]; i++ )
@@ -441,7 +441,7 @@ void wxTextCtrl::OnDropFiles( wxDropFilesEvent &WXUNUSED(event) )
{
/* If you implement this, don't forget to update the documentation!
* (file docs/latex/wx/text.tex) */
wxFAIL_MSG( T("wxTextCtrl::OnDropFiles not implemented") );
wxFAIL_MSG( wxT("wxTextCtrl::OnDropFiles not implemented") );
}
bool wxTextCtrl::PositionToXY(long pos, long *x, long *y ) const
@@ -460,7 +460,7 @@ bool wxTextCtrl::PositionToXY(long pos, long *x, long *y ) const
const wxChar* stop = text.c_str() + pos;
for ( const wxChar *p = text.c_str(); p < stop; p++ )
{
if (*p == T('\n'))
if (*p == wxT('\n'))
{
(*y)++;
*x=0;
@@ -536,7 +536,7 @@ int wxTextCtrl::GetNumberOfLines() const
void wxTextCtrl::SetInsertionPoint( long pos )
{
wxCHECK_RET( m_text != NULL, T("invalid text ctrl") );
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
if (m_windowStyle & wxTE_MULTILINE)
{
@@ -573,7 +573,7 @@ void wxTextCtrl::SetInsertionPoint( long pos )
void wxTextCtrl::SetInsertionPointEnd()
{
wxCHECK_RET( m_text != NULL, T("invalid text ctrl") );
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
if (m_windowStyle & wxTE_MULTILINE)
SetInsertionPoint(gtk_text_get_length(GTK_TEXT(m_text)));
@@ -583,7 +583,7 @@ void wxTextCtrl::SetInsertionPointEnd()
void wxTextCtrl::SetEditable( bool editable )
{
wxCHECK_RET( m_text != NULL, T("invalid text ctrl") );
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
if (m_windowStyle & wxTE_MULTILINE)
gtk_text_set_editable( GTK_TEXT(m_text), editable );
@@ -598,7 +598,7 @@ void wxTextCtrl::DiscardEdits()
void wxTextCtrl::SetSelection( long from, long to )
{
wxCHECK_RET( m_text != NULL, T("invalid text ctrl") );
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
gtk_editable_select_region( GTK_EDITABLE(m_text), (gint)from, (gint)to );
}
@@ -610,14 +610,14 @@ void wxTextCtrl::ShowPosition( long WXUNUSED(pos) )
long wxTextCtrl::GetInsertionPoint() const
{
wxCHECK_MSG( m_text != NULL, 0, T("invalid text ctrl") );
wxCHECK_MSG( m_text != NULL, 0, wxT("invalid text ctrl") );
return (long) GTK_EDITABLE(m_text)->current_pos;
}
long wxTextCtrl::GetLastPosition() const
{
wxCHECK_MSG( m_text != NULL, 0, T("invalid text ctrl") );
wxCHECK_MSG( m_text != NULL, 0, wxT("invalid text ctrl") );
int pos = 0;
if (m_windowStyle & wxTE_MULTILINE)
@@ -630,14 +630,14 @@ long wxTextCtrl::GetLastPosition() const
void wxTextCtrl::Remove( long from, long to )
{
wxCHECK_RET( m_text != NULL, T("invalid text ctrl") );
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
gtk_editable_delete_text( GTK_EDITABLE(m_text), (gint)from, (gint)to );
}
void wxTextCtrl::Replace( long from, long to, const wxString &value )
{
wxCHECK_RET( m_text != NULL, T("invalid text ctrl") );
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
gtk_editable_delete_text( GTK_EDITABLE(m_text), (gint)from, (gint)to );
@@ -655,7 +655,7 @@ void wxTextCtrl::Replace( long from, long to, const wxString &value )
void wxTextCtrl::Cut()
{
wxCHECK_RET( m_text != NULL, T("invalid text ctrl") );
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
#if (GTK_MINOR_VERSION > 0)
gtk_editable_cut_clipboard( GTK_EDITABLE(m_text) );
@@ -666,7 +666,7 @@ void wxTextCtrl::Cut()
void wxTextCtrl::Copy()
{
wxCHECK_RET( m_text != NULL, T("invalid text ctrl") );
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
#if (GTK_MINOR_VERSION > 0)
gtk_editable_copy_clipboard( GTK_EDITABLE(m_text) );
@@ -677,7 +677,7 @@ void wxTextCtrl::Copy()
void wxTextCtrl::Paste()
{
wxCHECK_RET( m_text != NULL, T("invalid text ctrl") );
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
#if (GTK_MINOR_VERSION > 0)
gtk_editable_paste_clipboard( GTK_EDITABLE(m_text) );
@@ -711,26 +711,26 @@ bool wxTextCtrl::CanPaste() const
void wxTextCtrl::Undo()
{
// TODO
wxFAIL_MSG( T("wxTextCtrl::Undo not implemented") );
wxFAIL_MSG( wxT("wxTextCtrl::Undo not implemented") );
}
void wxTextCtrl::Redo()
{
// TODO
wxFAIL_MSG( T("wxTextCtrl::Redo not implemented") );
wxFAIL_MSG( wxT("wxTextCtrl::Redo not implemented") );
}
bool wxTextCtrl::CanUndo() const
{
// TODO
wxFAIL_MSG( T("wxTextCtrl::CanUndo not implemented") );
wxFAIL_MSG( wxT("wxTextCtrl::CanUndo not implemented") );
return FALSE;
}
bool wxTextCtrl::CanRedo() const
{
// TODO
wxFAIL_MSG( T("wxTextCtrl::CanRedo not implemented") );
wxFAIL_MSG( wxT("wxTextCtrl::CanRedo not implemented") );
return FALSE;
}
@@ -738,7 +738,7 @@ bool wxTextCtrl::CanRedo() const
// selection.
void wxTextCtrl::GetSelection(long* from, long* to) const
{
wxCHECK_RET( m_text != NULL, T("invalid text ctrl") );
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
if (!(GTK_EDITABLE(m_text)->has_selection))
{
@@ -753,7 +753,7 @@ void wxTextCtrl::GetSelection(long* from, long* to) const
bool wxTextCtrl::IsEditable() const
{
wxCHECK_MSG( m_text != NULL, FALSE, T("invalid text ctrl") );
wxCHECK_MSG( m_text != NULL, FALSE, wxT("invalid text ctrl") );
return GTK_EDITABLE(m_text)->editable;
}
@@ -765,12 +765,12 @@ bool wxTextCtrl::IsModified() const
void wxTextCtrl::Clear()
{
SetValue( T("") );
SetValue( wxT("") );
}
void wxTextCtrl::OnChar( wxKeyEvent &key_event )
{
wxCHECK_RET( m_text != NULL, T("invalid text ctrl") );
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
if ((key_event.KeyCode() == WXK_RETURN) && (m_windowStyle & wxPROCESS_ENTER))
{
@@ -798,7 +798,7 @@ bool wxTextCtrl::IsOwnGtkWindow( GdkWindow *window )
// the font will change for subsequent text insertiongs
bool wxTextCtrl::SetFont( const wxFont &font )
{
wxCHECK_MSG( m_text != NULL, FALSE, T("invalid text ctrl") );
wxCHECK_MSG( m_text != NULL, FALSE, wxT("invalid text ctrl") );
if ( !wxWindowBase::SetFont(font) )
{
@@ -824,7 +824,7 @@ bool wxTextCtrl::SetFont( const wxFont &font )
bool wxTextCtrl::SetForegroundColour( const wxColour &WXUNUSED(colour) )
{
wxCHECK_MSG( m_text != NULL, FALSE, T("invalid text ctrl") );
wxCHECK_MSG( m_text != NULL, FALSE, wxT("invalid text ctrl") );
// doesn't work
return FALSE;
@@ -832,7 +832,7 @@ bool wxTextCtrl::SetForegroundColour( const wxColour &WXUNUSED(colour) )
bool wxTextCtrl::SetBackgroundColour( const wxColour &colour )
{
wxCHECK_MSG( m_text != NULL, FALSE, T("invalid text ctrl") );
wxCHECK_MSG( m_text != NULL, FALSE, wxT("invalid text ctrl") );
wxControl::SetBackgroundColour( colour );

View File

@@ -40,9 +40,9 @@
// Yuck this is really BOTH site and platform dependent
// so we should use some other strategy!
#ifdef __SUN__
#define DEFAULT_XRESOURCE_DIR T("/usr/openwin/lib/app-defaults")
#define DEFAULT_XRESOURCE_DIR wxT("/usr/openwin/lib/app-defaults")
#else
#define DEFAULT_XRESOURCE_DIR T("/usr/lib/X11/app-defaults")
#define DEFAULT_XRESOURCE_DIR wxT("/usr/lib/X11/app-defaults")
#endif
//-----------------------------------------------------------------------------
@@ -63,13 +63,13 @@ static wxChar *GetResourcePath(wxChar *buf, wxChar *name, bool create)
wxStrcpy(buf, name);
return buf; // Exists so ...
}
if (*name == T('/'))
if (*name == wxT('/'))
wxStrcpy(buf, name);
else
{
// Put in standard place for resource files if not absolute
wxStrcpy(buf, DEFAULT_XRESOURCE_DIR);
wxStrcat(buf, T("/"));
wxStrcat(buf, wxT("/"));
wxStrcat(buf, FileNameFromPath(name));
}
if (create)
@@ -96,18 +96,18 @@ static wxChar *GetIniFile(wxChar *dest, const wxChar *filename)
if ((home = wxGetUserHome(wxString())) != NULL)
{
wxStrcpy(dest, home);
if (dest[wxStrlen(dest) - 1] != T('/')) wxStrcat(dest, T("/"));
if (dest[wxStrlen(dest) - 1] != wxT('/')) wxStrcat(dest, wxT("/"));
if (filename == NULL)
{
if ((filename = wxGetenv(T("XENVIRONMENT"))) == NULL) filename = T(".Xdefaults");
if ((filename = wxGetenv(wxT("XENVIRONMENT"))) == NULL) filename = wxT(".Xdefaults");
}
else
if (*filename != T('.')) wxStrcat(dest, T("."));
if (*filename != wxT('.')) wxStrcat(dest, wxT("."));
wxStrcat(dest, filename);
}
else
{
dest[0] = T('\0');
dest[0] = wxT('\0');
}
}
return dest;
@@ -148,7 +148,7 @@ static void wxXMergeDatabases()
// Open XENVIRONMENT file, or if not defined, the .Xdefaults,
// and merge into existing database
if ((environment = wxGetenv(T("XENVIRONMENT"))) == NULL)
if ((environment = wxGetenv(wxT("XENVIRONMENT"))) == NULL)
{
size_t len;
#if wxUSE_UNICODE
@@ -203,7 +203,7 @@ void wxFlushResources()
void wxDeleteResources(const wxChar *file)
{
wxLogTrace(wxTraceResAlloc, T("Delete: Number = %d"), wxTheResourceCache->Number());
wxLogTrace(wxTraceResAlloc, wxT("Delete: Number = %d"), wxTheResourceCache->Number());
wxChar buffer[500];
(void)GetIniFile(buffer, file);
@@ -233,7 +233,7 @@ bool wxWriteResource(const wxString& section, const wxString& entry, const wxStr
database = (XrmDatabase)node->Data();
else {
database = XrmGetFileDatabase(wxConvCurrent->cWX2MB(buffer));
wxLogTrace(wxTraceResAlloc, T("Write: Number = %d"), wxTheResourceCache->Number());
wxLogTrace(wxTraceResAlloc, wxT("Write: Number = %d"), wxTheResourceCache->Number());
wxTheResourceCache->Append(buffer, (wxObject *)database);
}
char resName[300];
@@ -287,7 +287,7 @@ bool wxGetResource(const wxString& section, const wxString& entry, char **value,
else
{
database = XrmGetFileDatabase(wxConvCurrent->cWX2MB(buffer));
wxLogTrace(wxTraceResAlloc, T("Get: Number = %d"), wxTheResourceCache->Number());
wxLogTrace(wxTraceResAlloc, wxT("Get: Number = %d"), wxTheResourceCache->Number());
wxTheResourceCache->Append(buffer, (wxObject *)database);
}
} else

View File

@@ -155,7 +155,7 @@ static gint gtk_debug_focus_in_callback( GtkWidget *WXUNUSED(widget),
wxLog::AddTraceMask("focus");
s_done = TRUE;
}
wxLogTrace(T("FOCUS NOW AT: %s"), name);
wxLogTrace(wxT("FOCUS NOW AT: %s"), name);
*/
return FALSE;
@@ -164,7 +164,7 @@ static gint gtk_debug_focus_in_callback( GtkWidget *WXUNUSED(widget),
void debug_focus_in( GtkWidget* widget, const wxChar* name, const wxChar *window )
{
wxString tmp = name;
tmp += T(" FROM ");
tmp += wxT(" FROM ");
tmp += window;
wxChar *s = new wxChar[tmp.Length()+1];
@@ -977,10 +977,10 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton
wxapp_install_idle_handler();
/*
wxPrintf( T("1) OnButtonPress from ") );
wxPrintf( wxT("1) OnButtonPress from ") );
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
wxPrintf( win->GetClassInfo()->GetClassName() );
wxPrintf( T(".\n") );
wxPrintf( wxT(".\n") );
*/
if (!win->m_hasVMT) return FALSE;
if (g_blockEventsOnDrag) return TRUE;
@@ -995,20 +995,20 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton
gtk_widget_grab_focus (win->m_wxwindow);
/*
wxPrintf( T("GrabFocus from ") );
wxPrintf( wxT("GrabFocus from ") );
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
wxPrintf( win->GetClassInfo()->GetClassName() );
wxPrintf( T(".\n") );
wxPrintf( wxT(".\n") );
*/
}
}
/*
wxPrintf( T("2) OnButtonPress from ") );
wxPrintf( wxT("2) OnButtonPress from ") );
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
wxPrintf( win->GetClassInfo()->GetClassName() );
wxPrintf( T(".\n") );
wxPrintf( wxT(".\n") );
*/
wxEventType event_type = wxEVT_LEFT_DOWN;
@@ -1809,7 +1809,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
{
wxFAIL_MSG( T("wxWindow creation failed") );
wxFAIL_MSG( wxT("wxWindow creation failed") );
return FALSE;
}
@@ -1819,14 +1819,14 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
GTK_WIDGET_UNSET_FLAGS( m_widget, GTK_CAN_FOCUS );
#ifdef __WXDEBUG__
debug_focus_in( m_widget, T("wxWindow::m_widget"), name );
debug_focus_in( m_widget, wxT("wxWindow::m_widget"), name );
#endif
GtkScrolledWindow *scrolledWindow = GTK_SCROLLED_WINDOW(m_widget);
#ifdef __WXDEBUG__
debug_focus_in( scrolledWindow->hscrollbar, T("wxWindow::hsrcollbar"), name );
debug_focus_in( scrolledWindow->vscrollbar, T("wxWindow::vsrcollbar"), name );
debug_focus_in( scrolledWindow->hscrollbar, wxT("wxWindow::hsrcollbar"), name );
debug_focus_in( scrolledWindow->vscrollbar, wxT("wxWindow::vsrcollbar"), name );
#endif
GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass );
@@ -1840,7 +1840,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
m_wxwindow = gtk_myfixed_new();
#ifdef __WXDEBUG__
debug_focus_in( m_wxwindow, T("wxWindow::m_wxwindow"), name );
debug_focus_in( m_wxwindow, wxT("wxWindow::m_wxwindow"), name );
#endif
gtk_container_add( GTK_CONTAINER(m_widget), m_wxwindow );
@@ -1998,7 +1998,7 @@ wxWindow::~wxWindow()
bool wxWindow::PreCreation( wxWindow *parent, const wxPoint &pos, const wxSize &size )
{
wxCHECK_MSG( !m_needParent || parent, FALSE, T("Need complete parent.") );
wxCHECK_MSG( !m_needParent || parent, FALSE, wxT("Need complete parent.") );
/* this turns -1 into 20 so that a minimal window is
visible even although -1,-1 has been given as the
@@ -2030,7 +2030,7 @@ bool wxWindow::PreCreation( wxWindow *parent, const wxPoint &pos, const wxSize
void wxWindow::PostCreation()
{
wxASSERT_MSG( (m_widget != NULL), T("invalid window") );
wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") );
if (m_wxwindow)
{
@@ -2095,7 +2095,7 @@ void wxWindow::ConnectWidget( GtkWidget *widget )
bool wxWindow::Destroy()
{
wxASSERT_MSG( (m_widget != NULL), T("invalid window") );
wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") );
m_hasVMT = FALSE;
@@ -2104,8 +2104,8 @@ bool wxWindow::Destroy()
void wxWindow::DoSetSize( int x, int y, int width, int height, int sizeFlags )
{
wxASSERT_MSG( (m_widget != NULL), T("invalid window") );
wxASSERT_MSG( (m_parent != NULL), T("wxWindow::SetSize requires parent.\n") );
wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") );
wxASSERT_MSG( (m_parent != NULL), wxT("wxWindow::SetSize requires parent.\n") );
if (m_resizing) return; /* I don't like recursions */
m_resizing = TRUE;
@@ -2239,7 +2239,7 @@ void wxWindow::OnInternalIdle()
void wxWindow::DoGetSize( int *width, int *height ) const
{
wxCHECK_RET( (m_widget != NULL), T("invalid window") );
wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
if (width) (*width) = m_width;
if (height) (*height) = m_height;
@@ -2247,7 +2247,7 @@ void wxWindow::DoGetSize( int *width, int *height ) const
void wxWindow::DoSetClientSize( int width, int height )
{
wxCHECK_RET( (m_widget != NULL), T("invalid window") );
wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
if (!m_wxwindow)
{
@@ -2321,7 +2321,7 @@ void wxWindow::DoSetClientSize( int width, int height )
void wxWindow::DoGetClientSize( int *width, int *height ) const
{
wxCHECK_RET( (m_widget != NULL), T("invalid window") );
wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
if (!m_wxwindow)
{
@@ -2396,7 +2396,7 @@ void wxWindow::DoGetClientSize( int *width, int *height ) const
void wxWindow::DoGetPosition( int *x, int *y ) const
{
wxCHECK_RET( (m_widget != NULL), T("invalid window") );
wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
if (x) (*x) = m_x;
if (y) (*y) = m_y;
@@ -2404,7 +2404,7 @@ void wxWindow::DoGetPosition( int *x, int *y ) const
void wxWindow::DoClientToScreen( int *x, int *y ) const
{
wxCHECK_RET( (m_widget != NULL), T("invalid window") );
wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
if (!m_widget->window) return;
@@ -2433,7 +2433,7 @@ void wxWindow::DoClientToScreen( int *x, int *y ) const
void wxWindow::DoScreenToClient( int *x, int *y ) const
{
wxCHECK_RET( (m_widget != NULL), T("invalid window") );
wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
if (!m_widget->window) return;
@@ -2462,7 +2462,7 @@ void wxWindow::DoScreenToClient( int *x, int *y ) const
bool wxWindow::Show( bool show )
{
wxCHECK_MSG( (m_widget != NULL), FALSE, T("invalid window") );
wxCHECK_MSG( (m_widget != NULL), FALSE, wxT("invalid window") );
if (!wxWindowBase::Show(show))
{
@@ -2480,7 +2480,7 @@ bool wxWindow::Show( bool show )
bool wxWindow::Enable( bool enable )
{
wxCHECK_MSG( (m_widget != NULL), FALSE, T("invalid window") );
wxCHECK_MSG( (m_widget != NULL), FALSE, wxT("invalid window") );
if (!wxWindowBase::Enable(enable))
{
@@ -2497,9 +2497,9 @@ bool wxWindow::Enable( bool enable )
int wxWindow::GetCharHeight() const
{
wxCHECK_MSG( (m_widget != NULL), 12, T("invalid window") );
wxCHECK_MSG( (m_widget != NULL), 12, wxT("invalid window") );
wxCHECK_MSG( m_font.Ok(), 12, T("invalid font") );
wxCHECK_MSG( m_font.Ok(), 12, wxT("invalid font") );
GdkFont *font = m_font.GetInternalFont( 1.0 );
@@ -2508,9 +2508,9 @@ int wxWindow::GetCharHeight() const
int wxWindow::GetCharWidth() const
{
wxCHECK_MSG( (m_widget != NULL), 8, T("invalid window") );
wxCHECK_MSG( (m_widget != NULL), 8, wxT("invalid window") );
wxCHECK_MSG( m_font.Ok(), 8, T("invalid font") );
wxCHECK_MSG( m_font.Ok(), 8, wxT("invalid font") );
GdkFont *font = m_font.GetInternalFont( 1.0 );
@@ -2527,7 +2527,7 @@ void wxWindow::GetTextExtent( const wxString& string,
wxFont fontToUse = m_font;
if (theFont) fontToUse = *theFont;
wxCHECK_RET( fontToUse.Ok(), T("invalid font") );
wxCHECK_RET( fontToUse.Ok(), wxT("invalid font") );
GdkFont *font = fontToUse.GetInternalFont( 1.0 );
if (x) (*x) = gdk_string_width( font, string.mbc_str() );
@@ -2538,7 +2538,7 @@ void wxWindow::GetTextExtent( const wxString& string,
void wxWindow::SetFocus()
{
wxCHECK_RET( (m_widget != NULL), T("invalid window") );
wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
GtkWidget *connect_widget = GetConnectWidget();
if (connect_widget)
@@ -2564,7 +2564,7 @@ bool wxWindow::AcceptsFocus() const
bool wxWindow::Reparent( wxWindowBase *newParentBase )
{
wxCHECK_MSG( (m_widget != NULL), FALSE, T("invalid window") );
wxCHECK_MSG( (m_widget != NULL), FALSE, wxT("invalid window") );
wxWindow *oldParent = m_parent,
*newParent = (wxWindow *)newParentBase;
@@ -2600,11 +2600,11 @@ bool wxWindow::Reparent( wxWindowBase *newParentBase )
void wxWindow::DoAddChild(wxWindow *child)
{
wxASSERT_MSG( (m_widget != NULL), T("invalid window") );
wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") );
wxASSERT_MSG( (child != NULL), T("invalid child window") );
wxASSERT_MSG( (child != NULL), wxT("invalid child window") );
wxASSERT_MSG( (m_insertCallback != NULL), T("invalid child insertion function") );
wxASSERT_MSG( (m_insertCallback != NULL), wxT("invalid child insertion function") );
/* add to list */
AddChild( child );
@@ -2615,7 +2615,7 @@ void wxWindow::DoAddChild(wxWindow *child)
void wxWindow::Raise()
{
wxCHECK_RET( (m_widget != NULL), T("invalid window") );
wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
if (!m_widget->window) return;
@@ -2624,7 +2624,7 @@ void wxWindow::Raise()
void wxWindow::Lower()
{
wxCHECK_RET( (m_widget != NULL), T("invalid window") );
wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
if (!m_widget->window) return;
@@ -2633,14 +2633,14 @@ void wxWindow::Lower()
bool wxWindow::SetCursor( const wxCursor &cursor )
{
wxCHECK_MSG( (m_widget != NULL), FALSE, T("invalid window") );
wxCHECK_MSG( (m_widget != NULL), FALSE, wxT("invalid window") );
return wxWindowBase::SetCursor( cursor );
}
void wxWindow::WarpPointer( int x, int y )
{
wxCHECK_RET( (m_widget != NULL), T("invalid window") );
wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
GtkWidget *connect_widget = GetConnectWidget();
if (connect_widget->window)
@@ -2653,7 +2653,7 @@ void wxWindow::WarpPointer( int x, int y )
void wxWindow::Refresh( bool eraseBackground, const wxRect *rect )
{
wxCHECK_RET( (m_widget != NULL), T("invalid window") );
wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
if (!m_widget->window) return;
@@ -2720,7 +2720,7 @@ void wxWindow::Refresh( bool eraseBackground, const wxRect *rect )
void wxWindow::Clear()
{
wxCHECK_RET( m_widget != NULL, T("invalid window") );
wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
if (!m_widget->window) return;
@@ -2747,7 +2747,7 @@ void wxWindow::ApplyToolTip( GtkTooltips *tips, const wxChar *tip )
bool wxWindow::SetBackgroundColour( const wxColour &colour )
{
wxCHECK_MSG( m_widget != NULL, FALSE, T("invalid window") );
wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid window") );
if (!wxWindowBase::SetBackgroundColour(colour))
{
@@ -2794,7 +2794,7 @@ bool wxWindow::SetBackgroundColour( const wxColour &colour )
bool wxWindow::SetForegroundColour( const wxColour &colour )
{
wxCHECK_MSG( m_widget != NULL, FALSE, T("invalid window") );
wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid window") );
if (!wxWindowBase::SetForegroundColour(colour))
{
@@ -2910,9 +2910,9 @@ static void pop_pos_callback( GtkMenu * WXUNUSED(menu),
bool wxWindow::DoPopupMenu( wxMenu *menu, int x, int y )
{
wxCHECK_MSG( m_widget != NULL, FALSE, T("invalid window") );
wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid window") );
wxCHECK_MSG( menu != NULL, FALSE, T("invalid popup-menu") );
wxCHECK_MSG( menu != NULL, FALSE, wxT("invalid popup-menu") );
SetInvokingWindow( menu, this );
@@ -2949,7 +2949,7 @@ bool wxWindow::DoPopupMenu( wxMenu *menu, int x, int y )
void wxWindow::SetDropTarget( wxDropTarget *dropTarget )
{
wxCHECK_RET( m_widget != NULL, T("invalid window") );
wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
GtkWidget *dnd_widget = GetConnectWidget();
@@ -2979,7 +2979,7 @@ bool wxWindow::IsOwnGtkWindow( GdkWindow *window )
bool wxWindow::SetFont( const wxFont &font )
{
wxCHECK_MSG( m_widget != NULL, FALSE, T("invalid window") );
wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid window") );
if (!wxWindowBase::SetFont(font))
{
@@ -3017,9 +3017,9 @@ bool wxWindow::SetFont( const wxFont &font )
void wxWindow::CaptureMouse()
{
wxCHECK_RET( m_widget != NULL, T("invalid window") );
wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
wxCHECK_RET( g_captureWindow == NULL, T("CaptureMouse called twice") );
wxCHECK_RET( g_captureWindow == NULL, wxT("CaptureMouse called twice") );
GtkWidget *connect_widget = GetConnectWidget();
if (!connect_widget->window) return;
@@ -3038,9 +3038,9 @@ void wxWindow::CaptureMouse()
void wxWindow::ReleaseMouse()
{
wxCHECK_RET( m_widget != NULL, T("invalid window") );
wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
wxCHECK_RET( g_captureWindow, T("ReleaseMouse called twice") );
wxCHECK_RET( g_captureWindow, wxT("ReleaseMouse called twice") );
GtkWidget *connect_widget = GetConnectWidget();
if (!connect_widget->window) return;
@@ -3057,9 +3057,9 @@ bool wxWindow::IsRetained() const
void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible,
int range, bool refresh )
{
wxCHECK_RET( m_widget != NULL, T("invalid window") );
wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
wxCHECK_RET( m_wxwindow != NULL, T("window needs client area for scrolling") );
wxCHECK_RET( m_wxwindow != NULL, wxT("window needs client area for scrolling") );
m_hasScrolling = TRUE;
@@ -3120,9 +3120,9 @@ void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible,
void wxWindow::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) )
{
wxCHECK_RET( m_widget != NULL, T("invalid window") );
wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
wxCHECK_RET( m_wxwindow != NULL, T("window needs client area for scrolling") );
wxCHECK_RET( m_wxwindow != NULL, wxT("window needs client area for scrolling") );
if (orient == wxHORIZONTAL)
{
@@ -3163,9 +3163,9 @@ void wxWindow::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) )
int wxWindow::GetScrollThumb( int orient ) const
{
wxCHECK_MSG( m_widget != NULL, 0, T("invalid window") );
wxCHECK_MSG( m_widget != NULL, 0, wxT("invalid window") );
wxCHECK_MSG( m_wxwindow != NULL, 0, T("window needs client area for scrolling") );
wxCHECK_MSG( m_wxwindow != NULL, 0, wxT("window needs client area for scrolling") );
if (orient == wxHORIZONTAL)
return (int)(m_hAdjust->page_size+0.5);
@@ -3175,9 +3175,9 @@ int wxWindow::GetScrollThumb( int orient ) const
int wxWindow::GetScrollPos( int orient ) const
{
wxCHECK_MSG( m_widget != NULL, 0, T("invalid window") );
wxCHECK_MSG( m_widget != NULL, 0, wxT("invalid window") );
wxCHECK_MSG( m_wxwindow != NULL, 0, T("window needs client area for scrolling") );
wxCHECK_MSG( m_wxwindow != NULL, 0, wxT("window needs client area for scrolling") );
if (orient == wxHORIZONTAL)
return (int)(m_hAdjust->value+0.5);
@@ -3187,9 +3187,9 @@ int wxWindow::GetScrollPos( int orient ) const
int wxWindow::GetScrollRange( int orient ) const
{
wxCHECK_MSG( m_widget != NULL, 0, T("invalid window") );
wxCHECK_MSG( m_widget != NULL, 0, wxT("invalid window") );
wxCHECK_MSG( m_wxwindow != NULL, 0, T("window needs client area for scrolling") );
wxCHECK_MSG( m_wxwindow != NULL, 0, wxT("window needs client area for scrolling") );
if (orient == wxHORIZONTAL)
return (int)(m_hAdjust->upper+0.5);
@@ -3199,9 +3199,9 @@ int wxWindow::GetScrollRange( int orient ) const
void wxWindow::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) )
{
wxCHECK_RET( m_widget != NULL, T("invalid window") );
wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
wxCHECK_RET( m_wxwindow != NULL, T("window needs client area for scrolling") );
wxCHECK_RET( m_wxwindow != NULL, wxT("window needs client area for scrolling") );
if (!m_scrollGC)
{