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:
@@ -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") );
|
||||
|
Reference in New Issue
Block a user