GUIMainWindow Class Reference

#include <GUIMainWindow.h>

Inheritance diagram for GUIMainWindow:

FXMainWindow GUIApplicationWindow

Detailed Description

Definition at line 44 of file GUIMainWindow.h.


Public Member Functions

void addChild (FXMainWindow *child, bool updateOnSimStep=true)
void addChild (FXMDIChild *child, bool updateOnSimStep=true)
 Adds a further child window to the list.
FXFont * getBoldFont ()
virtual FXGLCanvasgetBuildGLCanvas () const =0
FXLabelgetCartesianLabel ()
virtual SUMOTime getCurrentSimTime () const =0
FXLabelgetGeoLabel ()
FXGLVisual * getGLVisual () const
 GUIMainWindow (FXApp *a)
bool isGaming () const throw ()
virtual bool loadSelection (const std::string &file, std::string &msg)=0 throw ()
 Loads a selection from a given file.
void removeChild (FXMainWindow *child)
void removeChild (FXMDIChild *child)
 removes the given child window from the list
virtual void setStatusBarText (const std::string &)
void updateChildren ()
virtual ~GUIMainWindow ()

Protected Member Functions

 GUIMainWindow ()

Protected Attributes

bool myAmGaming
 information whether the gui is currently in gaming mode
FXFont * myBoldFont
 Font used for popup-menu titles.
FXDockSite * myBottomDock
FXLabelmyCartesianCoordinate
 Labels for the current cartesian and geo-coordinate.
FXHorizontalFramemyCartesianFrame
FXLabelmyGeoCoordinate
FXHorizontalFramemyGeoFrame
FXGLVisual * myGLVisual
 The gl-visual used.
FXDockSite * myLeftDock
FXMDIClient * myMDIClient
 The multi view panel.
FXDockSite * myRightDock
bool myRunAtBegin
FXStatusBar * myStatusbar
 The status bar.
std::vector< FXMDIChild * > mySubWindows
FXDockSite * myTopDock
MFXMutex myTrackerLock
 A lock to make the removal and addition of trackers secure.
std::vector< FXMainWindow * > myTrackerWindows

Constructor & Destructor Documentation

GUIMainWindow::GUIMainWindow ( FXApp *  a  ) 

Definition at line 45 of file GUIMainWindow.cpp.

References myBoldFont, myBottomDock, myLeftDock, myRightDock, and myTopDock.

00046         : FXMainWindow(a,"SUMO-gui main window",NULL,NULL,DECOR_ALL,20,20,600,400),
00047         myGLVisual(new FXGLVisual(a, VISUAL_DOUBLEBUFFER|VISUAL_STEREO)),
00048         myRunAtBegin(false), myAmGaming(false) {
00049 
00050     FXFontDesc fdesc;
00051     getApp()->getNormalFont()->getFontDesc(fdesc);
00052     fdesc.weight = FXFont::Bold;
00053     myBoldFont = new FXFont(getApp(), fdesc);
00054 
00055     myTopDock=new FXDockSite(this,LAYOUT_SIDE_TOP|LAYOUT_FILL_X);
00056     myBottomDock=new FXDockSite(this,LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X);
00057     myLeftDock=new FXDockSite(this,LAYOUT_SIDE_LEFT|LAYOUT_FILL_Y);
00058     myRightDock=new FXDockSite(this,LAYOUT_SIDE_RIGHT|LAYOUT_FILL_Y);
00059 }

GUIMainWindow::~GUIMainWindow (  )  [virtual]

Definition at line 62 of file GUIMainWindow.cpp.

References myBoldFont, myBottomDock, myLeftDock, myRightDock, and myTopDock.

00062                               {
00063     delete myBoldFont;
00064     delete myTopDock;
00065     delete myBottomDock;
00066     delete myLeftDock;
00067     delete myRightDock;
00068 }

GUIMainWindow::GUIMainWindow (  )  [inline, protected]

Definition at line 111 of file GUIMainWindow.h.

00111 { }


Member Function Documentation

void GUIMainWindow::addChild ( FXMainWindow child,
bool  updateOnSimStep = true 
)

Definition at line 89 of file GUIMainWindow.cpp.

References MFXMutex::lock(), myTrackerLock, myTrackerWindows, and MFXMutex::unlock().

00089                                                                          {
00090     myTrackerLock.lock();
00091     myTrackerWindows.push_back(child);
00092     myTrackerLock.unlock();
00093 }

void GUIMainWindow::addChild ( FXMDIChild child,
bool  updateOnSimStep = true 
)

Adds a further child window to the list.

Definition at line 73 of file GUIMainWindow.cpp.

References mySubWindows.

Referenced by GUIParameterTableWindow::closeBuilding(), and GUIParameterTracker::GUIParameterTracker().

00073                                                                        {
00074     mySubWindows.push_back(child);
00075 }

FXFont * GUIMainWindow::getBoldFont (  ) 

Definition at line 107 of file GUIMainWindow.cpp.

References myBoldFont.

00107                            {
00108     return myBoldFont;
00109 }

