Added CTRL-TAB navigation to notebook

Added ESC -> Cancel convresion
  Added greying out of tooltips (I had some spare minutes)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1683 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-02-11 20:44:38 +00:00
parent 48b7862630
commit b98d804b28
9 changed files with 136 additions and 8 deletions

View File

@@ -127,6 +127,10 @@ gtk_notebook_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxNo
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;
@@ -184,6 +188,10 @@ static void wxInsertChildInNotebook( wxNotebook* parent, wxWindow* child )
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;
@@ -381,7 +389,7 @@ void wxNotebook::AdvanceSelection( bool bForward )
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 )
@@ -624,6 +632,14 @@ bool wxNotebook::AddPage(wxWindow* win, const wxString& text,
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" );