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...
 
 ~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...
 
 GNEViewParent ()
 FOX needs this. 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...
 
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 72 of file GNEViewParent.h.

Constructor & Destructor Documentation

◆ GNEViewParent() [1/2]

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

◆ GNEViewParent() [2/2]

GNEViewParent::GNEViewParent ( )
inlineprotected

FOX needs this.

Definition at line 201 of file GNEViewParent.h.

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 166 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 184 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 239 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 173 of file GNEViewParent.cpp.

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

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

◆ getDeleteFrame()

◆ getGNEAppWindows()

GNEApplicationWindow * GNEViewParent::getGNEAppWindows ( ) const

get GNE Application Windows

Definition at line 313 of file GNEViewParent.cpp.

References myGNEAppWindows.

Referenced by GNEPersonPlanFrame::PersonPlanCreator::addEdge(), GNERouteFrame::ConsecutiveEdges::addEdge(), GNERouteFrame::NonConsecutiveEdges::addEdge(), GNEFrameModuls::EdgePathCreator::addEdge(), GNEViewNetHelper::CommonCheckableButtons::buildCommonCheckableButtons(), GNEViewNetHelper::CommonViewOptions::buildCommonViewOptionsMenuChecks(), GNEViewNetHelper::DemandCheckableButtons::buildDemandCheckableButtons(), GNEViewNetHelper::DemandViewOptions::buildDemandViewOptionsMenuChecks(), GNEViewNetHelper::NetworkCheckableButtons::buildNetworkCheckableButtons(), GNEViewNetHelper::NetworkViewOptions::buildNetworkViewOptionsMenuChecks(), GNEViewNetHelper::EditModes::buildSuperModeButtons(), GNEFrameModuls::EdgePathCreator::clearEdges(), GNEViewNetHelper::DemandViewOptions::hideDemandViewOptionsMenuChecks(), GNEViewNetHelper::NetworkViewOptions::hideNetworkViewOptionsMenuChecks(), GNEPersonPlanFrame::PersonPlanCreator::onCmdAbortPersonPlanCreation(), GNERouteFrame::ConsecutiveEdges::onCmdAbortRoute(), GNERouteFrame::NonConsecutiveEdges::onCmdAbortRoute(), GNEPersonPlanFrame::PersonPlanCreator::onCmdFinishPersonPlanCreation(), GNENet::requiereSaveAdditionals(), GNENet::requiereSaveDemandElements(), GNENet::requiereSaveTLSPrograms(), GNENet::saveDemandElements(), GNEViewNetHelper::EditModes::setDemandEditMode(), GNEViewNetHelper::EditModes::setNetworkEditMode(), GNEViewNetHelper::EditModes::setSupermode(), GNEViewNet::updateDemandModeSpecificControls(), and GNEViewNet::updateNetworkModeSpecificControls().

◆ getGUIMainWindow()

GUIMainWindow * GNEViewParent::getGUIMainWindow ( ) const

◆ getInspectorFrame()

◆ getLocatorPopup()

FXPopup * GUIGlChildWindow::getLocatorPopup ( )
inherited

@ brief return a pointer to locator popup

Definition at line 178 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 172 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 106 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 269 of file GNEViewParent.cpp.

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

Referenced by GNEViewNet::updateDemandModeSpecificControls().

◆ getPolygonFrame()

◆ getProhibitionFrame()

GNEProhibitionFrame * GNEViewParent::getProhibitionFrame ( ) const

◆ getRouteFrame()

◆ getSelectorFrame()

GNESelectorFrame * GNEViewParent::getSelectorFrame ( ) const

get frame for GNE_NMODE_SELECT

Definition at line 185 of file GNEViewParent.cpp.

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

