Eclipse SUMO - Simulation of Urban MObility
GNEViewParent Class Reference

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

#include <GNEViewParent.h>

Inheritance diagram for GNEViewParent:
Collaboration diagram for GNEViewParent:

Data Structures

struct  ACChoosers
 struct for ACChoosers dialog More...
 
struct  Frames
 struct for Frames More...
 

Public Member Functions

virtual void create ()
 create GUIGlChildWindow More...
 
void eraseACChooserDialog (GNEDialogACChooser *chooserDialog)
 remove created chooser dialog More...
 
GNEAdditionalFramegetAdditionalFrame () const
 get frame for GNE_NMODE_ADDITIONAL 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...
 
GNEConnectorFramegetConnectorFrame () const
 get frame for GNE_NMODE_CONNECT More...
 
GNECreateEdgeFramegetCreateEdgeFrame () const
 get frame for GNE_NMODE_CREATEEDGE More...
 
GNECrossingFramegetCrossingFrame () const
 get frame for GNE_NMODE_CROSSING More...
 
GNEFramegetCurrentShownFrame () const
 get current frame (note: it can be null) More...
 
GNEDeleteFramegetDeleteFrame () const
 get frame for GNE_NMODE_DELETE More...
 
GNEApplicationWindowgetGNEAppWindows () const
 get GNE Application Windows More...
 
GUIMainWindowgetGUIMainWindow () const
 get GUIMainWindow App More...
 
GNEInspectorFramegetInspectorFrame () const
 get frame for GNE_NMODE_INSPECT 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...
 
GNEPersonFramegetPersonFrame () const
 get frame for GNE_DMODE_PERSON More...
 
GNEPersonPlanFramegetPersonPlanFrame () const
 get frame for GNE_DMODE_PERSONFRAME More...
 
GNEPersonTypeFramegetPersonTypeFrame () const
 get frame for GNE_DMODE_PERSONTYPE More...
 
GNEPolygonFramegetPolygonFrame () const
 get frame for GNE_NMODE_POLYGON More...
 
GNEProhibitionFramegetProhibitionFrame () const
 get frame for GNE_NMODE_PROHIBITION More...
 
GNERouteFramegetRouteFrame () const
 get frame for GNE_DMODE_ROUTE More...
 
GNESelectorFramegetSelectorFrame () const
 get frame for GNE_NMODE_SELECT More...
 
GNEStopFramegetStopFrame () const
 get frame for GNE_DMODE_STOP More...
 
GNETAZFramegetTAZFrame () const
 get frame for GNE_NMODE_TAZ More...
 
GNETLSEditorFramegetTLSEditorFrame () const
 get frame for GNE_NMODE_TLS More...
 
GNEVehicleFramegetVehicleFrame () const
 get frame for GNE_DMODE_VEHICLE More...
 
GNEVehicleTypeFramegetVehicleTypeFrame () const
 get frame for GNE_DMODE_VEHICLETYPE More...
 
GUISUMOAbstractViewgetView () const
 return GUISUMOAbstractView More...
 
 GNEViewParent (FXMDIClient *p, FXMDIMenu *mdimenu, const FXString &name, GNEApplicationWindow *parentWindow, FXGLCanvas *share, GNENet *net, GNEUndoList *undoList, FXIcon *ic=nullptr, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0)
 FOX-declaration. More...
 
void hideAllFrames ()
 hide all frames More...
 
void hideFramesArea ()
 hide frames area if all GNEFrames are hidden More...
 
virtual bool isSelected (GUIGlObject *o) const
 true if the object is selected (may include extra logic besides calling gSelected) More...
 
void setView (GUIGlID id)
 Centers the view onto the given artifact. More...
 
void showFramesArea ()
 show frames area if at least a GNEFrame is showed More...
 
void updateUndoRedoButtons ()
 update toolbar undo/redo buttons (called when user press Ctrl+Z/Y) More...
 
 ~GNEViewParent ()
 Destructor. More...
 
FOX-callbacks

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

long onCmdMakeSnapshot (FXObject *sender, FXSelector, void *)
 
long onCmdClose (FXObject *, FXSelector, void *)
 Called when the user hits the close button (x) More...
 
long onCmdLocate (FXObject *, FXSelector, void *)
 locator-callback More...
 
long onKeyPress (FXObject *o, FXSelector sel, void *data)
 Called when user press a key. More...
 
