CEBL  2.1
KeyboardPie.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 
18 /* KeyboardPie.hpp
19  * \author Jeshua Bratman
20  *
21  * Keyboard interface for CEBL
22  */
23 
24 #ifndef KEYBOARDPIE_H
25 #define KEYBOARDPIE_H
26 #include "PieInterface.hpp"
27 #include <sstream>
28 #include <map>
29 #include <stack>
30 #include <string>
31 
32 using namespace std;
33 
35 
36 class KeyboardPie : public PieInterface
37 {
38  private:
39  GtkWidget *typing_box;
40  GtkWidget *check_send_keys;
41  bool send_keys;
42  bool use_special;
43  MODE mode;
44 
45  int index;
46  vector<int> classes;
47  vector<string> alphabet;
48  vector<string> punctuation;
49  vector<string> special;
50  map<string, string> special_keys;
51  vector<string> back_level;
52  vector<string> key_pool;
53  stack<vector<string> > key_pool_stack;
54  map<int, vector<string> > current_labels;
55 
56  int top;
57  int bottom;
58 
59  void split(vector<string>, int, int);
60  void selectPie(int c);
61  void init();
62  void updateNames();
63 
64  public:
65  KeyboardPie();
66 
67  //interface functions
68  void setNumClasses(int);
69  void selectClass(int);
70  void setParamsList(std::map<std::string, CEBL::Param>);
71  std::map<std::string, CEBL::Param> getParamsList();
72 };
73 
74 #endif