wxEVT_SCROLLWIN_TOP - wxEVT_SCROLL_TOP;
}
-
-
-// In wxGTK2 the wxMessageDialog is not a real wxDialog, instead a
-// gtk_message_dialog is created, shown and destroyed inside the ShowModal()
-// call. Since its m_widget will always be NULL there would normally be lots
-// of wxCHECK asserts triggered by calling base class methods that are valid
-// calls (or just ignored) on other wx ports. Using these macros instead of
-// wxCHECK will silence those asserts if the window is a wxMessageDialog and
-// will let the method doing the check just be ignored in that case. If it's
-// not a wxMessageDialog then it behaves just like before.
-//
-// NOTE: Once more native dialogs are used then this will need to be
-// generalized a bit, perhaps with a IsNativeGTKDialog method or
-// something...
-
-#if wxUSE_MSGDLG && defined(__WXGTK20__) && !defined(__WXGPE__)
-#define wxCHECK_VALID_WIDGET(rc) \
- if (!(m_widget != NULL)) { \
- if (!wxIsKindOf(this, wxMessageDialog)) { wxFAIL_MSG(wxT("invalid window")); } \
- return rc; \
- }
-
-#define wxCHECK_VALID_WIDGET_RET() \
- if (!(m_widget != NULL)) { \
- if (!wxIsKindOf(this, wxMessageDialog)) { wxFAIL_MSG(wxT("invalid window")); } \
- return; \
- }
-
-#else // not wxGTK2, so just use wxCHECK
-#define wxCHECK_VALID_WIDGET(rc) wxCHECK_MSG( (m_widget != NULL), rc, wxT("invalid window") )
-#define wxCHECK_VALID_WIDGET_RET() wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
-#endif
-
-
#endif // _WX_GTK_PRIVATE_H_
wxEVT_SCROLLWIN_TOP - wxEVT_SCROLL_TOP;
}
-
-
-// In wxGTK2 the wxMessageDialog is not a real wxDialog, instead a
-// gtk_message_dialog is created, shown and destroyed inside the ShowModal()
-// call. Since its m_widget will always be NULL there would normally be lots
-// of wxCHECK asserts triggered by calling base class methods that are valid
-// calls (or just ignored) on other wx ports. Using these macros instead of
-// wxCHECK will silence those asserts if the window is a wxMessageDialog and
-// will let the method doing the check just be ignored in that case. If it's
-// not a wxMessageDialog then it behaves just like before.
-//
-// NOTE: Once more native dialogs are used then this will need to be
-// generalized a bit, perhaps with a IsNativeGTKDialog method or
-// something...
-
-#if wxUSE_MSGDLG && defined(__WXGTK20__) && !defined(__WXGPE__)
-#define wxCHECK_VALID_WIDGET(rc) \
- if (!(m_widget != NULL)) { \
- if (!wxIsKindOf(this, wxMessageDialog)) { wxFAIL_MSG(wxT("invalid window")); } \
- return rc; \
- }
-
-#define wxCHECK_VALID_WIDGET_RET() \
- if (!(m_widget != NULL)) { \
- if (!wxIsKindOf(this, wxMessageDialog)) { wxFAIL_MSG(wxT("invalid window")); } \
- return; \
- }
-
-#else // not wxGTK2, so just use wxCHECK
-#define wxCHECK_VALID_WIDGET(rc) wxCHECK_MSG( (m_widget != NULL), rc, wxT("invalid window") )
-#define wxCHECK_VALID_WIDGET_RET() wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
-#endif
-
-
#endif // _WX_GTK_PRIVATE_H_
#include "wx/log.h"
#include "wx/dialog.h"
-#include "wx/msgdlg.h"
#include "wx/control.h"
#include "wx/app.h"
#include "wx/dcclient.h"
bool wxTopLevelWindowGTK::Show( bool show )
{
- wxCHECK_VALID_WIDGET(FALSE);
+ wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
if (show && !m_sizeSet)
{
void wxTopLevelWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags )
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
+
// this shouldn't happen: wxFrame, wxMDIParentFrame and wxMDIChildFrame have m_wxwindow
wxASSERT_MSG( (m_wxwindow != NULL), wxT("invalid frame") );
void wxTopLevelWindowGTK::DoGetClientSize( int *width, int *height ) const
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
+
wxWindow::DoGetClientSize( width, height );
if (height)
{
void wxTopLevelWindowGTK::DoSetClientSize( int width, int height )
{
- wxCHECK_VALID_WIDGET_RET();
+ wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
DoSetSize(-1, -1,
width + m_miniEdge*2, height + m_miniEdge*2 + m_miniTitle, 0);
void wxTopLevelWindowGTK::SetTitle( const wxString &title )
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
+
m_title = title;
gtk_window_set_title( GTK_WINDOW(m_widget), wxGTK_CONV( title ) );
}
void wxTopLevelWindowGTK::SetIcons( const wxIconBundle &icons )
{
- wxCHECK_VALID_WIDGET_RET();
+ wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
GdkWindow* window = m_widget->window;
wxTopLevelWindowBase::SetIcons( icons );
void wxWindowGTK::PostCreation()
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") );
+
if (m_wxwindow)
{
if (!m_noExpose)
bool wxWindowGTK::Destroy()
{
- wxCHECK_VALID_WIDGET(FALSE);
+ wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") );
m_hasVMT = FALSE;
void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags )
{
- wxCHECK_VALID_WIDGET_RET();
+ wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") );
wxASSERT_MSG( (m_parent != NULL), wxT("wxWindowGTK::SetSize requires parent.\n") );
/*
void wxWindowGTK::DoGetSize( int *width, int *height ) const
{
- wxCHECK_VALID_WIDGET_RET();
+ wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
if (width) (*width) = m_width;
if (height) (*height) = m_height;
void wxWindowGTK::DoSetClientSize( int width, int height )
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
+
if (!m_wxwindow)
{
SetSize( width, height );
void wxWindowGTK::DoGetClientSize( int *width, int *height ) const
{
- wxCHECK_VALID_WIDGET_RET();
+ wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
if (!m_wxwindow)
{
void wxWindowGTK::DoGetPosition( int *x, int *y ) const
{
- wxCHECK_VALID_WIDGET_RET();
+ wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
int dx = 0;
int dy = 0;
void wxWindowGTK::DoClientToScreen( int *x, int *y ) const
{
- wxCHECK_VALID_WIDGET_RET();
+ wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
if (!m_widget->window) return;
void wxWindowGTK::DoScreenToClient( int *x, int *y ) const
{
- wxCHECK_VALID_WIDGET_RET();
+ wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
if (!m_widget->window) return;
bool wxWindowGTK::Show( bool show )
{
- wxCHECK_VALID_WIDGET(FALSE);
+ wxCHECK_MSG( (m_widget != NULL), FALSE, wxT("invalid window") );
if (!wxWindowBase::Show(show))
{
bool wxWindowGTK::Enable( bool enable )
{
- wxCHECK_VALID_WIDGET(FALSE);
-
+ wxCHECK_MSG( (m_widget != NULL), FALSE, wxT("invalid window") );
+
if (!wxWindowBase::Enable(enable))
{
// nothing to do
int wxWindowGTK::GetCharHeight() const
{
- wxCHECK_VALID_WIDGET(12);
+ wxCHECK_MSG( (m_widget != NULL), 12, wxT("invalid window") );
wxFont font = GetFont();
wxCHECK_MSG( font.Ok(), 12, wxT("invalid font") );
int wxWindowGTK::GetCharWidth() const
{
- wxCHECK_VALID_WIDGET(8);
+ wxCHECK_MSG( (m_widget != NULL), 8, wxT("invalid window") );
wxFont font = GetFont();
wxCHECK_MSG( font.Ok(), 8, wxT("invalid font") );
void wxWindowGTK::SetFocus()
{
- wxCHECK_VALID_WIDGET_RET();
+ wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
if ( m_hasFocus )
{
bool wxWindowGTK::Reparent( wxWindowBase *newParentBase )
{
- wxCHECK_VALID_WIDGET(FALSE);
+ wxCHECK_MSG( (m_widget != NULL), FALSE, wxT("invalid window") );
wxWindowGTK *oldParent = m_parent,
*newParent = (wxWindowGTK *)newParentBase;
void wxWindowGTK::Raise()
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
+
if (!m_widget->window) return;
gdk_window_raise( m_widget->window );
void wxWindowGTK::Lower()
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
+
if (!m_widget->window) return;
gdk_window_lower( m_widget->window );
bool wxWindowGTK::SetCursor( const wxCursor &cursor )
{
- wxCHECK_VALID_WIDGET(FALSE);
+ wxCHECK_MSG( (m_widget != NULL), FALSE, wxT("invalid window") );
if (cursor == m_cursor)
return FALSE;
void wxWindowGTK::WarpPointer( int x, int y )
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
+
// We provide this function ourselves as it is
// missing in GDK (top of this file).
void wxWindowGTK::ClearBackground()
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
+
#ifndef __WXGTK20__
if (m_wxwindow && m_wxwindow->window)
{
bool wxWindowGTK::SetBackgroundColour( const wxColour &colour )
{
- wxCHECK_VALID_WIDGET(FALSE);
+ wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid window") );
if (!wxWindowBase::SetBackgroundColour(colour))
return FALSE;
bool wxWindowGTK::SetForegroundColour( const wxColour &colour )
{
- wxCHECK_VALID_WIDGET(FALSE);
+ wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid window") );
if (!wxWindowBase::SetForegroundColour(colour))
{
bool wxWindowGTK::DoPopupMenu( wxMenu *menu, int x, int y )
{
- wxCHECK_VALID_WIDGET(FALSE);
+ wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid window") );
wxCHECK_MSG( menu != NULL, FALSE, wxT("invalid popup-menu") );
void wxWindowGTK::SetDropTarget( wxDropTarget *dropTarget )
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
+
GtkWidget *dnd_widget = GetConnectWidget();
if (m_dropTarget) m_dropTarget->UnregisterWidget( dnd_widget );
void wxWindowGTK::DoCaptureMouse()
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
+
GdkWindow *window = (GdkWindow*) NULL;
if (m_wxwindow)
window = GTK_PIZZA(m_wxwindow)->bin_window;
void wxWindowGTK::DoReleaseMouse()
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
+
wxCHECK_RET( g_captureWindow, wxT("can't release mouse - not captured") );
g_captureWindow = (wxWindowGTK*) NULL;
void wxWindowGTK::SetScrollbar( int orient, int pos, int thumbVisible,
int range, bool refresh )
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
+
wxCHECK_RET( m_wxwindow != NULL, wxT("window needs client area for scrolling") );
m_hasScrolling = TRUE;
void wxWindowGTK::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) )
{
- wxCHECK_VALID_WIDGET_RET();
+ wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
wxCHECK_RET( m_wxwindow != NULL, wxT("window needs client area for scrolling") );
int wxWindowGTK::GetScrollThumb( int orient ) const
{
- wxCHECK_VALID_WIDGET(0);
-
+ wxCHECK_MSG( m_widget != NULL, 0, wxT("invalid window") );
+
wxCHECK_MSG( m_wxwindow != NULL, 0, wxT("window needs client area for scrolling") );
if (orient == wxHORIZONTAL)
int wxWindowGTK::GetScrollPos( int orient ) const
{
- wxCHECK_VALID_WIDGET(0);
+ wxCHECK_MSG( m_widget != NULL, 0, wxT("invalid window") );
wxCHECK_MSG( m_wxwindow != NULL, 0, wxT("window needs client area for scrolling") );
int wxWindowGTK::GetScrollRange( int orient ) const
{
- wxCHECK_VALID_WIDGET(0);
+ wxCHECK_MSG( m_widget != NULL, 0, wxT("invalid window") );
wxCHECK_MSG( m_wxwindow != NULL, 0, wxT("window needs client area for scrolling") );
void wxWindowGTK::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) )
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
+
wxCHECK_RET( m_wxwindow != NULL, wxT("window needs client area for scrolling") );
// No scrolling requested.
#include "wx/log.h"
#include "wx/dialog.h"
-#include "wx/msgdlg.h"
#include "wx/control.h"
#include "wx/app.h"
#include "wx/dcclient.h"
bool wxTopLevelWindowGTK::Show( bool show )
{
- wxCHECK_VALID_WIDGET(FALSE);
+ wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
if (show && !m_sizeSet)
{
void wxTopLevelWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags )
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
+
// this shouldn't happen: wxFrame, wxMDIParentFrame and wxMDIChildFrame have m_wxwindow
wxASSERT_MSG( (m_wxwindow != NULL), wxT("invalid frame") );
void wxTopLevelWindowGTK::DoGetClientSize( int *width, int *height ) const
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
+
wxWindow::DoGetClientSize( width, height );
if (height)
{
void wxTopLevelWindowGTK::DoSetClientSize( int width, int height )
{
- wxCHECK_VALID_WIDGET_RET();
+ wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
DoSetSize(-1, -1,
width + m_miniEdge*2, height + m_miniEdge*2 + m_miniTitle, 0);
void wxTopLevelWindowGTK::SetTitle( const wxString &title )
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
+
m_title = title;
gtk_window_set_title( GTK_WINDOW(m_widget), wxGTK_CONV( title ) );
}
void wxTopLevelWindowGTK::SetIcons( const wxIconBundle &icons )
{
- wxCHECK_VALID_WIDGET_RET();
+ wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
GdkWindow* window = m_widget->window;
wxTopLevelWindowBase::SetIcons( icons );
void wxWindowGTK::PostCreation()
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") );
+
if (m_wxwindow)
{
if (!m_noExpose)
bool wxWindowGTK::Destroy()
{
- wxCHECK_VALID_WIDGET(FALSE);
+ wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") );
m_hasVMT = FALSE;
void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags )
{
- wxCHECK_VALID_WIDGET_RET();
+ wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") );
wxASSERT_MSG( (m_parent != NULL), wxT("wxWindowGTK::SetSize requires parent.\n") );
/*
void wxWindowGTK::DoGetSize( int *width, int *height ) const
{
- wxCHECK_VALID_WIDGET_RET();
+ wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
if (width) (*width) = m_width;
if (height) (*height) = m_height;
void wxWindowGTK::DoSetClientSize( int width, int height )
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
+
if (!m_wxwindow)
{
SetSize( width, height );
void wxWindowGTK::DoGetClientSize( int *width, int *height ) const
{
- wxCHECK_VALID_WIDGET_RET();
+ wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
if (!m_wxwindow)
{
void wxWindowGTK::DoGetPosition( int *x, int *y ) const
{
- wxCHECK_VALID_WIDGET_RET();
+ wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
int dx = 0;
int dy = 0;
void wxWindowGTK::DoClientToScreen( int *x, int *y ) const
{
- wxCHECK_VALID_WIDGET_RET();
+ wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
if (!m_widget->window) return;
void wxWindowGTK::DoScreenToClient( int *x, int *y ) const
{
- wxCHECK_VALID_WIDGET_RET();
+ wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
if (!m_widget->window) return;
bool wxWindowGTK::Show( bool show )
{
- wxCHECK_VALID_WIDGET(FALSE);
+ wxCHECK_MSG( (m_widget != NULL), FALSE, wxT("invalid window") );
if (!wxWindowBase::Show(show))
{
bool wxWindowGTK::Enable( bool enable )
{
- wxCHECK_VALID_WIDGET(FALSE);
-
+ wxCHECK_MSG( (m_widget != NULL), FALSE, wxT("invalid window") );
+
if (!wxWindowBase::Enable(enable))
{
// nothing to do
int wxWindowGTK::GetCharHeight() const
{
- wxCHECK_VALID_WIDGET(12);
+ wxCHECK_MSG( (m_widget != NULL), 12, wxT("invalid window") );
wxFont font = GetFont();
wxCHECK_MSG( font.Ok(), 12, wxT("invalid font") );
int wxWindowGTK::GetCharWidth() const
{
- wxCHECK_VALID_WIDGET(8);
+ wxCHECK_MSG( (m_widget != NULL), 8, wxT("invalid window") );
wxFont font = GetFont();
wxCHECK_MSG( font.Ok(), 8, wxT("invalid font") );
void wxWindowGTK::SetFocus()
{
- wxCHECK_VALID_WIDGET_RET();
+ wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
if ( m_hasFocus )
{
bool wxWindowGTK::Reparent( wxWindowBase *newParentBase )
{
- wxCHECK_VALID_WIDGET(FALSE);
+ wxCHECK_MSG( (m_widget != NULL), FALSE, wxT("invalid window") );
wxWindowGTK *oldParent = m_parent,
*newParent = (wxWindowGTK *)newParentBase;
void wxWindowGTK::Raise()
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
+
if (!m_widget->window) return;
gdk_window_raise( m_widget->window );
void wxWindowGTK::Lower()
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
+
if (!m_widget->window) return;
gdk_window_lower( m_widget->window );
bool wxWindowGTK::SetCursor( const wxCursor &cursor )
{
- wxCHECK_VALID_WIDGET(FALSE);
+ wxCHECK_MSG( (m_widget != NULL), FALSE, wxT("invalid window") );
if (cursor == m_cursor)
return FALSE;
void wxWindowGTK::WarpPointer( int x, int y )
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
+
// We provide this function ourselves as it is
// missing in GDK (top of this file).
void wxWindowGTK::ClearBackground()
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
+
#ifndef __WXGTK20__
if (m_wxwindow && m_wxwindow->window)
{
bool wxWindowGTK::SetBackgroundColour( const wxColour &colour )
{
- wxCHECK_VALID_WIDGET(FALSE);
+ wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid window") );
if (!wxWindowBase::SetBackgroundColour(colour))
return FALSE;
bool wxWindowGTK::SetForegroundColour( const wxColour &colour )
{
- wxCHECK_VALID_WIDGET(FALSE);
+ wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid window") );
if (!wxWindowBase::SetForegroundColour(colour))
{
bool wxWindowGTK::DoPopupMenu( wxMenu *menu, int x, int y )
{
- wxCHECK_VALID_WIDGET(FALSE);
+ wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid window") );
wxCHECK_MSG( menu != NULL, FALSE, wxT("invalid popup-menu") );
void wxWindowGTK::SetDropTarget( wxDropTarget *dropTarget )
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
+
GtkWidget *dnd_widget = GetConnectWidget();
if (m_dropTarget) m_dropTarget->UnregisterWidget( dnd_widget );
void wxWindowGTK::DoCaptureMouse()
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
+
GdkWindow *window = (GdkWindow*) NULL;
if (m_wxwindow)
window = GTK_PIZZA(m_wxwindow)->bin_window;
void wxWindowGTK::DoReleaseMouse()
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
+
wxCHECK_RET( g_captureWindow, wxT("can't release mouse - not captured") );
g_captureWindow = (wxWindowGTK*) NULL;
void wxWindowGTK::SetScrollbar( int orient, int pos, int thumbVisible,
int range, bool refresh )
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
+
wxCHECK_RET( m_wxwindow != NULL, wxT("window needs client area for scrolling") );
m_hasScrolling = TRUE;
void wxWindowGTK::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) )
{
- wxCHECK_VALID_WIDGET_RET();
+ wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
wxCHECK_RET( m_wxwindow != NULL, wxT("window needs client area for scrolling") );
int wxWindowGTK::GetScrollThumb( int orient ) const
{
- wxCHECK_VALID_WIDGET(0);
-
+ wxCHECK_MSG( m_widget != NULL, 0, wxT("invalid window") );
+
wxCHECK_MSG( m_wxwindow != NULL, 0, wxT("window needs client area for scrolling") );
if (orient == wxHORIZONTAL)
int wxWindowGTK::GetScrollPos( int orient ) const
{
- wxCHECK_VALID_WIDGET(0);
+ wxCHECK_MSG( m_widget != NULL, 0, wxT("invalid window") );
wxCHECK_MSG( m_wxwindow != NULL, 0, wxT("window needs client area for scrolling") );
int wxWindowGTK::GetScrollRange( int orient ) const
{
- wxCHECK_VALID_WIDGET(0);
+ wxCHECK_MSG( m_widget != NULL, 0, wxT("invalid window") );
wxCHECK_MSG( m_wxwindow != NULL, 0, wxT("window needs client area for scrolling") );
void wxWindowGTK::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) )
{
- wxCHECK_VALID_WIDGET_RET();
-
+ wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
+
wxCHECK_RET( m_wxwindow != NULL, wxT("window needs client area for scrolling") );
// No scrolling requested.