Re-Added wxStream::StreamSize()

Added in-place editting to wxTreeCtrl,
    modified wxListCtrl in-place editting
  Corrected behaviour of wxToolBar::Toggle() to not
    send messages and to report the correct state
  Removed many #include "wx/wx.h" to speed up
   compilation
 Some more compile fixes and tests.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3132 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-07-25 12:59:58 +00:00
parent a76015e6eb
commit e179bd6537
15 changed files with 388 additions and 148 deletions

View File

@@ -381,9 +381,32 @@ void wxToolBar::ToggleTool( int toolIndex, bool toggle )
wxToolBarTool *tool = (wxToolBarTool*)node->Data();
if (tool->m_index == toolIndex)
{
tool->m_toggleState = toggle;
if ((tool->m_item) && (GTK_IS_TOGGLE_BUTTON(tool->m_item)))
{
tool->m_toggleState = toggle;
if (tool->m_bitmap2.Ok())
{
wxBitmap bitmap = tool->m_bitmap1;
if (tool->m_toggleState) bitmap = tool->m_bitmap2;
GtkPixmap *pixmap = GTK_PIXMAP( tool->m_pixmap );
GdkBitmap *mask = (GdkBitmap *) NULL;
if (bitmap.GetMask()) mask = bitmap.GetMask()->GetBitmap();
gtk_pixmap_set( pixmap, bitmap.GetPixmap(), mask );
}
gtk_signal_disconnect_by_func( GTK_OBJECT(tool->m_item),
GTK_SIGNAL_FUNC(gtk_toolbar_callback), (gpointer*)tool );
gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(tool->m_item), toggle );
gtk_signal_connect( GTK_OBJECT(tool->m_item), "clicked",
GTK_SIGNAL_FUNC(gtk_toolbar_callback), (gpointer*)tool );
}
return;
}
node = node->Next();