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:
Inheritance graph
Collaboration diagram for GNEViewParent:
Collaboration graph

Public Member Functions

void buildColoringToolBar ()
 
void buildNavigationToolBar ()
 
void buildScreenshotToolBar ()
 
virtual void create ()
 
GNEAdditionalFramegetAdditionalFrame () const
 get frame for GNE_MODE_ADDITIONAL More...
 
GUIMainWindowgetApp () const
 get App (GUIMainWindow) More...
 
virtual FXGLCanvas * getBuildGLCanvas () const
 
FXComboBox & getColoringSchemesCombo ()
 
GNEConnectorFramegetConnectorFrame () const
 get frame for GNE_MODE_CONNECT More...
 
GNECrossingFramegetCrossingFrame () const
 get frame for GNE_MODE_CROSSING More...
 
GNEDeleteFramegetDeleteFrame () const
 get frame for GNE_MODE_DELETE More...
 
GNEInspectorFramegetInspectorFrame () const
 get frame for GNE_MODE_INSPECT More...
 
FXPopup * getLocatorPopup ()
 
FXToolBar & getNavigationToolBar (GUISUMOAbstractView &v)
 
GUIMainWindowgetParent ()
 Returns the main window. More...
 
GNESelectorFramegetSelectorFrame () const
 get frame for GNE_MODE_SELECT More...
 
GNETLSEditorFramegetTLSEditorFrame () const
 get frame for GNE_MODE_TLS More...
 
