56 FXMainWindow(a,
"SUMO-gui main window", nullptr, nullptr, DECOR_ALL, 20, 20, 600, 400),
57 myAmFullScreen(false),
58 myGLVisual(new FXGLVisual(a, VISUAL_DOUBLEBUFFER)),
60 myListInternal(false),
62 myListTeleporting(false) {
65 getApp()->getNormalFont()->getFontDesc(fdesc);
66 fdesc.weight = FXFont::Bold;
69 myTopDock =
new FXDockSite(
this, LAYOUT_SIDE_TOP | LAYOUT_FILL_X);
70 myBottomDock =
new FXDockSite(
this, LAYOUT_SIDE_BOTTOM | LAYOUT_FILL_X);
71 myLeftDock =
new FXDockSite(
this, LAYOUT_SIDE_LEFT | LAYOUT_FILL_Y);
72 myRightDock =
new FXDockSite(
this, LAYOUT_SIDE_RIGHT | LAYOUT_FILL_Y);
123 std::vector<std::string>
125 std::vector<std::string> ret;
127 ret.push_back(window->getTitle().text());
136 if (std::string(window->getTitle().text()) ==
id) {
186 throw ProcessError(
"A GUIMainWindow instance was not yet constructed.");
202 int windowWidth = getApp()->reg().readIntEntry(
"SETTINGS",
"width", 600);
203 int windowHeight = getApp()->reg().readIntEntry(
"SETTINGS",
"height", 400);
205 if (oc.
isSet(
"window-size")) {
206 std::vector<std::string> windowSize = oc.
getStringVector(
"window-size");
207 if (windowSize.size() != 2) {
208 WRITE_ERROR(
"option window-size requires INT,INT");
218 if (oc.
isSet(
"window-size") || getApp()->reg().readIntEntry(
"SETTINGS",
"maximized", 0) == 0 || oc.
isSet(
"window-pos")) {
220 int x =
MAX2(0,
MIN2(getApp()->reg().readIntEntry(
"SETTINGS",
"x", 150), getApp()->getRootWindow()->getWidth() - windowWidth));
221 int y =
MAX2(50,
MIN2(getApp()->reg().readIntEntry(
"SETTINGS",
"y", 150), getApp()->getRootWindow()->getHeight() - windowHeight));
222 if (oc.
isSet(
"window-pos")) {
224 if (windowPos.size() != 2) {
236 resize(windowWidth, windowHeight);
243 getApp()->reg().writeIntEntry(
"SETTINGS",
"x", getX());
244 getApp()->reg().writeIntEntry(
"SETTINGS",
"y", getY());
245 getApp()->reg().writeIntEntry(
"SETTINGS",
"width", getWidth());
246 getApp()->reg().writeIntEntry(
"SETTINGS",
"height", getHeight());
std::vector< FXMainWindow * > myTrackerWindows
FXLabel * myGeoCoordinate
GUISUMOAbstractView * getView() const
FXGLVisual * getGLVisual() const
void setWindowSizeAndPos()
perform initial window positioning and sizing according to user options / previous call ...
FXFont * myBoldFont
Font used for popup-menu titles.
FXGLVisual * myGLVisual
The gl-visual used.
std::vector< std::string > getViewIDs() const
static OptionsCont & getOptions()
Retrieves the options.
FXLabel & getCartesianLabel()
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
GUISUMOAbstractView * getActiveView() const
get the active view or 0
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static GUIMainWindow * getInstance()
static GUIMainWindow * myInstance
the singleton window instance
std::vector< std::string > getStringVector(const std::string &name) const
Returns the list of string-vector-value of the named option (only for Option_String) ...
void addGLChild(GUIGlChildWindow *child)
Adds a further child window to the list.
static int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter...
std::vector< GUIGlChildWindow * > myGLWindows
void unlock()
release mutex lock
void removeChild(FXMainWindow *child)
FXLabel * myCartesianCoordinate
Labels for the current cartesian and geo-coordinate.
FXDockSite * myBottomDock
MFXMutex myTrackerLock
A lock to make the removal and addition of trackers secure.
A Simulation step was performed.
A storage for options typed value containers)
FXMDIClient * myMDIClient
The multi view panel.
bool myAmFullScreen
whether to show the window in full screen mode
GUIGlChildWindow * getViewByID(const std::string &id) const
void addChild(FXMainWindow *child)
void storeWindowSizeAndPos()
record window position and size in registry
void removeGLChild(GUIGlChildWindow *child)
removes the given child window from the list