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:
Collaboration diagram for GUISUMOViewParent:

Public Types

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

Public Member Functions

virtual void create ()
 create GUIGlChildWindow More...
 
virtual FXGLCanvas * getBuildGLCanvas () const
 get build GL Canvas More...
 
FXComboBox * getColoringSchemesCombo ()
 return combobox with the current coloring schemes (standard, fastest standard, real world...) More...
 
FXPopup * getLocatorPopup ()
 @ brief return a pointer to locator popup More...
 
FXToolBar * getNavigationToolBar (GUISUMOAbstractView &v)
 return a reference to navigation toolbar More...
 
GUIMainWindowgetParent ()
 Returns the main window. 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)
 @notify 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 onCmdShowToolTips (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 ()
 

Protected Attributes

FXComboBox * myColoringSchemes
 The coloring schemes. More...
 
FXVerticalFrame * myContentFrame
 The contents frame. More...
 
FXMenuBar * myGripNavigationToolbar
 The grip navigation tool bar. More...
 
FXMenuButton * myLocatorButton
 The locator button. More...
 
FXPopup * myLocatorPopup
 The locator menu. More...
 
GUIMainWindowmyParent
 The parent window. More...
 
FXSlider * mySpeedFactorSlider = nullptr
 
FXToolBar * myStaticNavigationToolBar
 The static navigation tool bar. More...
 
FXToolBarShell * myToolBarDragSpeed = nullptr
 
FXToolBar * myToolBarSpeed = nullptr
 
GUISUMOAbstractViewmyView
 The view. 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 58 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 64 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 95 of file GUISUMOViewParent.cpp.

◆ ~GUISUMOViewParent()

GUISUMOViewParent::~GUISUMOViewParent ( )

Destructor.

Definition at line 127 of file GUISUMOViewParent.cpp.

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

Member Function Documentation

◆ buildColoringToolBar()

◆ buildNavigationToolBar()

◆ buildScreenshotToolBar()

void GUIGlChildWindow::buildScreenshotToolBar ( )
protectedinherited

◆ buildSpeedControlToolbar()

void GUISUMOViewParent::buildSpeedControlToolbar ( )
protected

◆ create()

◆ getBuildGLCanvas()

FXGLCanvas * GUIGlChildWindow::getBuildGLCanvas ( ) const
virtualinherited

get build GL Canvas

Definition at line 165 of file GUIGlChildWindow.cpp.

References GUIGlChildWindow::myView.

Referenced by GUIApplicationWindow::getBuildGLCanvas().

◆ getColoringSchemesCombo()

FXComboBox * GUIGlChildWindow::getColoringSchemesCombo ( )
inherited

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

Definition at line 183 of file GUIGlChildWindow.cpp.

References GUIGlChildWindow::myColoringSchemes.

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

◆ getLocatorPopup()

FXPopup * GUIGlChildWindow::getLocatorPopup ( )
inherited

@ brief return a pointer to locator popup

Definition at line 177 of file GUIGlChildWindow.cpp.

References GUIGlChildWindow::myLocatorPopup.

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

◆ getNavigationToolBar()

FXToolBar * GUIGlChildWindow::getNavigationToolBar ( GUISUMOAbstractView v)
inherited

return a reference to navigation toolbar

Definition at line 171 of file GUIGlChildWindow.cpp.

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

◆ getParent()

GUIMainWindow * GUIGlChildWindow::getParent ( )
inherited

Returns the main window.

Returns
This view's parent

Definition at line 105 of file GUIGlChildWindow.cpp.

References GUIGlChildWindow::myParent.

Referenced by GUIDialog_GLObjChooser::~GUIDialog_GLObjChooser().

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

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

Referenced by GUIApplicationWindow::openNewView().

◆ 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 258 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 *  data 
)
inherited

Definition at line 239 of file GUIGlChildWindow.cpp.

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

Referenced by FXDEFMAP().

◆ onCmdEditViewport()

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

Definition at line 197 of file GUIGlChildWindow.cpp.

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

Referenced by FXDEFMAP().

◆ onCmdEditViewScheme()

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

◆ onCmdLocate()

◆ onCmdMakeSnapshot()

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

◆ onCmdRecenterView()

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

Definition at line 189 of file GUIGlChildWindow.cpp.

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

Referenced by FXDEFMAP().

◆ onCmdShowToolTips()

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

◆ onCmdSpeedFactor()

◆ onCmdZoomStyle()

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

◆ onKeyPress()

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

handle keys

Definition at line 283 of file GUISUMOViewParent.cpp.

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

Referenced by GUIApplicationWindow::onKeyPress().

◆ onKeyRelease()

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

◆ onSimStep()

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

Called on a simulation step.

Definition at line 250 of file GUISUMOViewParent.cpp.

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

Referenced by FXDEFMAP().

◆ onUpdSpeedFactor()

◆ setToolBarVisibility()

void GUISUMOViewParent::setToolBarVisibility ( const bool  value)

@notify about toggled gaming status

Definition at line 133 of file GUISUMOViewParent.cpp.

References GUIGlChildWindow::myStaticNavigationToolBar.

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

◆ 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 246 of file GUIGlChildWindow.cpp.

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

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

Field Documentation

◆ myColoringSchemes

FXComboBox* GUIGlChildWindow::myColoringSchemes
protectedinherited

The coloring schemes.

Definition at line 117 of file GUIGlChildWindow.h.

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

◆ myContentFrame

FXVerticalFrame* GUIGlChildWindow::myContentFrame
protectedinherited

The contents frame.

Definition at line 114 of file GUIGlChildWindow.h.

Referenced by init().

◆ myGripNavigationToolbar

FXMenuBar* GUIGlChildWindow::myGripNavigationToolbar
protectedinherited

◆ myLocatorButton

FXMenuButton* GUIGlChildWindow::myLocatorButton
protectedinherited

The locator button.

Definition at line 111 of file GUIGlChildWindow.h.

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

◆ myLocatorPopup

FXPopup* GUIGlChildWindow::myLocatorPopup
protectedinherited

◆ myParent

GUIMainWindow* GUIGlChildWindow::myParent
protectedinherited

◆ mySpeedFactorSlider

FXSlider* GUISUMOViewParent::mySpeedFactorSlider = nullptr
protected

◆ myStaticNavigationToolBar

◆ myToolBarDragSpeed

FXToolBarShell* GUISUMOViewParent::myToolBarDragSpeed = nullptr
protected

Definition at line 128 of file GUISUMOViewParent.h.

◆ myToolBarSpeed

FXToolBar* GUISUMOViewParent::myToolBarSpeed = nullptr
protected

Definition at line 129 of file GUISUMOViewParent.h.

◆ myView


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