GUIGlChildWindow Class Reference

#include <GUIGlChildWindow.h>

Inheritance diagram for GUIGlChildWindow:

FXMDIChild GUISUMOViewParent

Detailed Description

Definition at line 46 of file GUIGlChildWindow.h.


Public Member Functions

virtual void buildColoringToolBar ()
virtual void buildNavigationToolBar ()
virtual void buildScreenshotToolBar ()
virtual void create ()
virtual FXGLCanvasgetBuildGLCanvas () const
FXComboBox & getColoringSchemesCombo ()
FXPopup * getLocatorPopup ()
FXToolBar & getNavigationToolBar (GUISUMOAbstractView &v)
 GUIGlChildWindow (FXMDIClient *p, FXMDIMenu *mdimenu, const FXString &name, FXIcon *ic=NULL, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0)
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 *)
virtual ~GUIGlChildWindow ()

Protected Member Functions

 GUIGlChildWindow ()

Protected Attributes

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

Constructor & Destructor Documentation

GUIGlChildWindow::GUIGlChildWindow ( FXMDIClient *  p,
FXMDIMenu *  mdimenu,
const FXString &  name,
FXIcon *  ic = NULL,
FXuint  opts = 0,
FXint  x = 0,
FXint  y = 0,
FXint  w = 0,
FXint  h = 0 
)

GUIGlChildWindow::~GUIGlChildWindow (  )  [virtual]

Definition at line 76 of file GUIGlChildWindow.cpp.

References myLocatorPopup, and myNavigationToolBar.

00076                                     {
00077     delete myLocatorPopup;
00078     delete myNavigationToolBar;
00079 }

GUIGlChildWindow::GUIGlChildWindow (  )  [inline, protected]

Definition at line 90 of file GUIGlChildWindow.h.

00090 { }


Member Function Documentation

void GUIGlChildWindow::buildColoringToolBar (  )  [virtual]

Definition at line 120 of file GUIGlChildWindow.cpp.

References GUIIconSubSys::getIcon(), ICON_COLORWHEEL, MID_COLOURSCHEMECHANGE, MID_EDITVIEWSCHEME, myColoringSchemes, and myNavigationToolBar.

00120                                        {
00121     // in fact, we currently are not able to build another bar
00122     //  we just add somthing to the navigation bar
00123 //    myColoringToolBar = new FXToolBar(myContentFrame,LAYOUT_DOCK_SAME|LAYOUT_SIDE_TOP|LAYOUT_FILL_X|FRAME_RAISED);
00124     new FXToolBarGrip(myNavigationToolBar,NULL,0,TOOLBARGRIP_SINGLE|FRAME_SUNKEN);
00125 
00126     // build coloring tools
00127     // combo
00128     myColoringSchemes =
00129         new FXComboBox(myNavigationToolBar, 12, this, MID_COLOURSCHEMECHANGE,
00130                        FRAME_SUNKEN|LAYOUT_LEFT|LAYOUT_TOP|COMBOBOX_STATIC|LAYOUT_CENTER_Y);
00131     // editor
00132     new FXButton(myNavigationToolBar,
00133                  "\tEdit Coloring Schemes...\tOpens a menu which lets you edit the coloring schemes.",
00134                  GUIIconSubSys::getIcon(ICON_COLORWHEEL), this, MID_EDITVIEWSCHEME,
00135                  ICON_ABOVE_TEXT|BUTTON_TOOLBAR|FRAME_RAISED|LAYOUT_TOP|LAYOUT_LEFT);
00136 }

void GUIGlChildWindow::buildNavigationToolBar (  )  [virtual]

Definition at line 92 of file GUIGlChildWindow.cpp.

References GUIIconSubSys::getIcon(), ICON_EDITVIEWPORT, ICON_LOCATE, ICON_RECENTERVIEW, ICON_SHOWTOOLTIPS, MID_EDITVIEWPORT, MID_RECENTERVIEW, MID_SHOWTOOLTIPS, myContentFrame, myLocatorButton, myLocatorPopup, and myNavigationToolBar.

00092                                          {
00093     myNavigationToolBar = new FXToolBar(myContentFrame,LAYOUT_SIDE_TOP|LAYOUT_FILL_X|FRAME_RAISED);
00094     // build the view settings
00095     // recenter view
00096     new FXButton(myNavigationToolBar,
00097                  "\tRecenter View\tRecenter view to the simulated area.",
00098                  GUIIconSubSys::getIcon(ICON_RECENTERVIEW), this, MID_RECENTERVIEW,
00099                  ICON_ABOVE_TEXT|BUTTON_TOOLBAR|FRAME_RAISED|LAYOUT_TOP|LAYOUT_LEFT);
00100     // add viewport button
00101     new FXButton(myNavigationToolBar,
00102                  "\tEdit Viewport...\tOpens a menu which lets you edit the viewport.",
00103                  GUIIconSubSys::getIcon(ICON_EDITVIEWPORT), this, MID_EDITVIEWPORT,
00104                  ICON_ABOVE_TEXT|BUTTON_TOOLBAR|FRAME_RAISED|LAYOUT_TOP|LAYOUT_LEFT);
00105     // build the locator popup
00106     myLocatorPopup = new FXPopup(myNavigationToolBar, POPUP_VERTICAL);
00107     myLocatorButton = new FXMenuButton(myNavigationToolBar,"\tLocate Structures\tLocate structures within the network.",
00108                                        GUIIconSubSys::getIcon(ICON_LOCATE), myLocatorPopup,
00109                                        MENUBUTTON_RIGHT|LAYOUT_TOP|BUTTON_TOOLBAR|FRAME_RAISED|FRAME_THICK);
00110     // add toggle button for tool-tips on/off
00111     new MFXCheckableButton(false, myNavigationToolBar,
00112                            "\tToggles Tool Tips\tToggles whether tool tips shall be shown.",
00113                            GUIIconSubSys::getIcon(ICON_SHOWTOOLTIPS), this, MID_SHOWTOOLTIPS,
00114                            BUTTON_NORMAL|LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT,
00115                            0,0, 23,23);
00116 }

