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