blob: 3c39e30bb84a991ab50c48f2e7990529db8cf54b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
/*
* DiceSimController.h
*
* Created on: 11.05.2011
* Author: sven
*/
#ifndef DICESIMCONTROLLER_H_
#define DICESIMCONTROLLER_H_
#ifndef _GTKMM_H
#include <gtkmm.h>
#endif
class DiceSimController {
public:
DiceSimController();
virtual ~DiceSimController();
void startApp(Gtk::Main& kit);
private:
class Columns : public Gtk::TreeModel::ColumnRecord {
public:
Columns() {
add(mData);
}
~Columns() {}
Gtk::TreeModelColumn<unsigned> mData;
};
static const char* UI_FILENAME;
Gtk::Window* mPtrMainWin;
Gtk::Button* mPtrStartBtn;
Gtk::ComboBox* mPtrDiceCombo;
Gtk::ComboBox* mPtrRollsCombo;
Glib::RefPtr<Gtk::TreeStore> mDiceTreeStore;
Glib::RefPtr<Gtk::TreeStore> mRollsTreeStore;
Gtk::TextView* mPtrTextView;
Glib::RefPtr<Gtk::TextBuffer> mRefPtrTextBuffer;
Columns mDiceCols;
Columns mRollsCols;
void on_startbutton_clicked();
void writeToCSV(const std::vector<unsigned>& results, unsigned numDice);
void startGnuPlot();
};
#endif /* DICESIMCONTROLLER_H_ */
|