added fade in/out editing to SimplePlaylistManagementWindow

This commit is contained in:
fgerlits 2005-07-14 15:56:59 +00:00
parent bb9553f329
commit 6efcdee4ca
4 changed files with 253 additions and 17 deletions

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $
Version : $Revision: 1.17 $
Version : $Revision: 1.18 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/src/ZebraTreeView.cxx,v $
------------------------------------------------------------------------------*/
@ -303,6 +303,50 @@ ZebraTreeView :: lineNumberCellDataFunction(
}
/*------------------------------------------------------------------------------
* Add a centered text column to the TreeView.
*----------------------------------------------------------------------------*/
int
ZebraTreeView :: appendEditableColumn(
const Glib::ustring& title,
const Gtk::TreeModelColumn<Glib::ustring>& modelColumn,
int columnId,
int minimumWidth)
throw ()
{
// a standard cell renderer; can be replaced with a ZebraCellRenderer
Gtk::CellRendererText* renderer = Gtk::manage(new Gtk::CellRendererText);
// right align the text in the column
renderer->property_xalign() = 1;
// set the cells to be editable, and connect the signal to our own
renderer->property_editable() = true;
renderer->signal_edited().connect(sigc::bind<int>(
sigc::mem_fun(*this, &ZebraTreeView::emitSignalCellEdited),
columnId ));
// the constructor packs the renderer into the TreeViewColumn
Gtk::TreeViewColumn* viewColumn = Gtk::manage(
new Gtk::TreeViewColumn(title, *renderer) );
// and then we associate this renderer with the model column
viewColumn->add_attribute(renderer->property_markup(), modelColumn);
// this cell data function will do the blue-gray zebra stripes
viewColumn->set_cell_data_func(
*renderer,
sigc::mem_fun(*this, &ZebraTreeView::cellDataFunction) );
// set the minimum width of the column
if (minimumWidth) {
viewColumn->set_min_width(minimumWidth);
}
return append_column(*viewColumn);
}
/*------------------------------------------------------------------------------
* Event handler for the Up menu item selected from the entry conext menu
*----------------------------------------------------------------------------*/