TypicalState.h
00001 #ifndef _TYPICALSTATE_H
00002 #define _TYPICALSTATE_H
00003
00004 #include <map>
00005 #include <typical/AbstractTypical.h>
00006 #include <objects/StateLogic.h>
00007 #include <objects/ShowLogic.h>
00008 #include <components/Image.h>
00009 #include <USignals.h>
00010 #include <global_macros.h>
00011
00012 namespace UniWidgets
00013 {
00023 class TypicalState : public AbstractTypical
00024 {
00025 public:
00026 TypicalState();
00027 explicit TypicalState(AbstractTypical::BaseObjectType* gobject);
00028 virtual ~TypicalState();
00029
00030
00031 typedef std::map<long, Image*> ModeImageMap;
00032 typedef std::pair<long, Image*> ModeImagePair;
00033 typedef std::map<long, Glib::ustring > ModePathMap;
00034 typedef std::pair<long, Glib::ustring > ModePathPair;
00036
00037 void configure();
00039 void set_rect(const Gdk::Rectangle rect);
00040 void set_path(const long mode, const Glib::ustring& path);
00041 void set_path2(const long mode, const Glib::ustring& path);
00042 void set_state_ai(const UniSetTypes::ObjectId sensor);
00043 void set_state_obj(const UniSetTypes::ObjectId sensor);
00044 void set_node(const UniSetTypes::ObjectId node);
00045 void set_mode_state(const long mode);
00046 void set_detntr_state(const long mode);
00047 void set_invert_mode(const bool state);
00048 virtual void set_lock_view(const bool lock);
00049 void insert_mode(const long mode, const long priority, const long blink);
00050 void invert_mode_off(const int priority=0);
00051 void invert_mode_off_state(UniWidgetsTypes::ThresholdType);
00053 Glib::ustring get_path(const long, bool is_back = false);
00054 Gdk::Rectangle* get_rect();
00055
00056 private:
00057
00058 Gdk::Rectangle rect_;
00059 ShowLogic showlogic_;
00060 StateLogic statelogic_;
00061 ModeImageMap images_;
00062 ModePathMap paths_;
00063 ModePathMap paths_2;
00064
00065
00066 void constructor();
00067
00068 DISALLOW_COPY_AND_ASSIGN(TypicalState);
00069 };
00070
00071 }
00072 #endif