long onKeyRelease (FXObject *o, FXSelector sel, void *data)
 Called when user releases a key. More...
 
long onCmdUpdateFrameAreaWidth (FXObject *, FXSelector, void *)
 Called when user change the splitter between FrameArea and ViewNet. 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...
 

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...
 
FXToolBar * myStaticNavigationToolBar
 The static navigation tool bar. More...
 
GUISUMOAbstractViewmyView
 The view. More...
 

Private Attributes

ACChoosers myACChoosers
 struct for ACChoosers More...
 
Frames myFrames
 struct for frames More...
 
FXHorizontalFrame * myFramesArea
 frame to hold GNEFrames More...
 
FXSplitter * myFramesSplitter
 Splitter to divide ViewNet und GNEFrames. More...
 
GNEApplicationWindowmyGNEAppWindows
 pointer to GNEApplicationWindow More...
 
FXButton * myRedoButton
 toolbar redo button More...
 
FXButton * myUndoButton
 toolbar undo button More...
 
FXHorizontalFrame * myViewArea
 frame to hold myView and myAttributePanel 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 71 of file GNEViewParent.h.

Constructor & Destructor Documentation

◆ GNEViewParent()

GNEViewParent::GNEViewParent ( FXMDIClient *  p,
FXMDIMenu *  mdimenu,
const FXString &  name,
GNEApplicationWindow parentWindow,
FXGLCanvas *  share,
GNENet net,
GNEUndoList undoList,
FXIcon *  ic = nullptr,
FXuint  opts = 0,
FXint  x = 0,
FXint  y = 0,
FXint  w = 0,
FXint  h = 0 
)

FOX-declaration.

Constructor also builds the view and calls create()

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
[in]shareA canvas tor get the shared context from
[in]netThe network to show

Definition at line 85 of file GNEViewParent.cpp.

References GUIGlChildWindow::create(), GUIIconSubSys::getIcon(), GUIDesignButtonToolbar, GUIDesignFrameArea, GUIDesignSplitter, GUIDesignVerticalSeparator, GUIDesignViewnArea, ICON_REDO, ICON_UNDO, MID_GNE_VIEWPARENT_FRAMEAREAWIDTH, MID_HOTKEY_CTRL_Y_REDO, and MID_HOTKEY_CTRL_Z_UNDO.

◆ ~GNEViewParent()

Member Function Documentation

◆ buildColoringToolBar()

◆ buildNavigationToolBar()

◆ buildScreenshotToolBar()

void GUIGlChildWindow::buildScreenshotToolBar ( )
protectedinherited

◆ create()

◆ eraseACChooserDialog()

◆ getAdditionalFrame()

◆ 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().

◆ getConnectorFrame()

GNEConnectorFrame * GNEViewParent::getConnectorFrame ( ) const

◆ getCreateEdgeFrame()

GNECreateEdgeFrame * GNEViewParent::getCreateEdgeFrame ( ) const

get frame for GNE_NMODE_CREATEEDGE

Definition at line 240 of file GNEViewParent.cpp.

References GNEViewParent::Frames::createEdgeFrame, and myFrames.

Referenced by GNEViewNet::abortOperation(), and GNEViewNet::processLeftButtonPressNetwork().

◆ getCrossingFrame()

GNECrossingFrame * GNEViewParent::getCrossingFrame ( ) const

◆ getCurrentShownFrame()

GNEFrame * GNEViewParent::getCurrentShownFrame ( ) const

get current frame (note: it can be null)

Definition at line 174 of file GNEViewParent.cpp.

References GNEViewParent::Frames::getCurrentShownFrame(), and myFrames.

Referenced by GNEApplicationWindow::onCmdRedo(), and GNEApplicationWindow::onCmdUndo().

◆ getDeleteFrame()

◆ getGNEAppWindows()

◆ getGUIMainWindow()

GUIMainWindow * GNEViewParent::getGUIMainWindow ( ) const

get GUIMainWindow App

Definition at line 308 of file GNEViewParent.cpp.

References GUIGlChildWindow::myParent.

◆ getInspectorFrame()

◆ 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().

◆ getPersonFrame()

◆ getPersonPlanFrame()

◆ getPersonTypeFrame()

GNEPersonTypeFrame * GNEViewParent::getPersonTypeFrame ( ) const

get frame for GNE_DMODE_PERSONTYPE

Definition at line 270 of file GNEViewParent.cpp.

