Rapicorn - Experimental UI Toolkit - Source Code  13.07.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
buttons.hh
Go to the documentation of this file.
00001  // Licensed GNU LGPL v3 or later: http://www.gnu.org/licenses/lgpl.html
00002 #ifndef __RAPICORN_BUTTONS_HH__
00003 #define __RAPICORN_BUTTONS_HH__
00004 
00005 #include <ui/container.hh>
00006 #include <ui/paintcontainers.hh>
00007 
00008 namespace Rapicorn {
00009 
00010 class ButtonAreaImpl : public virtual SingleContainerImpl, public virtual ButtonAreaIface,
00011                        public virtual EventHandler, public virtual FocusFrame::Client {
00012   uint          button_, repeater_, unpress_;
00013   ClickType     click_type_;
00014   FocusFrame   *focus_frame_;
00015   String        on_click_[3];
00016   virtual void          dump_private_data       (TestStream &tstream);
00017   bool                  activate_button_command (int button);
00018   bool                  activate_command        ();
00019   void                  activate_click          (int button, EventType etype);
00020   virtual bool          can_focus               () const;
00021   virtual bool          register_focus_frame    (FocusFrame &frame);
00022   virtual void          unregister_focus_frame  (FocusFrame &frame);
00023   virtual void          reset                   (ResetMode mode = RESET_ALL);
00024   virtual bool          handle_event            (const Event &event);
00025 public:
00026   explicit              ButtonAreaImpl  ();
00027   virtual bool          activate_widget   ();
00028   virtual String        on_click        () const                { return on_click_[0]; }
00029   virtual void          on_click        (const String &command) { on_click_[0] = string_strip (command); }
00030   virtual String        on_click2       () const                { return on_click_[1]; }
00031   virtual void          on_click2       (const String &command) { on_click_[1] = string_strip (command); }
00032   virtual String        on_click3       () const                { return on_click_[2]; }
00033   virtual void          on_click3       (const String &command) { on_click_[2] = string_strip (command); }
00034   virtual ClickType     click_type      () const                { return click_type_; }
00035   virtual void          click_type      (ClickType  click_type) { reset(); click_type_ = click_type; }
00036   virtual const PropertyList& __aida_properties__ ();
00037 };
00038 
00039 } // Rapicorn
00040 
00041 #endif  /* __RAPICORN_BUTTONS_HH__ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines