X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5fd11f09718445c5795526c393f2b2a1875f6870..9b64e79868d4d32c3541bbd049d3f9f94c8edbfe:/src/gtk1/window.cpp diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index ade2fa716a..7fc92ca687 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -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]; @@ -686,10 +686,6 @@ static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExp if (gdk_event->count > 0) return; - wxPaintEvent event( win->GetId() ); - event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); - /* wxPrintf( "OnExpose from " ); if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) @@ -700,6 +696,10 @@ static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExp (int)gdk_event->area.height ); */ + wxPaintEvent event( win->GetId() ); + event.SetEventObject( win ); + win->GetEventHandler()->ProcessEvent( event ); + win->GetUpdateRegion().Clear(); } @@ -707,7 +707,7 @@ static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExp // "draw" of m_wxwindow //----------------------------------------------------------------------------- -static void gtk_window_draw_callback( GtkWidget *WXUNUSED(widget), GdkRectangle *rect, wxWindow *win ) +static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxWindow *win ) { if (g_isIdle) wxapp_install_idle_handler(); @@ -715,12 +715,13 @@ static void gtk_window_draw_callback( GtkWidget *WXUNUSED(widget), GdkRectangle if (!win->m_hasVMT) return; + GtkMyFixed *myfixed = GTK_MYFIXED (widget); + if (!myfixed->children) + return; /* mini optimisation */ + win->GetUpdateRegion().Union( rect->x, rect->y, rect->width, rect->height ); - wxPaintEvent event( win->GetId() ); - event.SetEventObject( win ); - /* wxPrintf( "OnDraw from " ); if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) @@ -730,7 +731,9 @@ static void gtk_window_draw_callback( GtkWidget *WXUNUSED(widget), GdkRectangle (int)rect->width, (int)rect->height ); */ - + + wxPaintEvent event( win->GetId() ); + event.SetEventObject( win ); win->GetEventHandler()->ProcessEvent( event ); win->GetUpdateRegion().Clear(); @@ -974,10 +977,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 +995,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; @@ -1243,13 +1246,12 @@ static gint gtk_window_motion_notify_callback( GtkWidget *widget, GdkEventMotion if (gdk_event->is_hint) { - int x = 0; - int y = 0; - GdkModifierType state; - gdk_window_get_pointer(gdk_event->window, &x, &y, &state); - gdk_event->x = x; - gdk_event->y = y; - gdk_event->state = state; + int x = 0; + int y = 0; + GdkModifierType state; + gdk_window_get_pointer(gdk_event->window, &x, &y, &state); + gdk_event->x = x; + gdk_event->y = y; } /* @@ -1648,7 +1650,7 @@ static gint gtk_scrollbar_button_press_callback( GtkRange *WXUNUSED(widget), // "button_release_event" from scrollbar //----------------------------------------------------------------------------- -static gint gtk_scrollbar_button_release_callback( GtkRange *widget, +static gint gtk_scrollbar_button_release_callback( GtkRange *WXUNUSED(widget), GdkEventButton *WXUNUSED(gdk_event), wxWindow *win ) { @@ -1807,7 +1809,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id, if (!PreCreation( parent, pos, size ) || !CreateBase( parent, id, pos, size, style, wxDefaultValidator, name )) { - wxFAIL_MSG( _T("wxWindow creation failed") ); + wxFAIL_MSG( T("wxWindow creation failed") ); return FALSE; } @@ -1817,14 +1819,14 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id, GTK_WIDGET_UNSET_FLAGS( m_widget, GTK_CAN_FOCUS ); #ifdef __WXDEBUG__ - debug_focus_in( m_widget, _T("wxWindow::m_widget"), name ); + debug_focus_in( m_widget, 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 +1840,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id, m_wxwindow = gtk_myfixed_new(); #ifdef __WXDEBUG__ - debug_focus_in( m_wxwindow, _T("wxWindow::m_wxwindow"), name ); + debug_focus_in( m_wxwindow, T("wxWindow::m_wxwindow"), name ); #endif gtk_container_add( GTK_CONTAINER(m_widget), m_wxwindow ); @@ -1996,7 +1998,7 @@ wxWindow::~wxWindow() bool wxWindow::PreCreation( wxWindow *parent, const wxPoint &pos, const wxSize &size ) { - wxCHECK_MSG( !m_needParent || parent, FALSE, _T("Need complete parent.") ); + wxCHECK_MSG( !m_needParent || parent, FALSE, 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 +2030,7 @@ bool wxWindow::PreCreation( wxWindow *parent, const wxPoint &pos, const wxSize void wxWindow::PostCreation() { - wxASSERT_MSG( (m_widget != NULL), _T("invalid window") ); + wxASSERT_MSG( (m_widget != NULL), T("invalid window") ); if (m_wxwindow) { @@ -2036,9 +2038,9 @@ void wxWindow::PostCreation() gtk_signal_connect( GTK_OBJECT(m_wxwindow), "expose_event", GTK_SIGNAL_FUNC(gtk_window_expose_callback), (gpointer)this ); - gtk_signal_connect( GTK_OBJECT(m_wxwindow), "draw", + gtk_signal_connect( GTK_OBJECT(m_wxwindow), "draw", GTK_SIGNAL_FUNC(gtk_window_draw_callback), (gpointer)this ); - + #if (GTK_MINOR_VERSION > 0) /* these are called when the "sunken", "raised" or "simple" borders are drawn */ gtk_signal_connect( GTK_OBJECT(m_widget), "expose_event", @@ -2093,7 +2095,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 +2104,8 @@ bool wxWindow::Destroy() void wxWindow::DoSetSize( int x, int y, int width, int height, int sizeFlags ) { - wxASSERT_MSG( (m_widget != NULL), _T("invalid window") ); - wxASSERT_MSG( (m_parent != NULL), _T("wxWindow::SetSize requires parent.\n") ); + wxASSERT_MSG( (m_widget != NULL), 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; @@ -2201,10 +2203,13 @@ void wxWindow::OnInternalIdle() wxCursor cursor = m_cursor; if (g_globalCursor.Ok()) cursor = g_globalCursor; - if (cursor.Ok() && m_currentGdkCursor != cursor) + if (cursor.Ok()) { - m_currentGdkCursor = cursor; - + /* I now set the cursor the anew in every OnInternalIdle call + as setting the cursor in a parent window also effects the + windows above so that checking for the current cursor is + not possible. */ + if (m_wxwindow) { GdkWindow *window = m_wxwindow->window; @@ -2234,7 +2239,7 @@ void wxWindow::OnInternalIdle() void wxWindow::DoGetSize( int *width, int *height ) const { - wxCHECK_RET( (m_widget != NULL), _T("invalid window") ); + wxCHECK_RET( (m_widget != NULL), T("invalid window") ); if (width) (*width) = m_width; if (height) (*height) = m_height; @@ -2242,7 +2247,7 @@ void wxWindow::DoGetSize( int *width, int *height ) const void wxWindow::DoSetClientSize( int width, int height ) { - wxCHECK_RET( (m_widget != NULL), _T("invalid window") ); + wxCHECK_RET( (m_widget != NULL), T("invalid window") ); if (!m_wxwindow) { @@ -2316,7 +2321,7 @@ void wxWindow::DoSetClientSize( int width, int height ) void wxWindow::DoGetClientSize( int *width, int *height ) const { - wxCHECK_RET( (m_widget != NULL), _T("invalid window") ); + wxCHECK_RET( (m_widget != NULL), T("invalid window") ); if (!m_wxwindow) { @@ -2391,7 +2396,7 @@ void wxWindow::DoGetClientSize( int *width, int *height ) const void wxWindow::DoGetPosition( int *x, int *y ) const { - wxCHECK_RET( (m_widget != NULL), _T("invalid window") ); + wxCHECK_RET( (m_widget != NULL), T("invalid window") ); if (x) (*x) = m_x; if (y) (*y) = m_y; @@ -2399,7 +2404,7 @@ void wxWindow::DoGetPosition( int *x, int *y ) const void wxWindow::DoClientToScreen( int *x, int *y ) const { - wxCHECK_RET( (m_widget != NULL), _T("invalid window") ); + wxCHECK_RET( (m_widget != NULL), T("invalid window") ); if (!m_widget->window) return; @@ -2428,7 +2433,7 @@ void wxWindow::DoClientToScreen( int *x, int *y ) const void wxWindow::DoScreenToClient( int *x, int *y ) const { - wxCHECK_RET( (m_widget != NULL), _T("invalid window") ); + wxCHECK_RET( (m_widget != NULL), T("invalid window") ); if (!m_widget->window) return; @@ -2457,7 +2462,7 @@ void wxWindow::DoScreenToClient( int *x, int *y ) const bool wxWindow::Show( bool show ) { - wxCHECK_MSG( (m_widget != NULL), FALSE, _T("invalid window") ); + wxCHECK_MSG( (m_widget != NULL), FALSE, T("invalid window") ); if (!wxWindowBase::Show(show)) { @@ -2475,7 +2480,7 @@ bool wxWindow::Show( bool show ) bool wxWindow::Enable( bool enable ) { - wxCHECK_MSG( (m_widget != NULL), FALSE, _T("invalid window") ); + wxCHECK_MSG( (m_widget != NULL), FALSE, T("invalid window") ); if (!wxWindowBase::Enable(enable)) { @@ -2492,9 +2497,9 @@ bool wxWindow::Enable( bool enable ) int wxWindow::GetCharHeight() const { - wxCHECK_MSG( (m_widget != NULL), 12, _T("invalid window") ); + wxCHECK_MSG( (m_widget != NULL), 12, 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 +2508,9 @@ int wxWindow::GetCharHeight() const int wxWindow::GetCharWidth() const { - wxCHECK_MSG( (m_widget != NULL), 8, _T("invalid window") ); + wxCHECK_MSG( (m_widget != NULL), 8, 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 +2527,7 @@ void wxWindow::GetTextExtent( const wxString& string, wxFont fontToUse = m_font; if (theFont) fontToUse = *theFont; - wxCHECK_RET( fontToUse.Ok(), _T("invalid font") ); + wxCHECK_RET( fontToUse.Ok(), T("invalid font") ); GdkFont *font = fontToUse.GetInternalFont( 1.0 ); if (x) (*x) = gdk_string_width( font, string.mbc_str() ); @@ -2533,7 +2538,7 @@ void wxWindow::GetTextExtent( const wxString& string, void wxWindow::SetFocus() { - wxCHECK_RET( (m_widget != NULL), _T("invalid window") ); + wxCHECK_RET( (m_widget != NULL), T("invalid window") ); GtkWidget *connect_widget = GetConnectWidget(); if (connect_widget) @@ -2559,7 +2564,7 @@ bool wxWindow::AcceptsFocus() const bool wxWindow::Reparent( wxWindowBase *newParentBase ) { - wxCHECK_MSG( (m_widget != NULL), FALSE, _T("invalid window") ); + wxCHECK_MSG( (m_widget != NULL), FALSE, T("invalid window") ); wxWindow *oldParent = m_parent, *newParent = (wxWindow *)newParentBase; @@ -2595,11 +2600,11 @@ bool wxWindow::Reparent( wxWindowBase *newParentBase ) void wxWindow::DoAddChild(wxWindow *child) { - wxASSERT_MSG( (m_widget != NULL), _T("invalid window") ); + wxASSERT_MSG( (m_widget != NULL), 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 +2615,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 +2624,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 +2633,14 @@ void wxWindow::Lower() bool wxWindow::SetCursor( const wxCursor &cursor ) { - wxCHECK_MSG( (m_widget != NULL), FALSE, _T("invalid window") ); + wxCHECK_MSG( (m_widget != NULL), FALSE, 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 +2653,7 @@ void wxWindow::WarpPointer( int x, int y ) void wxWindow::Refresh( bool eraseBackground, const wxRect *rect ) { - wxCHECK_RET( (m_widget != NULL), _T("invalid window") ); + wxCHECK_RET( (m_widget != NULL), T("invalid window") ); if (!m_widget->window) return; @@ -2671,16 +2676,16 @@ void wxWindow::Refresh( bool eraseBackground, const wxRect *rect ) if (m_wxwindow) { /* call the callback directly for preventing GTK from - clearing the bakground */ + clearing the background */ int w = 0; int h = 0; GetClientSize( &w, &h ); - GdkRectangle gdk_rect; - gdk_rect.x = 0; - gdk_rect.y = 0; - gdk_rect.width = w; - gdk_rect.height = h; - gtk_window_draw_callback( m_wxwindow, &gdk_rect, this ); + + GetUpdateRegion().Union( 0, 0, w, h ); + wxPaintEvent event( GetId() ); + event.SetEventObject( this ); + GetEventHandler()->ProcessEvent( event ); + GetUpdateRegion().Clear(); } else { @@ -2689,20 +2694,25 @@ void wxWindow::Refresh( bool eraseBackground, const wxRect *rect ) } else { - GdkRectangle gdk_rect; - gdk_rect.x = rect->x; - gdk_rect.y = rect->y; - gdk_rect.width = rect->width; - gdk_rect.height = rect->height; if (m_wxwindow) { /* call the callback directly for preventing GTK from - clearing the bakground */ - gtk_window_draw_callback( m_wxwindow, &gdk_rect, this ); + clearing the background */ + GetUpdateRegion().Union( rect->x, rect->y, rect->width, rect->height ); + wxPaintEvent event( GetId() ); + event.SetEventObject( this ); + GetEventHandler()->ProcessEvent( event ); + GetUpdateRegion().Clear(); } else { + GdkRectangle gdk_rect; + gdk_rect.x = rect->x; + gdk_rect.y = rect->y; + gdk_rect.width = rect->width; + gdk_rect.height = rect->height; + gtk_widget_draw( m_widget, &gdk_rect ); } } @@ -2710,7 +2720,7 @@ void wxWindow::Refresh( bool eraseBackground, const wxRect *rect ) void wxWindow::Clear() { - wxCHECK_RET( m_widget != NULL, _T("invalid window") ); + wxCHECK_RET( m_widget != NULL, T("invalid window") ); if (!m_widget->window) return; @@ -2737,7 +2747,7 @@ void wxWindow::ApplyToolTip( GtkTooltips *tips, const wxChar *tip ) bool wxWindow::SetBackgroundColour( const wxColour &colour ) { - wxCHECK_MSG( m_widget != NULL, FALSE, _T("invalid window") ); + wxCHECK_MSG( m_widget != NULL, FALSE, T("invalid window") ); if (!wxWindowBase::SetBackgroundColour(colour)) { @@ -2784,7 +2794,7 @@ bool wxWindow::SetBackgroundColour( const wxColour &colour ) bool wxWindow::SetForegroundColour( const wxColour &colour ) { - wxCHECK_MSG( m_widget != NULL, FALSE, _T("invalid window") ); + wxCHECK_MSG( m_widget != NULL, FALSE, T("invalid window") ); if (!wxWindowBase::SetForegroundColour(colour)) { @@ -2900,9 +2910,9 @@ static void pop_pos_callback( GtkMenu * WXUNUSED(menu), bool wxWindow::DoPopupMenu( wxMenu *menu, int x, int y ) { - wxCHECK_MSG( m_widget != NULL, FALSE, _T("invalid window") ); + wxCHECK_MSG( m_widget != NULL, FALSE, 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 +2949,7 @@ bool wxWindow::DoPopupMenu( wxMenu *menu, int x, int y ) void wxWindow::SetDropTarget( wxDropTarget *dropTarget ) { - wxCHECK_RET( m_widget != NULL, _T("invalid window") ); + wxCHECK_RET( m_widget != NULL, T("invalid window") ); GtkWidget *dnd_widget = GetConnectWidget(); @@ -2969,7 +2979,7 @@ bool wxWindow::IsOwnGtkWindow( GdkWindow *window ) bool wxWindow::SetFont( const wxFont &font ) { - wxCHECK_MSG( m_widget != NULL, FALSE, _T("invalid window") ); + wxCHECK_MSG( m_widget != NULL, FALSE, T("invalid window") ); if (!wxWindowBase::SetFont(font)) { @@ -3007,9 +3017,9 @@ bool wxWindow::SetFont( const wxFont &font ) void wxWindow::CaptureMouse() { - wxCHECK_RET( m_widget != NULL, _T("invalid window") ); + wxCHECK_RET( m_widget != NULL, 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; @@ -3018,6 +3028,7 @@ void wxWindow::CaptureMouse() (GdkEventMask) (GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | + GDK_POINTER_MOTION_HINT_MASK | GDK_POINTER_MOTION_MASK), (GdkWindow *) NULL, m_cursor.GetCursor(), @@ -3027,9 +3038,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 +3057,9 @@ bool wxWindow::IsRetained() const void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible, int range, bool refresh ) { - wxCHECK_RET( m_widget != NULL, _T("invalid window") ); + wxCHECK_RET( m_widget != NULL, 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 +3120,9 @@ void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible, void wxWindow::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) ) { - wxCHECK_RET( m_widget != NULL, _T("invalid window") ); + wxCHECK_RET( m_widget != NULL, 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 +3163,9 @@ void wxWindow::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) ) int wxWindow::GetScrollThumb( int orient ) const { - wxCHECK_MSG( m_widget != NULL, 0, _T("invalid window") ); + wxCHECK_MSG( m_widget != NULL, 0, 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 +3175,9 @@ int wxWindow::GetScrollThumb( int orient ) const int wxWindow::GetScrollPos( int orient ) const { - wxCHECK_MSG( m_widget != NULL, 0, _T("invalid window") ); + wxCHECK_MSG( m_widget != NULL, 0, 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 +3187,9 @@ int wxWindow::GetScrollPos( int orient ) const int wxWindow::GetScrollRange( int orient ) const { - wxCHECK_MSG( m_widget != NULL, 0, _T("invalid window") ); + wxCHECK_MSG( m_widget != NULL, 0, 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 +3199,9 @@ int wxWindow::GetScrollRange( int orient ) const void wxWindow::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) ) { - wxCHECK_RET( m_widget != NULL, _T("invalid window") ); + wxCHECK_RET( m_widget != NULL, 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) {