GUISUMOAbstractViewgetView () const
 
 GNEViewParent (FXMDIClient *p, FXMDIMenu *mdimenu, const FXString &name, GNEApplicationWindow *parentWindow, FXGLCanvas *share, GNENet *net, GNEUndoList *undoList, FXIcon *ic=NULL, 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...
 
bool isSelected (GUIGlObject *o) const
 true if the object is selected (may include extra logic besides calling gSelected) More...
 
long onCmdChangeColorScheme (FXObject *, FXSelector sel, void *)
 
long onCmdEditViewport (FXObject *, FXSelector, void *)
 
long onCmdEditViewScheme (FXObject *, FXSelector, void *)
 
long onCmdRecenterView (FXObject *, FXSelector, void *)
 
long onCmdShowToolTips (FXObject *sender, FXSelector, void *)
 
long onCmdZoomStyle (FXObject *sender, FXSelector, void *)
 
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...
 

Protected Member Functions

 GNEViewParent ()
 FOX needs this. More...
 

Protected Attributes

FXComboBox * myColoringSchemes
 
FXVerticalFrame * myContentFrame
 
FXMenuButton * myLocatorButton
 
FXPopup * myLocatorPopup
 The locator menu. More...
 
FXToolBar * myNavigationToolBar
 The tool bar. More...
 
GUIMainWindowmyParent
 The parent window. More...
 
GUISUMOAbstractViewmyView
 the view More...
 

Private Attributes

FXHorizontalFrame * myFramesArea
 frame to hold GNEFrames More...
 
FXSplitter * myFramesSplitter
 Splitter to divide ViewNet und GNEFrames. More...
 
std::map< int, GNEFrame * > myGNEFrames
 map with the Frames 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 = NULL,
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 89 of file GNEViewParent.cpp.

References GNEViewNet::buildViewToolBars(), GUIGlChildWindow::create(), GUIIconSubSys::getIcon(), GUIDesignButtonToolbar, GUIDesignFrameArea, GUIDesignSplitter, GUIDesignVerticalSeparator, GUIDesignViewnArea, ICON_REDO, ICON_UNDO, MID_GNE_MODE_ADDITIONAL, MID_GNE_MODE_CONNECT, MID_GNE_MODE_CROSSING, MID_GNE_MODE_DELETE, MID_GNE_MODE_INSPECT, MID_GNE_MODE_SELECT, MID_GNE_MODE_TLS, and MID_GNE_SIZEOF_FRAMEAREAWIDTH_UPDATED.

◆ ~GNEViewParent()

GNEViewParent::~GNEViewParent ( )

Destructor.

Definition at line 156 of file GNEViewParent.cpp.

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

◆ GNEViewParent() [2/2]

GNEViewParent::GNEViewParent ( )
inlineprotected

FOX needs this.

Definition at line 162 of file GNEViewParent.h.

Member Function Documentation

◆ buildColoringToolBar()

◆ buildNavigationToolBar()

◆ buildScreenshotToolBar()

void GUIGlChildWindow::buildScreenshotToolBar ( )
inherited

◆ create()

void GUIGlChildWindow::create ( )
virtualinherited

◆ getAdditionalFrame()

GNEAdditionalFrame * GNEViewParent::getAdditionalFrame ( ) const

◆ getApp()

GUIMainWindow * GNEViewParent::getApp ( ) const

◆ getBuildGLCanvas()

FXGLCanvas * GUIGlChildWindow::getBuildGLCanvas ( ) const
virtualinherited

◆ getColoringSchemesCombo()

FXComboBox & GUIGlChildWindow::getColoringSchemesCombo ( )
inherited

◆ getConnectorFrame()

GNEConnectorFrame * GNEViewParent::getConnectorFrame ( ) const

◆ getCrossingFrame()

GNECrossingFrame * GNEViewParent::getCrossingFrame ( ) const

get frame for GNE_MODE_CROSSING

Definition at line 200 of file GNEViewParent.cpp.

References MID_GNE_MODE_CROSSING, and myGNEFrames.

Referenced by GNEViewNet::onLeftBtnPress(), and GNEViewNet::updateModeSpecificControls().

◆ getDeleteFrame()

GNEDeleteFrame * GNEViewParent::getDeleteFrame ( ) const

◆ getInspectorFrame()

◆ getLocatorPopup()

FXPopup * GUIGlChildWindow::getLocatorPopup ( )
inherited

◆ getNavigationToolBar()

FXToolBar & GUIGlChildWindow::getNavigationToolBar ( GUISUMOAbstractView v)
inherited

Definition at line 159 of file GUIGlChildWindow.cpp.

References GUIGlChildWindow::myNavigationToolBar.

Referenced by GUIGlChildWindow::getView().

◆ getParent()

GUIMainWindow* GUIGlChildWindow::getParent ( )
inlineinherited

Returns the main window.

Returns
This view's parent

Definition at line 89 of file GUIGlChildWindow.h.

References GUIGlChildWindow::isSelected(), and GUIGlChildWindow::myParent.

Referenced by GUIDialog_GLObjChooser::~GUIDialog_GLObjChooser().

◆ getSelectorFrame()

◆ getTLSEditorFrame()

GNETLSEditorFrame * GNEViewParent::getTLSEditorFrame ( ) const

◆ getView()

◆ hideAllFrames()

void GNEViewParent::hideAllFrames ( )

hide all frames

Definition at line 163 of file GNEViewParent.cpp.

References myGNEFrames.

Referenced by GNEViewNet::updateModeSpecificControls().

◆ hideFramesArea()

void GNEViewParent::hideFramesArea ( )

hide frames area if all GNEFrames are hidden

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

Definition at line 230 of file GNEViewParent.cpp.

References myFramesArea, and myGNEFrames.

Referenced by GNEFrame::hide().

◆ isSelected()

bool GNEViewParent::isSelected ( GUIGlObject o) const
virtual

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

Reimplemented from GUIGlChildWindow.

Definition at line 338 of file GNEViewParent.cpp.

References GUIGlObject::getGlID(), GNEEdge::getLaneGlIDs(), GUIGlObject::getType(), GLO_EDGE, GLO_LANE, gSelected, and GUISelectedStorage::isSelected().

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

References MID_CLOSE, and GUIGlChildWindow::myParent.

◆ onCmdEditViewport()

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

◆ onCmdEditViewScheme()

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

◆ onCmdLocate()

◆ onCmdMakeSnapshot()

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

References myFramesArea, and myGNEFrames.

◆ 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 359 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 366 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 229 of file GUIGlChildWindow.cpp.

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

Referenced by GUIGlChildWindow::getView(), GUIDialog_GLObjChooser::onCmdCenter(), GUIDialog_GLObjChooser::onCmdText(), 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 212 of file GNEViewParent.cpp.

References myFramesArea, and myGNEFrames.

Referenced by GNEFrame::show().

Field Documentation

◆ myColoringSchemes

FXComboBox* GUIGlChildWindow::myColoringSchemes
protectedinherited

◆ myContentFrame

FXVerticalFrame* GUIGlChildWindow::myContentFrame
protectedinherited

◆ myFramesArea

FXHorizontalFrame* GNEViewParent::myFramesArea
private

frame to hold GNEFrames

Definition at line 169 of file GNEViewParent.h.

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

◆ myFramesSplitter

FXSplitter* GNEViewParent::myFramesSplitter
private

Splitter to divide ViewNet und GNEFrames.

Definition at line 172 of file GNEViewParent.h.

◆ myGNEFrames

◆ myLocatorButton

FXMenuButton* GUIGlChildWindow::myLocatorButton
protectedinherited

◆ myLocatorPopup

FXPopup* GUIGlChildWindow::myLocatorPopup
protectedinherited

◆ myNavigationToolBar

◆ myParent

GUIMainWindow* GUIGlChildWindow::myParent
protectedinherited

◆ myView

◆ myViewArea

FXHorizontalFrame* GNEViewParent::myViewArea
private

frame to hold myView and myAttributePanel

Definition at line 166 of file GNEViewParent.h.


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