SUMO - Simulation of Urban MObility
|
A single child window which contains a view of the simulation area. More...
#include <GUISUMOViewParent.h>
Public Types | |
enum | ViewType { VIEW_2D_OPENGL, VIEW_3D_OSG } |
Available view types. More... | |
Public Member Functions | |
virtual void | buildColoringToolBar () |
virtual void | buildNavigationToolBar () |
virtual void | buildScreenshotToolBar () |
virtual void | create () |
virtual FXGLCanvas * | getBuildGLCanvas () const |
FXComboBox & | getColoringSchemesCombo () |
FXPopup * | getLocatorPopup () |
FXToolBar & | getNavigationToolBar (GUISUMOAbstractView &v) |
GUIMainWindow * | getParent () |
Returns the main window. More... | |
GUISUMOAbstractView * | getView () const |
GUISUMOViewParent (FXMDIClient *p, FXMDIMenu *mdimenu, const FXString &name, GUIMainWindow *parentWindow, FXIcon *ic=NULL, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0) | |
Constructor. More... | |
virtual GUISUMOAbstractView * | init (FXGLCanvas *share, GUINet &net, ViewType type) |
"Initialises" this window by building the contents 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 | onCmdLocate (FXObject *, FXSelector, void *) |
locator-callback More... | |
long | onCmdMakeSnapshot (FXObject *sender, FXSelector, void *) |
Called if the user wants to make a snapshot (screenshot) More... | |
long | onCmdRecenterView (FXObject *, FXSelector, void *) |
long | onCmdShowToolTips (FXObject *sender, FXSelector, void *) |
long | onCmdZoomStyle (FXObject *sender, FXSelector, void *) |
long | onSimStep (FXObject *sender, FXSelector, void *) |
Called on a simulation step. More... | |
void | setView (GUIGlID id) |
Centers the view onto the given artifact. More... | |
void | toggleGaming () |
about toggled gaming status More... | |
~GUISUMOViewParent () | |
Destructor. More... | |
Protected Member Functions | |
GUISUMOViewParent () | |
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... | |
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 66 of file GUISUMOViewParent.h.
Available view types.
Enumerator | |
---|---|
VIEW_2D_OPENGL |
plain 2D openGL view (
|
VIEW_3D_OSG |
plain 3D OSG view (
|
Definition at line 72 of file GUISUMOViewParent.h.
GUISUMOViewParent::GUISUMOViewParent | ( | FXMDIClient * | p, |
FXMDIMenu * | mdimenu, | ||
const FXString & | name, | ||
GUIMainWindow * | parentWindow, | ||
FXIcon * | ic = NULL , |
||
FXuint | opts = 0 , |
||
FXint | x = 0 , |
||
FXint | y = 0 , |
||
FXint | w = 0 , |
||
FXint | h = 0 |
||
) |
Constructor.
[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 |
Definition at line 96 of file GUISUMOViewParent.cpp.
GUISUMOViewParent::~GUISUMOViewParent | ( | ) |
Destructor.
Definition at line 127 of file GUISUMOViewParent.cpp.
References GUIGlChildWindow::myParent, and GUIMainWindow::removeChild().
|
inlineprotected |
FOX needs this.
Definition at line 127 of file GUISUMOViewParent.h.
|
virtualinherited |
Definition at line 137 of file GUIGlChildWindow.cpp.
References GUIIconSubSys::getIcon(), ICON_COLORWHEEL, MID_COLOURSCHEMECHANGE, MID_EDITVIEWSCHEME, GUIGlChildWindow::myColoringSchemes, and GUIGlChildWindow::myNavigationToolBar.
|
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().
|
virtualinherited |
Definition at line 157 of file GUIGlChildWindow.cpp.
References GUIIconSubSys::getIcon(), ICON_CAMERA, MID_MAKESNAPSHOT, and GUIGlChildWindow::myNavigationToolBar.
|
virtualinherited |
Definition at line 91 of file GUIGlChildWindow.cpp.
References GUIGlChildWindow::myLocatorPopup, GUIGlChildWindow::myNavigationToolBar, and GUIGlChildWindow::myView.
Referenced by GUIApplicationWindow::openNewView().
|
virtualinherited |
Definition at line 171 of file GUIGlChildWindow.cpp.
References GUIGlChildWindow::myView.
Referenced by GUIApplicationWindow::getBuildGLCanvas().
|
inherited |
Definition at line 189 of file GUIGlChildWindow.cpp.
References GUIGlChildWindow::myColoringSchemes.
Referenced by GUIViewTraffic::buildViewToolBars(), and GUISUMOAbstractView::getColoringSchemesCombo().
|
inherited |
Definition at line 183 of file GUIGlChildWindow.cpp.
References GUIGlChildWindow::myLocatorPopup.
Referenced by GUIViewTraffic::buildViewToolBars().
|
inherited |
Definition at line 177 of file GUIGlChildWindow.cpp.
References GUIGlChildWindow::myNavigationToolBar.
|
inlineinherited |
Returns the main window.
Definition at line 90 of file GUIGlChildWindow.h.
References GUIGlChildWindow::myParent.
Referenced by GUIDialog_GLObjChooser::~GUIDialog_GLObjChooser().
|
inlineinherited |
Definition at line 61 of file GUIGlChildWindow.h.
References GUIGlChildWindow::myView.
Referenced by TraCIServerAPI_GUI::getNamedView(), and GUIApplicationWindow::onCmdEditChosen().
|
virtual |
"Initialises" this window by building the contents
[in] | share | A canvas tor get the shared context from |
[in] | net | The network to show |
[in] | vt | The view type to use |
Definition at line 107 of file GUISUMOViewParent.cpp.
References GUISUMOAbstractView::buildViewToolBars(), GUIMainWindow::getGLVisual(), GUIMainWindow::isGaming(), GUIGlChildWindow::myContentFrame, GUIGlChildWindow::myNavigationToolBar, GUIGlChildWindow::myParent, GUIGlChildWindow::myView, VIEW_2D_OPENGL, and VIEW_3D_OSG.
Referenced by GUIApplicationWindow::openNewView().
|
virtual |
true if the object is selected (may include extra logic besides calling gSelected)
Reimplemented from GUIGlChildWindow.
Definition at line 243 of file GUISUMOViewParent.cpp.
References GUIGlObject::getGlID(), MSEdge::getLanes(), 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().
Definition at line 203 of file GUIGlChildWindow.cpp.
References GUIGlChildWindow::myView, and GUISUMOAbstractView::showViewportEditor().
Definition at line 210 of file GUIGlChildWindow.cpp.
References GUIGlChildWindow::myView, and GUISUMOAbstractView::showViewschemeEditor().
locator-callback
Definition at line 172 of file GUISUMOViewParent.cpp.
References GUIIconSubSys::getIcon(), GUIGlObject_AbstractAdd::getIDList(), GUIEdge::getIDs(), MSNet::getInstance(), MSNet::getShapeContainer(), MSNet::getVehicleControl(), GUIGlObjectStorage::gIDStorage, GLO_ADDITIONAL, GLO_EDGE, GLO_JUNCTION, GLO_POI, GLO_POLYGON, GLO_TLLOGIC, GLO_VEHICLE, ICON_LOCATEADD, ICON_LOCATEEDGE, ICON_LOCATEJUNCTION, ICON_LOCATEPOI, ICON_LOCATEPOLY, ICON_LOCATETLS, ICON_LOCATEVEHICLE, GUIMainWindow::listInternal(), MID_LOCATEADD, MID_LOCATEEDGE, MID_LOCATEJUNCTION, MID_LOCATEPOI, MID_LOCATEPOLY, MID_LOCATETLS, MID_LOCATEVEHICLE, GUIGlChildWindow::myLocatorButton, GUIGlChildWindow::myLocatorPopup, GUIGlChildWindow::myParent, and GUIDialog_GLObjChooser::show().
Referenced by GUIApplicationWindow::onCmdLocate().
Called if the user wants to make a snapshot (screenshot)
Definition at line 143 of file GUISUMOViewParent.cpp.
References gCurrentFolder, GUIIconSubSys::getIcon(), ICON_EMPTY, GUISUMOAbstractView::makeSnapshot(), GUIGlChildWindow::myView, and MFXUtils::userPermitsOverwritingWhenFileExists().
Definition at line 195 of file GUIGlChildWindow.cpp.
References GUIGlChildWindow::myView, and GUISUMOAbstractView::recenterView().
Definition at line 217 of file GUIGlChildWindow.cpp.
References MFXCheckableButton::amChecked(), GUIGlChildWindow::myView, MFXCheckableButton::setChecked(), and GUISUMOAbstractView::showToolTips().
Definition at line 228 of file GUIGlChildWindow.cpp.
References MFXCheckableButton::amChecked(), GUIGlChildWindow::myView, and MFXCheckableButton::setChecked().
Called on a simulation step.
Definition at line 235 of file GUISUMOViewParent.cpp.
References GUISUMOAbstractView::checkSnapshots(), and GUIGlChildWindow::myView.
|
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 GUIDialog_GLObjChooser::onCmdCenter(), and GUIDialog_GLObjChooser::onCmdText().
void GUISUMOViewParent::toggleGaming | ( | ) |
about toggled gaming status
Definition at line 133 of file GUISUMOViewParent.cpp.
References GUIMainWindow::isGaming(), GUIGlChildWindow::myNavigationToolBar, and GUIGlChildWindow::myParent.
|
protectedinherited |
Definition at line 112 of file GUIGlChildWindow.h.
Referenced by GUIGlChildWindow::buildColoringToolBar(), and GUIGlChildWindow::getColoringSchemesCombo().
|
protectedinherited |
Definition at line 110 of file GUIGlChildWindow.h.
Referenced by GUIGlChildWindow::buildNavigationToolBar(), and init().
|
protectedinherited |
Definition at line 108 of file GUIGlChildWindow.h.
Referenced by GUIGlChildWindow::buildNavigationToolBar(), and onCmdLocate().
|
protectedinherited |
The locator menu.
Definition at line 107 of file GUIGlChildWindow.h.
Referenced by GUIGlChildWindow::buildNavigationToolBar(), GUIGlChildWindow::create(), GUIGlChildWindow::getLocatorPopup(), 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(), init(), toggleGaming(), and GUIGlChildWindow::~GUIGlChildWindow().
|
protectedinherited |
The parent window.
Definition at line 115 of file GUIGlChildWindow.h.
Referenced by GUIGlChildWindow::getParent(), init(), onCmdLocate(), toggleGaming(), and ~GUISUMOViewParent().
|
protectedinherited |
the view
Definition at line 101 of file GUIGlChildWindow.h.
Referenced by GUIGlChildWindow::create(), GUIGlChildWindow::getBuildGLCanvas(), GUIGlChildWindow::getView(), init(), GUIGlChildWindow::onCmdChangeColorScheme(), GUIGlChildWindow::onCmdEditViewport(), GUIGlChildWindow::onCmdEditViewScheme(), onCmdMakeSnapshot(), GUIGlChildWindow::onCmdRecenterView(), GUIGlChildWindow::onCmdShowToolTips(), GUIGlChildWindow::onCmdZoomStyle(), onSimStep(), and GUIGlChildWindow::setView().