Adding an Stock Icon to a Gtk::TreeModel::ColumnRecord
- From: Martin Reissner <martin reissner ohm-hochschule de>
- To: gtkmm-list gnome org
- Subject: Adding an Stock Icon to a Gtk::TreeModel::ColumnRecord
- Date: Sat, 6 Oct 2007 18:58:28 +0200
Hi, I need some help adding a Stock Icon i.e Gtk::Image to a Tree Model
to be used in a ComboBox later on.
I got it working with a Gdk::Pixbuf e.g. with loading an image from a
file, but I don't know how to get it working with a Stock Icon as i
would need to obtain a Glib::RefPtr<Gtk::Image> from the Stock Icon and
I found no function in Gtk::Image returning a RefPtr (besides the
get_pixbuf() that is, that doesnt work on the IMAGE_STOCK storage type.
Here is my TreeModel, any help would be greatly appreciated ;)
Martin
class oui::ComboBoxColumns : public Gtk::TreeModel::ColumnRecord
{
public:
Gtk::TreeModelColumn<Glib::ustring> title;
Gtk::TreeModelColumn<Glib::ustring> description;
Gtk::TreeModelColumn< Glib::RefPtr<Gtk::Image> > icon;
ComboBoxColumns() { add(title); add(description); add(icon); }
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]