|
Freya
0.0.1
A Gtk3 MPD Client
|
00001 #ifndef FREYA_EVENTIMAGE_HH 00002 #define FREYA_EVENTIMAGE_HH 00003 00004 #include <gtkmm.h> 00005 00006 namespace Browser 00007 { 00008 class EventImage : public Gtk::EventBox 00009 { 00010 public: 00011 EventImage(); 00012 EventImage(Glib::RefPtr<Gdk::Pixbuf>& pix); 00013 ~EventImage(); 00014 00015 void set(Glib::RefPtr<Gdk::Pixbuf>& pix); 00016 void set(const char * data, gsize len, int width = 200, int height = 200, bool aspect = false); 00017 void set_default(); 00018 00019 private: 00020 /* Common ctor */ 00021 void setup(Glib::RefPtr<Gdk::Pixbuf>& pix); 00022 00023 /* On click callback */ 00024 virtual bool on_button_press_event(GdkEventButton * ev); 00025 00026 /* Actual Image widget */ 00027 Gtk::Image * image; 00028 00029 /* Shared store for 'noimage' */ 00030 static Glib::RefPtr<Gdk::Pixbuf> noImagePix; 00031 }; 00032 00033 } 00034 00035 #endif /* end of include guard: FREYA_EVENTIMAGE_HH */
1.8.0