![]() |
SUMO - Simulation of Urban MObility
|
A single child window which contains a view of the simulation area. More...
#include <GNEViewParent.h>
Public Member Functions | |
virtual void | buildColoringToolBar () |
virtual void | buildNavigationToolBar () |
virtual void | buildScreenshotToolBar () |
virtual void | create () |
GNEAdditionalFrame * | getAdditionalFrame () const |
get frame for GNE_MODE_ADDITIONAL More... | |
virtual FXGLCanvas * | getBuildGLCanvas () const |
FXComboBox & | getColoringSchemesCombo () |
GNEConnectorFrame * | getConnectorFrame () const |
get frame for GNE_MODE_CONNECT More... | |
int | getFramesAreaWidth () |
get width of the Frames Area More... | |
GNEInspectorFrame * | getInspectorFrame () const |
get frame for GNE_MODE_INSPECT More... | |
FXPopup * | getLocatorPopup () |
FXToolBar & | getNavigationToolBar (GUISUMOAbstractView &v) |
GUIMainWindow * | getParent () |
Returns the main window. More... | |
GNESelectorFrame * | getSelectorFrame () const |
get frame for GNE_MODE_SELECT More... | |
GNETLSEditorFrame * | getTLSEditorFrame () const |
get frame for GNE_MODE_TLS More... | |
GUISUMOAbstractView * | getView () const |
GNEViewParent (FXMDIClient *p, FXMDIMenu *mdimenu, const FXString &name, GNEApplicationWindow *parentWindow, FXGLCanvas *share, GNENet *net, GNEUndoList *undoList, FXIcon *ic=NULL, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0) | |
FOX-declaration. More... | |
void | hideFramesArea () |
hide frames area if all GNEFrames are hidden More... | |
bool | isSelected (GUIGlObject *o) const |
true if the object is selected (may include extra logic besides calling gSelected) More... | |
long | onCmdChangeColorScheme (FXObject *, FXSelector sel, void *) |
long | onCmdEditViewport (FXObject *, FXSelector, void *) |
long | onCmdEditViewScheme (FXObject *, FXSelector, void *) |
long | onCmdRecenterView (FXObject *, FXSelector, void *) |
long | onCmdShowToolTips (FXObject *sender, FXSelector, void *) |
long | onCmdZoomStyle (FXObject *sender, FXSelector, void *) |
void | setView (GUIGlID id) |
Centers the view onto the given artifact. More... | |
void | showFramesArea () |
show frames area if at least a GNEFrame is showed More... | |
~GNEViewParent () | |
Destructor. More... | |
FOX-callbacks | |
Called if the user wants to make a snapshot (screenshot) | |
long | onCmdMakeSnapshot (FXObject *sender, FXSelector, void *) |
long | onCmdClose (FXObject *, FXSelector, void *) |
Called when the user hits the close button (x) More... | |
long | onCmdLocate (FXObject *, FXSelector, void *) |
locator-callback More... | |
long | onKeyPress (FXObject *o, FXSelector sel, void *data) |
Called when user press a key. More... | |
long | onKeyRelease (FXObject *o, FXSelector sel, void *data) |
Called when user releases a key. More... | |
Protected Member Functions | |
GNEViewParent () | |
FOX needs this. More... | |
Protected Attributes | |
FXComboBox * | myColoringSchemes |
FXVerticalFrame * | myContentFrame |
FXMenuButton * | myLocatorButton |
FXPopup * | myLocatorPopup |
The locator menu. More... | |
FXToolBar * | myNavigationToolBar |
The tool bar. More... | |
GUIMainWindow * | myParent |
The parent window. More... | |
GUISUMOAbstractView * | myView |
the view More... | |
Private Attributes | |
GNEAdditionalFrame * | myAdditionalFrame |
the panel for GNE_MODE_ADDITIONAL More... | |
GNEConnectorFrame * | myConnectorFrame |
the panel for GNE_MODE_CONNECT More... | |
FXHorizontalFrame * | myFramesArea |
frame to hold GNEFrames More... | |
FXSplitter * | myFramesSplitter |
Splitter to divide ViewNet und GNEFrames. More... | |
GNEInspectorFrame * | myInspectorFrame |
the panel for GNE_MODE_INSPECT More... | |
GNESelectorFrame * | mySelectorFrame |
the panel for GNE_MODE_SELECT More... | |
GNETLSEditorFrame * | myTLSEditorFrame |
the panel for GNE_MODE_TLS More... | |
FXHorizontalFrame * | myViewArea |
frame to hold myView and myAttributePanel More... | |
A single child window which contains a view of the simulation area.
It is made of a tool-bar containing a field to change the type of display, buttons that allow to choose an artifact and some other view controlling options.
The rest of the window is a canvas that contains the display itself
Definition at line 69 of file GNEViewParent.h.
GNEViewParent::GNEViewParent | ( | FXMDIClient * | p, |
FXMDIMenu * | mdimenu, | ||
const FXString & | name, | ||
GNEApplicationWindow * | parentWindow, | ||
FXGLCanvas * | share, | ||
GNENet * | net, | ||
GNEUndoList * | undoList, | ||
FXIcon * | ic = NULL , |
||
FXuint | opts = 0 , |
||
FXint | x = 0 , |
||
FXint | y = 0 , |
||
FXint | w = 0 , |
||
FXint | h = 0 |
||
) |
FOX-declaration.
Constructor also builds the view and calls create()
[in] | p | The MDI-pane this window is shown within |
[in] | mdimenu | The MDI-menu for alignment |
[in] | name | The name of the window |
[in] | parentWindow | The main window |
[in] | ic | The icon of this window |
[in] | opts | Window options |
[in] | x | Initial x-position |
[in] | y | Initial x-position |
[in] | w | Initial width |
[in] | h | Initial height |
[in] | share | A canvas tor get the shared context from |
[in] | net | The network to show |
Definition at line 87 of file GNEViewParent.cpp.
References GNEViewNet::buildViewToolBars(), GUIGlChildWindow::create(), GUIIconSubSys::getIcon(), ICON_REDO, and ICON_UNDO.
GNEViewParent::~GNEViewParent | ( | ) |
Destructor.
Definition at line 153 of file GNEViewParent.cpp.
References GUIGlChildWindow::myParent, and GUIMainWindow::removeChild().
|
inlineprotected |
FOX needs this.
Definition at line 147 of file GNEViewParent.h.
|
virtualinherited |
Definition at line 137 of file GUIGlChildWindow.cpp.
References GUIIconSubSys::getIcon(), ICON_COLORWHEEL, MID_COLOURSCHEMECHANGE, MID_EDITVIEWSCHEME, GUIGlChildWindow::myColoringSchemes, and GUIGlChildWindow::myNavigationToolBar.
Referenced by GUIGlChildWindow::getView().
|
virtualinherited |
Definition at line 100 of file GUIGlChildWindow.cpp.
References GUIIconSubSys::getIcon(), ICON_EDITVIEWPORT, ICON_LOCATE, ICON_RECENTERVIEW, ICON_SHOWTOOLTIPS, ICON_ZOOMSTYLE, MID_EDITVIEWPORT, MID_RECENTERVIEW, MID_SHOWTOOLTIPS, MID_ZOOM_STYLE, GUIGlChildWindow::myContentFrame, GUIGlChildWindow::myLocatorButton, GUIGlChildWindow::myLocatorPopup, GUIGlChildWindow::myNavigationToolBar, and MFXCheckableButton::setChecked().
Referenced by GUIGlChildWindow::getView().
|
virtualinherited |
Definition at line 157 of file GUIGlChildWindow.cpp.
References GUIIconSubSys::getIcon(), ICON_CAMERA, MID_MAKESNAPSHOT, and GUIGlChildWindow::myNavigationToolBar.
Referenced by GUIGlChildWindow::getView().
|
virtualinherited |
Definition at line 91 of file GUIGlChildWindow.cpp.
References GUIGlChildWindow::myLocatorPopup, GUIGlChildWindow::myNavigationToolBar, and GUIGlChildWindow::myView.
Referenced by GNEViewParent(), and GUIApplicationWindow::openNewView().
GNEAdditionalFrame * GNEViewParent::getAdditionalFrame | ( | ) | const |
get frame for GNE_MODE_ADDITIONAL
Definition at line 185 of file GNEViewParent.cpp.
References myAdditionalFrame.
Referenced by GNEViewNet::onLeftBtnPress(), and GNEViewNet::updateModeSpecificControls().
|
virtualinherited |
Definition at line 171 of file GUIGlChildWindow.cpp.
References GUIGlChildWindow::myView.
Referenced by GUIApplicationWindow::getBuildGLCanvas(), and GNEApplicationWindow::getBuildGLCanvas().
|
inherited |
Definition at line 189 of file GUIGlChildWindow.cpp.
References GUIGlChildWindow::myColoringSchemes.
Referenced by GUIViewTraffic::buildViewToolBars(), GUISUMOAbstractView::getColoringSchemesCombo(), and GUIGlChildWindow::getView().
GNEConnectorFrame * GNEViewParent::getConnectorFrame | ( | ) | const |
get frame for GNE_MODE_CONNECT
Definition at line 173 of file GNEViewParent.cpp.
References myConnectorFrame.
Referenced by GNEViewNet::abortOperation(), GNEViewNet::hotkeyEnter(), GNEViewNet::onLeftBtnPress(), and GNEViewNet::updateModeSpecificControls().
int GNEViewParent::getFramesAreaWidth | ( | ) |
get width of the Frames Area
Definition at line 217 of file GNEViewParent.cpp.
References myFramesArea.
GNEInspectorFrame * GNEViewParent::getInspectorFrame | ( | ) | const |
get frame for GNE_MODE_INSPECT
Definition at line 161 of file GNEViewParent.cpp.
References myInspectorFrame.
Referenced by GNEViewNet::onLeftBtnPress(), GNEViewNet::updateControls(), and GNEViewNet::updateModeSpecificControls().
|
inherited |
Definition at line 183 of file GUIGlChildWindow.cpp.
References GUIGlChildWindow::myLocatorPopup.
Referenced by GUIViewTraffic::buildViewToolBars(), GNEViewNet::buildViewToolBars(), and GUIGlChildWindow::getView().
|
inherited |
Definition at line 177 of file GUIGlChildWindow.cpp.
References GUIGlChildWindow::myNavigationToolBar.
Referenced by GUIGlChildWindow::getView().
|
inlineinherited |
Returns the main window.
Definition at line 90 of file GUIGlChildWindow.h.
References GUIGlChildWindow::isSelected(), and GUIGlChildWindow::myParent.
Referenced by GUIDialog_GLObjChooser::~GUIDialog_GLObjChooser().
GNESelectorFrame * GNEViewParent::getSelectorFrame | ( | ) | const |
get frame for GNE_MODE_SELECT
Definition at line 167 of file GNEViewParent.cpp.
References mySelectorFrame.
Referenced by GNEConnectorFrame::onCmdSelectConflicts(), GNEConnectorFrame::onCmdSelectDeadEnds(), GNEConnectorFrame::onCmdSelectDeadStarts(), GNEConnectorFrame::onCmdSelectPass(), GNEViewNet::onLeftBtnRelease(), and GNEViewNet::updateModeSpecificControls().
GNETLSEditorFrame * GNEViewParent::getTLSEditorFrame | ( | ) | const |
get frame for GNE_MODE_TLS
Definition at line 179 of file GNEViewParent.cpp.
References myTLSEditorFrame.
Referenced by GNEViewNet::abortOperation(), GNEViewNet::hotkeyEnter(), GNEViewNet::onLeftBtnPress(), and GNEViewNet::updateModeSpecificControls().
|
inlineinherited |
Definition at line 61 of file GUIGlChildWindow.h.
References GUIGlChildWindow::buildColoringToolBar(), GUIGlChildWindow::buildNavigationToolBar(), GUIGlChildWindow::buildScreenshotToolBar(), GUIGlChildWindow::getColoringSchemesCombo(), GUIGlChildWindow::getLocatorPopup(), GUIGlChildWindow::getNavigationToolBar(), GUIGlChildWindow::myView, GUIGlChildWindow::onCmdChangeColorScheme(), GUIGlChildWindow::onCmdEditViewport(), GUIGlChildWindow::onCmdEditViewScheme(), GUIGlChildWindow::onCmdRecenterView(), GUIGlChildWindow::onCmdShowToolTips(), GUIGlChildWindow::onCmdZoomStyle(), and GUIGlChildWindow::setView().
Referenced by GUIMainWindow::getActiveView(), TraCIServerAPI_GUI::getNamedView(), GUIApplicationWindow::onCmdEditChosen(), GUIApplicationWindow::onCmdShowStats(), GUIApplicationWindow::openNewView(), and GNEApplicationWindow::openNewView().
void GNEViewParent::hideFramesArea | ( | ) |
hide frames area if all GNEFrames are hidden
Definition at line 204 of file GNEViewParent.cpp.
References myAdditionalFrame, myConnectorFrame, myFramesArea, myInspectorFrame, mySelectorFrame, and myTLSEditorFrame.
Referenced by GNEConnectorFrame::hide(), GNETLSEditorFrame::hide(), GNESelectorFrame::hide(), GNEInspectorFrame::hide(), and GNEAdditionalFrame::hide().
|
virtual |
true if the object is selected (may include extra logic besides calling gSelected)
Reimplemented from GUIGlChildWindow.
Definition at line 299 of file GNEViewParent.cpp.
References GUIGlObject::getGlID(), GNEEdge::getLaneGlIDs(), GUIGlObject::getType(), GLO_EDGE, GLO_LANE, gSelected, and GUISelectedStorage::isSelected().
|
inherited |
Definition at line 240 of file GUIGlChildWindow.cpp.
References GUIGlChildWindow::myView, and GUISUMOAbstractView::setColorScheme().
Referenced by GUIGlChildWindow::getView().
long GNEViewParent::onCmdClose | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user hits the close button (x)
Definition at line 253 of file GNEViewParent.cpp.
References MID_CLOSE, and GUIGlChildWindow::myParent.
|
inherited |
Definition at line 203 of file GUIGlChildWindow.cpp.
References GUIGlChildWindow::myView, and GUISUMOAbstractView::showViewportEditor().
Referenced by GUIGlChildWindow::getView().
|
inherited |
Definition at line 210 of file GUIGlChildWindow.cpp.
References GUIGlChildWindow::myView, and GUISUMOAbstractView::showViewschemeEditor().
Referenced by GUIGlChildWindow::getView().
long GNEViewParent::onCmdLocate | ( | FXObject * | , |
FXSelector | sel, | ||
void * | |||
) |
locator-callback
Definition at line 260 of file GNEViewParent.cpp.
References GNENet::getGlIDs(), GUIIconSubSys::getIcon(), GNEViewNet::getNet(), GUIGlObjectStorage::gIDStorage, GLO_EDGE, GLO_JUNCTION, GLO_TLLOGIC, ICON_LOCATEEDGE, ICON_LOCATEJUNCTION, ICON_LOCATETLS, MID_LOCATEEDGE, MID_LOCATEJUNCTION, MID_LOCATETLS, GUIGlChildWindow::myLocatorButton, GUIGlChildWindow::myLocatorPopup, GUIGlChildWindow::myView, and GUIDialog_GLObjChooser::show().
Referenced by GNEApplicationWindow::onCmdLocate().
long GNEViewParent::onCmdMakeSnapshot | ( | FXObject * | sender, |
FXSelector | , | ||
void * | |||
) |
Definition at line 224 of file GNEViewParent.cpp.
References gCurrentFolder, GUIIconSubSys::getIcon(), ICON_EMPTY, GUISUMOAbstractView::makeSnapshot(), GUIGlChildWindow::myView, and MFXUtils::userPermitsOverwritingWhenFileExists().
|
inherited |
Definition at line 195 of file GUIGlChildWindow.cpp.
References GUIGlChildWindow::myView, and GUISUMOAbstractView::recenterView().
Referenced by GUIGlChildWindow::getView().
|
inherited |
Definition at line 217 of file GUIGlChildWindow.cpp.
References MFXCheckableButton::amChecked(), GUIGlChildWindow::myView, MFXCheckableButton::setChecked(), and GUISUMOAbstractView::showToolTips().
Referenced by GUIGlChildWindow::getView().
|
inherited |
Definition at line 228 of file GUIGlChildWindow.cpp.
References MFXCheckableButton::amChecked(), GUIGlChildWindow::myView, and MFXCheckableButton::setChecked().
Referenced by GUIGlChildWindow::getView().
long GNEViewParent::onKeyPress | ( | FXObject * | o, |
FXSelector | sel, | ||
void * | data | ||
) |
Called when user press a key.
Definition at line 320 of file GNEViewParent.cpp.
References GUIGlChildWindow::myView, and GUISUMOAbstractView::onKeyPress().
Referenced by GNEApplicationWindow::onKeyPress().
long GNEViewParent::onKeyRelease | ( | FXObject * | o, |
FXSelector | sel, | ||
void * | data | ||
) |
Called when user releases a key.
Definition at line 327 of file GNEViewParent.cpp.
References GUIGlChildWindow::myView, and GUISUMOAbstractView::onKeyRelease().
Referenced by GNEApplicationWindow::onKeyRelease().
|
inherited |
Centers the view onto the given artifact.
[in] | id | The id of the object to center the view on |
Definition at line 247 of file GUIGlChildWindow.cpp.
References GUISUMOAbstractView::centerTo(), and GUIGlChildWindow::myView.
Referenced by GUIGlChildWindow::getView(), GUIDialog_GLObjChooser::onCmdCenter(), GUIDialog_GLObjChooser::onCmdText(), and GUIMessageWindow::setCursorPos().
void GNEViewParent::showFramesArea | ( | ) |
show frames area if at least a GNEFrame is showed
Definition at line 191 of file GNEViewParent.cpp.
References myAdditionalFrame, myConnectorFrame, myFramesArea, myInspectorFrame, mySelectorFrame, and myTLSEditorFrame.
Referenced by GNEConnectorFrame::show(), GNETLSEditorFrame::show(), GNESelectorFrame::show(), GNEInspectorFrame::show(), and GNEAdditionalFrame::show().
|
private |
the panel for GNE_MODE_ADDITIONAL
Definition at line 172 of file GNEViewParent.h.
Referenced by getAdditionalFrame(), hideFramesArea(), and showFramesArea().
|
protectedinherited |
Definition at line 112 of file GUIGlChildWindow.h.
Referenced by GUIGlChildWindow::buildColoringToolBar(), and GUIGlChildWindow::getColoringSchemesCombo().
|
private |
the panel for GNE_MODE_CONNECT
Definition at line 166 of file GNEViewParent.h.
Referenced by getConnectorFrame(), hideFramesArea(), and showFramesArea().
|
protectedinherited |
Definition at line 110 of file GUIGlChildWindow.h.
Referenced by GUIGlChildWindow::buildNavigationToolBar(), and GUISUMOViewParent::init().
|
private |
frame to hold GNEFrames
Definition at line 154 of file GNEViewParent.h.
Referenced by getFramesAreaWidth(), hideFramesArea(), and showFramesArea().
|
private |
Splitter to divide ViewNet und GNEFrames.
Definition at line 157 of file GNEViewParent.h.
|
private |
the panel for GNE_MODE_INSPECT
Definition at line 160 of file GNEViewParent.h.
Referenced by getInspectorFrame(), hideFramesArea(), and showFramesArea().
|
protectedinherited |
Definition at line 108 of file GUIGlChildWindow.h.
Referenced by GUIGlChildWindow::buildNavigationToolBar(), GUISUMOViewParent::onCmdLocate(), and onCmdLocate().
|
protectedinherited |
The locator menu.
Definition at line 107 of file GUIGlChildWindow.h.
Referenced by GUIGlChildWindow::buildNavigationToolBar(), GUIGlChildWindow::create(), GUIGlChildWindow::getLocatorPopup(), GUISUMOViewParent::onCmdLocate(), onCmdLocate(), and GUIGlChildWindow::~GUIGlChildWindow().
|
protectedinherited |
The tool bar.
Definition at line 104 of file GUIGlChildWindow.h.
Referenced by GUIGlChildWindow::buildColoringToolBar(), GUIGlChildWindow::buildNavigationToolBar(), GUIGlChildWindow::buildScreenshotToolBar(), GUIGlChildWindow::create(), GUIGlChildWindow::getNavigationToolBar(), GUISUMOViewParent::init(), GUISUMOViewParent::setToolBarVisibility(), and GUIGlChildWindow::~GUIGlChildWindow().
|
protectedinherited |
The parent window.
Definition at line 115 of file GUIGlChildWindow.h.
Referenced by GUIGlChildWindow::getParent(), GUISUMOViewParent::init(), onCmdClose(), GUISUMOViewParent::onCmdLocate(), ~GNEViewParent(), and GUISUMOViewParent::~GUISUMOViewParent().
|
private |
the panel for GNE_MODE_SELECT
Definition at line 163 of file GNEViewParent.h.
Referenced by getSelectorFrame(), hideFramesArea(), and showFramesArea().
|
private |
the panel for GNE_MODE_TLS
Definition at line 169 of file GNEViewParent.h.
Referenced by getTLSEditorFrame(), hideFramesArea(), and showFramesArea().
|
protectedinherited |
the view
Definition at line 101 of file GUIGlChildWindow.h.
Referenced by GUIGlChildWindow::create(), GUIGlChildWindow::getBuildGLCanvas(), GUIGlChildWindow::getView(), GUISUMOViewParent::init(), GUIGlChildWindow::onCmdChangeColorScheme(), GUIGlChildWindow::onCmdEditViewport(), GUIGlChildWindow::onCmdEditViewScheme(), onCmdLocate(), GUISUMOViewParent::onCmdMakeSnapshot(), onCmdMakeSnapshot(), GUIGlChildWindow::onCmdRecenterView(), GUIGlChildWindow::onCmdShowToolTips(), GUIGlChildWindow::onCmdZoomStyle(), GUISUMOViewParent::onKeyPress(), onKeyPress(), GUISUMOViewParent::onKeyRelease(), onKeyRelease(), GUISUMOViewParent::onSimStep(), and GUIGlChildWindow::setView().
|
private |
frame to hold myView and myAttributePanel
Definition at line 151 of file GNEViewParent.h.