Added wxEvtHandler::Disconect()

Added wxToolBar::DeleteTool()
  Removed the WXWIN_COMP... defines from the common setup.h
  Some tests,


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-11-18 15:58:35 +00:00
parent 61b04ac652
commit 97d7bfb8b4
12 changed files with 135 additions and 69 deletions

View File

@@ -61,6 +61,8 @@ bool wxStaticText::Create(wxWindow *parent,
// effect of changing the control size which might not be desirable
wxControl::SetLabel(label);
m_widget = gtk_label_new( m_label.mbc_str() );
gtk_label_set_line_wrap( GTK_LABEL(m_widget), FALSE );
SetFont( parent->GetFont() );
@@ -79,7 +81,7 @@ bool wxStaticText::Create(wxWindow *parent,
GtkRequisition req;
(* GTK_WIDGET_CLASS( GTK_OBJECT(m_widget)->klass )->size_request ) (m_widget, &req );
wxSize newSize = size;
if (newSize.x == -1) newSize.x = req.width;
if (newSize.y == -1) newSize.y = req.height;

View File

@@ -178,6 +178,7 @@ bool wxToolBar::Create( wxWindow *parent, wxWindowID id,
m_toolbar = GTK_TOOLBAR( gtk_toolbar_new( GTK_ORIENTATION_HORIZONTAL,
GTK_TOOLBAR_ICONS ) );
// gtk_toolbar_set_space_style( m_toolbar, GTK_TOOLBAR_SPACE_LINE );
m_separation = 5;
gtk_toolbar_set_space_size( m_toolbar, m_separation );
m_hasToolAlready = FALSE;
@@ -370,6 +371,28 @@ void wxToolBar::AddSeparator()
gtk_toolbar_append_space( m_toolbar );
}
bool wxToolBar::DeleteTool(int toolIndex)
{
wxNode *node = m_tools.First();
while (node)
{
wxToolBarTool *tool = (wxToolBarTool*)node->Data();
if (tool->m_index == toolIndex)
{
if (tool->m_control)
tool->m_control->Destroy();
else
gtk_widget_destroy( tool->m_item );
m_tools.DeleteNode( node );
return TRUE;
}
node = node->Next();
}
return FALSE;
}
void wxToolBar::ClearTools()
{
wxFAIL_MSG( wxT("wxToolBar::ClearTools not implemented") );