CEBL  2.1
InterfaceCombo.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 
26 #ifndef INTERFACECOMBO_H
27 #define INTERFACECOMBO_H
28 
29 
30 #include "WidgetUtils.hpp"
31 #include <vector>
32 
33 //forward defs
34 class CEBLViewGTK;
35 class EEGInterface;
36 
38 {
39  private:
40  CEBLViewGTK * view;
41 
42  //flag to indicate if view is being updated
43  bool updating_view;
44 
45  //combo boxes
46  std::vector<GtkWidget *> combos;
47  std::vector<int> num_interfaces;
48 
49  //selected interface id
50  int selected_interface;
51 
52  //list of selectable interfaces
53  std::vector<string> interfaces;
54  std::vector<EEGInterface *> interface_pointers;
55 
56  //callbacks
57  static void CB_changeInterface(GtkWidget *, gpointer);
58 
59  //udate a combo box from the model
60  void updateComboBox(int index);
61 
62  public:
65 
67  GtkWidget *getCombo();
68 
73 
75  void updateView();
76 
77 };
78 #endif
79