References myFrames, and GNEViewParent::Frames::personTypeFrame.

Referenced by GNEViewNet::updateDemandModeSpecificControls().

◆ getPolygonFrame()

◆ getProhibitionFrame()

GNEProhibitionFrame * GNEViewParent::getProhibitionFrame ( ) const

◆ getRouteFrame()

◆ getSelectorFrame()

◆ getStopFrame()

GNEStopFrame * GNEViewParent::getStopFrame ( ) const

get frame for GNE_DMODE_STOP

Definition at line 264 of file GNEViewParent.cpp.

References myFrames, and GNEViewParent::Frames::stopFrame.

Referenced by GNEViewNet::processLeftButtonPressDemand(), and GNEViewNet::updateDemandModeSpecificControls().

◆ getTAZFrame()

◆ getTLSEditorFrame()

◆ getVehicleFrame()

◆ getVehicleTypeFrame()

GNEVehicleTypeFrame * GNEViewParent::getVehicleTypeFrame ( ) const

◆ getView()

◆ hideAllFrames()

void GNEViewParent::hideAllFrames ( )

◆ hideFramesArea()

void GNEViewParent::hideFramesArea ( )

hide frames area if all GNEFrames are hidden

Note
this function is called in GNEFrame::Show();

Definition at line 298 of file GNEViewParent.cpp.

References GNEViewParent::Frames::isFrameShown(), myFrames, and myFramesArea.

Referenced by GNEFrame::hide().

◆ isSelected()

bool GUIGlChildWindow::isSelected ( GUIGlObject o) const
virtualinherited

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

Reimplemented in GUISUMOViewParent.

Definition at line 254 of file GUIGlChildWindow.cpp.

References GUIGlObject::getGlID(), GUIGlObject::getType(), gSelected, and GUISelectedStorage::isSelected().

Referenced by GUIDialog_GLObjChooser::refreshList().

◆ 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().

◆ onCmdClose()

long GNEViewParent::onCmdClose ( FXObject *  ,
FXSelector  ,
void *   
)

Called when the user hits the close button (x)

Definition at line 393 of file GNEViewParent.cpp.

References MID_HOTKEY_CTRL_W_CLOSESIMULATION, and GUIGlChildWindow::myParent.

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()

long GNEViewParent::onCmdLocate ( FXObject *  ,
FXSelector  sel,
void *   
)

locator-callback

Definition at line 400 of file GNEViewParent.cpp.

References GNEViewParent::ACChoosers::ACChooserAdditional, GNEViewParent::ACChoosers::ACChooserEdges, GNEViewParent::ACChoosers::ACChooserJunction, GNEViewParent::ACChoosers::ACChooserPersons, GNEViewParent::ACChoosers::ACChooserPOI, GNEViewParent::ACChoosers::ACChooserPolygon, GNEViewParent::ACChoosers::ACChooserRoutes, GNEViewParent::ACChoosers::ACChooserStops, GNEViewParent::ACChoosers::ACChooserTLS, GNEViewParent::ACChoosers::ACChooserVehicles, GNENet::AttributeCarriers::demandElements, GNENet::getAttributeCarriers(), GUIIconSubSys::getIcon(), GNEViewNet::getNet(), ShapeContainer::getPOIs(), ShapeContainer::getPolygons(), ICON_LOCATEADD, ICON_LOCATEEDGE, ICON_LOCATEJUNCTION, ICON_LOCATEPERSON, ICON_LOCATEPOI, ICON_LOCATEPOLY, ICON_LOCATEROUTE, ICON_LOCATESTOP, ICON_LOCATETLS, ICON_LOCATEVEHICLE, MID_LOCATEADD, MID_LOCATEEDGE, MID_LOCATEJUNCTION, MID_LOCATEPERSON, MID_LOCATEPOI, MID_LOCATEPOLY, MID_LOCATEROUTE, MID_LOCATESTOP, MID_LOCATETLS, MID_LOCATEVEHICLE, myACChoosers, GUIGlChildWindow::myLocatorButton, GUIGlChildWindow::myLocatorPopup, GUIGlChildWindow::myView, GNENet::retrieveAdditionals(), GNENet::retrieveEdges(), GNENet::retrieveJunctions(), SUMO_TAG_FLOW, SUMO_TAG_PERSON, SUMO_TAG_PERSONFLOW, SUMO_TAG_ROUTE, SUMO_TAG_ROUTEFLOW, SUMO_TAG_STOP_BUSSTOP, SUMO_TAG_STOP_CHARGINGSTATION, SUMO_TAG_STOP_CONTAINERSTOP, SUMO_TAG_STOP_LANE, SUMO_TAG_STOP_PARKINGAREA, SUMO_TAG_TRIP, and SUMO_TAG_VEHICLE.

