UPixbufCache.h

00001 #ifndef _UPIXBUFCACHE_H
00002 #define _UPIXBUFCACHE_H
00003 // -------------------------------------------------------------------------
00004 //#include <gtkmm.h>
00005 #include <gdkmm.h>
00006 #include <map>
00007 // -------------------------------------------------------------------------
00008 class UPixbufCache
00009 {
00010 public :
00011     UPixbufCache() {}
00012     ~UPixbufCache() {}
00013     typedef std::map< std::string, Glib::RefPtr<Gdk::Pixbuf> > PixbufMap;
00014 
00015     /* Methods */
00016     void add_pixbuf(const std::string& parametr,const Glib::RefPtr<Gdk::Pixbuf> pixbuf);
00017     bool find_pixbuf(const std::string& parametr);
00018     Glib::RefPtr<Gdk::Pixbuf> get_pixbuf_from_cache(const std::string& path,int w=-1,int h=-1, bool make_copy=true);
00019 
00021     static Glib::RefPtr<Gdk::Pixbuf> resize(const std::string& imagefile="", int width=-1,int height=-1);
00022 
00023 protected:
00024     /* Variables */
00025 
00026     static PixbufMap PixbufCache;
00027 private:
00028     /* Variables */
00029 };
00030 #endif

Документация по UniWidgets. Последние изменения: Fri Oct 10 09:57:50 2014. Создано системой  doxygen 1.5.9