65 FXMainWindow(a,
"SUMO-gui main window", NULL, NULL, DECOR_ALL, 20, 20, 600, 400),
66 myGLVisual(new FXGLVisual(a, VISUAL_DOUBLEBUFFER)),
68 myListInternal(false),
70 myListTeleporting(false) {
73 getApp()->getNormalFont()->getFontDesc(fdesc);
74 fdesc.weight = FXFont::Bold;
77 myTopDock =
new FXDockSite(
this, LAYOUT_SIDE_TOP | LAYOUT_FILL_X);
78 myBottomDock =
new FXDockSite(
this, LAYOUT_SIDE_BOTTOM | LAYOUT_FILL_X);
79 myLeftDock =
new FXDockSite(
this, LAYOUT_SIDE_LEFT | LAYOUT_FILL_Y);
80 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((*i)->getTitle().text());
144 if (std::string((*i)->getTitle().text()) ==
id) {
194 throw ProcessError(
"A GUIMainWindow instance was not yet constructed.");
209 int windowWidth = getApp()->reg().readIntEntry(
"SETTINGS",
"width", 600);
210 int windowHeight = getApp()->reg().readIntEntry(
"SETTINGS",
"height", 400);
212 if (oc.
isSet(
"window-size")) {
213 std::vector<std::string> windowSize = oc.
getStringVector(
"window-size");
214 if (windowSize.size() != 2
217 WRITE_ERROR(
"option window-size requires INT,INT");
223 if (oc.
isSet(
"window-size") || getApp()->reg().readIntEntry(
"SETTINGS",
"maximized", 0) == 0 || oc.
isSet(
"window-pos")) {
225 int x =
MAX2(0,
MIN2(getApp()->reg().readIntEntry(
"SETTINGS",
"x", 150), getApp()->getRootWindow()->getWidth() - windowWidth));
226 int y =
MAX2(0,
MIN2(getApp()->reg().readIntEntry(
"SETTINGS",
"y", 150), getApp()->getRootWindow()->getHeight() - windowHeight));
227 if (oc.
isSet(
"window-pos")) {
229 if (windowPos.size() != 2
241 setWidth(windowWidth);
242 setHeight(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.