Changed a few #include <xxx.h> to #include "xxx.h"

Added endl operator to wxTextStream
  Corrrected a few misbehaviours in wxFileDialog,
  Corrected tab traversal a bit
  Corrected wxImage::SetData() to not copy, but take
    the data and care for ref couting as well


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-08-20 22:52:21 +00:00
parent 5586805bfa
commit ed58dbeab6
28 changed files with 135 additions and 136 deletions

View File

@@ -127,43 +127,6 @@ static void gtk_page_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation*
if (win->GetAutoLayout()) win->Layout();
}
//-----------------------------------------------------------------------------
// "key_press_event"
//-----------------------------------------------------------------------------
static gint
gtk_notebook_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxNotebook *notebook )
{
if (g_isIdle) wxapp_install_idle_handler();
if (g_blockEventsOnDrag) return FALSE;
if (!notebook->m_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;
if (notebook != notebook->FindFocus()) return FALSE;
if (notebook->m_pages.GetCount() == 0) return FALSE;
wxNode *node = notebook->m_pages.Nth( notebook->GetSelection() );
if (!node) return FALSE;
wxNotebookPage *page = (wxNotebookPage*) node->Data();
// don't let others the key event
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "key_press_event" );
page->m_client->SetFocus();
return TRUE;
}
//-----------------------------------------------------------------------------
// InsertChild callback for wxNotebook
//-----------------------------------------------------------------------------
@@ -241,9 +204,6 @@ bool wxNotebook::Create(wxWindow *parent, wxWindowID id,
m_parent->DoAddChild( this );
gtk_signal_connect( GTK_OBJECT(m_widget), "key_press_event",
GTK_SIGNAL_FUNC(gtk_notebook_key_press_callback), (gpointer)this );
PostCreation();
Show( TRUE );
@@ -251,6 +211,19 @@ bool wxNotebook::Create(wxWindow *parent, wxWindowID id,
return TRUE;
}
void wxNotebook::SetFocus()
{
if (m_pages.GetCount() == 0) return;
wxNode *node = m_pages.Nth( GetSelection() );
if (!node) return;
wxNotebookPage *page = (wxNotebookPage*) node->Data();
page->m_client->SetFocus();
}
int wxNotebook::GetSelection() const
{
wxCHECK_MSG( m_widget != NULL, -1, _T("invalid notebook") );
@@ -284,7 +257,7 @@ wxString wxNotebook::GetPageText( int page ) const
if (nb_page)
return nb_page->m_text;
else
return "";
return _T("");
}
int wxNotebook::GetPageImage( int page ) const