Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Fl_Button_Group.h

00001 #ifndef _FL_BUTTON_GROUP_H_
00002 #define _FL_BUTTON_GROUP_H_
00003 
00004 #include "Fl_Map.h"
00005 #include "Fl_Group.h"
00006 #include "Fl_Input.h"
00007 #include "Fl_Button.h"
00008 #include "Fl_String_List.h"
00009 
00013 class FL_API Fl_Button_Group : public Fl_Group {
00014 public:
00015     static Fl_Named_Style* default_style;
00016 
00017     // Values for type()
00018     enum {
00019         NORMAL_BUTTONS = 0,
00020         CHECK_BUTTONS,
00021         RADIO_BUTTONS       
00022     };
00023 
00025     Fl_Button_Group(int x, int y, int w, int h, const char *label = 0);
00026 
00028     Fl_Button_Group(const char* l = 0,int layout_size=30,Fl_Align layout_al=FL_ALIGN_TOP,int label_w=100);
00029 
00031     void buttons(const Fl_String_List& sl);
00032 
00034     void buttons(const Fl_Int_String_Map& sm);
00035 
00037     Fl_String value() const;
00038 
00040     void get_values(Fl_Int_String_Map& values);
00041 
00042     void value(const char *s, const char *separator="|");
00043     void value(const Fl_String &s, const char *separator="|");
00044     void value(const Fl_String_List &sl);
00045 
00046     virtual void reset() { value(""); }
00047     virtual void layout();
00048     virtual void preferred_size(int& x,int& y) const;
00049 
00050 protected:
00051     Fl_Button     *m_input_button;  // Button for input field
00052     Fl_Input      *m_input;         // Input field
00053 
00054     int button_index(const char *label);
00055     void deselect_all();
00056     virtual Fl_Button *create_button(const char *label);
00057 };
00058 
00059 #endif

Generated on Thu Jul 31 15:33:43 2003 for eFLTK by doxygen1.2.15