Referenced by GNEViewNet::abortOperation(), GNEViewNet::getAttributeCarriersInBoundary(), GNEConnectorFrame::ConnectionOperations::onCmdSelectConflicts(), GNEConnectorFrame::ConnectionOperations::onCmdSelectDeadEnds(), GNEConnectorFrame::ConnectionOperations::onCmdSelectDeadStarts(), GNEConnectorFrame::ConnectionOperations::onCmdSelectPass(), GNEViewNetHelper::SelectingArea::processBoundarySelection(), GNEInspectorFrame::processDemandSupermodeClick(), GNEViewNet::processLeftButtonPressDemand(), GNEViewNet::processLeftButtonPressNetwork(), GNEInspectorFrame::processNetworkSupermodeClick(), GNEVehicleType::selectAttributeCarrier(), GNENetElement::selectAttributeCarrier(), GNEStop::selectAttributeCarrier(), GNEShape::selectAttributeCarrier(), GNERide::selectAttributeCarrier(), GNEPersonTrip::selectAttributeCarrier(), GNEWalk::selectAttributeCarrier(), GNERoute::selectAttributeCarrier(), GNEPerson::selectAttributeCarrier(), GNEAdditional::selectAttributeCarrier(), GNEVehicle::selectAttributeCarrier(), GNEVehicleType::unselectAttributeCarrier(), GNENetElement::unselectAttributeCarrier(), GNEStop::unselectAttributeCarrier(), GNEShape::unselectAttributeCarrier(), GNERide::unselectAttributeCarrier(), GNEPersonTrip::unselectAttributeCarrier(), GNEWalk::unselectAttributeCarrier(), GNERoute::unselectAttributeCarrier(), GNEPerson::unselectAttributeCarrier(), GNEAdditional::unselectAttributeCarrier(), GNEVehicle::unselectAttributeCarrier(), GNEViewNet::updateDemandModeSpecificControls(), and GNEViewNet::updateNetworkModeSpecificControls().

◆ getStopFrame()

GNEStopFrame * GNEViewParent::getStopFrame ( ) const

get frame for GNE_DMODE_STOP

Definition at line 263 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 297 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 255 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

◆ onCmdClose()

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

Called when the user hits the close button (x)

Definition at line 383 of file GNEViewParent.cpp.

References MID_HOTKEY_CTRL_W_CLOSESIMULATION, and GUIGlChildWindow::myParent.

◆ onCmdEditViewport()

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

◆ onCmdEditViewScheme()

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

◆ onCmdLocate()

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

◆ onCmdMakeSnapshot()

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

◆ onCmdRecenterView()

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

◆ 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 592 of file GNEViewParent.cpp.

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

◆ 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 578 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 585 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 247 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 287 of file GNEViewParent.cpp.

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

Referenced by GNEFrame::show().

Field Documentation

◆ myACChoosers

ACChoosers GNEViewParent::myACChoosers
private

struct for ACChoosers

Definition at line 331 of file GNEViewParent.h.

Referenced by eraseACChooserDialog(), and onCmdLocate().

◆ myColoringSchemes

FXComboBox* GUIGlChildWindow::myColoringSchemes
protectedinherited

The coloring schemes.

Definition at line 119 of file GUIGlChildWindow.h.

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

◆ myContentFrame

FXVerticalFrame* GUIGlChildWindow::myContentFrame
protectedinherited

The contents frame.

Definition at line 116 of file GUIGlChildWindow.h.

Referenced by GUISUMOViewParent::init().

◆ myFrames

◆ myFramesArea

FXHorizontalFrame* GNEViewParent::myFramesArea
private

frame to hold GNEFrames

Definition at line 322 of file GNEViewParent.h.

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

◆ myFramesSplitter

FXSplitter* GNEViewParent::myFramesSplitter
private

Splitter to divide ViewNet und GNEFrames.

Definition at line 325 of file GNEViewParent.h.

◆ myGNEAppWindows

GNEApplicationWindow* GNEViewParent::myGNEAppWindows
private

pointer to GNEApplicationWindow

Definition at line 316 of file GNEViewParent.h.

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

◆ myGripNavigationToolbar

FXMenuBar* GUIGlChildWindow::myGripNavigationToolbar
protectedinherited

◆ myLocatorButton

FXMenuButton* GUIGlChildWindow::myLocatorButton
protectedinherited

The locator button.

Definition at line 113 of file GUIGlChildWindow.h.

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

◆ myLocatorPopup

FXPopup* GUIGlChildWindow::myLocatorPopup
protectedinherited

◆ myParent

◆ myStaticNavigationToolBar

◆ myView

◆ myViewArea

FXHorizontalFrame* GNEViewParent::myViewArea
private

frame to hold myView and myAttributePanel

Definition at line 319 of file GNEViewParent.h.


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