Adding an Stock Icon to a Gtk::TreeModel::ColumnRecord

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 ;)


 class oui::ComboBoxColumns : public Gtk::TreeModel::ColumnRecord
   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]