UniWidgets  1.0.0
ShowLogic.h
00001 #ifndef _SHOWLOGIC_H
00002 #define _SHOWLOGIC_H
00003 // -------------------------------------------------------------------------
00004 #include <objects/AbstractLogic.h>
00005 #include <UniSetTypes.h>
00006 #include <global_macros.h>
00007 #include <uniwidgets/USignals.h>
00008 #include <components/SimpleView.h>
00009 // -------------------------------------------------------------------------
00010 namespace UniWidgets
00011 {
00026 class ShowLogic : public AbstractLogic
00027 {
00028 public:
00029     ShowLogic();
00030     explicit ShowLogic(Gtk::EventBox::BaseObjectType* gobject);
00031     virtual ~ShowLogic();
00032 
00033     /* Public methods */
00034     virtual bool show_state( const long mode, bool blink = true );  
00035     virtual void hide_state( const long mode);          
00036     virtual void confirm_handler(const long mode);          
00037     virtual long get_state_obj();                   
00039 protected:
00040     /* Methods */
00041     virtual void on_init();                     
00043     /* Variables */
00044     std::vector<SimpleView*> states_;                   
00045     SimpleView* current_state_;                     
00046   bool is_initialize_;
00047 
00048     /* Methods */
00049     void constructor();
00050     virtual void init_states();                 
00052     virtual long mode_to_priority(const long mode);         
00053     virtual bool is_priority_higher(const long new_priority);   
00054     virtual void set_state(const long mode,bool blink);     
00055     SimpleView* mode_to_state(const long mode);             
00056     long get_mode_in_max_priority();                
00057     DISALLOW_COPY_AND_ASSIGN(ShowLogic);
00058 
00059   ADD_PROPERTY(view_type,long)  
00060 };
00061 
00062 }
00063 
00064 #endif