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

Data Structures

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

Public Member Functions

void buildColoringToolBar ()
 
void buildNavigationToolBar ()
 
void buildScreenshotToolBar ()
 
virtual void create ()
 
void eraseACChooserDialog (GNEDialogACChooser *chooserDialog)
 remove created chooser dialog More...
 
GNEAdditionalFramegetAdditionalFrame () const
 get frame for GNE_MODE_ADDITIONAL 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...
 
GNEApplicationWindowgetGNEAppWindows () const
 get GNE Application Windows More...
 
GUIMainWindowgetGUIMainWindow () const
 get GUIMainWindow App More...
 
GNEInspectorFramegetInspectorFrame () const
 get frame for GNE_MODE_INSPECT More...
 
FXPopup * getLocatorPopup ()
 
FXToolBar & getNavigationToolBar (GUISUMOAbstractView &v)
 
GUIMainWindowgetParent ()
 Returns the main window. More...
 
GNEPolygonFramegetPolygonFrame () const
 get frame for GNE_MODE_POLYGON More...
 
GNEProhibitionFramegetProhibitionFrame () const
 get frame for GNE_MODE_PROHIBITION More...
 
GNESelectorFramegetSelectorFrame () const
 get frame for GNE_MODE_SELECT More...
 
GNETAZFramegetTAZFrame () const
 get frame for GNE_MODE_TAZ 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=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...
 
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

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 63 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 74 of file GNEViewParent.cpp.

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

◆ ~GNEViewParent()

GNEViewParent::~GNEViewParent ( )

Destructor.

Definition at line 135 of file GNEViewParent.cpp.

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

◆ GNEViewParent() [2/2]

GNEViewParent::GNEViewParent ( )
inlineprotected

FOX needs this.

Definition at line 168 of file GNEViewParent.h.

Member Function Documentation

◆ buildColoringToolBar()

◆ buildNavigationToolBar()

◆ buildScreenshotToolBar()

void GUIGlChildWindow::buildScreenshotToolBar ( )
inherited

◆ create()

void GUIGlChildWindow::create ( )
virtualinherited

◆ eraseACChooserDialog()

◆ getAdditionalFrame()

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

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

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

◆ getDeleteFrame()

GNEDeleteFrame * GNEViewParent::getDeleteFrame ( ) const

◆ getGNEAppWindows()

GNEApplicationWindow * GNEViewParent::getGNEAppWindows ( ) const

get GNE Application Windows

Definition at line 233 of file GNEViewParent.cpp.

References myGNEAppWindows.

Referenced by GNENet::requiereSaveAdditionals(), GNENet::requiereSaveShapes(), and GNENet::requiereSaveTLSPrograms().

◆ getGUIMainWindow()

GUIMainWindow * GNEViewParent::getGUIMainWindow ( ) const

get GUIMainWindow App

Definition at line 227 of file GNEViewParent.cpp.

References GUIGlChildWindow::myParent.

Referenced by GNEFrame::ACHierarchy::createPopUpMenu().

◆ getInspectorFrame()

◆ getLocatorPopup()

FXPopup * GUIGlChildWindow::getLocatorPopup ( )
inherited

◆ getNavigationToolBar()

FXToolBar & GUIGlChildWindow::getNavigationToolBar ( GUISUMOAbstractView v)
inherited

Definition at line 152 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 82 of file GUIGlChildWindow.h.

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

Referenced by GUIDialog_GLObjChooser::~GUIDialog_GLObjChooser().

◆ getPolygonFrame()

◆ getProhibitionFrame()

GNEProhibitionFrame * GNEViewParent::getProhibitionFrame ( ) const

get frame for GNE_MODE_PROHIBITION

Definition at line 201 of file GNEViewParent.cpp.

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

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

◆ getSelectorFrame()

◆ getTAZFrame()

◆ getTLSEditorFrame()

◆ getView()

◆ hideAllFrames()

void GNEViewParent::hideAllFrames ( )

hide all frames

Definition at line 142 of file GNEViewParent.cpp.

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

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

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

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

References GNEAttributeCarrier::isAttributeCarrierSelected().

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

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 423 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 409 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 416 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 222 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 207 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 262 of file GNEViewParent.h.

Referenced by eraseACChooserDialog(), and onCmdLocate().

◆ myColoringSchemes

FXComboBox* GUIGlChildWindow::myColoringSchemes
protectedinherited

◆ myContentFrame

FXVerticalFrame* GUIGlChildWindow::myContentFrame
protectedinherited

◆ myFrames

◆ myFramesArea

FXHorizontalFrame* GNEViewParent::myFramesArea
private

frame to hold GNEFrames

Definition at line 253 of file GNEViewParent.h.

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

◆ myFramesSplitter

FXSplitter* GNEViewParent::myFramesSplitter
private

Splitter to divide ViewNet und GNEFrames.

Definition at line 256 of file GNEViewParent.h.

◆ myGNEAppWindows

GNEApplicationWindow* GNEViewParent::myGNEAppWindows
private

pointer to GNEApplicationWindow

Definition at line 247 of file GNEViewParent.h.

Referenced by getGNEAppWindows().

◆ myLocatorButton

FXMenuButton* GUIGlChildWindow::myLocatorButton
protectedinherited

◆ myLocatorPopup

FXPopup* GUIGlChildWindow::myLocatorPopup
protectedinherited

◆ myNavigationToolBar

◆ myParent

◆ myView

◆ myViewArea

FXHorizontalFrame* GNEViewParent::myViewArea
private

frame to hold myView and myAttributePanel

Definition at line 250 of file GNEViewParent.h.


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