3 /* Copyright(C) 2001-2002 The gtkmm Development Team
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or(at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the Free
17 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #include <gtkmm/treeview_private.h>
27 namespace TreeView_Private
30 SignalProxy_CellData::SignalProxy_CellData(const SlotType& slot)
35 SignalProxy_CellData::~SignalProxy_CellData()
38 void SignalProxy_CellData::gtk_callback(GtkTreeViewColumn*, GtkCellRenderer* cell,
39 GtkTreeModel* model, GtkTreeIter* iter, void* data)
41 SignalProxy_CellData *const self = static_cast<SignalProxy_CellData*>(data);
45 // use Slot::operator()
46 (self->slot_)(Glib::wrap(cell, false), TreeIter(model, iter));
50 Glib::exception_handlers_invoke();
54 void SignalProxy_CellData::gtk_callback_destroy(void* data)
56 delete static_cast<SignalProxy_CellData*>(data);
61 SignalProxy_RowSeparator::SignalProxy_RowSeparator(const SlotType& slot)
66 SignalProxy_RowSeparator::~SignalProxy_RowSeparator()
69 gboolean SignalProxy_RowSeparator::gtk_callback(GtkTreeModel* model, GtkTreeIter* iter, void* data)
71 SignalProxy_RowSeparator *const self = static_cast<SignalProxy_RowSeparator*>(data);
75 return (self->slot_)(Glib::wrap(model, true), Gtk::TreeIter(model, iter));
79 Glib::exception_handlers_invoke();
82 return 0; // arbitrary value
85 void SignalProxy_RowSeparator::gtk_callback_destroy(void* data)
87 delete static_cast<SignalProxy_RowSeparator*>(data);
91 } // namespace TreeView_Private