Add copyright notice
[forms.git] / F / F_Button.H
blob4a4a62edb7b7b2aa0ec730c11c30e9a261b86065
2  /*
3   *   Copyright (C) 2007, Harbour, All rights reserved.
4   */
6 #ifndef _F_BUTTON_H_
7 #define _F_BUTTON_H_
9 #include <F_Text_Display.H>
10 #include <F_Window.H>
12 namespace F {
14 class F_Button : public F_Widget {
16   F_Button_State_t state_;
18   void draw();
19   void draw_label();
20   bool handle(F_Event_t &ev);
22  public:
23   F_Button(F_Box_Type_t btype, coord_t x, coord_t y, dim_t w, dim_t h,
24     const char *label = 0) : F_Widget(x, y, w + 1, h + 1, label) {
25       state_ = F_BUTTON_NORMAL;
26       can_be_focused(true);
27  }
28   ~F_Button() { }
29   F_Button_State_t state() { return state_; }
30   void state(F_Button_State_t st) { state_ = st; }
31  };
34 #endif