54 FXMainWindow(a,
"sumo-gui main window", nullptr, nullptr, DECOR_ALL, 20, 20, 600, 400),
55 myAmFullScreen(false),
57 myGLVisual(new FXGLVisual(a, VISUAL_DOUBLEBUFFER)),
59 myListInternal(false),
61 myListTeleporting(false) {
64 getApp()->getNormalFont()->getFontDesc(fdesc);
65 fdesc.weight = FXFont::Bold;
70 myTopDock =
new FXDockSite(
this, LAYOUT_SIDE_TOP | LAYOUT_FILL_X);
71 myBottomDock =
new FXDockSite(
this, LAYOUT_SIDE_BOTTOM | LAYOUT_FILL_X);
72 myLeftDock =
new FXDockSite(
this, LAYOUT_SIDE_LEFT | LAYOUT_FILL_Y);
73 myRightDock =
new FXDockSite(
this, LAYOUT_SIDE_RIGHT | LAYOUT_FILL_Y);
131 std::vector<std::string>
133 std::vector<std::string> ret;
135 ret.push_back(window->getTitle().text());
144 if (std::string(window->getTitle().text()) ==
id) {
162 const std::vector<GUIGlChildWindow*>&
228 throw ProcessError(
"A GUIMainWindow instance was not yet constructed.");
244 int windowWidth = getApp()->reg().readIntEntry(
"SETTINGS",
"width", 600);
245 int windowHeight = getApp()->reg().readIntEntry(
"SETTINGS",
"height", 400);
247 if (oc.
isSet(
"window-size")) {
248 std::vector<std::string> windowSize = oc.
getStringVector(
"window-size");
249 if (windowSize.size() != 2) {
250 WRITE_ERROR(
"option window-size requires INT,INT");
260 if (oc.
isSet(
"window-size") || getApp()->reg().readIntEntry(
"SETTINGS",
"maximized", 0) == 0 || oc.
isSet(
"window-pos")) {
262 int x =
MAX2(0,
MIN2(getApp()->reg().readIntEntry(
"SETTINGS",
"x", 150), getApp()->getRootWindow()->getWidth() - windowWidth));
263 int y =
MAX2(50,
MIN2(getApp()->reg().readIntEntry(
"SETTINGS",
"y", 150), getApp()->getRootWindow()->getHeight() - windowHeight));
264 if (oc.
isSet(
"window-pos")) {
266 if (windowPos.size() != 2) {
278 resize(windowWidth, windowHeight);
285 getApp()->reg().writeIntEntry(
"SETTINGS",
"x", getX());
286 getApp()->reg().writeIntEntry(
"SETTINGS",
"y", getY());
287 getApp()->reg().writeIntEntry(
"SETTINGS",
"width", getWidth());
288 getApp()->reg().writeIntEntry(
"SETTINGS",
"height", getHeight());
@ MID_SIMSTEP
A Simulation step was performed.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
GUISUMOAbstractView * getView() const
return GUISUMOAbstractView
void setWindowSizeAndPos()
perform initial window positioning and sizing according to user options / previous call
const std::vector< GUIGlChildWindow * > & getViews() const
get views
bool myListParking
information whether the locator should list parking vehicles
static GUIMainWindow * myInstance
the singleton window instance
virtual ~GUIMainWindow()
destructor
GUIGlChildWindow * getViewByID(const std::string &id) const
get specific view by ID
std::vector< FXMainWindow * > myTrackerWindows
FXLabel & getCartesianLabel()
get cartesian label
FXFont * myFallbackFont
Fallback font for extended characters support.
std::vector< std::string > getViewIDs() const
get view IDs
GUISUMOAbstractView * getActiveView() const
get the active view or 0
bool isGaming() const
return whether the gui is in gaming mode
bool myListTeleporting
information whether the locator should list teleporting vehicles
FXLabel * myCartesianCoordinate
Labels for the current cartesian and geo-coordinate.
FXMDIClient * myMDIClient
The multi view panel.
FXFont * getBoldFont()
get bold front
bool listTeleporting() const
return whether to list teleporting vehicles
FXFont * myBoldFont
Font used for popup-menu titles.
static GUIMainWindow * getInstance()
get instance
FXLabel * myGeoCoordinate
bool listParking() const
return whether to list parking vehicles
FXDockSite * myBottomDock
void updateChildren()
update childrens
bool listInternal() const
return whether to list internal structures
void addGLChild(GUIGlChildWindow *child)
Adds a further child window to the list (GUIGlChildWindow)
FXMutex myTrackerLock
A lock to make the removal and addition of trackers secure.
bool myListInternal
information whether the locator should list internal structures
void storeWindowSizeAndPos()
record window position and size in registry
GUIMainWindow(FXApp *a)
constructor
FXGLVisual * getGLVisual() const
get GL Visual
FXLabel & getGeoLabel()
get geo label
bool myAmFullScreen
fox need this
void removeGLChild(GUIGlChildWindow *child)
removes the given child window from the list (GUIGlChildWindow)
FXDockSite * getTopDock()
get top dock
FXFont * getFallbackFont()
get fallback front
FXGLVisual * myGLVisual
The gl-visual used.
bool myAmGaming
information whether the gui is currently in gaming mode
void removeChild(FXMainWindow *child)
removes the given child window from the list (FXMainWindow)
std::vector< GUIGlChildWindow * > myGLWindows
void addChild(FXMainWindow *child)
Adds a further child window to the list (FXMainWindow)
A storage for options typed value containers)
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
const StringVector & getStringVector(const std::string &name) const
Returns the list of string-value of the named option (only for Option_StringVector)
static OptionsCont & getOptions()
Retrieves the options.
static int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter,...