virtual FXGLCanvas* GUIMainWindow::getBuildGLCanvas (  )  const [pure virtual]

Implemented in GUIApplicationWindow.

FXLabel & GUIMainWindow::getCartesianLabel (  ) 

Definition at line 132 of file GUIMainWindow.cpp.

References myCartesianCoordinate.

Referenced by GUISUMOAbstractView::updatePositionInformation().

00132                                  {
00133     return *myCartesianCoordinate;
00134 }

virtual SUMOTime GUIMainWindow::getCurrentSimTime (  )  const [pure virtual]

FXLabel & GUIMainWindow::getGeoLabel (  ) 

Definition at line 138 of file GUIMainWindow.cpp.

References myGeoCoordinate.

Referenced by GUISUMOAbstractView::updatePositionInformation().

00138                            {
00139     return *myGeoCoordinate;
00140 }

FXGLVisual * GUIMainWindow::getGLVisual (  )  const

Definition at line 126 of file GUIMainWindow.cpp.

References myGLVisual.

Referenced by GUISUMOViewParent::init().

00126                                  {
00127     return myGLVisual;
00128 }

bool GUIMainWindow::isGaming (  )  const throw ()

Definition at line 144 of file GUIMainWindow.cpp.

References myAmGaming.

Referenced by GUISUMOAbstractView::onLeftBtnRelease().

00144                                       {
00145     return myAmGaming;
00146 }

virtual bool GUIMainWindow::loadSelection ( const std::string &  file,
std::string &  msg 
) throw () [pure virtual]

Loads a selection from a given file.

Parameters:
[in] file The file to load the selection from
[out] msg The error message
Returns:
Whether the selection could be loaded (fills the error message if not)

Implemented in GUIApplicationWindow.

Referenced by GUIDialog_GLChosenEditor::onCmdLoad().

void GUIMainWindow::removeChild ( FXMainWindow child  ) 

Definition at line 97 of file GUIMainWindow.cpp.

References MFXMutex::lock(), myTrackerLock, myTrackerWindows, and MFXMutex::unlock().

00097                                               {
00098     myTrackerLock.lock();
00099     std::vector<FXMainWindow*>::iterator i =
00100         std::find(myTrackerWindows.begin(), myTrackerWindows.end(), child);
00101     myTrackerWindows.erase(i);
00102     myTrackerLock.unlock();
00103 }

void GUIMainWindow::removeChild ( FXMDIChild child  ) 

virtual void GUIMainWindow::setStatusBarText ( const std::string &   )  [inline, virtual]

Reimplemented in GUIApplicationWindow.

Definition at line 66 of file GUIMainWindow.h.

00066 { }

void GUIMainWindow::updateChildren (  ) 


Field Documentation

information whether the gui is currently in gaming mode

Definition at line 108 of file GUIMainWindow.h.

Referenced by isGaming(), and GUIApplicationWindow::onCmdGaming().

FXFont* GUIMainWindow::myBoldFont [protected]

Font used for popup-menu titles.

Definition at line 87 of file GUIMainWindow.h.

Referenced by getBoldFont(), GUIMainWindow(), and ~GUIMainWindow().

FXDockSite * GUIMainWindow::myBottomDock [protected]

Definition at line 103 of file GUIMainWindow.h.

Referenced by GUIMainWindow(), and ~GUIMainWindow().

Labels for the current cartesian and geo-coordinate.

Definition at line 96 of file GUIMainWindow.h.

Referenced by GUIApplicationWindow::closeAllWindows(), GUIApplicationWindow::dependentBuild(), and getCartesianLabel().

FXGLVisual* GUIMainWindow::myGLVisual [protected]

The gl-visual used.

Definition at line 101 of file GUIMainWindow.h.

Referenced by getGLVisual(), and GUIApplicationWindow::~GUIApplicationWindow().

FXDockSite * GUIMainWindow::myLeftDock [protected]

Definition at line 103 of file GUIMainWindow.h.

Referenced by GUIMainWindow(), and ~GUIMainWindow().

FXMDIClient* GUIMainWindow::myMDIClient [protected]

FXDockSite * GUIMainWindow::myRightDock [protected]

Definition at line 103 of file GUIMainWindow.h.

Referenced by GUIMainWindow(), and ~GUIMainWindow().

FXStatusBar* GUIMainWindow::myStatusbar [protected]

std::vector<FXMDIChild*> GUIMainWindow::mySubWindows [protected]

Definition at line 81 of file GUIMainWindow.h.

Referenced by addChild(), GUIApplicationWindow::closeAllWindows(), and removeChild().

FXDockSite* GUIMainWindow::myTopDock [protected]

A lock to make the removal and addition of trackers secure.

Definition at line 84 of file GUIMainWindow.h.

Referenced by addChild(), GUIApplicationWindow::closeAllWindows(), removeChild(), and updateChildren().

std::vector<FXMainWindow*> GUIMainWindow::myTrackerWindows [protected]


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

Generated on Wed May 5 00:06:44 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6