Eclipse SUMO - Simulation of Urban MObility
GUISUMOViewParent Class Reference

A single child window which contains a view of the simulation area. More...

#include <GUISUMOViewParent.h>

Inheritance diagram for GUISUMOViewParent:
[legend]
Collaboration diagram for GUISUMOViewParent:
[legend]

Public Types

enum  ViewType { VIEW_2D_OPENGL , VIEW_3D_OSG }
 Available view types. More...
 

Public Member Functions

virtual void create ()
 create GUIGlChildWindow More...
 
void eraseGLObjChooser (GUIDialog_GLObjChooser *GLObjChooser)
 erase GLObjChooser More...
 
virtual FXGLCanvas * getBuildGLCanvas () const
 get build GL Canvas More...
 
MFXComboBoxIcongetColoringSchemesCombo ()
 return combobox with the current coloring schemes (standard, fastest standard, real world...) More...
 
GUIMainWindowgetGUIMainWindowParent ()
 Returns the GUIMainWindow parent. More...
 
FXPopup * getLocatorPopup ()
 @ brief return a pointer to locator popup More...
 
FXToolBar * getNavigationToolBar (GUISUMOAbstractView &v)
 return a reference to navigation toolbar More...
 
std::vector< GUIGlIDgetObjectIDs (int messageId) const
 get all objects of the given type More...
 
MFXCheckableButtongetShowToolTipsMenu () const
 get menu for tooltips menu More...
 
GUISUMOAbstractViewgetView () const
 return GUISUMOAbstractView More...
 
 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 GUISUMOAbstractViewinit (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 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 onCmdSpeedFactor (FXObject *, FXSelector, void *)
 speedFactor-callback More...
 
long onKeyPress (FXObject *o, FXSelector sel, void *data)
 handle keys More...
 
long onKeyRelease (FXObject *o, FXSelector sel, void *data)
 
long onSimStep (FXObject *sender, FXSelector, void *)
 Called on a simulation step. More...
 
long onUpdSpeedFactor (FXObject *, FXSelector, void *)
 
void setToolBarVisibility (const bool value)
 about toggled gaming status More...
 
void setView (GUIGlID id)
 Centers the view onto the given artifact. More...
 
 ~GUISUMOViewParent ()
 Destructor. More...
 
buttons call backs
long onCmdRecenterView (FXObject *, FXSelector, void *)
 
long onCmdEditViewport (FXObject *, FXSelector, void *)
 
long onCmdEditViewScheme (FXObject *, FXSelector, void *)
 
long onCmdShowToolTipsView (FXObject *sender, FXSelector, void *)
 
long onCmdShowToolTipsMenu (FXObject *sender, FXSelector, void *)
 
long onCmdZoomStyle (FXObject *sender, FXSelector, void *)
 
long onCmdChangeColorScheme (FXObject *, FXSelector sel, void *)
 

Protected Member Functions

void buildColoringToolBar ()
 build coloring toolbar More...
 
void buildNavigationToolBar ()
 build navigation toolbar More...
 
void buildScreenshotToolBar ()
 build screenshot toolbar More...
 
void buildSpeedControlToolbar ()
 fox need this More...
 

Protected Attributes

FXVerticalFrame * myChildWindowContentFrame = nullptr
 The contents frame. More...
 
MFXComboBoxIconmyColoringSchemes = nullptr
 The coloring schemes. More...
 
FXMenuBar * myGripNavigationToolbar = nullptr
 The grip navigation tool bar. More...
 
GUIMainWindowmyGUIMainWindowParent = nullptr
 FOX needs this. More...
 
MFXMenuButtonTooltipmyLocatorButton = nullptr
 The locator button. More...
 
FXPopup * myLocatorPopup = nullptr
 The locator menu. More...
 
MFXCheckableButtonmyShowToolTipsMenu = nullptr
 menu for tooltips menu More...
 
MFXCheckableButtonmyShowToolTipsView = nullptr
 menu for tooltips view More...
 
FXSlider * mySpeedFactorSlider = nullptr
 slider for speedfactor More...
 
FXToolBar * myStaticNavigationToolBar = nullptr
 The static navigation tool bar. More...
 
FXToolBarShell * myToolBarDragSpeed = nullptr
 toolbar shell for speed More...
 
FXToolBar * myToolBarSpeed = nullptr
 toolbar for speed More...
 
GUISUMOAbstractViewmyView = nullptr
 The view. More...
 
MFXCheckableButtonmyZoomStyle = nullptr
 Zoom but. More...
 

Private Attributes

std::map< int, GUIDialog_ChooserAbstract * > myGLObjChooser
 map for existing dialogs More...
 

Detailed Description

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 53 of file GUISUMOViewParent.h.

Member Enumeration Documentation

◆ ViewType

Available view types.

Enumerator
VIEW_2D_OPENGL 

plain 2D openGL view (

See also
GUIViewTraffic)
VIEW_3D_OSG 

plain 3D OSG view (

See also
GUIOSGView)

Definition at line 59 of file GUISUMOViewParent.h.

Constructor & Destructor Documentation

◆ GUISUMOViewParent()

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.

Parameters
[in]pThe MDI-pane this window is shown within
[in]mdimenuThe MDI-menu for alignment
[in]nameThe name of the window
[in]parentWindowThe main window
[in]icThe icon of this window
[in]optsWindow options
[in]xInitial x-position
[in]yInitial x-position
[in]wInitial width
[in]hInitial height

Definition at line 78 of file GUISUMOViewParent.cpp.

◆ ~GUISUMOViewParent()

GUISUMOViewParent::~GUISUMOViewParent ( )

Destructor.

Definition at line 110 of file GUISUMOViewParent.cpp.

References GUIGlChildWindow::myGUIMainWindowParent, and GUIMainWindow::removeGLChild().

Member Function Documentation

◆ buildColoringToolBar()

◆ buildNavigationToolBar()

◆ buildScreenshotToolBar()

◆ buildSpeedControlToolbar()

void GUISUMOViewParent::buildSpeedControlToolbar ( )
protected

◆ create()

void GUIGlChildWindow::create ( )
virtualinherited

create GUIGlChildWindow

Definition at line 89 of file GUIGlChildWindow.cpp.

References GUIGlChildWindow::myGripNavigationToolbar, GUIGlChildWindow::myLocatorPopup, GUIGlChildWindow::myStaticNavigationToolBar, and GUIGlChildWindow::myView.

Referenced by GNEViewParent::GNEViewParent(), and GUIApplicationWindow::openNewView().

Here is the caller graph for this function:

◆ eraseGLObjChooser()

void GUISUMOViewParent::eraseGLObjChooser ( GUIDialog_GLObjChooser GLObjChooser)

erase GLObjChooser

Definition at line 126 of file GUISUMOViewParent.cpp.

References GUIDialog_ChooserAbstract::getMessageId(), and myGLObjChooser.

Referenced by GUIDialog_GLObjChooser::~GUIDialog_GLObjChooser().

Here is the caller graph for this function:

◆ getBuildGLCanvas()

FXGLCanvas * GUIGlChildWindow::getBuildGLCanvas ( ) const
virtualinherited

get build GL Canvas

Definition at line 177 of file GUIGlChildWindow.cpp.

References GUIGlChildWindow::myView.

Referenced by GUIApplicationWindow::getBuildGLCanvas().

Here is the caller graph for this function:

◆ getColoringSchemesCombo()

MFXComboBoxIcon * GUIGlChildWindow::getColoringSchemesCombo ( )
inherited

return combobox with the current coloring schemes (standard, fastest standard, real world...)

Definition at line 195 of file GUIGlChildWindow.cpp.

References GUIGlChildWindow::myColoringSchemes.

Referenced by GUIViewTraffic::buildViewToolBars(), GNEViewNet::buildViewToolBars(), and GUISUMOAbstractView::getColoringSchemesCombo().

Here is the caller graph for this function:

◆ getGUIMainWindowParent()

GUIMainWindow * GUIGlChildWindow::getGUIMainWindowParent ( )
inherited

Returns the GUIMainWindow parent.

Definition at line 109 of file GUIGlChildWindow.cpp.

References GUIGlChildWindow::myGUIMainWindowParent.

Referenced by MFXDecalsTable::Column::Column(), GUISUMOAbstractView::paintGL(), GUISUMOAbstractView::showToolTipFor(), GUISUMOAbstractView::updateToolTip(), and GUIDialog_ChooserAbstract::~GUIDialog_ChooserAbstract().

Here is the caller graph for this function:

◆ getLocatorPopup()

FXPopup * GUIGlChildWindow::getLocatorPopup ( )
inherited

@ brief return a pointer to locator popup

Definition at line 189 of file GUIGlChildWindow.cpp.

References GUIGlChildWindow::myLocatorPopup.

Referenced by GUIViewTraffic::buildViewToolBars(), and GNEViewNet::buildViewToolBars().

Here is the caller graph for this function:

◆ getNavigationToolBar()

FXToolBar * GUIGlChildWindow::getNavigationToolBar ( GUISUMOAbstractView v)
inherited

return a reference to navigation toolbar

Definition at line 183 of file GUIGlChildWindow.cpp.

References GUIGlChildWindow::myGripNavigationToolbar, and GUIGlChildWindow::myStaticNavigationToolBar.

◆ getObjectIDs()

◆ getShowToolTipsMenu()

MFXCheckableButton * GUIGlChildWindow::getShowToolTipsMenu ( ) const
inherited

get menu for tooltips menu

Definition at line 201 of file GUIGlChildWindow.cpp.

References GUIGlChildWindow::myShowToolTipsMenu.

Referenced by GNEOptionsDialog::onCmdShowToolTipsMenu(), and GNEPythonToolDialog::onCmdShowToolTipsMenu().

Here is the caller graph for this function:

◆ getView()

◆ init()

GUISUMOAbstractView * GUISUMOViewParent::init ( FXGLCanvas *  share,
GUINet net,
GUISUMOViewParent::ViewType  type 
)
virtual

"Initialises" this window by building the contents

Parameters
[in]shareA canvas tor get the shared context from
[in]netThe network to show
[in]vtThe view type to use
Todo:
Check whether this could be done in the constructor

Definition at line 90 of file GUISUMOViewParent.cpp.

References GUISUMOAbstractView::buildViewToolBars(), GUIMainWindow::getGLVisual(), GUIMainWindow::isGaming(), GUIGlChildWindow::myChildWindowContentFrame, GUIGlChildWindow::myGUIMainWindowParent, GUIGlChildWindow::myStaticNavigationToolBar, GUIGlChildWindow::myView, VIEW_2D_OPENGL, and VIEW_3D_OSG.

Referenced by GUIApplicationWindow::openNewView().

Here is the caller graph for this function:

◆ isSelected()

bool GUISUMOViewParent::isSelected ( GUIGlObject o) const
virtual

true if the object is selected (may include extra logic besides calling gSelected)

Reimplemented from GUIGlChildWindow.

Definition at line 294 of file GUISUMOViewParent.cpp.

References GUIGlObject::getGlID(), MSEdge::getLanes(), GUIGlObject::getType(), GLO_EDGE, GLO_LANE, gSelected, and GUISelectedStorage::isSelected().

◆ onCmdChangeColorScheme()

long GUIGlChildWindow::onCmdChangeColorScheme ( FXObject *  ,
FXSelector  sel,
void *  ptr 
)
inherited

Definition at line 263 of file GUIGlChildWindow.cpp.

References GUIGlChildWindow::myView, and GUISUMOAbstractView::setColorScheme().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdEditViewport()

long GUIGlChildWindow::onCmdEditViewport ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

Definition at line 215 of file GUIGlChildWindow.cpp.

References GUIGlChildWindow::myView, and GUISUMOAbstractView::showViewportEditor().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdEditViewScheme()

long GUIGlChildWindow::onCmdEditViewScheme ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

Definition at line 222 of file GUIGlChildWindow.cpp.

References GUIGlChildWindow::myView, and GUISUMOAbstractView::showViewschemeEditor().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdLocate()

◆ onCmdMakeSnapshot()

long GUISUMOViewParent::onCmdMakeSnapshot ( FXObject *  sender,
FXSelector  ,
void *   
)

Called if the user wants to make a snapshot (screenshot)

Definition at line 132 of file GUISUMOViewParent.cpp.

References MFXCheckableButton::amChecked(), CAMERA, GUISUMOAbstractView::endSnapshot(), gCurrentFolder, GUIIconSubSys::getIcon(), GUISUMOAbstractView::makeSnapshot(), GUIGlChildWindow::myView, MFXCheckableButton::setChecked(), TL, MFXUtils::userPermitsOverwritingWhenFileExists(), and WRITE_MESSAGE.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdRecenterView()

long GUIGlChildWindow::onCmdRecenterView ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

Definition at line 207 of file GUIGlChildWindow.cpp.

References GUIGlChildWindow::myView, and GUISUMOAbstractView::recenterView().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdShowToolTipsMenu()

long GUIGlChildWindow::onCmdShowToolTipsMenu ( FXObject *  sender,
FXSelector  ,
void *   
)
inherited

Definition at line 240 of file GUIGlChildWindow.cpp.

References MFXCheckableButton::amChecked(), MFXStaticToolTip::enableStaticToolTip(), GUIMainWindow::getStaticTooltipMenu(), GUIGlChildWindow::myGUIMainWindowParent, GUIGlChildWindow::myShowToolTipsMenu, and MFXCheckableButton::setChecked().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdShowToolTipsView()

long GUIGlChildWindow::onCmdShowToolTipsView ( FXObject *  sender,
FXSelector  ,
void *   
)
inherited

Definition at line 229 of file GUIGlChildWindow.cpp.

References MFXCheckableButton::amChecked(), MFXStaticToolTip::enableStaticToolTip(), GUIMainWindow::getStaticTooltipView(), GUIGlChildWindow::myGUIMainWindowParent, GUIGlChildWindow::myShowToolTipsView, and MFXCheckableButton::setChecked().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdSpeedFactor()

long GUISUMOViewParent::onCmdSpeedFactor ( FXObject *  ,
FXSelector  ,
void *   
)

speedFactor-callback

Definition at line 351 of file GUISUMOViewParent.cpp.

References GUIGlObjectStorage::getObjectBlocking(), GUISUMOAbstractView::getTrackedID(), GUIGlObject::getType(), GUIGlObjectStorage::gIDStorage, GLO_PERSON, GLO_VEHICLE, GUIGlObject::INVALID_ID, mySpeedFactorSlider, GUIGlChildWindow::myView, MSBaseVehicle::setChosenSpeedFactor(), SPEEDFACTOR_SCALE, and toString().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdZoomStyle()

long GUIGlChildWindow::onCmdZoomStyle ( FXObject *  sender,
FXSelector  ,
void *   
)
inherited

Definition at line 253 of file GUIGlChildWindow.cpp.

References MFXCheckableButton::amChecked(), GUIGlChildWindow::myView, GUIGlChildWindow::myZoomStyle, and MFXCheckableButton::setChecked().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onKeyPress()

long GUISUMOViewParent::onKeyPress ( FXObject *  o,
FXSelector  sel,
void *  data 
)

handle keys

Definition at line 319 of file GUISUMOViewParent.cpp.

References GUIGlChildWindow::myView, and GUISUMOAbstractView::onKeyPress().

Referenced by GUIApplicationWindow::onKeyPress().

Here is the caller graph for this function:

◆ onKeyRelease()

long GUISUMOViewParent::onKeyRelease ( FXObject *  o,
FXSelector  sel,
void *  data 
)

Definition at line 326 of file GUISUMOViewParent.cpp.

References GUIGlChildWindow::myView, and GUISUMOAbstractView::onKeyRelease().

Referenced by GUIApplicationWindow::onKeyRelease().

Here is the caller graph for this function:

◆ onSimStep()

long GUISUMOViewParent::onSimStep ( FXObject *  sender,
FXSelector  ,
void *   
)

Called on a simulation step.

Definition at line 286 of file GUISUMOViewParent.cpp.

References GUISUMOAbstractView::checkSnapshots(), and GUIGlChildWindow::myView.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onUpdSpeedFactor()

long GUISUMOViewParent::onUpdSpeedFactor ( FXObject *  sender,
FXSelector  ,
void *  ptr 
)

◆ setToolBarVisibility()

void GUISUMOViewParent::setToolBarVisibility ( const bool  value)

about toggled gaming status

Definition at line 116 of file GUISUMOViewParent.cpp.

References GUIGlChildWindow::myStaticNavigationToolBar.

Referenced by GUIApplicationWindow::onCmdFullScreen(), and GUIApplicationWindow::onCmdGaming().

Here is the caller graph for this function:

◆ setView()

void GUIGlChildWindow::setView ( GUIGlID  id)
inherited

Centers the view onto the given artifact.

Parameters
[in]idThe id of the object to center the view on

Definition at line 270 of file GUIGlChildWindow.cpp.

References GUISUMOAbstractView::centerTo(), and GUIGlChildWindow::myView.

Referenced by GUIDialog_ChooserAbstract::onCmdCenter(), GUIDialog_ChooserAbstract::onCmdText(), GUIDialog_ChooserAbstract::onCmdTrack(), and GUIMessageWindow::setCursorPos().

Here is the caller graph for this function:

Field Documentation

◆ myChildWindowContentFrame

FXVerticalFrame* GUIGlChildWindow::myChildWindowContentFrame = nullptr
protectedinherited

The contents frame.

Definition at line 132 of file GUIGlChildWindow.h.

Referenced by init().

◆ myColoringSchemes

MFXComboBoxIcon* GUIGlChildWindow::myColoringSchemes = nullptr
protectedinherited

The coloring schemes.

Definition at line 135 of file GUIGlChildWindow.h.

Referenced by GUIGlChildWindow::buildColoringToolBar(), and GUIGlChildWindow::getColoringSchemesCombo().

◆ myGLObjChooser

std::map<int, GUIDialog_ChooserAbstract*> GUISUMOViewParent::myGLObjChooser
private

map for existing dialogs

Definition at line 141 of file GUISUMOViewParent.h.

Referenced by eraseGLObjChooser(), and onCmdLocate().

◆ myGripNavigationToolbar

FXMenuBar* GUIGlChildWindow::myGripNavigationToolbar = nullptr
protectedinherited

◆ myGUIMainWindowParent

◆ myLocatorButton

MFXMenuButtonTooltip* GUIGlChildWindow::myLocatorButton = nullptr
protectedinherited

The locator button.

Definition at line 123 of file GUIGlChildWindow.h.

Referenced by GUIGlChildWindow::buildNavigationToolBar(), onCmdLocate(), and GNEViewParent::onCmdLocate().

◆ myLocatorPopup

FXPopup* GUIGlChildWindow::myLocatorPopup = nullptr
protectedinherited

◆ myShowToolTipsMenu

MFXCheckableButton* GUIGlChildWindow::myShowToolTipsMenu = nullptr
protectedinherited

◆ myShowToolTipsView

MFXCheckableButton* GUIGlChildWindow::myShowToolTipsView = nullptr
protectedinherited

menu for tooltips view

Definition at line 126 of file GUIGlChildWindow.h.

Referenced by GUIGlChildWindow::buildNavigationToolBar(), and GUIGlChildWindow::onCmdShowToolTipsView().

◆ mySpeedFactorSlider

FXSlider* GUISUMOViewParent::mySpeedFactorSlider = nullptr
protected

slider for speedfactor

Definition at line 137 of file GUISUMOViewParent.h.

Referenced by buildSpeedControlToolbar(), onCmdSpeedFactor(), and onUpdSpeedFactor().

◆ myStaticNavigationToolBar

◆ myToolBarDragSpeed

FXToolBarShell* GUISUMOViewParent::myToolBarDragSpeed = nullptr
protected

toolbar shell for speed

Definition at line 131 of file GUISUMOViewParent.h.

◆ myToolBarSpeed

FXToolBar* GUISUMOViewParent::myToolBarSpeed = nullptr
protected

toolbar for speed

Definition at line 134 of file GUISUMOViewParent.h.

◆ myView

◆ myZoomStyle

MFXCheckableButton* GUIGlChildWindow::myZoomStyle = nullptr
protectedinherited

The documentation for this class was generated from the following files: