00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef _FLU_TOGGLE_GROUP_H
00017 #define _FLU_TOGGLE_GROUP_H
00018
00019 #include <stdio.h>
00020 #include <string.h>
00021
00022
00023 #include <FL/Fl.H>
00024 #include <FL/Fl_Check_Button.H>
00025 #include <FL/fl_draw.H>
00026 #include <FL/Fl_Group.H>
00027
00028 #include "FLU/Flu_Enumerations.h"
00029
00031 class FLU_EXPORT Flu_Toggle_Group : public Fl_Group
00032 {
00033
00034 public:
00035
00037 Flu_Toggle_Group( int x, int y, int w, int h, const char *l = 0 );
00038
00040 inline void activate()
00041 { value(1); }
00042
00044 inline void deactivate()
00045 { value(0); }
00046
00048 inline int active() const
00049 { return value(); }
00050
00052 inline void value( int v )
00053 { chkBtn->value(v); redraw(); }
00054
00056 inline int value() const
00057 { return chkBtn->value(); }
00058
00060 void draw();
00061
00062 protected:
00063
00064 static void _toggleCB( Fl_Widget *w, void *arg )
00065 { ((Flu_Toggle_Group*)arg)->toggleCB(); }
00066 void toggleCB();
00067
00068 Fl_Check_Button *chkBtn;
00069
00070 };
00071
00072 #endif