First page Back Continue Last page Overview Graphics

Example 2: subclassing

class LibraryCellRenderer

: public Gtk::CellRendererPixbuf

{

public:

LibraryCellRenderer();

virtual void get_size_vfunc (Gtk::Widget& widget,

const Gdk::Rectangle* cell_area,

int* x_offset, int* y_offset,

int* width, int* height) const;

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

Glib::PropertyProxy_ReadOnly<db::LibFile::Ptr> property_libfile() const;

Glib::PropertyProxy<db::LibFile::Ptr> property_libfile();

private:

Glib::Property<db::LibFile::Ptr> m_libfileproperty;

};