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.

References buildSpeedControlToolbar(), GUIGlChildWindow::GUIGlChildWindow(), GUISUMOViewParent(), and GUIGlChildWindow::myGUIMainWindowParent.

Referenced by GUISUMOViewParent().

Here is the caller graph for this function:

◆ ~GUISUMOViewParent()

GUISUMOViewParent::~GUISUMOViewParent ( )

Destructor.

Definition at line 110 of file GUISUMOViewParent.cpp.

References GUIGlChildWindow::myGUIMainWindowParent.

Member Function Documentation

◆ buildColoringToolBar()

void GUIGlChildWindow::buildColoringToolBar ( )
protectedinherited

build coloring toolbar

Definition at line 153 of file GUIGlChildWindow.cpp.

References COLORWHEEL, GUIIconSubSys::getIcon(), GUIDesignButtonToolbar, GUIDesignComboBoxStatic, GUIDesignComboBoxVisibleItems, GUIDesignVerticalSeparator, MID_COLORSCHEMECHANGE, MID_HOTKEY_F9_EDIT_VIEWSCHEME, myColoringSchemes, myGripNavigationToolbar, myGUIMainWindowParent, myStaticNavigationToolBar, and TL.

Referenced by GUIGlChildWindow().

Here is the caller graph for this function:

◆ buildNavigationToolBar()

void GUIGlChildWindow::buildNavigationToolBar ( )
protectedinherited

◆ buildScreenshotToolBar()

void GUIGlChildWindow::buildScreenshotToolBar ( )
protectedinherited

build screenshot toolbar

Definition at line 167 of file GUIGlChildWindow.cpp.

References CAMERA, GUIIconSubSys::getIcon(), GUIDesignButtonToolbar, GUIDesignVerticalSeparator, MID_MAKESNAPSHOT, myGripNavigationToolbar, myGUIMainWindowParent, myStaticNavigationToolBar, and TL.

Referenced by GUIGlChildWindow().

Here is the caller graph for this function:

◆ buildSpeedControlToolbar()

void GUISUMOViewParent::buildSpeedControlToolbar ( )
protected

fox need this

build speed control toolbar

Definition at line 326 of file GUISUMOViewParent.cpp.

References GUIDesignVerticalSeparator, MID_SPEEDFACTOR, GUIGlChildWindow::myGripNavigationToolbar, mySpeedFactorSlider, and GUIGlChildWindow::myStaticNavigationToolBar.

Referenced by GUISUMOViewParent().

Here is the caller graph for this function:

◆ create()

void GUIGlChildWindow::create ( )
virtualinherited

create GUIGlChildWindow

Definition at line 90 of file GUIGlChildWindow.cpp.

References myGripNavigationToolbar, myLocatorPopup, myStaticNavigationToolBar, and 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.

◆ getBuildGLCanvas()

FXGLCanvas * GUIGlChildWindow::getBuildGLCanvas ( ) const
virtualinherited

get build GL Canvas

Definition at line 178 of file GUIGlChildWindow.cpp.

References 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 196 of file GUIGlChildWindow.cpp.

References myColoringSchemes.

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

Here is the caller graph for this function:

◆ getGUIMainWindowParent()

GUIMainWindow * GUIGlChildWindow::getGUIMainWindowParent ( )
inherited

Returns the GUIMainWindow parent.

Definition at line 110 of file GUIGlChildWindow.cpp.

References myGUIMainWindowParent.

◆ getLocatorPopup()

FXPopup * GUIGlChildWindow::getLocatorPopup ( )
inherited

@ brief return a pointer to locator popup

Definition at line 190 of file GUIGlChildWindow.cpp.

References myLocatorPopup.

Referenced by GNEViewNet::buildViewToolBars(), and GUIViewTraffic::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 184 of file GUIGlChildWindow.cpp.

References myGripNavigationToolbar, and myStaticNavigationToolBar.

◆ getObjectIDs()

◆ getShowToolTipsMenu()

MFXCheckableButton * GUIGlChildWindow::getShowToolTipsMenu ( ) const
inherited

