diff --git a/src/PlugIn.cpp b/src/PlugIn.cpp index ee975ce..86cde32 100644 --- a/src/PlugIn.cpp +++ b/src/PlugIn.cpp @@ -56,3 +56,21 @@ PlugIn::PlugIn() : } PlugIn::~PlugIn() noexcept { } + +EuroScopePlugIn::CRadarScreen* PlugIn::OnRadarScreenCreated(const char* displayName, bool needsRadarContent, bool geoReferenced, + bool canBeSaved, bool canBeCreated) { + std::ignore = needsRadarContent; + std::ignore = geoReferenced; + std::ignore = canBeSaved; + std::ignore = canBeCreated; + std::ignore = displayName; + + if (nullptr == this->m_screen) + this->m_screen = std::make_shared(); + + return this->m_screen.get(); +} + +void PlugIn::OnRadarTargetPositionUpdate(EuroScopePlugIn::CRadarTarget radarTarget) { + +} diff --git a/src/PlugIn.h b/src/PlugIn.h index 37b4ff7..1d97521 100644 --- a/src/PlugIn.h +++ b/src/PlugIn.h @@ -16,6 +16,8 @@ #include +#include "RadarScreen.h" + namespace aman { /** * @brief Defines the EuroScope plug-in @@ -33,7 +35,8 @@ namespace aman { enum class TagItemElement { }; - Communication m_configuration; + Communication m_configuration; + std::shared_ptr m_screen; public: /** @@ -49,5 +52,22 @@ namespace aman { PlugIn(PlugIn&&) = delete; PlugIn& operator=(const PlugIn&) = delete; PlugIn& operator=(PlugIn&&) = delete; + + /** + * @brief Called as soon as a new RADAR screen needs to be created + * @param[in] displayName The display's name + * @param[in] needsRadarContent True of the screen needs RADAR content + * @param[in] geoReferenced True if the positions are geo referenced + * @param[in] canBeSaved True if the configurations can be saved + * @param[in] canBeCreated True if the configuration can be created + * @return The created RADAR screen + */ + EuroScopePlugIn::CRadarScreen* OnRadarScreenCreated(const char* displayName, bool needsRadarContent, bool geoReferenced, + bool canBeSaved, bool canBeCreated) override; + /** + * @brief Called as soon as a radar target position is updated + * @param[in] radarTarget The updated radar target + */ + void OnRadarTargetPositionUpdate(EuroScopePlugIn::CRadarTarget radarTarget) override; }; }