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

virtual void buildColoringToolBar ()
 
virtual void buildNavigationToolBar ()
 
virtual void buildScreenshotToolBar ()
 
virtual void create ()
 
GNEAdditionalFramegetAdditionalFrame () const
 get frame for GNE_MODE_ADDITIONAL More...
 
virtual FXGLCanvas * getBuildGLCanvas () const
 
FXComboBox & getColoringSchemesCombo ()
 
GNEConnectorFramegetConnectorFrame () const
 get frame for GNE_MODE_CONNECT More...
 
int getFramesAreaWidth ()
 get width of the Frames Area 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 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...
 

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

GNEAdditionalFramemyAdditionalFrame
 the panel for GNE_MODE_ADDITIONAL More...
 
GNEConnectorFramemyConnectorFrame
 the panel for GNE_MODE_CONNECT More...
 
FXHorizontalFrame * myFramesArea
 frame to hold GNEFrames More...
 
FXSplitter * myFramesSplitter
 Splitter to divide ViewNet und GNEFrames. More...
 
GNEInspectorFramemyInspectorFrame
 the panel for GNE_MODE_INSPECT More...
 
GNESelectorFramemySelectorFrame
 the panel for GNE_MODE_SELECT More...
 
GNETLSEditorFramemyTLSEditorFrame
 the panel for GNE_MODE_TLS 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 69 of file GNEViewParent.h.

Constructor & Destructor Documentation

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

References GNEViewNet::buildViewToolBars(), GUIGlChildWindow::create(), GUIIconSubSys::getIcon(), ICON_REDO, and ICON_UNDO.

GNEViewParent::~GNEViewParent ( )

Destructor.

Definition at line 153 of file GNEViewParent.cpp.

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

GNEViewParent::GNEViewParent ( )
inlineprotected

FOX needs this.

Definition at line 147 of file GNEViewParent.h.

Member Function Documentation

void GUIGlChildWindow::buildColoringToolBar ( )
virtualinherited
void GUIGlChildWindow::buildScreenshotToolBar ( )
virtualinherited
void GUIGlChildWindow::create ( )
virtualinherited
GNEAdditionalFrame * GNEViewParent::getAdditionalFrame ( ) const

get frame for GNE_MODE_ADDITIONAL

Definition at line 185 of file GNEViewParent.cpp.

References myAdditionalFrame.

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

FXGLCanvas * GUIGlChildWindow::getBuildGLCanvas ( ) const
virtualinherited
FXComboBox & GUIGlChildWindow::getColoringSchemesCombo ( )
inherited
GNEConnectorFrame * GNEViewParent::getConnectorFrame ( ) const
int GNEViewParent::getFramesAreaWidth ( )

get width of the Frames Area

Definition at line 217 of file GNEViewParent.cpp.

References myFramesArea.

GNEInspectorFrame * GNEViewParent::getInspectorFrame ( ) const

get frame for GNE_MODE_INSPECT

Definition at line 161 of file GNEViewParent.cpp.

References myInspectorFrame.

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

FXPopup * GUIGlChildWindow::getLocatorPopup ( )
inherited
FXToolBar & GUIGlChildWindow::getNavigationToolBar ( GUISUMOAbstractView v)
inherited

Definition at line 177 of file GUIGlChildWindow.cpp.

References GUIGlChildWindow::myNavigationToolBar.

Referenced by GUIGlChildWindow::getView().

GUIMainWindow* GUIGlChildWindow::getParent ( )
inlineinherited

Returns the main window.

Returns
This view's parent

Definition at line 90 of file GUIGlChildWindow.h.

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

Referenced by GUIDialog_GLObjChooser::~GUIDialog_GLObjChooser().

GNETLSEditorFrame * GNEViewParent::getTLSEditorFrame ( ) const
void GNEViewParent::hideFramesArea ( )

hide frames area if all GNEFrames are hidden

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

Definition at line 204 of file GNEViewParent.cpp.

