00001 #ifndef _UVOID_H 00002 #define _UVOID_H 00003 // ------------------------------------------------------------------------- 00004 #include <UniSetTypes.h> 00005 #include <MessageType.h> 00006 #include <gtkmm.h> 00007 #include "SBlinker.h" 00008 #include "Connector.h" 00009 // ------------------------------------------------------------------------- 00010 class GuiPM; 00019 class UVoid 00020 { 00021 public : 00022 UVoid(Glib::Object* obj): 00023 gpm(NULL) 00024 ,connected_(false) 00025 ,obj_(obj) 00026 {} 00027 ~UVoid() {} 00028 00029 /* Methods */ 00033 virtual void askSensors(UniversalIO::UIOCommand command) {} 00037 virtual void sensorInfo(UniSetTypes::SensorMessage *sm) {} 00041 virtual void set_state(bool state) {} 00045 virtual void add_lock(const Gtk::Widget& w) {} 00048 virtual void unlock_current() {} 00052 virtual void set_connector(const ConnectorRef& connector) throw(); 00055 ConnectorRef& get_connector(); 00058 static void draw_disconnect_effect_1(Cairo::RefPtr<Cairo::Context> cr, const Gdk::Rectangle& rect); 00059 00060 /* Handlers */ 00061 virtual void on_connect() throw(); 00062 virtual void on_disconnect() throw(); 00064 /* Properties */ 00065 Glib::PropertyProxy<bool> property_auto_connect(); 00066 Glib::PropertyProxy_ReadOnly<bool> property_auto_connect() const; 00068 Glib::PropertyProxy<int> property_disconnect_effect(); 00069 Glib::PropertyProxy_ReadOnly<int> property_disconnect_effect() const; 00071 Glib::PropertyProxy<bool> property_lock_view(); 00072 Glib::PropertyProxy_ReadOnly<bool> property_lock_view() const; 00074 /* Variables */ 00078 GuiPM* gpm; 00079 00080 protected: 00081 /* Variables */ 00082 static Blinker blinker; 00083 /* connected_ variable is used for local SharedMemory link state */ 00084 bool connected_; 00085 ConnectorRef connector_; 00086 sigc::connection disconnect_connection_; 00087 sigc::connection connect_connection_; 00089 private: 00090 /* Variables */ 00091 Glib::Object* obj_; 00092 }; 00093 #endif
1.5.9