get menu for tooltips menu

Definition at line 202 of file GUIGlChildWindow.cpp.

References myShowToolTipsMenu.

◆ 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 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 287 of file GUISUMOViewParent.cpp.

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

◆ onCmdChangeColorScheme()

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

Definition at line 264 of file GUIGlChildWindow.cpp.

References myView.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdEditViewport()

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

Definition at line 216 of file GUIGlChildWindow.cpp.

References myView.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdEditViewScheme()

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

Definition at line 223 of file GUIGlChildWindow.cpp.

References myView.

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, gCurrentFolder, GUIIconSubSys::getIcon(), SUMOXMLDefinitions::ImageFileExtensions, SUMOXMLDefinitions::ImageVideoFileExtensions, 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 208 of file GUIGlChildWindow.cpp.

References myView.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdShowToolTipsMenu()

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

Definition at line 241 of file GUIGlChildWindow.cpp.

References myGUIMainWindowParent, and myShowToolTipsMenu.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdShowToolTipsView()

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

Definition at line 230 of file GUIGlChildWindow.cpp.

References myGUIMainWindowParent, and myShowToolTipsView.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdSpeedFactor()

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

speedFactor-callback

Definition at line 344 of file GUISUMOViewParent.cpp.

References 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 254 of file GUIGlChildWindow.cpp.

References myView, and myZoomStyle.

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 312 of file GUISUMOViewParent.cpp.

References GUIGlChildWindow::myView.

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 319 of file GUISUMOViewParent.cpp.

References GUIGlChildWindow::myView.

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 279 of file GUISUMOViewParent.cpp.

References GUIGlChildWindow::myView.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onUpdSpeedFactor()

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

Definition at line 364 of file GUISUMOViewParent.cpp.

References MSBaseVehicle::getChosenSpeedFactor(), MSPerson::getChosenSpeedFactor(), GUIGlObject::getType(), GUIGlObjectStorage::gIDStorage, GLO_PERSON, GLO_VEHICLE, GUIGlObject::INVALID_ID, mySpeedFactorSlider, GUIGlChildWindow::myView, and SPEEDFACTOR_SCALE.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ setToolBarVisibility()

void GUISUMOViewParent::setToolBarVisibility ( const bool value)

about toggled gaming status

Definition at line 116 of file GUISUMOViewParent.cpp.

References invalid_return< std::string >::value, and 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 271 of file GUIGlChildWindow.cpp.

References myView.

Referenced by 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 GNEViewParent::GNEViewParent(), GUIGlChildWindow(), and GUISUMOViewParent::init().

◆ myColoringSchemes

MFXComboBoxIcon* GUIGlChildWindow::myColoringSchemes = nullptr
protectedinherited

The coloring schemes.

Definition at line 135 of file GUIGlChildWindow.h.

Referenced by buildColoringToolBar(), and 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 buildNavigationToolBar(), GNEViewParent::onCmdLocate(), and GUISUMOViewParent::onCmdLocate().

◆ myLocatorPopup

FXPopup* GUIGlChildWindow::myLocatorPopup = nullptr
protectedinherited

◆ myShowToolTipsMenu

MFXCheckableButton* GUIGlChildWindow::myShowToolTipsMenu = nullptr
protectedinherited

menu for tooltips menu

Definition at line 129 of file GUIGlChildWindow.h.

Referenced by buildNavigationToolBar(), getShowToolTipsMenu(), and onCmdShowToolTipsMenu().

◆ myShowToolTipsView

MFXCheckableButton* GUIGlChildWindow::myShowToolTipsView = nullptr
protectedinherited

menu for tooltips view

Definition at line 126 of file GUIGlChildWindow.h.

Referenced by buildNavigationToolBar(), and 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

FXToolBar* GUIGlChildWindow::myStaticNavigationToolBar = nullptr
protectedinherited

◆ 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

Zoom but.

Definition at line 117 of file GUIGlChildWindow.h.

Referenced by buildNavigationToolBar(), and onCmdZoomStyle().


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