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:
GUIGlChildWindow FXMDIChild

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.
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.
virtual GUISUMOAbstractView * init (FXGLCanvas *share, GUINet &net)
 "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 onCmdChangeColorScheme (FXObject *, FXSelector sel, void *)
long onCmdEditViewport (FXObject *, FXSelector, void *)
long onCmdEditViewScheme (FXObject *, FXSelector, void *)
long onCmdLocate (FXObject *, FXSelector, void *)
 locator-callback
long onCmdMakeSnapshot (FXObject *sender, FXSelector, void *)
 Called if the user wants to make a snapshot (screenshot)
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.
void setView (GUIGlID id)
 Centers the view onto the given artifact.
 ~GUISUMOViewParent ()
 Destructor.

Protected Member Functions

 GUISUMOViewParent ()
 FOX needs this.

Protected Attributes

FXComboBox * myColoringSchemes
FXVerticalFrame * myContentFrame
FXMenuButton * myLocatorButton
FXPopup * myLocatorPopup
 The locator menu.
FXToolBar * myNavigationToolBar
 The tool bar.
GUIMainWindow * myParent
 The parent window.
GUISUMOAbstractView * myView
 the view

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


Constructor & Destructor Documentation

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

GUISUMOViewParent::~GUISUMOViewParent ( )

Destructor.

Definition at line 113 of file GUISUMOViewParent.cpp.

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

GUISUMOViewParent::GUISUMOViewParent ( ) [inline, protected]

FOX needs this.

Definition at line 114 of file GUISUMOViewParent.h.


Member Function Documentation

void GUIGlChildWindow::buildColoringToolBar ( ) [virtual, inherited]
void GUIGlChildWindow::buildScreenshotToolBar ( ) [virtual, inherited]
void GUIGlChildWindow::create ( ) [virtual, inherited]
FXGLCanvas * GUIGlChildWindow::getBuildGLCanvas ( ) const [virtual, inherited]

Definition at line 171 of file GUIGlChildWindow.cpp.

References GUIGlChildWindow::myView.

Referenced by GUIApplicationWindow::getBuildGLCanvas().

FXComboBox & GUIGlChildWindow::getColoringSchemesCombo ( ) [inherited]
FXPopup * GUIGlChildWindow::getLocatorPopup ( ) [inherited]

Definition at line 183 of file GUIGlChildWindow.cpp.

References GUIGlChildWindow::myLocatorPopup.

Referenced by GUIViewTraffic::buildViewToolBars().

FXToolBar & GUIGlChildWindow::getNavigationToolBar ( GUISUMOAbstractView &  v) [inherited]

Definition at line 177 of file GUIGlChildWindow.cpp.

References GUIGlChildWindow::myNavigationToolBar.

GUIMainWindow* GUIGlChildWindow::getParent ( ) [inline, inherited]

Returns the main window.

Returns:
This view's parent

Definition at line 90 of file GUIGlChildWindow.h.

References GUIGlChildWindow::myParent.

Referenced by GUIDialog_GLObjChooser::~GUIDialog_GLObjChooser().

GUISUMOAbstractView* GUIGlChildWindow::getView ( ) const [inline, inherited]

Definition at line 61 of file GUIGlChildWindow.h.

References GUIGlChildWindow::myView.

Referenced by TraCIServerAPI_GUI::getNamedView().

GUISUMOAbstractView * GUISUMOViewParent::init ( FXGLCanvas *  share,
GUINet &  net 
) [virtual]

"Initialises" this window by building the contents

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

Definition at line 102 of file GUISUMOViewParent.cpp.

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

Referenced by GUIApplicationWindow::openNewView().

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

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

long GUIGlChildWindow::onCmdChangeColorScheme ( FXObject *  ,
FXSelector  sel,
void *  data 
) [inherited]
long GUIGlChildWindow::onCmdEditViewport ( FXObject *  ,
FXSelector  ,
void *   
) [inherited]
long GUIGlChildWindow::onCmdEditViewScheme ( FXObject *  ,
FXSelector  ,
void *   
) [inherited]
long GUISUMOViewParent::onCmdMakeSnapshot ( FXObject *  sender,
FXSelector  ,
void *   
)
long GUIGlChildWindow::onCmdRecenterView ( FXObject *  ,
FXSelector  ,
void *   
) [inherited]
long GUIGlChildWindow::onCmdShowToolTips ( FXObject *  sender,
FXSelector  ,
void *   
) [inherited]
long GUIGlChildWindow::onCmdZoomStyle ( FXObject *  sender,
FXSelector  ,
void *   
) [inherited]
long GUISUMOViewParent::onSimStep ( FXObject *  sender,
FXSelector  ,
void *   
)

Called on a simulation step.

Definition at line 205 of file GUISUMOViewParent.cpp.

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

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

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

Referenced by GUIDialog_GLObjChooser::onCmdCenter(), and GUIDialog_GLObjChooser::onCmdText().


Field Documentation

FXVerticalFrame* GUIGlChildWindow::myContentFrame [protected, inherited]

Definition at line 110 of file GUIGlChildWindow.h.

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

FXMenuButton* GUIGlChildWindow::myLocatorButton [protected, inherited]

Definition at line 108 of file GUIGlChildWindow.h.

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

GUIMainWindow* GUIGlChildWindow::myParent [protected, inherited]

The parent window.

Definition at line 115 of file GUIGlChildWindow.h.

Referenced by GUIGlChildWindow::getParent(), init(), onCmdLocate(), and ~GUISUMOViewParent().


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines