diff --git a/Aman/Aman.vcxproj b/Aman/Aman.vcxproj
index 788fb4a..4aa1548 100644
--- a/Aman/Aman.vcxproj
+++ b/Aman/Aman.vcxproj
@@ -210,6 +210,7 @@
+
diff --git a/Aman/Aman.vcxproj.filters b/Aman/Aman.vcxproj.filters
index 24632dc..7b29c1a 100644
--- a/Aman/Aman.vcxproj.filters
+++ b/Aman/Aman.vcxproj.filters
@@ -115,6 +115,9 @@
Header Files
+
+ Header Files
+
diff --git a/Aman/AmanAircraft.h b/Aman/AmanAircraft.h
index d3015d9..a6d604b 100644
--- a/Aman/AmanAircraft.h
+++ b/Aman/AmanAircraft.h
@@ -9,6 +9,7 @@ class AmanAircraft {
std::string arrivalRunway;
std::string icaoType;
std::string nextFix;
+ std::string scratchPad;
int viaFixIndex;
diff --git a/Aman/AmanController.cpp b/Aman/AmanController.cpp
index 7c4e361..d6eb116 100644
--- a/Aman/AmanController.cpp
+++ b/Aman/AmanController.cpp
@@ -6,8 +6,6 @@
AmanController::AmanController(AmanPlugIn* plugin) {
this->amanModel = plugin;
- this->amanWindow = NULL;
- this->amanWindow = std::make_shared(this);
}
AmanController::~AmanController() {}
@@ -22,9 +20,7 @@ void AmanController::modelUpdated() {
}
void AmanController::toggleTimeline(const std::string& id) {
- bool isActive = std::find(activeTimelines.begin(), activeTimelines.end(), id) != activeTimelines.end();
-
- if (isActive) {
+ if (isTimelineActive(id)) {
activeTimelines.erase(
std::remove(activeTimelines.begin(), activeTimelines.end(), id),
activeTimelines.end()
@@ -35,11 +31,27 @@ void AmanController::toggleTimeline(const std::string& id) {
modelUpdated();
}
+bool AmanController::isTimelineActive(const std::string& id) {
+ return std::find(activeTimelines.begin(), activeTimelines.end(), id) != activeTimelines.end();
+}
+
void AmanController::reloadProfiles() {
this->amanModel->requestReload();
}
-void AmanController::setTimelineHorizon(const std::string& id, uint32_t minutes) {
- this->amanWindow->setTimelineHorizon(id, minutes);
+bool AmanController::openWindow() {
+ if (this->amanWindow == nullptr) {
+ this->amanWindow = std::make_shared(this);
+ return true;
+ }
+}
+
+bool AmanController::closeWindow() {
+ if (this->amanWindow == nullptr) {
+ return false;
+ } else {
+ this->amanWindow.reset();
+ return true;
+ }
}
diff --git a/Aman/AmanController.h b/Aman/AmanController.h
index 7af9e89..af75ff0 100644
--- a/Aman/AmanController.h
+++ b/Aman/AmanController.h
@@ -12,8 +12,10 @@ class AmanController {
AmanController(AmanPlugIn* model);
void modelUpdated();
void toggleTimeline(const std::string& id);
+ bool isTimelineActive(const std::string& id);
void reloadProfiles();
- void setTimelineHorizon(const std::string& id, uint32_t minutes);
+ bool openWindow();
+ bool closeWindow();
~AmanController();
diff --git a/Aman/AmanPlugIn.cpp b/Aman/AmanPlugIn.cpp
index 3e7cffe..ebd555d 100644
--- a/Aman/AmanPlugIn.cpp
+++ b/Aman/AmanPlugIn.cpp
@@ -5,6 +5,7 @@
#include "AmanPlugIn.h"
#include "AmanTimeline.h"
#include "AmanWindow.h"
+#include "AmanTagItem.h"
#include "stdafx.h"
#include "windows.h"
#include "rapidjson/document.h"
@@ -17,6 +18,7 @@
#include
#include
#include
+#include