SimpleImage.h
00001
00002 #ifndef _SIMPLEIMAGE_H
00003 #define _SIMPLEIMAGE_H
00004
00005 #include <gtkmm.h>
00006 #include <UPixbufCache.h>
00007 #include <global_macros.h>
00008 #include <components/SimpleView.h>
00009
00010 namespace UniWidgets
00011 {
00018 class SimpleImage : public SimpleView
00019 {
00020 public:
00021 SimpleImage();
00022 explicit SimpleImage(SimpleView::BaseObjectType* gobject);
00023 virtual ~SimpleImage();
00024
00025 protected:
00026
00027 Glib::RefPtr<Gdk::Pixbuf> missing_image_;
00029
00030 void on_path_changed(Glib::RefPtr<Gdk::Pixbuf>& image,
00031 Glib::Property<Glib::ustring>* new_path,
00032 Glib::ustring property_name);
00034 void draw(Glib::RefPtr<Gdk::Pixbuf>& image);
00035 UPixbufCache& get_cache(){ return pixbufcache;}
00037 private:
00038
00039 UPixbufCache pixbufcache;
00040 bool is_glade;
00041
00042 void constructor();
00043
00044 void load_pixbuf(Glib::RefPtr<Gdk::Pixbuf>* image_ptr,
00045 const Glib::Property<Glib::ustring>* property_path);
00046 DISALLOW_COPY_AND_ASSIGN(SimpleImage);
00047 };
00048
00049 }
00050
00051 #endif