-
Notifications
You must be signed in to change notification settings - Fork 1
/
isingWindow.h
36 lines (26 loc) · 695 Bytes
/
isingWindow.h
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
#pragma once
#include <gtkmm.h>
#include <sigc++/sigc++.h>
#include "model.h"
#include "ticker.h"
#include "binding.h"
//This is the top level class for the view
class IsingWindow : public sigc::trackable{
public:
IsingWindow() = default;
virtual ~IsingWindow() = default;
void from_file() throw();
Gtk::Window& getWindow();
protected:
std::shared_ptr<IsingModel> model;
std::shared_ptr<Ticker> magnetismTicker;
std::shared_ptr<Ticker> varianceTicker;
Gtk::Window* window;
sigc::connection timout;
std::shared_ptr<Binding<double>> step_frequency;
//main update loop
bool step();
private:
Glib::RefPtr<Gtk::Builder> builder;
Gtk::ToggleButton *running;
};