CEBL  2.1
WidgetPanel.hpp
Go to the documentation of this file.
1 /*
2 * CEBL : CSU EEG Brain-Computer Interface Lab
3 *
4 * Author: Jeshua Bratman - jeshuabratman@gmail.com
5 *
6 * This file is part of CEBL.
7 *
8 * CEBL is free software; you can redistribute it and/or modify it.
9 * We only ask that if you use our code that you cite the source in
10 * your project or publication.
11 *
12 * EEG Group (www.cs.colostate.edu/eeg)
13 * Department of Computer Science
14 * Colorado State University
15 *
16 */
17 
27 #ifndef WIDGETPANEL_H
28 #define WIDGETPANEL_H
29 
30 #include "../CEBLIncludes.hpp"
31 #include <gtk/gtk.h>
32 #include "../Param.hpp"
33 #include <vector>
34 #include <map>
35 #include <string>
36 
37 
39 {
40  private:
41  std::vector <std::string> parameters;
42  std::vector <std::string> descriptions;
43  std::vector <GtkWidget*> value_widgets;
44  std::vector <GtkWidget*> parameter_widgets;
45  std::vector <GtkWidget*> description_widgets;
46  std::map <std::string, CEBL::Param> params;
47  int number;
48  GtkWidget *table;
49  GtkWidget *container;
50  int nrows;
51 
52  //create widget panel by map of params
53  void createByParams(std::map<std::string, CEBL::Param> params);
54 
55  public:
56  WidgetPanel();
58  WidgetPanel(std::map<std::string, CEBL::Param> params);
59  ~WidgetPanel();
60 
62  void add(std::string parameter, std::string description, std::string default_value);
63 
65  void add(CEBL::Param &);
66 
68  GtkWidget *getContainer() { return container; };
69 
71  GtkWidget *getWidget(int i);
72 
74  map<std::string, CEBL::Param> getParams();
75 };
76 
77 #endif
78