void GUIGlChildWindow::buildScreenshotToolBar (  )  [virtual]

Definition at line 140 of file GUIGlChildWindow.cpp.

References GUIIconSubSys::getIcon(), ICON_CAMERA, MID_MAKESNAPSHOT, and myNavigationToolBar.

00140                                          {
00141     // in fact, we currently are not able to build another bar
00142     //  we just add somthing to the navigation bar
00143 //    myScreenshotToolBar = new FXToolBar(myContentFrame,LAYOUT_DOCK_SAME|LAYOUT_SIDE_TOP|LAYOUT_FILL_X|FRAME_RAISED);
00144     new FXToolBarGrip(myNavigationToolBar,NULL,0,TOOLBARGRIP_SINGLE|FRAME_SUNKEN);
00145     // snapshot
00146     new FXButton(myNavigationToolBar,
00147                  "\tMake Snapshot\tMakes a snapshot of the view.",
00148                  GUIIconSubSys::getIcon(ICON_CAMERA), this, MID_MAKESNAPSHOT,
00149                  ICON_ABOVE_TEXT|BUTTON_TOOLBAR|FRAME_RAISED|LAYOUT_TOP|LAYOUT_LEFT);
00150 }

void GUIGlChildWindow::create (  )  [virtual]

Definition at line 83 of file GUIGlChildWindow.cpp.

References myLocatorPopup, myNavigationToolBar, and myView.

Referenced by GUIApplicationWindow::openNewView().

00083                          {
00084     FXMDIChild::create();
00085     myNavigationToolBar->create();
00086     myLocatorPopup->create();
00087     myView->create();
00088 }

FXGLCanvas * GUIGlChildWindow::getBuildGLCanvas (  )  const [virtual]

Definition at line 154 of file GUIGlChildWindow.cpp.

References myView.

Referenced by GUIApplicationWindow::getBuildGLCanvas().

00154                                          {
00155     return myView;
00156 }

FXComboBox & GUIGlChildWindow::getColoringSchemesCombo (  ) 

Definition at line 172 of file GUIGlChildWindow.cpp.

References myColoringSchemes.

Referenced by GUIViewTraffic::buildViewToolBars(), and GUISUMOAbstractView::getColoringSchemesCombo().

00172                                           {
00173     return *myColoringSchemes;
00174 }

FXPopup * GUIGlChildWindow::getLocatorPopup (  ) 

Definition at line 166 of file GUIGlChildWindow.cpp.

References myLocatorPopup.

Referenced by GUIViewTraffic::buildViewToolBars().

00166                                   {
00167     return myLocatorPopup;
00168 }

FXToolBar & GUIGlChildWindow::getNavigationToolBar ( GUISUMOAbstractView v  ) 

Definition at line 160 of file GUIGlChildWindow.cpp.

References myNavigationToolBar.

00160                                                             {
00161     return *myNavigationToolBar;
00162 }

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

Definition at line 211 of file GUIGlChildWindow.cpp.

References myView, and GUISUMOAbstractView::setColorScheme().

00211                                                                         {
00212     myView->setColorScheme((char*) data);
00213     return 1;
00214 }

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

Definition at line 186 of file GUIGlChildWindow.cpp.

References myView, and GUISUMOAbstractView::showViewportEditor().

00186                                                               {
00187     myView->showViewportEditor();
00188     return 1;
00189 }

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

Definition at line 193 of file GUIGlChildWindow.cpp.

References myView, and GUISUMOAbstractView::showViewschemeEditor().

00193                                                                 {
00194     myView->showViewschemeEditor();
00195     return 1;
00196 }

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

Definition at line 178 of file GUIGlChildWindow.cpp.

References myView, and GUISUMOAbstractView::recenterView().

00178                                                               {
00179     myView->recenterView();
00180     myView->update();
00181     return 1;
00182 }

long GUIGlChildWindow::onCmdShowToolTips ( FXObject sender,
FXSelector  ,
void *   
)

Definition at line 200 of file GUIGlChildWindow.cpp.

References MFXCheckableButton::amChecked(), myView, MFXCheckableButton::setChecked(), and GUISUMOAbstractView::showToolTips().

00200                                                                     {
00201     MFXCheckableButton *button = static_cast<MFXCheckableButton*>(sender);
00202     button->setChecked(!button->amChecked());
00203     myView->showToolTips(button->amChecked());
00204     update();
00205     myView->update();
00206     return 1;
00207 }


Field Documentation

FXComboBox* GUIGlChildWindow::myColoringSchemes [protected]

Definition at line 86 of file GUIGlChildWindow.h.

Referenced by buildColoringToolBar(), and getColoringSchemesCombo().

FXVerticalFrame* GUIGlChildWindow::myContentFrame [protected]

Definition at line 84 of file GUIGlChildWindow.h.

Referenced by buildNavigationToolBar(), and GUISUMOViewParent::init().

FXMenuButton* GUIGlChildWindow::myLocatorButton [protected]

Definition at line 82 of file GUIGlChildWindow.h.

Referenced by buildNavigationToolBar(), and GUISUMOViewParent::showLocator().

FXPopup* GUIGlChildWindow::myLocatorPopup [protected]

FXToolBar* GUIGlChildWindow::myNavigationToolBar [protected]


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

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