many changes; major ones:
1. start of !wxUSE_GUI support 2. _T() macro renamed to T() 3. wxConvertWX2MB and MB2WX macro added git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
// Author: Robert Roebling
|
||||
// Id: $id:$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
@@ -24,13 +24,12 @@
|
||||
class wxAccelRefData: public wxObjectRefData
|
||||
{
|
||||
public:
|
||||
|
||||
wxAccelRefData(void);
|
||||
|
||||
wxAccelRefData();
|
||||
|
||||
wxList m_accels;
|
||||
};
|
||||
|
||||
wxAccelRefData::wxAccelRefData(void)
|
||||
wxAccelRefData::wxAccelRefData()
|
||||
{
|
||||
m_accels.DeleteContents( TRUE );
|
||||
}
|
||||
@@ -40,7 +39,7 @@ wxAccelRefData::wxAccelRefData(void)
|
||||
#define M_ACCELDATA ((wxAccelRefData *)m_refData)
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable,wxObject)
|
||||
|
||||
|
||||
wxAcceleratorTable::wxAcceleratorTable()
|
||||
{
|
||||
}
|
||||
@@ -48,7 +47,7 @@ wxAcceleratorTable::wxAcceleratorTable()
|
||||
wxAcceleratorTable::wxAcceleratorTable( int n, wxAcceleratorEntry entries[] )
|
||||
{
|
||||
m_refData = new wxAccelRefData();
|
||||
|
||||
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
int flag = entries[i].GetFlags();
|
||||
@@ -80,12 +79,12 @@ int wxAcceleratorTable::GetCommand( wxKeyEvent &event )
|
||||
(((entry->GetFlags() & wxACCEL_CTRL) == 0) || event.ControlDown()) &&
|
||||
(((entry->GetFlags() & wxACCEL_SHIFT) == 0) || event.ShiftDown()) &&
|
||||
(((entry->GetFlags() & wxACCEL_ALT) == 0) || event.AltDown() || event.MetaDown()))
|
||||
{
|
||||
{
|
||||
return entry->GetCommand();
|
||||
}
|
||||
}
|
||||
node = node->Next();
|
||||
}
|
||||
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@@ -144,7 +144,7 @@ gint wxapp_idle_callback( gpointer WXUNUSED(data) );
|
||||
bool wxYield()
|
||||
{
|
||||
bool has_idle = (wxTheApp->m_idleTag != 0);
|
||||
|
||||
|
||||
if (has_idle)
|
||||
{
|
||||
/* We need to temporarily remove idle callbacks or the loop will
|
||||
@@ -160,20 +160,20 @@ bool wxYield()
|
||||
might have been changed (it also will update other things set from
|
||||
OnUpdateUI() which is a nice (and desired) side effect) */
|
||||
while (wxTheApp->ProcessIdle()) { }
|
||||
|
||||
|
||||
if (has_idle)
|
||||
{
|
||||
/* re-add idle handler */
|
||||
wxTheApp->m_idleTag = gtk_idle_add( wxapp_idle_callback, (gpointer) NULL );
|
||||
}
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gint wxapp_idle_callback( gpointer WXUNUSED(data) )
|
||||
{
|
||||
if (!wxTheApp) return TRUE;
|
||||
|
||||
|
||||
#if (GTK_MINOR_VERSION > 0)
|
||||
/* when getting called from GDK's idle handler we
|
||||
are no longer within GDK's grab on the GUI
|
||||
@@ -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, T("attempt to install idle handler twice") );
|
||||
|
||||
/* this routine gets called by all event handlers
|
||||
indicating that the idle is over. */
|
||||
@@ -224,14 +224,14 @@ static gint wxapp_wakeup_timerout_callback( gpointer WXUNUSED(data) );
|
||||
void wxapp_install_thread_wakeup()
|
||||
{
|
||||
if (wxTheApp->m_wakeUpTimerTag) return;
|
||||
|
||||
|
||||
wxTheApp->m_wakeUpTimerTag = gtk_timeout_add( 100, wxapp_wakeup_timerout_callback, (gpointer) NULL );
|
||||
}
|
||||
|
||||
void wxapp_uninstall_thread_wakeup()
|
||||
{
|
||||
if (!wxTheApp->m_wakeUpTimerTag) return;
|
||||
|
||||
|
||||
gtk_timeout_remove( wxTheApp->m_wakeUpTimerTag );
|
||||
wxTheApp->m_wakeUpTimerTag = 0;
|
||||
}
|
||||
@@ -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( T("Unsupported graphics hardware") );
|
||||
#endif
|
||||
}
|
||||
m_colorCube[ (r*1024) + (g*32) + b ] = index;
|
||||
@@ -478,7 +478,7 @@ bool wxApp::SendIdleEvents( wxWindow* win )
|
||||
win->ProcessEvent(event);
|
||||
|
||||
win->OnInternalIdle();
|
||||
|
||||
|
||||
if (event.MoreRequested())
|
||||
needMore = TRUE;
|
||||
|
||||
@@ -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(T("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") );
|
||||
T("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, T("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(T("requested non existent standard icon"));
|
||||
// still fall through
|
||||
|
||||
case wxICON_HAND:
|
||||
|
@@ -60,7 +60,7 @@ bool wxMask::Create( const wxBitmap& WXUNUSED(bitmap),
|
||||
m_bitmap = (GdkBitmap*) NULL;
|
||||
}
|
||||
|
||||
wxFAIL_MSG( _T("TODO") );
|
||||
wxFAIL_MSG( T("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( T("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, T("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), T("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), T("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, T("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, T("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, T("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, T("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, T("invalid bitmap") );
|
||||
|
||||
return M_BMPDATA->m_height;
|
||||
}
|
||||
|
||||
int wxBitmap::GetWidth() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), -1, _T("invalid bitmap") );
|
||||
wxCHECK_MSG( Ok(), -1, T("invalid bitmap") );
|
||||
|
||||
return M_BMPDATA->m_width;
|
||||
}
|
||||
|
||||
int wxBitmap::GetDepth() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), -1, _T("invalid bitmap") );
|
||||
wxCHECK_MSG( Ok(), -1, T("invalid bitmap") );
|
||||
|
||||
return M_BMPDATA->m_bpp;
|
||||
}
|
||||
|
||||
wxMask *wxBitmap::GetMask() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), (wxMask *) NULL, _T("invalid bitmap") );
|
||||
wxCHECK_MSG( Ok(), (wxMask *) NULL, T("invalid bitmap") );
|
||||
|
||||
return M_BMPDATA->m_mask;
|
||||
}
|
||||
|
||||
void wxBitmap::SetMask( wxMask *mask )
|
||||
{
|
||||
wxCHECK_RET( Ok(), _T("invalid bitmap") );
|
||||
wxCHECK_RET( Ok(), T("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, T("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, T("invalid bitmap") );
|
||||
|
||||
return M_BMPDATA->m_pixmap;
|
||||
}
|
||||
|
||||
GdkBitmap *wxBitmap::GetBitmap() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), (GdkBitmap *) NULL, _T("invalid bitmap") );
|
||||
wxCHECK_MSG( Ok(), (GdkBitmap *) NULL, T("invalid bitmap") );
|
||||
|
||||
return M_BMPDATA->m_bitmap;
|
||||
}
|
||||
|
@@ -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( T("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, T("invalid button") );
|
||||
|
||||
wxControl::SetLabel( label );
|
||||
}
|
||||
|
||||
wxString wxBitmapButton::GetLabel() const
|
||||
{
|
||||
wxCHECK_MSG( m_widget != NULL, _T(""), _T("invalid button") );
|
||||
wxCHECK_MSG( m_widget != NULL, T(""), T("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, T("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, T("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, T("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, T("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, T("invalid button") );
|
||||
|
||||
if ( ! m_selected.Ok() ) return;
|
||||
m_selected = bitmap;
|
||||
|
@@ -111,7 +111,7 @@ int wxBrush::GetStyle() const
|
||||
{
|
||||
if (m_refData == NULL)
|
||||
{
|
||||
wxFAIL_MSG( _T("invalid brush") );
|
||||
wxFAIL_MSG( T("invalid brush") );
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ wxColour &wxBrush::GetColour() const
|
||||
{
|
||||
if (m_refData == NULL)
|
||||
{
|
||||
wxFAIL_MSG( _T("invalid brush") );
|
||||
wxFAIL_MSG( T("invalid brush") );
|
||||
return wxNullColour;
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ wxBitmap *wxBrush::GetStipple() const
|
||||
{
|
||||
if (m_refData == NULL)
|
||||
{
|
||||
wxFAIL_MSG( _T("invalid brush") );
|
||||
wxFAIL_MSG( T("invalid brush") );
|
||||
return &wxNullBitmap;
|
||||
}
|
||||
|
||||
|
@@ -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( T("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, T("invalid button") );
|
||||
|
||||
wxControl::SetLabel( label );
|
||||
|
||||
|
@@ -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( T("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, T("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, T("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, T("invalid checkbox") );
|
||||
|
||||
wxControl::SetLabel( label );
|
||||
|
||||
|
@@ -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, T("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] == T('X'));
|
||||
}
|
||||
|
||||
wxFAIL_MSG(_T("wrong checklistbox index"));
|
||||
wxFAIL_MSG(T("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, T("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] == T('X'))) return;
|
||||
|
||||
if (check)
|
||||
str.SetChar( 1, _T('X') );
|
||||
str.SetChar( 1, T('X') );
|
||||
else
|
||||
str.SetChar( 1, _T('-') );
|
||||
str.SetChar( 1, T('-') );
|
||||
|
||||
gtk_label_set( label, str.mbc_str() );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
wxFAIL_MSG(_T("wrong checklistbox index"));
|
||||
wxFAIL_MSG(T("wrong checklistbox index"));
|
||||
}
|
||||
|
||||
int wxCheckListBox::GetItemHeight() const
|
||||
|
@@ -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( T("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, T("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, T("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, T("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, T("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, T("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, T("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( T("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, T("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 , T("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, T("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, T(""), T("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 , T("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( T("wxChoice: invalid index in GetString()") );
|
||||
|
||||
return _T("");
|
||||
return T("");
|
||||
}
|
||||
|
||||
wxString wxChoice::GetStringSelection() const
|
||||
{
|
||||
wxCHECK_MSG( m_widget != NULL, _T(""), _T("invalid choice") );
|
||||
wxCHECK_MSG( m_widget != NULL, T(""), T("invalid choice") );
|
||||
|
||||
GtkLabel *label = GTK_LABEL( GTK_BUTTON(m_widget)->child );
|
||||
|
||||
wxASSERT_MSG( label != NULL , _T("wxChoice: invalid label") );
|
||||
wxASSERT_MSG( label != NULL , T("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, T("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, T("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, T("invalid choice") );
|
||||
|
||||
int n = FindString( string );
|
||||
if (n != -1) SetSelection( n );
|
||||
|
@@ -450,7 +450,7 @@ void wxClipboard::Clear()
|
||||
|
||||
bool wxClipboard::Open()
|
||||
{
|
||||
wxCHECK_MSG( !m_open, FALSE, _T("clipboard already open") );
|
||||
wxCHECK_MSG( !m_open, FALSE, T("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, T("clipboard not open") );
|
||||
|
||||
wxCHECK_MSG( data, FALSE, _T("data is invalid") );
|
||||
wxCHECK_MSG( data, FALSE, T("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, T("clipboard not open") );
|
||||
|
||||
wxCHECK_MSG( data, FALSE, _T("data is invalid") );
|
||||
wxCHECK_MSG( data, FALSE, T("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, T("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, T("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, T("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, T("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, T("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, T("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, T("error retrieving data from clipboard") );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@@ -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( T("wxColour: couldn't find colour") );
|
||||
wxPrintf( T("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, T("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, T("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, T("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, T("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, T("invalid colour") );
|
||||
|
||||
return &M_COLDATA->m_color;
|
||||
}
|
||||
|
@@ -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( T("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, T("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, T("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, T("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, T("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, T("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, T("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, T("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(T("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, T("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, T("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, T(""), T("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( T("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, T(""), T("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( T("wxComboBox: no selection") );
|
||||
|
||||
return _T("");
|
||||
return T("");
|
||||
}
|
||||
|
||||
int wxComboBox::Number() const
|
||||
{
|
||||
wxCHECK_MSG( m_widget != NULL, 0, _T("invalid combobox") );
|
||||
wxCHECK_MSG( m_widget != NULL, 0, T("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, T("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, T("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, T("invalid combobox") );
|
||||
|
||||
GtkWidget *entry = GTK_COMBO(m_widget)->entry;
|
||||
wxString tmp = _T("");
|
||||
wxString tmp = T("");
|
||||
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, T("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, T("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, T("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, T("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, T("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, T("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, T("invalid combobox") );
|
||||
|
||||
GtkWidget *entry = GTK_COMBO(m_widget)->entry;
|
||||
gtk_editable_delete_text( GTK_EDITABLE(entry), (gint)from, (gint)to );
|
||||
|
@@ -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 != T('\0'); pc++ )
|
||||
{
|
||||
if ( *pc == _T('&') )
|
||||
if ( *pc == T('&') )
|
||||
{
|
||||
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 != T('&') ) m_chAccel = *pc;
|
||||
#endif
|
||||
}
|
||||
m_label << *pc;
|
||||
|
@@ -93,7 +93,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(T("unsupported cursor type"));
|
||||
// will use the standard one
|
||||
|
||||
case wxCURSOR_ARROW:
|
||||
@@ -168,7 +168,7 @@ void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
|
||||
return;
|
||||
|
||||
wxASSERT_MSG( !gs_savedCursor.Ok(),
|
||||
_T("forgot to call wxEndBusyCursor, will leak memory") );
|
||||
T("forgot to call wxEndBusyCursor, will leak memory") );
|
||||
|
||||
gs_savedCursor = g_globalCursor;
|
||||
|
||||
|
@@ -142,46 +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 *wxEmptyString = _T("");
|
||||
const wxChar *wxGetTextFromUserPromptStr = _T("Input Text");
|
||||
const wxChar *wxMessageBoxCaptionStr = _T("Message");
|
||||
const wxChar *wxFileSelectorPromptStr = _T("Select a file");
|
||||
const wxChar *wxFileSelectorDefaultWildcardStr = _T("*");
|
||||
const wxChar *wxInternalErrorStr = _T("wxWindows Internal Error");
|
||||
const wxChar *wxFatalErrorStr = _T("wxWindows Fatal Error");
|
||||
const wxChar *wxDirDialogNameStr = _T("wxDirCtrl");
|
||||
const wxChar *wxDirDialogDefaultFolderStr = _T("/");
|
||||
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("/");
|
||||
|
||||
/* See wx/utils.h */
|
||||
const wxChar *wxFloatToStringStr = _T("%.2f");
|
||||
const wxChar *wxDoubleToStringStr = _T("%.2f");
|
||||
const wxChar *wxFloatToStringStr = T("%.2f");
|
||||
const wxChar *wxDoubleToStringStr = T("%.2f");
|
||||
|
||||
/* Dafaults for wxWindow etc. */
|
||||
const wxSize wxDefaultSize(-1, -1);
|
||||
|
@@ -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 == T("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 = T("STRING");
|
||||
}
|
||||
else
|
||||
if (m_type == wxDF_BITMAP)
|
||||
{
|
||||
m_id = _T("image/png");
|
||||
m_id = T("image/png");
|
||||
}
|
||||
else
|
||||
if (m_type == wxDF_FILENAME)
|
||||
{
|
||||
m_id = _T("file:ALL");
|
||||
m_id = T("file:ALL");
|
||||
}
|
||||
else
|
||||
{
|
||||
wxFAIL_MSG( _T("invalid dataformat") );
|
||||
wxFAIL_MSG( T("invalid dataformat") );
|
||||
}
|
||||
|
||||
m_hasAtom = FALSE;
|
||||
@@ -155,7 +155,7 @@ GdkAtom wxDataFormat::GetAtom()
|
||||
else
|
||||
if (m_type == wxDF_PRIVATE)
|
||||
{
|
||||
m_atom = gdk_atom_intern( MBSTRINGCAST m_id.mbc_str(), FALSE );
|
||||
m_atom = gdk_atom_intern( wxMBSTRINGCAST m_id.mbc_str(), FALSE );
|
||||
}
|
||||
else
|
||||
if (m_type == wxDF_FILENAME)
|
||||
@@ -484,7 +484,7 @@ void wxPrivateDataObject::Free()
|
||||
|
||||
wxPrivateDataObject::wxPrivateDataObject()
|
||||
{
|
||||
wxString id = _T("application/");
|
||||
wxString id = T("application/");
|
||||
id += wxTheApp->GetAppName();
|
||||
|
||||
m_format.SetId( id );
|
||||
|
@@ -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, T("DC needs a window") );
|
||||
|
||||
GtkWidget *widget = window->m_wxwindow;
|
||||
|
||||
wxASSERT_MSG( widget, _T("DC needs a widget") );
|
||||
wxASSERT_MSG( widget, T("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( T("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( T("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(), T("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(), T("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(), T("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(), T("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(), T("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(), T("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(), T("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(), T("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(), T("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(), T("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(), T("invalid window dc") );
|
||||
|
||||
wxCHECK_RET( bitmap.Ok(), _T("invalid bitmap") );
|
||||
wxCHECK_RET( bitmap.Ok(), T("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, T("invalid window dc") );
|
||||
|
||||
wxCHECK_MSG( source, FALSE, _T("invalid source dc") );
|
||||
wxCHECK_MSG( source, FALSE, T("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(), T("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(), T("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(), T("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(), T("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(), T("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(), T("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( T("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(), T("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(), T("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(), T("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( T("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(), T("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 ®ion )
|
||||
{
|
||||
wxCHECK_RET( Ok(), _T("invalid window dc") );
|
||||
wxCHECK_RET( Ok(), T("invalid window dc") );
|
||||
|
||||
if (region.Empty())
|
||||
{
|
||||
@@ -1203,7 +1203,7 @@ void wxWindowDC::DoSetClippingRegionAsRegion( const wxRegion ®ion )
|
||||
|
||||
void wxWindowDC::DestroyClippingRegion()
|
||||
{
|
||||
wxCHECK_RET( Ok(), _T("invalid window dc") );
|
||||
wxCHECK_RET( Ok(), T("invalid window dc") );
|
||||
|
||||
wxDC::DestroyClippingRegion();
|
||||
|
||||
@@ -1306,7 +1306,7 @@ wxSize wxWindowDC::GetPPI() const
|
||||
|
||||
int wxWindowDC::GetDepth() const
|
||||
{
|
||||
wxFAIL_MSG(_T("not implemented"));
|
||||
wxFAIL_MSG(T("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(), T("invalid window dc") );
|
||||
|
||||
wxPoint *p;
|
||||
double cx1, cy1, cx2, cy2, cx3, cy3, cx4, cy4;
|
||||
|
@@ -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( T("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 = T("");
|
||||
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), T("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), T("invalid dialog") );
|
||||
wxASSERT_MSG( (m_wxwindow != NULL), T("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), T("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( T("wxDialog:SetModal obsolete now") );
|
||||
}
|
||||
|
||||
int wxDialog::ShowModal()
|
||||
{
|
||||
if (IsModal())
|
||||
{
|
||||
wxFAIL_MSG( _T("wxDialog:ShowModal called twice") );
|
||||
wxFAIL_MSG( T("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( T("wxDialog:EndModal called twice") );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -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( 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") );
|
||||
*/
|
||||
|
||||
#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, T("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, T("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, T("wxDragSource: no data") );
|
||||
|
||||
if (!m_data) return (wxDragResult) wxDragNone;
|
||||
|
||||
|
@@ -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, T("filedialog") ))
|
||||
{
|
||||
wxFAIL_MSG( _T("wxXX creation failed") );
|
||||
wxFAIL_MSG( T("wxXX creation failed") );
|
||||
return;
|
||||
}
|
||||
|
||||
m_message = message;
|
||||
m_path = _T("");
|
||||
m_path = T("");
|
||||
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()!=T('/') )
|
||||
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 += T(".");
|
||||
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, T(""),
|
||||
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(T("*.")) + 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 == T('.')) ext++;
|
||||
wxChar wild[60];
|
||||
wxSprintf(wild, _T("*.%s"), ext);
|
||||
wxSprintf(wild, T("*.%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 == T('.')) ext++;
|
||||
wxChar wild[60];
|
||||
wxSprintf(wild, _T("*.%s"), ext);
|
||||
wxSprintf(wild, T("*.%s"), ext);
|
||||
|
||||
return wxFileSelector (prompt, (const wxChar *) NULL, default_name, ext, wild, 0, parent);
|
||||
}
|
||||
|
@@ -162,18 +162,18 @@ wxFont::wxFont( GdkFont *WXUNUSED(font), char *xFontName )
|
||||
wxString tmp;
|
||||
|
||||
wxString fontname( xFontName );
|
||||
wxStringTokenizer tn( fontname, _T("-") );
|
||||
wxStringTokenizer tn( fontname, T("-") );
|
||||
|
||||
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 == T("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 == T("I")) M_FONTDATA->m_style = wxITALIC;
|
||||
if (tmp == T("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 == 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;
|
||||
}
|
||||
|
||||
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, T("invalid font") );
|
||||
|
||||
return M_FONTDATA->m_pointSize;
|
||||
}
|
||||
|
||||
wxString wxFont::GetFaceName() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), _T(""), _T("invalid font") );
|
||||
wxCHECK_MSG( Ok(), T(""), T("invalid font") );
|
||||
|
||||
return M_FONTDATA->m_faceName;
|
||||
}
|
||||
|
||||
int wxFont::GetFamily() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), 0, _T("invalid font") );
|
||||
wxCHECK_MSG( Ok(), 0, T("invalid font") );
|
||||
|
||||
return M_FONTDATA->m_family;
|
||||
}
|
||||
|
||||
int wxFont::GetStyle() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), 0, _T("invalid font") );
|
||||
wxCHECK_MSG( Ok(), 0, T("invalid font") );
|
||||
|
||||
return M_FONTDATA->m_style;
|
||||
}
|
||||
|
||||
int wxFont::GetWeight() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), 0, _T("invalid font") );
|
||||
wxCHECK_MSG( Ok(), 0, T("invalid font") );
|
||||
|
||||
return M_FONTDATA->m_weight;
|
||||
}
|
||||
|
||||
bool wxFont::GetUnderlined() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), FALSE, _T("invalid font") );
|
||||
wxCHECK_MSG( Ok(), FALSE, T("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, T("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( T("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(T("could not load any font"));
|
||||
}
|
||||
|
||||
return font;
|
||||
|
@@ -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, T("fontdialog") ))
|
||||
{
|
||||
wxFAIL_MSG( _T("wxXX creation failed") );
|
||||
wxFAIL_MSG( T("wxXX creation failed") );
|
||||
return;
|
||||
}
|
||||
#ifndef __WXGTK12__
|
||||
wxFAIL_MSG( _T("TODO") );
|
||||
wxFAIL_MSG( T("TODO") );
|
||||
#else // GTK+ 1.2
|
||||
wxString m_message( _("Choose font") );
|
||||
m_widget = gtk_font_selection_dialog_new( m_message.mbc_str() );
|
||||
|
@@ -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( T("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, T("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, T("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, T("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), T("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), T("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), T("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), T("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), T("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), T("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), T("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), T("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), T("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), T("invalid frame") );
|
||||
wxASSERT_MSG( (m_wxwindow != NULL), T("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), T("invalid frame") );
|
||||
|
||||
wxCHECK_MSG( m_frameToolBar == NULL, FALSE, _T("recreating toolbar in wxFrame") );
|
||||
wxCHECK_MSG( m_frameToolBar == NULL, FALSE, T("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), T("invalid frame") );
|
||||
|
||||
wxCHECK_MSG( m_frameStatusBar == NULL, FALSE, _T("recreating status bar in wxFrame") );
|
||||
wxCHECK_MSG( m_frameStatusBar == NULL, FALSE, T("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), T("invalid frame") );
|
||||
|
||||
wxCHECK_RET( m_frameStatusBar != NULL, _T("no statusbar to set text for") );
|
||||
wxCHECK_RET( m_frameStatusBar != NULL, T("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), T("invalid frame") );
|
||||
|
||||
wxCHECK_RET( m_frameStatusBar != NULL, _T("no statusbar to set widths for") );
|
||||
wxCHECK_RET( m_frameStatusBar != NULL, T("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), T("invalid frame") );
|
||||
|
||||
m_title = title;
|
||||
if (m_title.IsNull()) m_title = _T("");
|
||||
if (m_title.IsNull()) m_title = T("");
|
||||
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), T("invalid frame") );
|
||||
|
||||
m_icon = icon;
|
||||
if (!icon.Ok()) return;
|
||||
|
@@ -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( T("wxGauge creation failed") );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@@ -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( T("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, T("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, T("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, T("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, T("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, T("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, T("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, T("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, T("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, T("invalid listbox") );
|
||||
|
||||
GList *child = g_list_nth( m_list->children, n );
|
||||
|
||||
wxCHECK_RET( child, _T("wrong listbox index") );
|
||||
wxCHECK_RET( child, T("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, T("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, T("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, T("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, T("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, T(""), T("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(T("wrong listbox index"));
|
||||
|
||||
return _T("");
|
||||
return T("");
|
||||
}
|
||||
|
||||
wxString wxListBox::GetStringSelection() const
|
||||
{
|
||||
wxCHECK_MSG( m_list != NULL, _T(""), _T("invalid listbox") );
|
||||
wxCHECK_MSG( m_list != NULL, T(""), T("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(T("no listbox selection available"));
|
||||
return T("");
|
||||
}
|
||||
|
||||
int wxListBox::Number()
|
||||
{
|
||||
wxCHECK_MSG( m_list != NULL, -1, _T("invalid listbox") );
|
||||
wxCHECK_MSG( m_list != NULL, -1, T("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, T("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(T("wrong listbox index"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void wxListBox::Set( int WXUNUSED(n), const wxString *WXUNUSED(choices) )
|
||||
{
|
||||
wxFAIL_MSG(_T("wxListBox::Set not implemented"));
|
||||
wxFAIL_MSG(T("wxListBox::Set not implemented"));
|
||||
}
|
||||
|
||||
void wxListBox::SetFirstItem( int WXUNUSED(n) )
|
||||
{
|
||||
wxFAIL_MSG(_T("wxListBox::SetFirstItem not implemented"));
|
||||
wxFAIL_MSG(T("wxListBox::SetFirstItem not implemented"));
|
||||
}
|
||||
|
||||
void wxListBox::SetFirstItem( const wxString &WXUNUSED(item) )
|
||||
{
|
||||
wxFAIL_MSG(_T("wxListBox::SetFirstItem not implemented"));
|
||||
wxFAIL_MSG(T("wxListBox::SetFirstItem not implemented"));
|
||||
}
|
||||
|
||||
void wxListBox::SetSelection( int n, bool select )
|
||||
{
|
||||
wxCHECK_RET( m_list != NULL, _T("invalid listbox") );
|
||||
wxCHECK_RET( m_list != NULL, T("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, T("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(T("wrong listbox index"));
|
||||
}
|
||||
}
|
||||
|
||||
void wxListBox::SetStringSelection( const wxString &string, bool select )
|
||||
{
|
||||
wxCHECK_RET( m_list != NULL, _T("invalid listbox") );
|
||||
wxCHECK_RET( m_list != NULL, T("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, T("invalid listbox") );
|
||||
|
||||
#ifndef NEW_GTK_DND_CODE
|
||||
if (m_dropTarget)
|
||||
|
@@ -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, T("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, T("wxMDIClientWindow") ))
|
||||
{
|
||||
wxFAIL_MSG( _T("wxMDIClientWindow creation failed") );
|
||||
wxFAIL_MSG( T("wxMDIClientWindow creation failed") );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@@ -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, T("menubar") ))
|
||||
{
|
||||
wxFAIL_MSG( _T("wxMenuBar creation failed") );
|
||||
wxFAIL_MSG( T("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, T("menubar") ))
|
||||
{
|
||||
wxFAIL_MSG( _T("wxMenuBar creation failed") );
|
||||
wxFAIL_MSG( T("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 != T('\0'); pc++ )
|
||||
{
|
||||
if (*pc == _T('&'))
|
||||
if (*pc == T('&'))
|
||||
{
|
||||
#if (GTK_MINOR_VERSION > 0) && (GTK_MICRO_VERSION > 0)
|
||||
str << _T('_');
|
||||
str << T('_');
|
||||
}
|
||||
else if (*pc == _T('/'))
|
||||
else if (*pc == T('/'))
|
||||
{
|
||||
str << _T('\\');
|
||||
str << T('\\');
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#if __WXGTK12__
|
||||
if ( *pc == _T('_') )
|
||||
if ( *pc == T('_') )
|
||||
{
|
||||
// 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 << T('/') << 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 = T("<main>/");
|
||||
for ( pc = str; *pc != T('\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 == T('_'))
|
||||
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, T("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, T("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, T("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, T("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, T(""), T("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, T("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, T("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, T("invalid"), T("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, T("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, T("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, T(""), T("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, T("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 = T("");
|
||||
const wxChar *pc = str;
|
||||
for (; (*pc != _T('\0')) && (*pc != _T('\t')); pc++ )
|
||||
for (; (*pc != T('\0')) && (*pc != T('\t')); pc++ )
|
||||
{
|
||||
if (*pc == _T('&'))
|
||||
if (*pc == T('&'))
|
||||
{
|
||||
#if (GTK_MINOR_VERSION > 0)
|
||||
m_text << _T('_');
|
||||
m_text << T('_');
|
||||
}
|
||||
else if ( *pc == _T('_') ) // escape underscores
|
||||
else if ( *pc == T('_') ) // escape underscores
|
||||
{
|
||||
m_text << _T("__");
|
||||
m_text << T("__");
|
||||
}
|
||||
else if (*pc == _T('/')) /* we have to filter out slashes ... */
|
||||
else if (*pc == T('/')) /* we have to filter out slashes ... */
|
||||
{
|
||||
m_text << _T('\\'); /* ... and replace them with back slashes */
|
||||
m_text << T('\\'); /* ... 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 = T("");
|
||||
#if (GTK_MINOR_VERSION > 0)
|
||||
if(*pc == _T('\t'))
|
||||
if(*pc == T('\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, T("invalid menu item") );
|
||||
|
||||
wxCHECK_RET( IsCheckable(), _T("Can't check uncheckable item!") )
|
||||
wxCHECK_RET( IsCheckable(), T("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, T("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, T("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 = T("");
|
||||
if (m_title != T(""))
|
||||
{
|
||||
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 T('a'): /* Alt */
|
||||
case T('A'):
|
||||
case T('m'): /* Meta */
|
||||
case T('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 T('c'): /* Ctrl */
|
||||
case T('C'):
|
||||
case T('s'): /* Strg, yeah man, I'm German */
|
||||
case T('S'):
|
||||
{
|
||||
strcpy( hotbuf, "<control>" );
|
||||
wxString last = hotkey.Right(1);
|
||||
strcat( hotbuf, last.mb_str() );
|
||||
return hotbuf;
|
||||
}
|
||||
case _T('F'): /* function keys */
|
||||
case T('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 = T("<main>/");
|
||||
for ( const wxChar *pc = text; *pc != T('\0'); pc++ )
|
||||
{
|
||||
while (*pc == _T('_')) pc++; /* skip it */
|
||||
while (*pc == T('_')) 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 = T("<main>/");
|
||||
for ( const wxChar *pc = text; *pc != T('\0'); pc++ )
|
||||
{
|
||||
if (*pc == _T('_')) pc++; /* skip it */
|
||||
if (*pc == T('_')) 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 = T("");
|
||||
for ( const wxChar *pc = itemString; *pc != T('\0'); pc++ )
|
||||
{
|
||||
if (*pc == _T('&'))
|
||||
if (*pc == T('&'))
|
||||
{
|
||||
pc++; /* skip it */
|
||||
#if (GTK_MINOR_VERSION > 0)
|
||||
s << _T('_');
|
||||
s << T('_');
|
||||
#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, T("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, T("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, T("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, T("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, T("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, T(""), T("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, T("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, T(""), T("wxMenu::GetHelpString: no such item") );
|
||||
|
||||
return item->GetHelp();
|
||||
}
|
||||
|
@@ -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( T("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, T("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, T("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, T(""), T("invalid notebook") );
|
||||
|
||||
wxNotebookPage* nb_page = GetNotebookPage(page);
|
||||
if (nb_page)
|
||||
return nb_page->m_text;
|
||||
else
|
||||
return _T("");
|
||||
return T("");
|
||||
}
|
||||
|
||||
int wxNotebook::GetPageImage( int page ) const
|
||||
{
|
||||
wxCHECK_MSG( m_widget != NULL, -1, _T("invalid notebook") );
|
||||
wxCHECK_MSG( m_widget != NULL, -1, T("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, T("invalid notebook") );
|
||||
|
||||
wxCHECK_MSG( page < (int)m_pages.GetCount(), (wxNotebookPage*) NULL, _T("invalid notebook index") );
|
||||
wxCHECK_MSG( page < (int)m_pages.GetCount(), (wxNotebookPage*) NULL, T("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, T("invalid notebook") );
|
||||
|
||||
wxCHECK_MSG( page < (int)m_pages.GetCount(), -1, _T("invalid notebook index") );
|
||||
wxCHECK_MSG( page < (int)m_pages.GetCount(), -1, T("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, T("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, T("invalid notebook") );
|
||||
|
||||
wxNotebookPage* nb_page = GetNotebookPage(page);
|
||||
|
||||
wxCHECK_MSG( nb_page, FALSE, _T("SetPageText: invalid page index") );
|
||||
wxCHECK_MSG( nb_page, FALSE, T("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( T("wxNotebook::SetPageSize not implemented") );
|
||||
}
|
||||
|
||||
void wxNotebook::SetPadding( const wxSize &WXUNUSED(padding) )
|
||||
{
|
||||
wxFAIL_MSG( _T("wxNotebook::SetPadding not implemented") );
|
||||
wxFAIL_MSG( T("wxNotebook::SetPadding not implemented") );
|
||||
}
|
||||
|
||||
void wxNotebook::SetTabSize(const wxSize& WXUNUSED(sz))
|
||||
{
|
||||
wxFAIL_MSG( _T("wxNotebook::SetTabSize not implemented") );
|
||||
wxFAIL_MSG( T("wxNotebook::SetTabSize not implemented") );
|
||||
}
|
||||
|
||||
bool wxNotebook::DeleteAllPages()
|
||||
{
|
||||
wxCHECK_MSG( m_widget != NULL, FALSE, _T("invalid notebook") );
|
||||
wxCHECK_MSG( m_widget != NULL, FALSE, T("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, T("invalid notebook") );
|
||||
|
||||
wxCHECK_MSG( win->GetParent() == this, FALSE,
|
||||
_T("Can't add a page whose parent is not the notebook!") );
|
||||
T("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 = T("");
|
||||
|
||||
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, T("invalid notebook") );
|
||||
|
||||
wxNotebookPage* nb_page = GetNotebookPage(page);
|
||||
if (!nb_page)
|
||||
|
@@ -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(T("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(T("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(T("not implemented"));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -171,35 +171,35 @@ wxDash* wxPen::GetDash() const
|
||||
|
||||
int wxPen::GetCap() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), -1, _T("invalid pen") );
|
||||
wxCHECK_MSG( Ok(), -1, T("invalid pen") );
|
||||
|
||||
return M_PENDATA->m_capStyle;
|
||||
}
|
||||
|
||||
int wxPen::GetJoin() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), -1, _T("invalid pen") );
|
||||
wxCHECK_MSG( Ok(), -1, T("invalid pen") );
|
||||
|
||||
return M_PENDATA->m_joinStyle;
|
||||
}
|
||||
|
||||
int wxPen::GetStyle() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), -1, _T("invalid pen") );
|
||||
wxCHECK_MSG( Ok(), -1, T("invalid pen") );
|
||||
|
||||
return M_PENDATA->m_style;
|
||||
}
|
||||
|
||||
int wxPen::GetWidth() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), -1, _T("invalid pen") );
|
||||
wxCHECK_MSG( Ok(), -1, T("invalid pen") );
|
||||
|
||||
return M_PENDATA->m_width;
|
||||
}
|
||||
|
||||
wxColour &wxPen::GetColour() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), wxNullColour, _T("invalid pen") );
|
||||
wxCHECK_MSG( Ok(), wxNullColour, T("invalid pen") );
|
||||
|
||||
return M_PENDATA->m_colour;
|
||||
}
|
||||
|
@@ -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( T("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 != T('&') )
|
||||
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( T("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, T("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, T("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, T("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, T("invalid radiobox") );
|
||||
|
||||
wxNode *node = m_boxes.Nth( n );
|
||||
|
||||
wxCHECK_RET( node, _T("radiobox wrong index") );
|
||||
wxCHECK_RET( node, T("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, T("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( T("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, T(""), T("invalid radiobox") );
|
||||
|
||||
wxNode *node = m_boxes.Nth( n );
|
||||
|
||||
wxCHECK_MSG( node, _T(""), _T("radiobox wrong index") );
|
||||
wxCHECK_MSG( node, T(""), T("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, T(""), T("invalid radiobox") );
|
||||
|
||||
return GetString( item );
|
||||
}
|
||||
|
||||
void wxRadioBox::SetLabel( const wxString& label )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, _T("invalid radiobox") );
|
||||
wxCHECK_RET( m_widget != NULL, T("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, T("invalid radiobox") );
|
||||
|
||||
wxNode *node = m_boxes.Nth( item );
|
||||
|
||||
wxCHECK_RET( node, _T("radiobox wrong index") );
|
||||
wxCHECK_RET( node, T("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(T("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, T("invalid radiobox") );
|
||||
|
||||
wxNode *node = m_boxes.Nth( item );
|
||||
|
||||
wxCHECK_RET( node, _T("radiobox wrong index") );
|
||||
wxCHECK_RET( node, T("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, T("invalid radiobox") );
|
||||
|
||||
wxNode *node = m_boxes.Nth( item );
|
||||
|
||||
wxCHECK_RET( node, _T("radiobox wrong index") );
|
||||
wxCHECK_RET( node, T("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, T(""), T("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( T("wxRadioBox none selected") );
|
||||
return T("");
|
||||
}
|
||||
|
||||
bool wxRadioBox::SetStringSelection( const wxString &s )
|
||||
{
|
||||
wxCHECK_MSG( m_widget != NULL, FALSE, _T("invalid radiobox") );
|
||||
wxCHECK_MSG( m_widget != NULL, FALSE, T("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(T("wxRadioBox::SetNumberOfRowsOrCols not implemented."));
|
||||
}
|
||||
|
||||
void wxRadioBox::DisableEvents()
|
||||
|
@@ -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( T("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, T("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, T("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, T("invalid radiobutton") );
|
||||
|
||||
return GTK_TOGGLE_BUTTON(m_widget)->active;
|
||||
}
|
||||
|
@@ -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( T("wxScrollBar creation failed") );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@@ -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, T("wxSystemSettings::GetSystemMetric not fully implemented") );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -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( T("wxSlider creation failed") );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@@ -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( T("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, T("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, T("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, T("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), T("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), T("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), T("invalid spin button") );
|
||||
|
||||
m_width = 15;
|
||||
gtk_widget_set_usize( m_widget, m_width, m_height );
|
||||
|
@@ -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(), T("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( T("wxXX creation failed") );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@@ -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( T("wxStaticBox creation failed") );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@@ -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( T("wxStaticLine creation failed") );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@@ -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( T("wxXX creation failed") );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@@ -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( T("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") );
|
||||
T("invalid bitmap for wxToolBar icon") );
|
||||
|
||||
wxCHECK_MSG( bitmap.GetBitmap() == NULL, (wxToolBarTool *)NULL,
|
||||
_T("wxToolBar doesn't support GdkBitmap") );
|
||||
T("wxToolBar doesn't support GdkBitmap") );
|
||||
|
||||
wxCHECK_MSG( bitmap.GetPixmap() != NULL, (wxToolBarTool *)NULL,
|
||||
_T("wxToolBar::Add needs a wxBitmap") );
|
||||
T("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( T("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( T("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( T("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( T("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( T("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( T("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, T("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( T("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( T("wrong toolbar index") );
|
||||
|
||||
return _T("");
|
||||
return T("");
|
||||
}
|
||||
|
||||
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( T("wrong toolbar index") );
|
||||
|
||||
return _T("");
|
||||
return T("");
|
||||
}
|
||||
|
||||
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( T("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( T("wrong toolbar index") );
|
||||
|
||||
return;
|
||||
}
|
||||
|
@@ -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( T("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, T(""), T("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, T("invalid text ctrl") );
|
||||
|
||||
wxString tmp = _T("");
|
||||
wxString tmp = T("");
|
||||
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, T("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, T("invalid text ctrl") );
|
||||
|
||||
if (text.IsEmpty()) return;
|
||||
|
||||
@@ -413,7 +413,7 @@ wxString wxTextCtrl::GetLineText( long lineNo ) const
|
||||
|
||||
if (text)
|
||||
{
|
||||
wxString buf(_T(""));
|
||||
wxString buf(T(""));
|
||||
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( T("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 == T('\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, T("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, T("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, T("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, T("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, T("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, T("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, T("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, T("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, T("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, T("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, T("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( T("wxTextCtrl::Undo not implemented") );
|
||||
}
|
||||
|
||||
void wxTextCtrl::Redo()
|
||||
{
|
||||
// TODO
|
||||
wxFAIL_MSG( _T("wxTextCtrl::Redo not implemented") );
|
||||
wxFAIL_MSG( T("wxTextCtrl::Redo not implemented") );
|
||||
}
|
||||
|
||||
bool wxTextCtrl::CanUndo() const
|
||||
{
|
||||
// TODO
|
||||
wxFAIL_MSG( _T("wxTextCtrl::CanUndo not implemented") );
|
||||
wxFAIL_MSG( T("wxTextCtrl::CanUndo not implemented") );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool wxTextCtrl::CanRedo() const
|
||||
{
|
||||
// TODO
|
||||
wxFAIL_MSG( _T("wxTextCtrl::CanRedo not implemented") );
|
||||
wxFAIL_MSG( T("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, T("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, T("invalid text ctrl") );
|
||||
|
||||
return GTK_EDITABLE(m_text)->editable;
|
||||
}
|
||||
@@ -765,12 +765,12 @@ bool wxTextCtrl::IsModified() const
|
||||
|
||||
void wxTextCtrl::Clear()
|
||||
{
|
||||
SetValue( _T("") );
|
||||
SetValue( T("") );
|
||||
}
|
||||
|
||||
void wxTextCtrl::OnChar( wxKeyEvent &key_event )
|
||||
{
|
||||
wxCHECK_RET( m_text != NULL, _T("invalid text ctrl") );
|
||||
wxCHECK_RET( m_text != NULL, T("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, T("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, T("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, T("invalid text ctrl") );
|
||||
|
||||
wxControl::SetBackgroundColour( colour );
|
||||
|
||||
|
@@ -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 T("/usr/openwin/lib/app-defaults")
|
||||
#else
|
||||
#define DEFAULT_XRESOURCE_DIR _T("/usr/lib/X11/app-defaults")
|
||||
#define DEFAULT_XRESOURCE_DIR T("/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 == T('/'))
|
||||
wxStrcpy(buf, name);
|
||||
else
|
||||
{
|
||||
// Put in standard place for resource files if not absolute
|
||||
wxStrcpy(buf, DEFAULT_XRESOURCE_DIR);
|
||||
wxStrcat(buf, _T("/"));
|
||||
wxStrcat(buf, T("/"));
|
||||
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] != T('/')) wxStrcat(dest, T("/"));
|
||||
if (filename == NULL)
|
||||
{
|
||||
if ((filename = wxGetenv(_T("XENVIRONMENT"))) == NULL) filename = _T(".Xdefaults");
|
||||
if ((filename = wxGetenv(T("XENVIRONMENT("))) == NULL) filename = T(".Xdefaults");
|
||||
}
|
||||
else
|
||||
if (*filename != _T('.')) wxStrcat(dest, _T("."));
|
||||
if (*filename != T('.')) wxStrcat(dest, T("."));
|
||||
wxStrcat(dest, filename);
|
||||
}
|
||||
else
|
||||
{
|
||||
dest[0] = _T('\0');
|
||||
dest[0] = T('\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(T("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, T("Delete: Number = %d"), wxTheResourceCache->Number());
|
||||
wxChar buffer[500];
|
||||
(void)GetIniFile(buffer, file);
|
||||
|
||||
@@ -233,11 +233,11 @@ 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, T("Write: Number = %d"), wxTheResourceCache->Number());
|
||||
wxTheResourceCache->Append(buffer, (wxObject *)database);
|
||||
}
|
||||
char resName[300];
|
||||
strcpy(resName, !section.IsNull() ? MBSTRINGCAST section.mb_str() : "wxWindows");
|
||||
strcpy(resName, !section.IsNull() ? wxMBSTRINGCAST section.mb_str() : "wxWindows");
|
||||
strcat(resName, ".");
|
||||
strcat(resName, entry.mb_str());
|
||||
XrmPutStringResource(&database, resName, value.mb_str());
|
||||
@@ -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, T("Get: Number = %d"), wxTheResourceCache->Number());
|
||||
wxTheResourceCache->Append(buffer, (wxObject *)database);
|
||||
}
|
||||
} else
|
||||
@@ -352,7 +352,7 @@ bool wxGetResource(const wxString& section, const wxString& entry, int *value, c
|
||||
{
|
||||
// Handle True, False here
|
||||
// True, Yes, Enables, Set or Activated
|
||||
if (*s == 'T' || *s == 'Y' || *s == 'E' || *s == 'S' || *s == 'A')
|
||||
if (*s == 'T(' || *s == 'Y' || *s == 'E' || *s == 'S' || *s == 'A')
|
||||
*value = TRUE;
|
||||
// False, No, Disabled, Reset, Cleared, Deactivated
|
||||
else if (*s == 'F' || *s == 'N' || *s == 'D' || *s == 'R' || *s == 'C')
|
||||
|
@@ -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(T("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 += T(" FROM ");
|
||||
tmp += window;
|
||||
|
||||
wxChar *s = new wxChar[tmp.Length()+1];
|
||||
@@ -974,10 +974,10 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton
|
||||
wxapp_install_idle_handler();
|
||||
|
||||
/*
|
||||
wxPrintf( _T("1) OnButtonPress from ") );
|
||||
wxPrintf( T("1) OnButtonPress from ") );
|
||||
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
|
||||
wxPrintf( win->GetClassInfo()->GetClassName() );
|
||||
wxPrintf( _T(".\n") );
|
||||
wxPrintf( T(".\n") );
|
||||
*/
|
||||
if (!win->m_hasVMT) return FALSE;
|
||||
if (g_blockEventsOnDrag) return TRUE;
|
||||
@@ -992,20 +992,20 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton
|
||||
gtk_widget_grab_focus (win->m_wxwindow);
|
||||
|
||||
/*
|
||||
wxPrintf( _T("GrabFocus from ") );
|
||||
wxPrintf( T("GrabFocus from ") );
|
||||
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
|
||||
wxPrintf( win->GetClassInfo()->GetClassName() );
|
||||
wxPrintf( _T(".\n") );
|
||||
wxPrintf( T(".\n") );
|
||||
*/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
wxPrintf( _T("2) OnButtonPress from ") );
|
||||
wxPrintf( T("2) OnButtonPress from ") );
|
||||
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
|
||||
wxPrintf( win->GetClassInfo()->GetClassName() );
|
||||
wxPrintf( _T(".\n") );
|
||||
wxPrintf( T(".\n") );
|
||||
*/
|
||||
|
||||
wxEventType event_type = wxEVT_LEFT_DOWN;
|
||||
@@ -1807,7 +1807,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( T("wxWindow creation failed") );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1817,14 +1817,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, T("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, T("wxWindow::hsrcollbar"), name );
|
||||
debug_focus_in( scrolledWindow->vscrollbar, T("wxWindow::vsrcollbar"), name );
|
||||
#endif
|
||||
|
||||
GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass );
|
||||
@@ -1838,7 +1838,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, T("wxWindow::m_wxwindow"), name );
|
||||
#endif
|
||||
|
||||
gtk_container_add( GTK_CONTAINER(m_widget), m_wxwindow );
|
||||
@@ -1996,7 +1996,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, T("Need complete parent.") );
|
||||
|
||||
/* this turns -1 into 20 so that a minimal window is
|
||||
visible even although -1,-1 has been given as the
|
||||
@@ -2028,7 +2028,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), T("invalid window") );
|
||||
|
||||
if (m_wxwindow)
|
||||
{
|
||||
@@ -2093,7 +2093,7 @@ void wxWindow::ConnectWidget( GtkWidget *widget )
|
||||
|
||||
bool wxWindow::Destroy()
|
||||
{
|
||||
wxASSERT_MSG( (m_widget != NULL), _T("invalid window") );
|
||||
wxASSERT_MSG( (m_widget != NULL), T("invalid window") );
|
||||
|
||||
m_hasVMT = FALSE;
|
||||
|
||||
@@ -2102,8 +2102,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), T("invalid window") );
|
||||
wxASSERT_MSG( (m_parent != NULL), T("wxWindow::SetSize requires parent.\n") );
|
||||
|
||||
if (m_resizing) return; /* I don't like recursions */
|
||||
m_resizing = TRUE;
|
||||
@@ -2234,7 +2234,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), T("invalid window") );
|
||||
|
||||
if (width) (*width) = m_width;
|
||||
if (height) (*height) = m_height;
|
||||
@@ -2242,7 +2242,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), T("invalid window") );
|
||||
|
||||
if (!m_wxwindow)
|
||||
{
|
||||
@@ -2316,7 +2316,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), T("invalid window") );
|
||||
|
||||
if (!m_wxwindow)
|
||||
{
|
||||
@@ -2391,7 +2391,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), T("invalid window") );
|
||||
|
||||
if (x) (*x) = m_x;
|
||||
if (y) (*y) = m_y;
|
||||
@@ -2399,7 +2399,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), T("invalid window") );
|
||||
|
||||
if (!m_widget->window) return;
|
||||
|
||||
@@ -2428,7 +2428,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), T("invalid window") );
|
||||
|
||||
if (!m_widget->window) return;
|
||||
|
||||
@@ -2457,7 +2457,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, T("invalid window") );
|
||||
|
||||
if (!wxWindowBase::Show(show))
|
||||
{
|
||||
@@ -2475,7 +2475,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, T("invalid window") );
|
||||
|
||||
if (!wxWindowBase::Enable(enable))
|
||||
{
|
||||
@@ -2492,9 +2492,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, T("invalid window") );
|
||||
|
||||
wxCHECK_MSG( m_font.Ok(), 12, _T("invalid font") );
|
||||
wxCHECK_MSG( m_font.Ok(), 12, T("invalid font") );
|
||||
|
||||
GdkFont *font = m_font.GetInternalFont( 1.0 );
|
||||
|
||||
@@ -2503,9 +2503,9 @@ int wxWindow::GetCharHeight() const
|
||||
|
||||
int wxWindow::GetCharWidth() const
|
||||
{
|
||||
wxCHECK_MSG( (m_widget != NULL), 8, _T("invalid window") );
|
||||
wxCHECK_MSG( (m_widget != NULL), 8, T("invalid window") );
|
||||
|
||||
wxCHECK_MSG( m_font.Ok(), 8, _T("invalid font") );
|
||||
wxCHECK_MSG( m_font.Ok(), 8, T("invalid font") );
|
||||
|
||||
GdkFont *font = m_font.GetInternalFont( 1.0 );
|
||||
|
||||
@@ -2522,7 +2522,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(), T("invalid font") );
|
||||
|
||||
GdkFont *font = fontToUse.GetInternalFont( 1.0 );
|
||||
if (x) (*x) = gdk_string_width( font, string.mbc_str() );
|
||||
@@ -2533,7 +2533,7 @@ void wxWindow::GetTextExtent( const wxString& string,
|
||||
|
||||
void wxWindow::SetFocus()
|
||||
{
|
||||
wxCHECK_RET( (m_widget != NULL), _T("invalid window") );
|
||||
wxCHECK_RET( (m_widget != NULL), T("invalid window") );
|
||||
|
||||
GtkWidget *connect_widget = GetConnectWidget();
|
||||
if (connect_widget)
|
||||
@@ -2559,7 +2559,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, T("invalid window") );
|
||||
|
||||
wxWindow *oldParent = m_parent,
|
||||
*newParent = (wxWindow *)newParentBase;
|
||||
@@ -2595,11 +2595,11 @@ bool wxWindow::Reparent( wxWindowBase *newParentBase )
|
||||
|
||||
void wxWindow::DoAddChild(wxWindow *child)
|
||||
{
|
||||
wxASSERT_MSG( (m_widget != NULL), _T("invalid window") );
|
||||
wxASSERT_MSG( (m_widget != NULL), T("invalid window") );
|
||||
|
||||
wxASSERT_MSG( (child != NULL), _T("invalid child window") );
|
||||
wxASSERT_MSG( (child != NULL), T("invalid child window") );
|
||||
|
||||
wxASSERT_MSG( (m_insertCallback != NULL), _T("invalid child insertion function") );
|
||||
wxASSERT_MSG( (m_insertCallback != NULL), T("invalid child insertion function") );
|
||||
|
||||
/* add to list */
|
||||
AddChild( child );
|
||||
@@ -2610,7 +2610,7 @@ void wxWindow::DoAddChild(wxWindow *child)
|
||||
|
||||
void wxWindow::Raise()
|
||||
{
|
||||
wxCHECK_RET( (m_widget != NULL), _T("invalid window") );
|
||||
wxCHECK_RET( (m_widget != NULL), T("invalid window") );
|
||||
|
||||
if (!m_widget->window) return;
|
||||
|
||||
@@ -2619,7 +2619,7 @@ void wxWindow::Raise()
|
||||
|
||||
void wxWindow::Lower()
|
||||
{
|
||||
wxCHECK_RET( (m_widget != NULL), _T("invalid window") );
|
||||
wxCHECK_RET( (m_widget != NULL), T("invalid window") );
|
||||
|
||||
if (!m_widget->window) return;
|
||||
|
||||
@@ -2628,14 +2628,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, T("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), T("invalid window") );
|
||||
|
||||
GtkWidget *connect_widget = GetConnectWidget();
|
||||
if (connect_widget->window)
|
||||
@@ -2648,7 +2648,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), T("invalid window") );
|
||||
|
||||
if (!m_widget->window) return;
|
||||
|
||||
@@ -2710,7 +2710,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, T("invalid window") );
|
||||
|
||||
if (!m_widget->window) return;
|
||||
|
||||
@@ -2737,7 +2737,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, T("invalid window") );
|
||||
|
||||
if (!wxWindowBase::SetBackgroundColour(colour))
|
||||
{
|
||||
@@ -2784,7 +2784,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, T("invalid window") );
|
||||
|
||||
if (!wxWindowBase::SetForegroundColour(colour))
|
||||
{
|
||||
@@ -2900,9 +2900,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, T("invalid window") );
|
||||
|
||||
wxCHECK_MSG( menu != NULL, FALSE, _T("invalid popup-menu") );
|
||||
wxCHECK_MSG( menu != NULL, FALSE, T("invalid popup-menu") );
|
||||
|
||||
SetInvokingWindow( menu, this );
|
||||
|
||||
@@ -2939,7 +2939,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, T("invalid window") );
|
||||
|
||||
GtkWidget *dnd_widget = GetConnectWidget();
|
||||
|
||||
@@ -2969,7 +2969,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, T("invalid window") );
|
||||
|
||||
if (!wxWindowBase::SetFont(font))
|
||||
{
|
||||
@@ -3007,9 +3007,9 @@ bool wxWindow::SetFont( const wxFont &font )
|
||||
|
||||
void wxWindow::CaptureMouse()
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, _T("invalid window") );
|
||||
wxCHECK_RET( m_widget != NULL, T("invalid window") );
|
||||
|
||||
wxCHECK_RET( g_captureWindow == NULL, _T("CaptureMouse called twice") );
|
||||
wxCHECK_RET( g_captureWindow == NULL, T("CaptureMouse called twice") );
|
||||
|
||||
GtkWidget *connect_widget = GetConnectWidget();
|
||||
if (!connect_widget->window) return;
|
||||
@@ -3027,9 +3027,9 @@ void wxWindow::CaptureMouse()
|
||||
|
||||
void wxWindow::ReleaseMouse()
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, _T("invalid window") );
|
||||
wxCHECK_RET( m_widget != NULL, T("invalid window") );
|
||||
|
||||
wxCHECK_RET( g_captureWindow, _T("ReleaseMouse called twice") );
|
||||
wxCHECK_RET( g_captureWindow, T("ReleaseMouse called twice") );
|
||||
|
||||
GtkWidget *connect_widget = GetConnectWidget();
|
||||
if (!connect_widget->window) return;
|
||||
@@ -3046,9 +3046,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, T("invalid window") );
|
||||
|
||||
wxCHECK_RET( m_wxwindow != NULL, _T("window needs client area for scrolling") );
|
||||
wxCHECK_RET( m_wxwindow != NULL, T("window needs client area for scrolling") );
|
||||
|
||||
m_hasScrolling = TRUE;
|
||||
|
||||
@@ -3109,9 +3109,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, T("invalid window") );
|
||||
|
||||
wxCHECK_RET( m_wxwindow != NULL, _T("window needs client area for scrolling") );
|
||||
wxCHECK_RET( m_wxwindow != NULL, T("window needs client area for scrolling") );
|
||||
|
||||
if (orient == wxHORIZONTAL)
|
||||
{
|
||||
@@ -3152,9 +3152,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, T("invalid window") );
|
||||
|
||||
wxCHECK_MSG( m_wxwindow != NULL, 0, _T("window needs client area for scrolling") );
|
||||
wxCHECK_MSG( m_wxwindow != NULL, 0, T("window needs client area for scrolling") );
|
||||
|
||||
if (orient == wxHORIZONTAL)
|
||||
return (int)(m_hAdjust->page_size+0.5);
|
||||
@@ -3164,9 +3164,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, T("invalid window") );
|
||||
|
||||
wxCHECK_MSG( m_wxwindow != NULL, 0, _T("window needs client area for scrolling") );
|
||||
wxCHECK_MSG( m_wxwindow != NULL, 0, T("window needs client area for scrolling") );
|
||||
|
||||
if (orient == wxHORIZONTAL)
|
||||
return (int)(m_hAdjust->value+0.5);
|
||||
@@ -3176,9 +3176,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, T("invalid window") );
|
||||
|
||||
wxCHECK_MSG( m_wxwindow != NULL, 0, _T("window needs client area for scrolling") );
|
||||
wxCHECK_MSG( m_wxwindow != NULL, 0, T("window needs client area for scrolling") );
|
||||
|
||||
if (orient == wxHORIZONTAL)
|
||||
return (int)(m_hAdjust->upper+0.5);
|
||||
@@ -3188,9 +3188,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, T("invalid window") );
|
||||
|
||||
wxCHECK_RET( m_wxwindow != NULL, _T("window needs client area for scrolling") );
|
||||
wxCHECK_RET( m_wxwindow != NULL, T("window needs client area for scrolling") );
|
||||
|
||||
if (!m_scrollGC)
|
||||
{
|
||||
|
Reference in New Issue
Block a user