64 FXMainWindow(a,
"SUMO-gui main window", NULL, NULL, DECOR_ALL, 20, 20, 600, 400),
65 myGLVisual(new FXGLVisual(a, VISUAL_DOUBLEBUFFER)),
67 myListInternal(false),
69 myListTeleporting(false) {
72 getApp()->getNormalFont()->getFontDesc(fdesc);
73 fdesc.weight = FXFont::Bold;
76 myTopDock =
new FXDockSite(
this, LAYOUT_SIDE_TOP | LAYOUT_FILL_X);
77 myBottomDock =
new FXDockSite(
this, LAYOUT_SIDE_BOTTOM | LAYOUT_FILL_X);
78 myLeftDock =
new FXDockSite(
this, LAYOUT_SIDE_LEFT | LAYOUT_FILL_Y);
79 myRightDock =
new FXDockSite(
this, LAYOUT_SIDE_RIGHT | LAYOUT_FILL_Y);
130 std::vector<std::string>
132 std::vector<std::string> ret;
134 ret.push_back((*i)->getTitle().text());
143 if (std::string((*i)->getTitle().text()) ==
id) {
193 throw ProcessError(
"A GUIMainWindow instance was not yet constructed.");
208 int windowWidth = getApp()->reg().readIntEntry(
"SETTINGS",
"width", 600);
209 int windowHeight = getApp()->reg().readIntEntry(
"SETTINGS",
"height", 400);
211 if (oc.
isSet(
"window-size")) {
212 std::vector<std::string> windowSize = oc.
getStringVector(
"window-size");
213 if (windowSize.size() != 2
216 WRITE_ERROR(
"option window-size requires INT,INT");
222 if (oc.
isSet(
"window-size") || getApp()->reg().readIntEntry(
"SETTINGS",
"maximized", 0) == 0 || oc.
isSet(
"window-pos")) {
224 int x =
MAX2(0,
MIN2(getApp()->reg().readIntEntry(
"SETTINGS",
"x", 150), getApp()->getRootWindow()->getWidth() - windowWidth));
225 int y =
MAX2(0,
MIN2(getApp()->reg().readIntEntry(
"SETTINGS",
"y", 150), getApp()->getRootWindow()->getHeight() - windowHeight));
226 if (oc.
isSet(
"window-pos")) {
228 if (windowPos.size() != 2
239 resize(windowWidth, windowHeight);
std::vector< FXMainWindow * > myTrackerWindows
FXLabel * myGeoCoordinate
static bool _str2int(const std::string &data)
check if a String can be parsed into a int check overflows
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.
std::vector< FXMDIChild * > mySubWindows
GUISUMOAbstractView * getActiveView() const
get the active view or 0
void addChild(FXMDIChild *child, bool updateOnSimStep=true)
Adds a further child window to the list.
static GUIMainWindow * getInstance()
static int _str2int(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter...
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 removeChild(FXMDIChild *child)
removes the given child window from the list
void unlock()
release mutex lock
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.
FXMDIChild * getViewByID(const std::string &id) const
A storage for options typed value containers)
FXMDIClient * myMDIClient
The multi view panel.
A Simulation step was performed.