added first version of huge play button in Live Mode (does not do anything yet)
This commit is contained in:
parent
8dfa5a9f54
commit
76939ade97
8 changed files with 95 additions and 22 deletions
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.19 $
|
||||
Version : $Revision: 1.20 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/src/WidgetFactory.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -36,9 +36,11 @@
|
|||
#include <gtkmm/entry.h>
|
||||
|
||||
#include "LiveSupport/Widgets/Colors.h"
|
||||
#include "LiveSupport/Widgets/WidgetFactory.h"
|
||||
#include "LiveSupport/Widgets/ZebraTreeView.h"
|
||||
#include "MessageWindow.h"
|
||||
|
||||
#include "LiveSupport/Widgets/WidgetFactory.h"
|
||||
|
||||
|
||||
using namespace LiveSupport::Core;
|
||||
using namespace LiveSupport::Widgets;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.9 $
|
||||
Version : $Revision: 1.10 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/src/ZebraTreeView.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -35,9 +35,7 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
#include "LiveSupport/Widgets/WidgetFactory.h"
|
||||
#include "LiveSupport/Widgets/ZebraTreeModelColumnRecord.h"
|
||||
#include "LiveSupport/Widgets/ZebraCellRenderer.h"
|
||||
|
||||
#include "LiveSupport/Widgets/ZebraTreeView.h"
|
||||
|
||||
|
@ -108,6 +106,46 @@ ZebraTreeView :: appendColumn(
|
|||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Add a button column to the TreeView.
|
||||
*----------------------------------------------------------------------------*/
|
||||
int
|
||||
ZebraTreeView :: appendColumn(
|
||||
const Glib::ustring & title,
|
||||
WidgetFactory::ImageButtonType buttonType,
|
||||
int minimumWidth)
|
||||
throw ()
|
||||
{
|
||||
Ptr<WidgetFactory>::Ref wf = WidgetFactory::getInstance();
|
||||
ImageButton * button = Gtk::manage(wf->createButton(
|
||||
buttonType ));
|
||||
Glib::RefPtr<Gdk::Pixbuf> passiveImage = button->getPassiveImage();
|
||||
|
||||
// a standard cell renderer
|
||||
Gtk::CellRendererPixbuf* renderer
|
||||
= Gtk::manage(new Gtk::CellRendererPixbuf);
|
||||
|
||||
// set the image of the renderer
|
||||
renderer->property_pixbuf() = passiveImage;
|
||||
|
||||
// the constructor packs the renderer into the TreeViewColumn
|
||||
Gtk::TreeViewColumn* viewColumn = Gtk::manage(new
|
||||
Gtk::TreeViewColumn(title, *renderer) );
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* The callback function.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue