/////////////////////////////////////////////////////////////////////////////
-// Name: gtk/window.cpp
+// Name: src/gtk1/window.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
#endif
#include "wx/window.h"
-#include "wx/dcclient.h"
-#include "wx/frame.h"
-#include "wx/app.h"
-#include "wx/layout.h"
-#include "wx/utils.h"
-#include "wx/dialog.h"
-#include "wx/msgdlg.h"
-#include "wx/module.h"
-#include "wx/combobox.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/intl.h"
+ #include "wx/log.h"
+ #include "wx/app.h"
+ #include "wx/utils.h"
+ #include "wx/frame.h"
+ #include "wx/dcclient.h"
+ #include "wx/menu.h"
+ #include "wx/dialog.h"
+ #include "wx/settings.h"
+ #include "wx/msgdlg.h"
+ #include "wx/textctrl.h"
+ #include "wx/combobox.h"
+ #include "wx/layout.h"
+ #include "wx/statusbr.h"
+ #include "wx/math.h"
+ #include "wx/module.h"
+#endif
#if wxUSE_DRAG_AND_DROP
#include "wx/dnd.h"
#include "wx/caret.h"
#endif // wxUSE_CARET
-#if wxUSE_TEXTCTRL
- #include "wx/textctrl.h"
-#endif
-
-#include "wx/menu.h"
-#include "wx/statusbr.h"
-#include "wx/intl.h"
-#include "wx/settings.h"
-#include "wx/log.h"
#include "wx/fontutil.h"
#ifdef __WXDEBUG__
#include "wx/thread.h"
#endif
-#include "wx/math.h"
#include <ctype.h>
#include "wx/gtk1/private.h"
// data
//-----------------------------------------------------------------------------
-extern wxList wxPendingDelete;
extern bool g_blockEventsOnDrag;
extern bool g_blockEventsOnScroll;
extern wxCursor g_globalCursor;
break;
case GDK_Prior: // == GDK_Page_Up
- key_code = WXK_PRIOR;
+ key_code = WXK_PAGEUP;
break;
case GDK_Next: // == GDK_Page_Down
- key_code = WXK_NEXT;
+ key_code = WXK_PAGEDOWN;
break;
case GDK_End:
break;
case GDK_KP_Prior: // == GDK_KP_Page_Up
- key_code = isChar ? WXK_PRIOR : WXK_NUMPAD_PRIOR;
+ key_code = isChar ? WXK_PAGEUP : WXK_NUMPAD_PAGEUP;
break;
case GDK_KP_Next: // == GDK_KP_Page_Down
- key_code = isChar ? WXK_NEXT : WXK_NUMPAD_NEXT;
+ key_code = isChar ? WXK_PAGEDOWN : WXK_NUMPAD_PAGEDOWN;
break;
case GDK_KP_End:
static void AdjustEventButtonState(wxMouseEvent& event)
{
// GDK reports the old state of the button for a button press event, but
- // for compatibility with MSW and common sense we want m_leftDown be TRUE
+ // for compatibility with MSW and common sense we want m_leftDown be true
// for a LEFT_DOWN event, not FALSE, so we will invert
// left/right/middleDown for the corresponding click events
gdk_window_set_cursor( window, cursor.GetCursor() );
}
- else
+ else if ( m_widget )
{
-
GdkWindow *window = m_widget->window;
- if ((window) && !(GTK_WIDGET_NO_WINDOW(m_widget)))
+ if ( window && !GTK_WIDGET_NO_WINDOW(m_widget) )
gdk_window_set_cursor( window, cursor.GetCursor() );
-
}
}
wxCHECK_RET( window, _T("CaptureMouse() failed") );
- wxCursor* cursor = & m_cursor;
+ const wxCursor* cursor = &m_cursor;
if (!cursor->Ok())
cursor = wxSTANDARD_CURSOR;
if (g_eraseGC)
gdk_gc_unref( g_eraseGC );
}
-