Added layout constraints call to wxNotebook
Renamed key_down events to match MSW equivalents Invened activated events to tree and list ctrl Added patches to text ctrl from georg git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1216,7 +1216,7 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
|
||||
m_lastOnSame = FALSE;
|
||||
m_renameTimer->Stop();
|
||||
|
||||
SendNotify( line, wxEVT_COMMAND_LIST_KEY_DOWN );
|
||||
SendNotify( line, wxEVT_COMMAND_LIST_ITEM_ACTIVATED );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -1369,6 +1369,11 @@ void wxListMainWindow::OnArrowChar( wxListLineData *newCurrent, bool shiftDown )
|
||||
|
||||
void wxListMainWindow::OnChar( wxKeyEvent &event )
|
||||
{
|
||||
wxListEvent le( wxEVT_COMMAND_LIST_KEY_DOWN, m_parent->GetId() );
|
||||
le.m_code = event.KeyCode();
|
||||
le.SetEventObject( m_parent );
|
||||
m_parent->GetEventHandler()->ProcessEvent( le );
|
||||
|
||||
/*
|
||||
if (event.KeyCode() == WXK_TAB)
|
||||
{
|
||||
@@ -1482,7 +1487,7 @@ void wxListMainWindow::OnChar( wxKeyEvent &event )
|
||||
case WXK_RETURN:
|
||||
case WXK_EXECUTE:
|
||||
{
|
||||
wxListEvent le( wxEVT_COMMAND_LIST_KEY_DOWN, GetParent()->GetId() );
|
||||
wxListEvent le( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, GetParent()->GetId() );
|
||||
le.SetEventObject( GetParent() );
|
||||
le.m_itemIndex = GetIndexOfLine( m_current );
|
||||
m_current->GetItem( 0, le.m_item );
|
||||
|
@@ -1112,6 +1112,11 @@ void wxTreeCtrl::OnKillFocus( wxFocusEvent &WXUNUSED(event) )
|
||||
|
||||
void wxTreeCtrl::OnChar( wxKeyEvent &event )
|
||||
{
|
||||
wxTreeEvent te( wxEVT_COMMAND_TREE_KEY_DOWN, GetId() );
|
||||
te.m_code = event.KeyCode();
|
||||
te.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( te );
|
||||
|
||||
if (m_current == 0)
|
||||
{
|
||||
event.Skip();
|
||||
@@ -1144,7 +1149,7 @@ void wxTreeCtrl::OnChar( wxKeyEvent &event )
|
||||
case ' ':
|
||||
case WXK_RETURN:
|
||||
{
|
||||
wxTreeEvent event( wxEVT_COMMAND_TREE_KEY_DOWN, GetId() );
|
||||
wxTreeEvent event( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, GetId() );
|
||||
event.m_item = m_current;
|
||||
event.m_code = 0;
|
||||
event.SetEventObject( this );
|
||||
@@ -1236,7 +1241,7 @@ void wxTreeCtrl::OnMouse( wxMouseEvent &event )
|
||||
|
||||
if ( event.LeftDClick() )
|
||||
{
|
||||
wxTreeEvent event( wxEVT_COMMAND_TREE_KEY_DOWN, GetId() );
|
||||
wxTreeEvent event( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, GetId() );
|
||||
event.m_item = item;
|
||||
event.m_code = 0;
|
||||
event.SetEventObject( this );
|
||||
|
@@ -99,6 +99,8 @@ static void gtk_page_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation*
|
||||
}
|
||||
|
||||
win->SetSize( alloc->x, alloc->y, alloc->width, alloc->height );
|
||||
|
||||
if (win->GetAutoLayout()) win->Layout();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@@ -303,7 +303,8 @@ bool wxTextCtrl::LoadFile( const wxString &file )
|
||||
|
||||
if (m_windowStyle & wxTE_MULTILINE)
|
||||
{
|
||||
gtk_editable_insert_text( GTK_EDITABLE(m_text), text, 0, &len );
|
||||
gint pos = 0;
|
||||
gtk_editable_insert_text( GTK_EDITABLE(m_text), text, len, &pos );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -555,7 +556,7 @@ void wxTextCtrl::Replace( long from, long to, const wxString &value )
|
||||
|
||||
gtk_editable_delete_text( GTK_EDITABLE(m_text), (gint)from, (gint)to );
|
||||
if (value.IsNull()) return;
|
||||
gint pos = (gint)to;
|
||||
gint pos = (gint)from;
|
||||
gtk_editable_insert_text( GTK_EDITABLE(m_text), value, value.Length(), &pos );
|
||||
}
|
||||
|
||||
|
@@ -99,6 +99,8 @@ static void gtk_page_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation*
|
||||
}
|
||||
|
||||
win->SetSize( alloc->x, alloc->y, alloc->width, alloc->height );
|
||||
|
||||
if (win->GetAutoLayout()) win->Layout();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@@ -303,7 +303,8 @@ bool wxTextCtrl::LoadFile( const wxString &file )
|
||||
|
||||
if (m_windowStyle & wxTE_MULTILINE)
|
||||
{
|
||||
gtk_editable_insert_text( GTK_EDITABLE(m_text), text, 0, &len );
|
||||
gint pos = 0;
|
||||
gtk_editable_insert_text( GTK_EDITABLE(m_text), text, len, &pos );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -555,7 +556,7 @@ void wxTextCtrl::Replace( long from, long to, const wxString &value )
|
||||
|
||||
gtk_editable_delete_text( GTK_EDITABLE(m_text), (gint)from, (gint)to );
|
||||
if (value.IsNull()) return;
|
||||
gint pos = (gint)to;
|
||||
gint pos = (gint)from;
|
||||
gtk_editable_insert_text( GTK_EDITABLE(m_text), value, value.Length(), &pos );
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user