CisternImage.h

00001 #ifndef _CISTERNIMAGE_H
00002 #define _CISTERNIMAGE_H
00003 // -------------------------------------------------------------------------
00004 #include <components/SimpleImage.h>
00005 #include <plugins.h>
00006 #include <global_macros.h>
00007 // -------------------------------------------------------------------------
00008 namespace UniWidgets
00009 {
00017 class CisternImage : public SimpleImage
00018 {
00019 public:
00020   CisternImage();
00021   explicit CisternImage(SimpleImage::BaseObjectType* gobject);
00022   virtual ~CisternImage();
00023 
00024   /* Methods */
00025   void set_value(long value);  
00026   virtual void start_blink() {};
00027   virtual void stop_blink() {};
00028   virtual bool is_blinking();
00029 
00030 protected:
00031   /* Event handlers */
00032   virtual bool on_expose_event(GdkEventExpose* event);
00033   Glib::RefPtr<Gdk::Pixbuf> background_off_image_;
00034   Glib::RefPtr<Gdk::Pixbuf> background_image_;
00035 
00036   Glib::RefPtr<Gdk::Pixbuf> filling_image_;
00037   Glib::RefPtr<Gdk::Pixbuf> filling_off_image_;
00038   void draw_value(Glib::RefPtr<Gdk::Pixbuf> image);  
00039   int value_to_offset(const Gtk::Allocation allocation);  
00041   /* Variables */
00042   int value_;            
00043   Glib::RefPtr<Gdk::Pixbuf> scale_image_;
00044 
00045   /* Constants */
00046   static const int MaxValue;        
00047   static const int MinValue;        
00049 private:
00050   /* Methods */
00051   void constructor();          
00052   DISALLOW_COPY_AND_ASSIGN(CisternImage);
00053   /* Properties */
00054   ADD_PROPERTY( background_image_path, Glib::ustring )  
00055   ADD_PROPERTY( filling_image_path, Glib::ustring )  
00056   ADD_PROPERTY( scale_image_path, Glib::ustring )    
00057   ADD_PROPERTY( scale_switch, bool )      
00058 };
00059 
00060 }
00061 
00062 #endif

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