options_dlg.hh
Go to the documentation of this file.
1 #ifndef _OPTIONS_DLG_H_
2 #define _OPTIONS_DLG_H_
3 
4 #include <FL/Fl_Button.H>
5 #include <FL/Fl_Check_Button.H>
6 #include <FL/Fl_Scroll.H>
7 #include <FL/Fl_Window.H>
8 
9 #include <set>
10 #include <string>
11 #include <vector>
12 
13 #include "option.hh"
14 #include "stage.hh"
15 
16 namespace Stg {
17 
18 // class Option;
19 
20 class OptionsDlg : public Fl_Window {
21 public:
23 
24 private:
25  std::vector<Option *> options;
26  Option *changedItem;
27  Option *showAll;
28  event_t status;
29  Fl_Scroll *scroll;
30  Fl_Check_Button *showAllCheck;
31  void updateChecks();
32 
33  static void checkChanged(Fl_Widget *w, void *p);
34 
35  // constants
36  static const int vm = 4;
37  // const int hm;
38  static const int boxH = 30;
39 
40 public:
41  OptionsDlg(int x, int y, int w, int h);
42  virtual ~OptionsDlg();
43 
44  void setOptions(const std::set<Option *> &opts);
45  void clearOptions() { options.clear(); }
46  void showAllOpt(Option *opt);
47  event_t event() const { return status; }
48  Option *changed() { return changedItem; }
49 };
50 }
51 
52 #endif
event_t
Definition: options_dlg.hh:22
@ NO_EVENT
Definition: options_dlg.hh:22
@ CHANGE_ALL
Definition: options_dlg.hh:22
Definition: options_dlg.hh:20
Option * changed()
Definition: options_dlg.hh:48
void setOptions(const std::set< Option * > &opts)
Definition: options_dlg.cc:70
void clearOptions()
Definition: options_dlg.hh:45
@ CLOSE
Definition: options_dlg.hh:22
virtual ~OptionsDlg()
Definition: options_dlg.cc:24
void showAllOpt(Option *opt)
Definition: options_dlg.cc:77
OptionsDlg(int x, int y, int w, int h)
Definition: options_dlg.cc:6
The Stage library uses its own namespace.
Definition: canvas.hh:8
event_t event() const
Definition: options_dlg.hh:47
Definition: option.hh:19
@ CHANGE
Definition: options_dlg.hh:22