Merge ssh://git@sfinx.od.ua/home/git/Harbour/forms
[forms.git] / F / F_Button.H
blobaa6299f730eec1f8a21d6f3a9927b20d10c4e0b4
2 #ifndef _F_BUTTON_H_
3 #define _F_BUTTON_H_
5 #include <F_Text_Display.H>
6 #include <F_Window.H>
8 namespace F {
10 class F_Button : public F_Widget {
12   F_Button_State_t state_;
14   void draw();
15   void draw_label();
16   bool handle(F_Event_t &ev);
18  public:
19   F_Button(F_Box_Type_t btype, coord_t x, coord_t y, dim_t w, dim_t h,
20     const char *label = 0) : F_Widget(x, y, w + 1, h + 1, label) {
21       state_ = F_BUTTON_NORMAL;
22       can_be_focused(true);
23  }
24   ~F_Button() { }
25   F_Button_State_t state() { return state_; }
26   void state(F_Button_State_t st) { state_ = st; }
27  };
30 #endif