/* Copyright (C) 1998-2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see .
*/
#include
#include
#include
#include
//#include
#include
#include
namespace Gtk
{
void Toolbar::insert(ToolButton& item, int pos, const sigc::slot& clicked_slot)
{
item.signal_clicked().connect(clicked_slot);
gtk_toolbar_insert(gobj(), (GtkToolItem*)((item).gobj()), pos);
}
void Toolbar::insert(ToggleToolButton& item, int pos, const sigc::slot& toggled_slot)
{
item.signal_toggled().connect(toggled_slot);
gtk_toolbar_insert(gobj(), (GtkToolItem*)((item).gobj()), pos);
}
void Toolbar::append(ToolItem& item)
{
gtk_toolbar_insert(gobj(), (item).gobj(), -1 /* See GTK+ docs */);
}
void Toolbar::append(ToolButton& item, const sigc::slot& clicked_slot)
{
item.signal_clicked().connect(clicked_slot);
gtk_toolbar_insert(gobj(), (GtkToolItem*)((item).gobj()), -1 /* See GTK+ docs */);
}
void Toolbar::append(ToggleToolButton& item, const sigc::slot& toggled_slot)
{
item.signal_toggled().connect(toggled_slot);
gtk_toolbar_insert(gobj(), (GtkToolItem*)((item).gobj()), -1 /* See GTK+ docs */);
}
void Toolbar::prepend(ToolItem& item)
{
gtk_toolbar_insert(gobj(), (item).gobj(), 0 /* See GTK+ docs */);
}
void Toolbar::prepend(ToolButton& item, const sigc::slot& clicked_slot)
{
item.signal_clicked().connect(clicked_slot);
gtk_toolbar_insert(gobj(), (GtkToolItem*)((item).gobj()), 0 /* See GTK+ docs */);
}
void Toolbar::prepend(ToggleToolButton& item, const sigc::slot& toggled_slot)
{
item.signal_toggled().connect(toggled_slot);
gtk_toolbar_insert(gobj(), (GtkToolItem*)((item).gobj()), 0 /* See GTK+ docs */);
}
void Toolbar::unset_drop_highlight_item()
{
//See GTK+ docs.
gtk_toolbar_set_drop_highlight_item(gobj(), nullptr, 0);
}
} // namespace Gtk