TreeViewColumn with multiple editable CellRenderers
- From: Sandro Mani <manisandro gmail com>
- To: gtkmm-list gnome org
- Subject: TreeViewColumn with multiple editable CellRenderers
- Date: Wed, 30 Mar 2016 23:44:18 +0200
Hi
I need a TreeViewColumn with multiple CellRenderers, of which some are
editable. The following code works fine for the purpose:
Gtk::TreeViewColumn *itemViewCol = Gtk::manage(new Gtk::TreeViewColumn(""));
itemViewCol->pack_start(m_itemStoreCols.selected, false);
Gtk::TreeView_Private::_connect_auto_store_editable_signal_handler<bool>(m_itemView,
itemViewCol->get_cells()[0], m_itemStoreCols.selected);
itemViewCol->pack_start(m_itemStoreCols.icon, false);
itemViewCol->pack_start(m_itemStoreCols.text, true);
Gtk::TreeView_Private::_connect_auto_store_editable_signal_handler<Glib::ustring>(m_itemView,
itemViewCol->get_cells()[2], m_itemStoreCols.text);
m_itemView->append_column(*itemViewCol);
But the only way I found to accomplish this is by calling
Gtk::TreeView_Private::_connect_auto_store_editable_signal_handler
like TreeView::append_column_editable does. I'm somewhat unconfortable
using functions from Gtk::TreeView_Private, so my question is whether
this is indeed the only way, and if so whether there is a reason why
there is no pubblic API to accomplish this? If not, what about a method
such as
template <class ColumnType> inline
TreeView::set_cell_editable(CellRenderer* pCellRenderer, const
TreeModelColumn<ColumnType>& model_column)
{
TreeView_Private::_connect_auto_store_editable_signal_handler<ColumnType>(this,
pCellRender, model_column);
}
?
Thanks
Sandro
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]