|
UniWidgets
1.2.0
|
00001 00002 #ifndef _IMAGEBLINK_H 00003 #define _IMAGEBLINK_H 00004 // ------------------------------------------------------------------------- 00005 #include <SBlinker.h> 00006 #include <components/Image.h> 00007 #include <plugins.h> 00008 // ------------------------------------------------------------------------- 00009 namespace UniWidgets 00010 { 00016 class ImageBlink : public Image 00017 { 00018 public: 00019 ImageBlink(); 00020 explicit ImageBlink(Image::BaseObjectType* gobject); 00021 virtual ~ImageBlink(); 00022 00023 /* Methods */ 00024 virtual void start_blink(); 00025 virtual void stop_blink(); 00026 virtual bool is_blinking(); 00027 // virtual void set_blink_(bool value){blink_.set_value(value);} /*!< установка типа картинки(с миганием или без мигания) */ 00028 virtual bool set_state(bool st); 00029 virtual bool can_blinking(){return true;} 00030 virtual void on_size_allocate(Gtk::Allocation& alloc); 00031 00032 protected: 00033 /* Event handlers */ 00034 virtual bool on_expose_event(GdkEventExpose*); 00035 void on_map(); 00036 void on_unmap(); 00037 00038 private: 00039 /* Variables */ 00040 static Blinker blinker; 00041 Glib::RefPtr<Gdk::Pixbuf> image2_ref_; 00042 sigc::connection blink_connection_; 00043 bool is_blinking_; 00044 bool sleep_blinking_; 00045 /* FIXME: state_ is indicator of showing image (first or second). 00046 * This is not realy bool value !!! */ 00047 bool state_; 00048 00049 /* Methods */ 00050 void constructor(); 00051 void blink(bool state,int time = DEFAULT_BLINK_TIME); 00052 00053 // Функция для 00054 void configure_blinktime(); 00055 00056 DISALLOW_COPY_AND_ASSIGN(ImageBlink); 00057 /* Properties */ 00058 ADD_PROPERTY( image2_path, Glib::ustring ) 00059 //Задаёт частоту мигания картинки 00060 ADD_PROPERTY( blinktime, int ) 00061 }; 00062 00063 } 00064 00065 #endif
1.7.6.1