diff options
author | Daniel Jones <admin@danieljon.es> | 2020-06-24 15:25:12 +0930 |
---|---|---|
committer | Daniel Jones <admin@danieljon.es> | 2020-06-24 15:25:12 +0930 |
commit | 08ffc71b3b219c169af385ed9c47fae6535dcd67 (patch) | |
tree | 96d96919e5be79356496fff4ea2f479c52632ca2 /MainWindow.h | |
parent | b7d79a8224a578ab5868eb2733bdf4a50db5e4f2 (diff) | |
download | foxlogicgates-08ffc71b3b219c169af385ed9c47fae6535dcd67.tar.gz foxlogicgates-08ffc71b3b219c169af385ed9c47fae6535dcd67.zip |
functionality: added ability to delete links. click on the input of the link you wish to delete and press the delete key.
Diffstat (limited to 'MainWindow.h')
-rw-r--r-- | MainWindow.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/MainWindow.h b/MainWindow.h index ac3ff2e..e1ee01e 100644 --- a/MainWindow.h +++ b/MainWindow.h @@ -31,6 +31,11 @@ class MainWindow : public FXMainWindow { FXDECLARE(MainWindow) + struct selected_input + { + Gate *gate; + int input; + }; public: explicit MainWindow(FXApp* a); @@ -84,6 +89,7 @@ class MainWindow : public FXMainWindow void create_ui(); void draw(); void update_gate_state(Gate *gate); + void find_selected_input(int x, int y); Gate *find_gate_at(int x, int y); Gate *find_gate_by_id(int id); @@ -128,6 +134,7 @@ class MainWindow : public FXMainWindow FXButton *NOT_button; Gate::GATE_TYPE selected_gate_type = Gate::NONE; // the type of gate we will place + struct selected_input selected_input; /* mouse */ bool lmouse_down = false; @@ -139,6 +146,7 @@ class MainWindow : public FXMainWindow /* general */ std::vector<std::unique_ptr<Gate>> gates; + }; #endif // MAINWINDOW_H |