171 FXIMPLEMENT(
GNEApplicationWindow, FXMainWindow, GNEApplicationWindowMap, ARRAYNUMBER(GNEApplicationWindowMap))
177 #pragma warning(push) 178 #pragma warning(disable: 4355) 184 myRecentNets(a,
"nets"),
185 myConfigPattern(configPattern),
186 hadDependentBuild(false),
204 WRITE_ERROR(
"DEBUG: GNEApplicationWindow::dependentBuild called twice");
225 myGeoCoordinate =
new FXLabel(
myGeoFrame,
"N/A\t\tOriginal coordinate (before coordinate transformation in NETCONVERT)", 0, LAYOUT_CENTER_Y);
256 getAccelTable()->addAccel(parseAccel(
"m"),
this, FXSEL(SEL_COMMAND,
MID_GNE_MODE_MOVE));
261 getAccelTable()->addAccel(parseAccel(
"t"),
this, FXSEL(SEL_COMMAND,
MID_GNE_MODE_TLS));
264 getAccelTable()->addAccel(parseAccel(
"Esc"),
this, FXSEL(SEL_COMMAND,
MID_GNE_ABORT));
265 getAccelTable()->addAccel(parseAccel(
"Del"),
this, FXSEL(SEL_COMMAND,
MID_GNE_HOTKEY_DEL));
268 getAccelTable()->addAccel(parseAccel(
"v"),
this, FXSEL(SEL_COMMAND,
MID_EDITVIEWPORT));
274 gCurrentFolder = getApp()->reg().readStringEntry(
"SETTINGS",
"basedir",
"");
275 FXMainWindow::create();
283 FXint width = getApp()->getNormalFont()->getTextWidth(
"8", 1) * 22;
287 show(PLACEMENT_DEFAULT);
289 if (getApp()->reg().readIntEntry(
"SETTINGS",
"maximized", 0) == 1) {
327 FXMainWindow::detach();
338 "&New Network...\tCtrl+N\tCreate a new network.",
341 "&Open Network...\tCtrl+O\tOpen a SUMO network.",
344 "Open Configura&tion...\tCtrl+T\tOpen a NETCONVERT configuration file.",
347 "Import &Foreign Network...\t\tImport a foreign network such as OSM.",
350 "Load S&hapes...\tCtrl+P\tLoad shapes into the network view.",
353 "Load A&dditionals...\tCtrl+D\tLoad additional elements.",
356 "&Reload\tCtrl+R\tReloads the network.",
359 "&Save Network...\tCtrl+S\tSave the network.",
362 "Save Net&work As...\tCtrl+Shift+S\tSave the network in another file.",
365 "Save plain XM&L...\tCtrl+L\tSave plain xml representation the network.",
368 "Save &joined junctions...\tCtrl+J\tSave log of joined junctions (allows reproduction of joins).",
371 "Save POIs As ...\tCtrl+Shift+P\tSave the POIs.",
374 "Save additionals\tCtrl+Shift+D\tSave additional elements.",
377 "Save additionals As...\t\tSave additional elements in another file.",
381 "Close\tCtrl+W\tClose the net&work.",
384 FXMenuSeparator* sep1 =
new FXMenuSeparator(
myFileMenu);
386 sep1->setSelector(FXRecentFiles::ID_ANYFILES);
400 FXMenuSeparator* sep2 =
new FXMenuSeparator(
myFileMenu);
402 sep2->setSelector(FXRecentFiles::ID_ANYFILES);
418 "&Quit\tCtrl+Q\tQuit the Application.",
427 "&Undo\tCtrl+Z\tUndo the last change.",
430 "&Redo\tCtrl+Y\tRedo the last change.",
437 "&Edge mode\tE\tCreate junction and edges.",
440 "&Move mode\tM\tMove elements.",
443 "&Delete mode\tD\tDelete elements.",
446 "&Inspect mode\tI\tInspect elements and change their attributes.",
449 "&Select mode\tS\tSelect elements.",
452 "&Connection mode\tC\tEdit connections between lanes.",
455 "&Traffic light mode\tT\tEdit traffic lights over junctions.",
458 "&Additional mode\tA\tCreate additional elements.",
461 "C&rossing mode\tR\tCreate crossings between edges.",
475 "Compute Junctions\tF5\tComputes junction shape and logic.",
478 "Clean Junctions\tF6\tRemoves solitary junctions.",
481 "Join Selected Junctions\tF7\tJoins selected junctions into a single junction.",
484 "Options\tF10\t\tConfigure Processing Options.",
498 "Locate &Junctions\tShift+J\tOpen a Dialog for Locating a Junction.",
501 "Locate &Edges\tShift+E\tOpen a Dialog for Locating an Edge.",
504 "Locate &TLS\tShift+T\tOpen a Dialog for Locating a Traffic Light.",
511 "&Show Status Line\t\tToggle this Status Bar on/off.",
514 "Show &Message Window\t\tToggle the Message Window on/off.",
540 "&Clear Message Window\t\tClear the message window.",
549 "&Online Documentation\tF1\tOpen Online documentation.",
552 "&About\tF2\tAbout netedit.",
560 getApp()->reg().writeIntEntry(
"SETTINGS",
"x", getX());
561 getApp()->reg().writeIntEntry(
"SETTINGS",
"y", getY());
562 getApp()->reg().writeIntEntry(
"SETTINGS",
"width", getWidth());
563 getApp()->reg().writeIntEntry(
"SETTINGS",
"height", getHeight());
564 getApp()->reg().writeStringEntry(
"SETTINGS",
"basedir",
gCurrentFolder.text());
566 getApp()->reg().writeIntEntry(
"SETTINGS",
"maximized", 1);
568 getApp()->reg().writeIntEntry(
"SETTINGS",
"maximized", 0);
603 FXFileDialog opendialog(
this,
"Open Netconvert Configuration");
605 opendialog.setSelectMode(SELECTFILE_EXISTING);
610 if (opendialog.execute()) {
612 std::string file = opendialog.getFilename().text();
623 FXFileDialog opendialog(
this,
"Open Network");
625 opendialog.setSelectMode(SELECTFILE_EXISTING);
626 opendialog.setPatternList(
"SUMO nets (*.net.xml)\nAll files (*)");
630 if (opendialog.execute()) {
632 std::string file = opendialog.getFilename().text();
647 FXFileDialog opendialog(
this,
"Import Foreign Network");
649 opendialog.setSelectMode(SELECTFILE_EXISTING);
650 FXString osmPattern(
"OSM net (*.osm.xml,*.osm)");
651 opendialog.setPatternText(0, osmPattern);
655 if (opendialog.execute()) {
657 std::string file = opendialog.getFilename().text();
661 if (osmPattern.contains(opendialog.getPattern())) {
662 oc.
set(
"osm-files", file);
663 oc.
set(
"ramps.guess",
"true");
664 oc.
set(
"tls.guess",
"true");
666 throw ProcessError(
"Attempted to import unknown file format '" + file +
"'.");
670 new GNEDialog_Wizard(
this,
"Select Import Options", getWidth(), getHeight());
672 if (wizard->execute()) {
684 FXFileDialog opendialog(
this,
"Open Shapes");
686 opendialog.setSelectMode(SELECTFILE_EXISTING);
687 opendialog.setPatternList(
"Additional files (*.xml)\nAll files (*)");
691 if (opendialog.execute()) {
693 std::string file = opendialog.getFilename().text();
707 FXFileDialog opendialog(
this,
"Open Additional");
709 opendialog.setSelectMode(SELECTFILE_EXISTING);
710 opendialog.setPatternList(
"Additional files (*.xml)\nAll files (*)");
714 if (opendialog.execute()) {
716 std::string file = opendialog.getFilename().text();
728 additionalHandler.resetLastTag();
741 myStatusbar->getStatusLine()->setText(
"Already loading!");
744 std::string file((
const char*)data);
780 sender->handle(
this,
myAmLoading ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE), 0);
796 about->show(PLACEMENT_OWNER);
802 FXEvent*
event = (FXEvent*)ptr;
804 setDNDData(FROM_CLIPBOARD, event->target,
string);
845 if (ec->
myNet == 0) {
857 std::string settingsName = settings.
addSettings(view);
868 off.
set(getApp()->reg().readRealEntry(
"viewport",
"x"), getApp()->reg().readRealEntry(
"viewport",
"y"), getApp()->reg().readRealEntry(
"viewport",
"z"));
872 getApp()->endWaitCursor();
884 additionalHandler.resetLastTag();
908 getApp()->beginWaitCursor();
927 FXuint opts = MDI_TRACKING;
931 viewParent->maximize();
1007 return getApp()->getDefaultCursor(DEF_ARROW_CURSOR);
1020 myStatusbar->getStatusLine()->setText(statusBarText.c_str());
1021 myStatusbar->getStatusLine()->setNormalText(statusBarText.c_str());
1120 if (wizard->execute()) {
1130 "Save Network as",
".net.xml",
1138 oc.
set(
"output-file", file.text());
1148 "Select name of the plain-xml edge-file (other names will be deduced from this)",
"",
1155 bool wasSet = oc.
isSet(
"plain-output-prefix");
1156 std::string oldPrefix = oc.
getString(
"plain-output-prefix");
1158 std::string prefix = file.text();
1160 if (prefix.at(prefix.size() - 1) ==
'.') {
1161 prefix = prefix.substr(0, prefix.size() - 1);
1163 oc.
set(
"plain-output-prefix", prefix);
1164 getApp()->beginWaitCursor();
1175 FXMessageBox::error(
this, MBOX_OK,
"Saving plain xml failed!",
"%s", e.what());
1178 WRITE_WARNING(
"Closed FXMessageBox of type 'error' with 'OK'");
1185 oc.
set(
"plain-output-prefix", oldPrefix);
1187 oc.
unSet(
"plain-output-prefix");
1189 getApp()->endWaitCursor();
1197 "Select name of the joined-junctions file",
".nod.xml",
1204 bool wasSet = oc.
isSet(
"junctions.join-output");
1205 std::string oldFile = oc.
getString(
"junctions.join-output");
1207 std::string filename = file.text();
1208 oc.
set(
"junctions.join-output", filename);
1209 getApp()->beginWaitCursor();
1218 FXMessageBox::error(
this, MBOX_OK,
"Saving joined junctions failed!",
"%s", e.what());
1221 WRITE_WARNING(
"Closed FXMessageBox of type 'error' with 'OK'");
1228 oc.
set(
"junctions.join-output", oldFile);
1230 oc.
unSet(
"junctions.join-output");
1232 getApp()->endWaitCursor();
1240 "Select name of the POI file",
".xml",
1246 std::string filename = file.text();
1248 getApp()->beginWaitCursor();
1257 FXMessageBox::error(
this, MBOX_OK,
"Saving POIs failed!",
"%s", e.what());
1260 WRITE_WARNING(
"Closed FXMessageBox of type 'error' with 'OK'");
1264 getApp()->endWaitCursor();
1271 sender->handle(
this,
myNet == 0 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE), 0);
1278 sender->handle(
this,
myNet == 0 || !
OptionsCont::getOptions().isSet(
"sumo-net-file") ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE), 0);
1287 if (oc.
getString(
"output-file") ==
"") {
1290 getApp()->beginWaitCursor();
1301 FXMessageBox::error(
this, MBOX_OK,
"Saving Network failed!",
"%s", e.what());
1304 WRITE_WARNING(
"Closed FXMessageBox of type 'error' with 'OK'");
1309 getApp()->endWaitCursor();
1320 "Select name of the additional file",
".xml",
1331 getApp()->beginWaitCursor();
1341 FXMessageBox::error(
this, MBOX_OK,
"Saving additionals failed!",
"%s", e.what());
1344 WRITE_WARNING(
"Closed FXMessageBox of type 'error' with 'OK'");
1348 getApp()->endWaitCursor();
1357 "Select name of the additional file",
".xml",
1374 bool enable =
myNet != 0 && oc.
isSet(
"output-file");
1375 sender->handle(
this, FXSEL(SEL_COMMAND, enable ? ID_ENABLE : ID_DISABLE), 0);
1377 FXString caption = (
"Save " + oc.
getString(
"output-file")).c_str();
1378 sender->handle(
this, FXSEL(SEL_COMMAND, FXMenuCaption::ID_SETSTRINGVALUE), (
void*)&caption);
1403 answer = FXMessageBox::question(
this, MBOX_QUIT_SAVE_CANCEL,
1404 "Confirm closing Network",
"%s",
1405 "You have unsaved changes in the network. Do you wish to quit and discard all changes?");
1406 if (answer == MBOX_CLICKED_QUIT) {
1409 WRITE_WARNING(
"Closed FXMessageBox of type 'question' with 'Quit'");
1412 }
else if (answer == MBOX_CLICKED_SAVE) {
1422 WRITE_WARNING(
"Closed FXMessageBox of type 'question' with 'No'");
1424 WRITE_WARNING(
"Closed FXMessageBox of type 'question' with 'ESC'");
1442 FXuint answer = FXMessageBox::question(
this, MBOX_QUIT_SAVE_CANCEL,
1443 "Save additionals before exit",
"%s",
1444 "You have unsaved additionals. Do you wish to quit and discard all changes?");
1446 if (answer == MBOX_CLICKED_QUIT) {
1448 WRITE_WARNING(
"Closed FXMessageBox of type 'question' with 'Quit'");
1451 }
else if (answer == MBOX_CLICKED_SAVE) {
1454 WRITE_WARNING(
"Closed FXMessageBox of type 'question' with 'Yes'");
1462 WRITE_WARNING(
"Closed FXMessageBox of type 'question' with 'No'");
1464 WRITE_WARNING(
"Closed FXMessageBox of type 'question' with 'ESC'");
1485 std::string edgeID = laneID;
1487 const std::string::size_type underscore = laneID.rfind(
'_');
1489 if (underscore != std::string::npos) {
1490 edgeID = laneID.substr(0, underscore);
1491 if (laneID.substr(underscore).empty()) {
1494 lane = GNEAttributeCarrier::parse<int>(laneID.substr(underscore).c_str());
1498 if (edge == 0 || edge->getNumLanes() <= lane) {
1499 WRITE_ERROR(
"Lane '" + laneID +
"' to place poi '" + poiID +
"' on is not known.");
1503 lanePos = edge->getLength() + lanePos;
1505 return edge->getLanes()[lane].shape.positionAtOffset(lanePos);
1520 const long handled = FXMainWindow::onKeyPress(o, sel, data);
1521 if (handled == 0 &&
myMDIClient->numChildren() > 0) {
1533 const long handled = FXMainWindow::onKeyRelease(o, sel, data);
1534 if (handled == 0 &&
myMDIClient->numChildren() > 0) {
std::vector< FXMainWindow * > myTrackerWindows
const std::vector< GUISUMOAbstractView::Decal > & getDecals() const
Returns the parsed decals.
std::string myConfigPattern
Input file pattern.
FXLabel * myGeoCoordinate
ShapeContainer & getShapeContainer()
get shape container
FXMenuBar * myMenuBar
The application menu bar.
GUISUMOAbstractView * getView() const
bool myAmLoading
information whether the gui is currently loading and the load-options shall be greyed out ...
SUMOTime getCurrentSimTime() const
get current simulation time (pure virtual but we don't need it)
GUICompleteSchemeStorage gSchemeStorage
long onKeyPress(FXObject *o, FXSelector sel, void *data)
Called when user press a key.
static std::string clipped
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
long onCmdNewNetwork(FXObject *, FXSelector, void *)
FXEX::FXThreadEvent myLoadThreadEvent
io-event with the load-thread
void setAdditionalsFile(const std::string &additionalsFile)
set additionals file
void abortOperation(bool clearSelection=true)
abort current edition operation
Open viewport editor - button.
void setStatusBarText(const std::string &statusBarText)
set text of the statusBar
void appendMsg(GUIEventType eType, const std::string &msg)
Adds new text to the window.
MFXEventQue< GUIEvent * > myEvents
List of got requests.
void resetWritable()
Resets all options to be writeable.
GNEUndoList * getUndoList()
get pointer to undoList
long onCmdReload(FXObject *, FXSelector, void *)
called when the command/FXCall reload is executed
void create()
Creates the widget.
void closeAllWindows()
this method closes all windows and deletes the current simulation */
virtual FXGLCanvas * getBuildGLCanvas() const
virtual void setViewportFromTo(const Position &lookFrom, const Position &lookAt)
applies the given viewport settings
void joinSelectedJunctions(GNEUndoList *undoList)
send when a message occured
FXRecentFiles myRecentConfigs
List of recent config files.
long onCmdSaveAdditionals(FXObject *, FXSelector, void *)
called when the command/FXCall save additionals is executed
GUIMessageWindow * myMessageWindow
A window to display messages, warnings and error in.
focus upper element of current frame
The main window of the Netedit.
#define GUIDesignSplitterMDI
MDI Splitter.
void hotkeyFocusFrame()
handle focus frame keypress
abort current edit operation
long onCmdClearMsgWindow(FXObject *, FXSelector, void *)
called when the command/FXCall clear message windows is executed
void loadConfigOrNet(const std::string &file, bool isNet, bool useStartupOptions, bool newNet=false)
begins the loading of a netconvert configuration or a a network
virtual void create()
Creates the main window (required by FOX)
long onCmdJoinJunctions(FXObject *, FXSelector, void *)
called if the user selects Processing->join junctions
bool hadDependentBuild
check if had dependent build
The representation of a single edge during network building.
static void initIcons(FXApp *a)
Initiate GUIIconSubSys.
GNEUndoList * myUndoList
the one and only undo list
long onCmdComputeJunctions(FXObject *, FXSelector, void *)
called if the user selects Processing->compute junctions
static void resetTextures()
Reset textures.
void registerMsgHandlers()
register and unregister message handlers
void computeEverything(GNEApplicationWindow *window, bool force=false)
long onCmdSetMode(FXObject *sender, FXSelector sel, void *ptr)
called if the user hits an edit-mode hotkey
void handleEvent_NetworkLoaded(GUIEvent *e)
handle event of type Network loaded
#define GUIDesignStatusBar
design used in status bar
GNENet * myNet
pointer of the net
bool continueWithUnsavedAdditionalChanges()
void loadConfigOrNet(const std::string file, bool isNet, bool isReload=false, bool useStartupOptions=false, bool newNet=false)
starts to load a netimport configuration or a network */
void setWindowSizeAndPos()
perform initial window positioning and sizing according to user options / previous call ...
#define GUIDesignToolBarGrip
design for toolbar grip (used to change the position of toolbar with mouse)
long onCmdLocate(FXObject *, FXSelector, void *)
locator-callback
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
called when a key is released
#define GUIDesignSplitter
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
Called when user releases a key.
Editor for the list of chosen objects.
bool continueWithUnsavedChanges()
warns about unsaved changes and gives the user the option to abort
FXGLVisual * myGLVisual
The gl-visual used.
long onCmdOpenForeign(FXObject *, FXSelector, void *)
called when the command/FXCall open foreign is executed
A NBNetBuilder extended by visualisation and editing capabilities.
long onCmdSaveNetwork(FXObject *, FXSelector, void *)
called when the command/FXCall save network is executed
mode for selecting objects
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
long onCmdAbout(FXObject *, FXSelector, void *)
called when the command/FXCall show about dialog is executed
void setEditModeFromHotkey(FXushort selid)
sets edit mode (from hotkey)
FXString gCurrentFolder
The folder used as last.
int getNumberOfAdditionals(SumoXMLTag type=SUMO_TAG_NOTHING) const
Returns the number of additionals of the net.
Storage for geometrical objects.
long onUpdNeedsNetwork(FXObject *, FXSelector, void *)
called when the upadte/FXCall needs network is executed
void saveViewport(const double x, const double y, const double z)
Makes the given viewport the default.
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
virtual void eventOccured()
std::string myFile
the name of the loaded file
long onLoadThreadEvent(FXObject *, FXSelector, void *)
called when the command/FXCall load thread is executed
static void resetLoaded()
resets loaded location elements
FXMDIMenu * myMDIMenu
The menu used for the MDI-windows.
void unregisterMsgHandlers()
void set(double x, double y)
set positions x and y
static bool runParser(GenericSAXHandler &handler, const std::string &file, const bool isNet=false)
Runs the given handler on the given file; returns if everything's ok.
void updateControls()
update control contents after undo/redo or recompute
static FXString getFilename2Write(FXWindow *parent, const FXString &header, const FXString &extension, FXIcon *icon, FXString ¤tFolder)
Returns the file name to write.
long onCmdEditChosen(FXObject *, FXSelector, void *)
called when the command/FXCall edit chosen is executed
void updateControls()
update control contents after undo/redo or recompute
Builds trigger objects for GNENet (busStops, chargingStations, detectors, etc..)
void addDecals(const std::vector< Decal > &decals)
add decals
GUISUMOAbstractView * openNewView()
opens a new simulation display
GNENet * myNet
the loaded net
long onUpdReload(FXObject *, FXSelector, void *)
called when the update/FXCall reload is executed
#define WRITE_WARNING(msg)
A single child window which contains a view of the simulation area.
Position getLanePos(const std::string &poiID, const std::string &laneID, double lanePos)
get lane position
static OptionsCont & getOptions()
Retrieves the options.
long onCmdHelp(FXObject *sender, FXSelector sel, void *ptr)
called if the user selects help->Documentation
bool isTestingModeEnabled() const
check if netedit is running in testing mode
The application's "About" - dialog.
void addSeparator()
Adds a a separator to this log window.
void p_clear()
clears the undo list (implies abort)
long onClipboardRequest(FXObject *sender, FXSelector sel, void *ptr)
called when the command/FXCall clipboard request is executed
The XML-Handler for network loading.
static void setDefaultOptions(OptionsCont &oc)
sets required options for proper functioning
FXHorizontalFrame * myCartesianFrame
FXDEFMAP(GNEApplicationWindow) GNEApplicationWindowMap[]
FXMenuPane * myProcessingMenu
long onCmdSaveAdditionalsAs(FXObject *, FXSelector, void *)
called when the command/FXCall save additionals as is executed
const std::string & getMsg() const
Returns the message.
Load additional file with poi and polygons.
static FXint fxexecute(FXString link)
long onCmdEditViewport(FXObject *, FXSelector, void *)
called if the user press key v to open zoom editor
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
mode for inspecting object attributes
std::vector< FXMDIChild * > mySubWindows
long onCmdOptions(FXObject *, FXSelector, void *)
called if the user selects Processing->Configure Options
FXMenuPane * myWindowsMenu
static void close()
close GUITextureSubSys
GNEApplicationWindow()
FOX needs this for static members.
FXSplitter * myMainSplitter
The splitter that divides the main window into view and the log window.
Reload the previously loaded simulation.
Loads a file previously loaded.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
long onCmdOpenRecent(FXObject *, FXSelector, void *)
called when the command/FXCall open recent is executed
long onCmdOpenNetwork(FXObject *, FXSelector, void *)
called when the command/FXCall open network is executed
FXGLCanvas * getBuildGLCanvas() const
get build OpenGL Canvas
int myViewNumber
The current view number.
A point in 2D or 3D with translation and scaling methods.
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously.
virtual void fillMenuBar()
Builds the menu bar.
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
static void saveToFile(const std::string &file)
save POIs to file
bool isAdditionalsSaved() const
check if additional are saved
long onCmdSaveAsPlainXML(FXObject *, FXSelector, void *)
called when the command/FXCall save as plain xml is executed
void save(OptionsCont &oc)
save the network
long onCmdOpenConfiguration(FXObject *, FXSelector, void *)
called when the command/FXCall open configuration is executed
std::string mySettingsFile
the name of the settings file to load
long onCmdOpenAdditionals(FXObject *, FXSelector, void *)
called when the command/FXCall open additionals is executed
send when a error occured
mode for editing crossing
static bool checkOptions()
Checks set options from the OptionsCont-singleton for being valid.
long onCmdLocate(FXObject *, FXSelector, void *)
called when the command/FXCall locate is executed
void setTarget(FXObject *tgt)
set the target
FXCursor * getDefaultCursor()
get default cursor
void setSnapshots(GUISUMOAbstractView *view) const
Makes a snapshot if it has been parsed.
long onCmdCleanJunctions(FXObject *, FXSelector, void *)
called if the user selects Processing->clean junctions
std::string addSettings(GUISUMOAbstractView *view=0) const
Adds the parsed settings to the global list of settings.
mode for editing additional
The XML-Handler for shapes loading network loading.
virtual ~GNEApplicationWindow()
Destructor.
long onUpdOpen(FXObject *, FXSelector, void *)
called when the command/FXCall on update open executed
GNELoadThread * myLoadThread
the thread that loads the network
FXStatusBar * myStatusbar
The status bar.
long onCmdOpenShapes(FXObject *, FXSelector, void *)
called when the command/FXCall open shapes is executed
void unlock()
release mutex lock
long onCmdEnter(FXObject *sender, FXSelector sel, void *ptr)
called if the user hits enter
virtual void showViewportEditor()
show viewport editor
bool myViewportFromRegistry
whether loading viewport from registry
long onCmdFocusFrame(FXObject *sender, FXSelector sel, void *ptr)
called if the user hits f
long onCmdQuit(FXObject *, FXSelector, void *)
Called by FOX if the application shall be closed.
bool set(const std::string &name, const std::string &value)
Sets the given value for the named option.
virtual void detach()
detaches the tool/menu bar
FXLabel * myCartesianCoordinate
Labels for the current cartesian and geo-coordinate.
void setViewport(GUISUMOAbstractView *view)
Sets the default viewport.
MFXMutex myTrackerLock
A lock to make the removal and addition of trackers secure.
void setSelector(FXSelector sel)
set the selector
void unSet(const std::string &name, bool failOnNonExistant=true) const
Marks the option as unset.
long onCmdDel(FXObject *sender, FXSelector sel, void *ptr)
called if the user hits del
void applyViewport(GUISUMOAbstractView *view) const
Sets the viewport which has been parsed.
FXRecentFiles myRecentNets
List of recent nets.
void loadOptionOnStartup()
load net on startup
void removeSolitaryJunctions(GNEUndoList *undoList)
removes junctions that have no edges
static void close()
close GUIIconSubSys
FXToolBarShell * myMenuBarDrag
FXHorizontalFrame * myGeoFrame
A storage for options typed value containers)
Load additional file with additional elements.
long onCmdClose(FXObject *, FXSelector, void *)
called when the command/FXCall close is executed
void clear()
Clears the list of selected objects.
std::string myAdditionalsFile
filename for load/save additionals
FXMDIClient * myMDIClient
The multi view panel.
send when a simulation has been loaded
void handleEvent_Message(GUIEvent *e)
hanlde event of type message
void saveJoined(OptionsCont &oc)
save log of joined junctions (and nothing else)
send when a warning occured
#define GUIDesignHorizontalFrameStatusBar
Horizontal frame used in status bar.
mode for connecting lanes
long onCmdAbort(FXObject *sender, FXSelector sel, void *ptr)
called if the user hits esc
long onCmdSaveJoined(FXObject *, FXSelector, void *)
called when the command/FXCall save joined is executed
An XML-handler for visualisation schemes.
const FXString myTitlePrefix
the prefix for the window title
GUIEventType getOwnType() const
returns the event type
static FXString getTitleText(const FXString &appname, FXString filename="")
Returns the title text in dependance to an optional file name.
GNEShapeHandler(const std::string &file, GNENet *net, ShapeContainer &sc)
Constructor.
Locate junction - button.
GNENet * myNet
we are responsible for the net
#define GUIDesignToolBarShell3
void dependentBuild()
build dependent
void clear()
Clears the window.
NBEdge * getNBEdge()
returns the internal NBEdge
virtual ~GNEShapeHandler()
Destructor.
void hotkeyDel()
handle del keypress
#define WRITE_MESSAGE(msg)
static void initTextures(FXApp *a)
Initiate GUITextureSubSys for textures.
GUISelectedStorage gSelected
A global holder of selected objects.
void hotkeyEnter()
handle enter keypress
long onCmdSaveAsNetwork(FXObject *, FXSelector, void *)
called when the command/FXCall save network as is executed
GNEViewNet * getView()
convenience method
A logging window for the gui.
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
void saveAdditionals(const std::string &filename)
save additional elements of the network
void savePlain(OptionsCont &oc)
save plain xml representation of the network (and nothing else)
static void fillOptions(OptionsCont &oc)
clears and initializes the OptionsCont
FXMenuPane * myFileMenu
the submenus
long onKeyPress(FXObject *o, FXSelector sel, void *data)
called when a key is pressed
long onUpdSaveNetwork(FXObject *, FXSelector, void *)
called when the update/FXCall save network is executed
FXMenuPane * myLocatorMenu
long onCmdSavePois(FXObject *, FXSelector, void *)
called when the command/FXCall save pois is executed
static const Position INVALID
used to indicate that a position is valid
GNEViewNet * getViewNet() const
get view net