00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 #ifndef _FL_BUTTON_H_
00023 #define _FL_BUTTON_H_
00024 
00025 #include "Fl_Widget.h"
00026 
00035 class FL_API Fl_Button : public Fl_Widget {
00036 public:
00037     static Fl_Named_Style* default_style;
00038 
00040     Fl_Button(int x, int y, int w, int h,const char *l=0);
00041 
00043     Fl_Button(const char* l = 0,int layout_size=30,Fl_Align layout_al=FL_ALIGN_TOP);
00044 
00046     enum {
00047         NORMAL = 0, 
00048         TOGGLE = 1, 
00049         RADIO  = 2, 
00050         HIDDEN = 3  
00051     };
00052 
00053     bool value() const { return Fl_Widget::value(); }
00054     bool value(bool);
00055 
00057     bool set();
00058 
00060     bool clear();
00061 
00063     void setonly();
00064 
00065     virtual void draw();
00066     virtual int handle(int event);
00067     virtual void preferred_size(int& w, int& h) const;
00068 
00069 protected:
00070     void draw(int glyph, int glyph_width) const;
00071 };
00072 
00073 #endif