|
UniWidgets
1.2.0
|
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 /* Variables */ 00027 Glib::RefPtr<Gdk::Pixbuf> missing_image_; 00029 /* Methods */ 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 /* Variables */ 00039 UPixbufCache pixbufcache; 00040 /* Methods */ 00041 void constructor(); 00042 00043 void load_pixbuf(Glib::RefPtr<Gdk::Pixbuf>* image_ptr, 00044 const Glib::Property<Glib::ustring>* property_path); 00045 DISALLOW_COPY_AND_ASSIGN(SimpleImage); 00046 }; 00047 00048 } 00049 00050 #endif
1.7.6.1