References myAdditionalFrame, myConnectorFrame, myFramesArea, myInspectorFrame, mySelectorFrame, and myTLSEditorFrame.

Referenced by GNEConnectorFrame::hide(), GNETLSEditorFrame::hide(), GNESelectorFrame::hide(), GNEInspectorFrame::hide(), and GNEAdditionalFrame::hide().

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

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

long GUIGlChildWindow::onCmdChangeColorScheme ( FXObject *  ,
FXSelector  sel,
void *  data 
)
inherited
long GNEViewParent::onCmdClose ( FXObject *  ,
FXSelector  ,
void *   
)

Called when the user hits the close button (x)

Definition at line 253 of file GNEViewParent.cpp.

References MID_CLOSE, and GUIGlChildWindow::myParent.

long GUIGlChildWindow::onCmdEditViewport ( FXObject *  ,
FXSelector  ,
void *   
)
inherited
long GUIGlChildWindow::onCmdEditViewScheme ( FXObject *  ,
FXSelector  ,
void *   
)
inherited
long GNEViewParent::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 GNEViewParent::onKeyPress ( FXObject *  o,
FXSelector  sel,
void *  data 
)

Called when user press a key.

Definition at line 320 of file GNEViewParent.cpp.

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

Referenced by GNEApplicationWindow::onKeyPress().

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

Called when user releases a key.

Definition at line 327 of file GNEViewParent.cpp.

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

Referenced by GNEApplicationWindow::onKeyRelease().

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 GUIGlChildWindow::getView(), GUIDialog_GLObjChooser::onCmdCenter(), GUIDialog_GLObjChooser::onCmdText(), and GUIMessageWindow::setCursorPos().

void GNEViewParent::showFramesArea ( )

show frames area if at least a GNEFrame is showed

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

Definition at line 191 of file GNEViewParent.cpp.

References myAdditionalFrame, myConnectorFrame, myFramesArea, myInspectorFrame, mySelectorFrame, and myTLSEditorFrame.

Referenced by GNEConnectorFrame::show(), GNETLSEditorFrame::show(), GNESelectorFrame::show(), GNEInspectorFrame::show(), and GNEAdditionalFrame::show().

Field Documentation

GNEAdditionalFrame* GNEViewParent::myAdditionalFrame
private

the panel for GNE_MODE_ADDITIONAL

Definition at line 172 of file GNEViewParent.h.

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

FXComboBox* GUIGlChildWindow::myColoringSchemes
protectedinherited
GNEConnectorFrame* GNEViewParent::myConnectorFrame
private

the panel for GNE_MODE_CONNECT

Definition at line 166 of file GNEViewParent.h.

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

FXVerticalFrame* GUIGlChildWindow::myContentFrame
protectedinherited
FXHorizontalFrame* GNEViewParent::myFramesArea
private

frame to hold GNEFrames

Definition at line 154 of file GNEViewParent.h.

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

FXSplitter* GNEViewParent::myFramesSplitter
private

Splitter to divide ViewNet und GNEFrames.

Definition at line 157 of file GNEViewParent.h.

GNEInspectorFrame* GNEViewParent::myInspectorFrame
private

the panel for GNE_MODE_INSPECT

Definition at line 160 of file GNEViewParent.h.

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

FXMenuButton* GUIGlChildWindow::myLocatorButton
protectedinherited
FXPopup* GUIGlChildWindow::myLocatorPopup
protectedinherited
GUIMainWindow* GUIGlChildWindow::myParent
protectedinherited
GNESelectorFrame* GNEViewParent::mySelectorFrame
private

the panel for GNE_MODE_SELECT

Definition at line 163 of file GNEViewParent.h.

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

GNETLSEditorFrame* GNEViewParent::myTLSEditorFrame
private

the panel for GNE_MODE_TLS

Definition at line 169 of file GNEViewParent.h.

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

FXHorizontalFrame* GNEViewParent::myViewArea
private

frame to hold myView and myAttributePanel

Definition at line 151 of file GNEViewParent.h.


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