options_dlg.hh

Go to the documentation of this file.
00001 #ifndef _OPTIONS_DLG_H_
00002 #define _OPTIONS_DLG_H_
00003 
00004 #include <FL/Fl_Window.H>
00005 #include <FL/Fl_Scroll.H>
00006 #include <FL/Fl_Check_Button.H>
00007 #include <FL/Fl_Button.H>
00008 
00009 #include <string>
00010 #include <vector>
00011 #include <set>
00012 
00013 #include "stage.hh"
00014 #include "option.hh"
00015 
00016 namespace Stg {
00017 
00018   //class Option;
00019 
00020     class OptionsDlg : public Fl_Window {
00021     public:
00022         enum event_t { NO_EVENT, CHANGE, CHANGE_ALL, CLOSE };
00023         
00024     private:
00025         std::vector<Option*> options;
00026         Option* changedItem;
00027         Option* showAll;
00028         event_t status;
00029         Fl_Scroll* scroll;
00030         Fl_Check_Button* showAllCheck;
00031         void updateChecks();
00032         
00033         static void checkChanged( Fl_Widget* w, void* p );
00034 
00035         // constants
00036         static const int vm = 4;
00037         const int hm;
00038         static const int boxH = 30;
00039 
00040     public:
00041         OptionsDlg( int x, int y, int w, int h );
00042         virtual ~OptionsDlg();
00043         
00044         void setOptions( const std::set<Option*>& opts );
00045         void clearOptions() { options.clear(); }
00046         void showAllOpt( Option* opt );
00047         const event_t event() const { return status; }
00048         Option* changed() { return changedItem; }
00049     };
00050 
00051 }
00052     
00053 #endif
00054 

Generated on Tue Oct 20 15:42:05 2009 for Stage by  doxygen 1.6.1