1
#ifndef __UI_DIALOG_IMAGETOGGLER_H__
2
#define __UI_DIALOG_IMAGETOGGLER_H__
8
* Copyright (C) 2006-2008 Authors
10
* Released under GNU GPL, read the file 'COPYING' for more information
13
#include <gtkmm/cellrendererpixbuf.h>
14
#include <gtkmm/widget.h>
20
class ImageToggler : public Gtk::CellRendererPixbuf {
22
ImageToggler( char const *on, char const *off);
23
virtual ~ImageToggler() {};
25
sigc::signal<void, const Glib::ustring&> signal_toggled() { return _signal_toggled;}
26
sigc::signal<void, GdkEvent const *> signal_pre_toggle() { return _signal_pre_toggle; }
28
Glib::PropertyProxy<bool> property_active() { return _property_active.get_proxy(); }
29
Glib::PropertyProxy<bool> property_activatable() { return _property_activatable.get_proxy(); }
30
Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf_on();
31
Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf_off();
35
virtual void get_size_vfunc( Gtk::Widget &widget,
36
Gdk::Rectangle const *cell_area,
37
int *x_offset, int *y_offset, int *width, int *height ) const;
40
virtual void render_vfunc( const Glib::RefPtr<Gdk::Drawable>& window,
42
const Gdk::Rectangle& background_area,
43
const Gdk::Rectangle& cell_area,
44
const Gdk::Rectangle& expose_area,
45
Gtk::CellRendererState flags );
47
virtual bool activate_vfunc(GdkEvent *event,
49
const Glib::ustring &path,
50
const Gdk::Rectangle &background_area,
51
const Gdk::Rectangle &cell_area,
52
Gtk::CellRendererState flags);
56
Glib::ustring _pixOnName;
57
Glib::ustring _pixOffName;
59
Glib::Property<bool> _property_active;
60
Glib::Property<bool> _property_activatable;
61
Glib::Property< Glib::RefPtr<Gdk::Pixbuf> > _property_pixbuf_on;
62
Glib::Property< Glib::RefPtr<Gdk::Pixbuf> > _property_pixbuf_off;
64
sigc::signal<void, const Glib::ustring&> _signal_toggled;
65
sigc::signal<void, GdkEvent const *> _signal_pre_toggle;
72
} // namespace Inkscape
75
#endif /* __UI_DIALOG_IMAGETOGGLER_H__ */
80
c-file-style:"stroustrup"
81
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
86
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :