Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
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
 
void eraseGLObjChooser (GUIDialog_GLObjChooser *GLObjChooser)
 erase GLObjChooser
 
virtual FXGLCanvas * getBuildGLCanvas () const
 get build GL Canvas
 
MFXComboBoxIcongetColoringSchemesCombo ()
 return combobox with the current coloring schemes (standard, fastest standard, real world...)
 
GUIMainWindowgetGUIMainWindowParent ()
 Returns the GUIMainWindow parent.
 
FXPopup * getLocatorPopup ()
 @ brief return a pointer to locator popup
 
FXToolBar * getNavigationToolBar (GUISUMOAbstractView &v)
 return a reference to navigation toolbar
 
std::vector< GUIGlIDgetObjectIDs (int messageId) const
 get all objects of the given type
 
MFXCheckableButtongetShowToolTipsMenu () const
 get menu for tooltips menu
 
GUISUMOAbstractViewgetView () const
 return GUISUMOAbstractView
 
 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.
 
virtual GUISUMOAbstractViewinit (FXGLCanvas *share, GUINet &net, ViewType type)
 "Initialises" this window by building the contents
 
bool isSelected (GUIGlObject *o) const
 true if the object is selected (may include extra logic besides calling gSelected)
 
long onCmdLocate (FXObject *, FXSelector, void *)
 locator-callback
 
long onCmdMakeSnapshot (FXObject *sender, FXSelector, void *)
 Called if the user wants to make a snapshot (screenshot)
 
long onCmdSpeedFactor (FXObject *, FXSelector, void *)
 speedFactor-callback
 
long onKeyPress (FXObject *o, FXSelector sel, void *data)
 handle keys
 
long onKeyRelease (FXObject *o, FXSelector sel, void *data)
 
long onSimStep (FXObject *sender, FXSelector, void *)
 Called on a simulation step.
 
long onUpdSpeedFactor (FXObject *, FXSelector, void *)
 
void setToolBarVisibility (const bool value)
 about toggled gaming status
 
void setView (GUIGlID id)
 Centers the view onto the given artifact.
 
 ~GUISUMOViewParent ()
 Destructor.
 
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
 
void buildNavigationToolBar ()
 build navigation toolbar
 
void buildScreenshotToolBar ()
 build screenshot toolbar
 
void buildSpeedControlToolbar ()
 fox need this
 

Protected Attributes

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

Private Attributes

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

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: