33 CellRendererPixbufMulti::CellRendererPixbufMulti() :
36 property_state_(*this,
"active", 0)
38 property_mode() = Gtk::CELL_RENDERER_MODE_ACTIVATABLE;
41 property_sensitive() =
false;
44 Glib::PropertyProxy<uint32_t>
51 Glib::PropertyProxy_Base
65 CellRendererPixbufMulti::render_vfunc (
const Glib::RefPtr<Gdk::Drawable>& window, Gtk::Widget& ,
const Gdk::Rectangle& ,
const Gdk::Rectangle& cell_area,
const Gdk::Rectangle& , Gtk::CellRendererState )
68 int offset_height = 0;
71 offset_width = cell_area.get_x() + (int)(cell_area.get_width() - pb->get_width())/2;
72 offset_height = cell_area.get_y() + (int)(cell_area.get_height() - pb->get_height())/2;
74 window->draw_pixbuf (RefPtr<GC>(), pb, 0, 0, offset_width, offset_height, -1, -1, Gdk::RGB_DITHER_NORMAL, 0, 0);
virtual void render_vfunc(const Glib::RefPtr< Gdk::Drawable > &window, Gtk::Widget &widget, const Gdk::Rectangle &background_area, const Gdk::Rectangle &cell_area, const Gdk::Rectangle &expose_area, Gtk::CellRendererState flags)
void set_pixbuf(uint32_t state, Glib::RefPtr< Gdk::Pixbuf > pixbuf)
Glib::Property< uint32_t > property_state_
sigc::signal< void, const Glib::ustring & > SignalChanged
SignalChanged & signal_changed()
virtual void get_size_vfunc(Gtk::Widget &widget, const Gdk::Rectangle *cell_area, int *x_offset, int *y_offset, int *width, int *height) const
Glib::PropertyProxy< uint32_t > property_state()
std::map< uint32_t, Glib::RefPtr< Gdk::Pixbuf > > _pixbufs
Glib::PropertyProxy_Base _property_renderable()
virtual bool activate_vfunc(GdkEvent *, Gtk::Widget &, const Glib::ustring &path, const Gdk::Rectangle &, const Gdk::Rectangle &, Gtk::CellRendererState)
SignalChanged signal_changed_