#include "wx/imaglist.h"
#include "wx/intl.h"
#include "wx/log.h"
+
+#include "gdk/gdk.h"
+#include "gtk/gtk.h"
+#include "wx/gtk/win_gtk.h"
#include "gdk/gdkkeysyms.h"
//-----------------------------------------------------------------------------
if (g_blockEventsOnDrag) return FALSE;
if (!notebook->HasVMT()) return FALSE;
+
+ /* this code makes jumping down from the handles of the notebooks
+ to the actual items in the visible notebook page possible with
+ the down-arrow key */
if (gdk_event->keyval != GDK_Down) return FALSE;
IMPLEMENT_DYNAMIC_CLASS(wxNotebook,wxControl)
+BEGIN_EVENT_TABLE(wxNotebook, wxControl)
+ EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey)
+END_EVENT_TABLE()
+
void wxNotebook::Init()
{
m_imageList = (wxImageList *) NULL;
if (bForward)
SetSelection( sel == max ? 0 : sel + 1 );
else
- SetSelection( sel == 0 ? max : sel - 1 );
+ SetSelection( sel == 0 ? max-1 : sel - 1 );
}
void wxNotebook::SetImageList( wxImageList* imageList )
if (image == -1 && nb_page->m_image == -1)
return TRUE; /* Case 1): Nothing to do. */
- GtkWidget *pixmapwid = NULL;
+ GtkWidget *pixmapwid = (GtkWidget*) NULL;
if (nb_page->m_image != -1)
{
wxFAIL_MSG( "wxNotebook::SetPadding not implemented" );
}
+void wxNotebook::SetTabSize(const wxSize& sz)
+{
+ wxFAIL_MSG( "wxNotebook::SetTabSize not implemented" );
+}
+
bool wxNotebook::DeleteAllPages()
{
wxCHECK_MSG( m_widget != NULL, FALSE, "invalid notebook" );
return TRUE;
}
+void wxNotebook::OnNavigationKey(wxNavigationKeyEvent& event)
+{
+ if (event.IsWindowChange())
+ AdvanceSelection( event.GetDirection() );
+ else
+ event.Skip();
+}
+
wxWindow *wxNotebook::GetPage( int page ) const
{
wxCHECK_MSG( m_widget != NULL, (wxWindow*) NULL, "invalid notebook" );