Referenced by FXDEFMAP(), and GNEApplicationWindow::onCmdLocate().

◆ onCmdMakeSnapshot()

long GNEViewParent::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

◆ onCmdUpdateFrameAreaWidth()

long GNEViewParent::onCmdUpdateFrameAreaWidth ( FXObject *  ,
FXSelector  ,
void *   
)

Called when user change the splitter between FrameArea and ViewNet.

Definition at line 622 of file GNEViewParent.cpp.

References myFrames, myFramesArea, and GNEViewParent::Frames::setWidth().

Referenced by FXDEFMAP().

◆ onCmdZoomStyle()

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

◆ onKeyPress()

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

Called when user press a key.

Definition at line 608 of file GNEViewParent.cpp.

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

Referenced by GNEApplicationWindow::onKeyPress().

◆ onKeyRelease()

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

Called when user releases a key.

Definition at line 615 of file GNEViewParent.cpp.

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

Referenced by GNEApplicationWindow::onKeyRelease().

◆ 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().

◆ showFramesArea()

void GNEViewParent::showFramesArea ( )

show frames area if at least a GNEFrame is showed

Note
this function is called in GNEFrame::Show();

Definition at line 288 of file GNEViewParent.cpp.

References GNEViewParent::Frames::isFrameShown(), myFrames, and myFramesArea.

Referenced by GNEFrame::show().

◆ updateUndoRedoButtons()

void GNEViewParent::updateUndoRedoButtons ( )

update toolbar undo/redo buttons (called when user press Ctrl+Z/Y)

Definition at line 352 of file GNEViewParent.cpp.

References GNEApplicationWindow::getUndoList(), myGNEAppWindows, myRedoButton, myUndoButton, GNEUndoList::p_onUpdRedo(), and GNEUndoList::p_onUpdUndo().

Referenced by GNEApplicationWindow::onCmdRedo(), and GNEApplicationWindow::onCmdUndo().

Field Documentation

◆ myACChoosers

ACChoosers GNEViewParent::myACChoosers
private

struct for ACChoosers

Definition at line 341 of file GNEViewParent.h.

Referenced by eraseACChooserDialog(), and onCmdLocate().

◆ 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 GUISUMOViewParent::init().

◆ myFrames

◆ myFramesArea

FXHorizontalFrame* GNEViewParent::myFramesArea
private

frame to hold GNEFrames

Definition at line 326 of file GNEViewParent.h.

Referenced by hideFramesArea(), onCmdUpdateFrameAreaWidth(), and showFramesArea().

◆ myFramesSplitter

FXSplitter* GNEViewParent::myFramesSplitter
private

Splitter to divide ViewNet und GNEFrames.

Definition at line 335 of file GNEViewParent.h.

◆ myGNEAppWindows

GNEApplicationWindow* GNEViewParent::myGNEAppWindows
private

pointer to GNEApplicationWindow

Definition at line 320 of file GNEViewParent.h.

Referenced by getGNEAppWindows(), updateUndoRedoButtons(), and ~GNEViewParent().

◆ myGripNavigationToolbar

◆ myLocatorButton

FXMenuButton* GUIGlChildWindow::myLocatorButton
protectedinherited

The locator button.

Definition at line 111 of file GUIGlChildWindow.h.

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

◆ myLocatorPopup

FXPopup* GUIGlChildWindow::myLocatorPopup
protectedinherited

◆ myParent

◆ myRedoButton

FXButton* GNEViewParent::myRedoButton
private

toolbar redo button

Definition at line 332 of file GNEViewParent.h.

Referenced by updateUndoRedoButtons().

◆ myStaticNavigationToolBar

◆ myUndoButton

FXButton* GNEViewParent::myUndoButton
private

toolbar undo button

Definition at line 329 of file GNEViewParent.h.

Referenced by updateUndoRedoButtons().

◆ myView

◆ myViewArea

FXHorizontalFrame* GNEViewParent::myViewArea
private

frame to hold myView and myAttributePanel

Definition at line 323 of file GNEViewParent.h.


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