#pragma once
#include <vector>
#include <libsumo/TraCIDefs.h>
#define DEFAULT_VIEW "View #0"
#ifndef LIBTRACI
namespace FX {
class FXApp;
}
class GUISUMOAbstractView;
class GUIApplicationWindow;
typedef long long int SUMOTime;
#endif
namespace LIBSUMO_NAMESPACE {
class GUI {
public:
#if defined(HAVE_LIBSUMOGUI) || defined(HAVE_FOX) || defined(LIBTRACI)
static double getZoom(const std::string& viewID = DEFAULT_VIEW);
static double getAngle(const std::string& viewID = DEFAULT_VIEW);
static libsumo::TraCIPosition getOffset(const std::string& viewID = DEFAULT_VIEW);
static std::string getSchema(const std::string& viewID = DEFAULT_VIEW);
static libsumo::TraCIPositionVector getBoundary(const std::string& viewID = DEFAULT_VIEW);
static bool hasView(const std::string& viewID = DEFAULT_VIEW);
static std::string getTrackedVehicle(const std::string& viewID = DEFAULT_VIEW);
static bool isSelected(const std::string& objID, const std::string& objType = "vehicle");
static void setZoom(const std::string& viewID, double zoom);
static void setAngle(const std::string& viewID, double angle);
static void setOffset(const std::string& viewID, double x, double y);
static void setSchema(const std::string& viewID, const std::string& schemeName);
static void setBoundary(const std::string& viewID, double xmin, double ymin, double xmax, double ymax);
static void trackVehicle(const std::string& viewID, const std::string& vehID);
static void screenshot(const std::string& viewID, const std::string& filename, const int width = -1, const int height = -1);
static void track(const std::string& objID, const std::string& viewID = DEFAULT_VIEW);
static void toggleSelection(const std::string& objID, const std::string& objType = "vehicle");
static void addView(const std::string& viewID, const std::string& schemeName = "", bool in3D = false);
static void removeView(const std::string& viewID);
LIBSUMO_ID_PARAMETER_API
LIBSUMO_SUBSCRIPTION_API
#ifndef LIBTRACI
#ifndef SWIG
static bool start(const std::vector<std::string>& cmd);
static bool load(const std::vector<std::string>& cmd);
static bool hasInstance();
static bool step(SUMOTime t);
static bool close(const std::string& reason);
static std::shared_ptr<VariableWrapper> makeWrapper();
static bool handleVariable(const std::string& objID, const int variable, VariableWrapper* wrapper, tcpip::Storage* paramData);
private:
static SubscriptionResults mySubscriptionResults;
static ContextSubscriptionResults myContextSubscriptionResults;
static GUISUMOAbstractView* getView(const std::string& id);
static GUIApplicationWindow* myWindow;
static FX::FXApp* myApp;
#endif
#endif
#endif
GUI() = delete;
};
}