GUIVehicle::GUIVehiclePopupMenu Class Reference

#include <GUIVehicle.h>

Inheritance diagram for GUIVehicle::GUIVehiclePopupMenu:

GUIGLObjectPopupMenu FXMenuPane

Detailed Description

A popup-menu for vehicles. In comparison to the normal popup-menu, this one also allows to:

Definition at line 199 of file GUIVehicle.h.


Public Member Functions

 GUIVehiclePopupMenu (GUIMainWindow &app, GUISUMOAbstractView &parent, GUIGlObject &o)
 Constructor.
long onCmdAddSelected (FXObject *, FXSelector, void *)
 Called if the object shall be added to the list of selected objects.
long onCmdCenter (FXObject *, FXSelector, void *)
 Called if the assigned objects shall be centered.
long onCmdCopyCursorPosition (FXObject *, FXSelector, void *)
 Called if the cursor position shall be copied to clipboard.
long onCmdCopyName (FXObject *, FXSelector, void *)
 Called if the name shall be copied to clipboard.
long onCmdCopyTypedName (FXObject *, FXSelector, void *)
 Called if the typed name shall be copied to clipboard.
long onCmdHideAllRoutes (FXObject *, FXSelector, void *)
 Called if all routes of the vehicle shall be hidden.
long onCmdHideBestLanes (FXObject *, FXSelector, void *)
 Called if the current route of the vehicle shall be hidden.
long onCmdHideCurrentRoute (FXObject *, FXSelector, void *)
 Called if the current route of the vehicle shall be hidden.
long onCmdRemoveSelected (FXObject *, FXSelector, void *)
 Called if the object shall be removed from the list of selected objects.
long onCmdShowAllRoutes (FXObject *, FXSelector, void *)
 Called if all routes of the vehicle shall be shown.
long onCmdShowBestLanes (FXObject *, FXSelector, void *)
 Called if the current route of the vehicle shall be shown.
long onCmdShowCurrentRoute (FXObject *, FXSelector, void *)
 Called if the current route of the vehicle shall be shown.
long onCmdShowPars (FXObject *, FXSelector, void *)
 Called if the parameter of this object shall be shown.
long onCmdStartTrack (FXObject *, FXSelector, void *)
 Called if the vehicle shall be tracked.
long onCmdStopTrack (FXObject *, FXSelector, void *)
 Called if the current shall not be tracked any longer.
 ~GUIVehiclePopupMenu () throw ()
 Destructor.

Protected Member Functions

 GUIVehiclePopupMenu ()

Protected Attributes

GUIMainWindowmyApplication
 The main application.
Position2D myNetworkPosition
 The position within the network the cursor was above when instanting the popup.
GUIGlObjectmyObject
 The object that belongs to this popup-menu.
GUISUMOAbstractViewmyParent
 The parent window.

Constructor & Destructor Documentation

GUIVehicle::GUIVehiclePopupMenu::GUIVehiclePopupMenu ( GUIMainWindow app,
GUISUMOAbstractView parent,
GUIGlObject o 
)

Constructor.

Definition at line 123 of file GUIVehicle.cpp.

00126         : GUIGLObjectPopupMenu(app, parent, o) {
00127 }

GUIVehicle::GUIVehiclePopupMenu::~GUIVehiclePopupMenu (  )  throw ()

Destructor.

Definition at line 130 of file GUIVehicle.cpp.

00130 {}

GUIVehicle::GUIVehiclePopupMenu::GUIVehiclePopupMenu (  )  [inline, protected]

Definition at line 234 of file GUIVehicle.h.

00234 { }


Member Function Documentation

long GUIGLObjectPopupMenu::onCmdAddSelected ( FXObject ,
FXSelector  ,
void *   
) [inherited]

Called if the object shall be added to the list of selected objects.

Definition at line 113 of file GUIGLObjectPopupMenu.cpp.

References GUIGlObject::getGlID(), GUIGlObject::getType(), gSelected, GUIGLObjectPopupMenu::myObject, GUIGLObjectPopupMenu::myParent, and GUISelectedStorage::select().

00113                                                                  {
00114     gSelected.select(myObject->getType(), myObject->getGlID());
00115     myParent->update();
00116     return 1;
00117 }

long GUIGLObjectPopupMenu::onCmdCenter ( FXObject ,
FXSelector  ,
void *   
) [inherited]

Called if the assigned objects shall be centered.

Definition at line 78 of file GUIGLObjectPopupMenu.cpp.

References GUISUMOAbstractView::centerTo(), GUIGLObjectPopupMenu::myObject, and GUIGLObjectPopupMenu::myParent.

00078                                                             {
00079     myParent->centerTo(myObject);
00080     return 1;
00081 }

long GUIGLObjectPopupMenu::onCmdCopyCursorPosition ( FXObject ,
FXSelector  ,
void *   
) [inherited]

Called if the cursor position shall be copied to clipboard.

Definition at line 99 of file GUIGLObjectPopupMenu.cpp.

References GUIUserIO::copyToClipboard(), GUIGLObjectPopupMenu::myNetworkPosition, GUIGLObjectPopupMenu::myParent, and toString().

00099                                                                         {
00100     GUIUserIO::copyToClipboard(*myParent->getApp(), toString(myNetworkPosition));
00101     return 1;
00102 }

long GUIGLObjectPopupMenu::onCmdCopyName ( FXObject ,
FXSelector  ,
void *   
) [inherited]

Called if the name shall be copied to clipboard.

Definition at line 85 of file GUIGLObjectPopupMenu.cpp.

References GUIUserIO::copyToClipboard(), GUIGlObject::getMicrosimID(), GUIGLObjectPopupMenu::myObject, and GUIGLObjectPopupMenu::myParent.

00085                                                               {
00086     GUIUserIO::copyToClipboard(*myParent->getApp(), myObject->getMicrosimID());
00087     return 1;
00088 }

long GUIGLObjectPopupMenu::onCmdCopyTypedName ( FXObject ,
FXSelector  ,
void *   
) [inherited]

Called if the typed name shall be copied to clipboard.

Definition at line 92 of file GUIGLObjectPopupMenu.cpp.

References GUIUserIO::copyToClipboard(), GUIGlObject::getFullName(), GUIGLObjectPopupMenu::myObject, and GUIGLObjectPopupMenu::myParent.

00092                                                                    {
00093     GUIUserIO::copyToClipboard(*myParent->getApp(), myObject->getFullName());
00094     return 1;
00095 }

long GUIVehicle::GUIVehiclePopupMenu::onCmdHideAllRoutes ( FXObject ,
FXSelector  ,
void *   
)

Called if all routes of the vehicle shall be hidden.

Definition at line 142 of file GUIVehicle.cpp.

References GUIGlObject::getType(), GLO_VEHICLE, GUISUMOAbstractView::hideRoute(), GUIGLObjectPopupMenu::myObject, and GUIGLObjectPopupMenu::myParent.

00142                                                                             {
00143     assert(myObject->getType()==GLO_VEHICLE);
00144     myParent->hideRoute(static_cast<GUIVehicle*>(myObject), -1);
00145     return 1;
00146 }

long GUIVehicle::GUIVehiclePopupMenu::onCmdHideBestLanes ( FXObject ,
FXSelector  ,
void *   
)

Called if the current route of the vehicle shall be hidden.

Definition at line 173 of file GUIVehicle.cpp.

References GUIGlObject::getType(), GLO_VEHICLE, GUISUMOAbstractView::hideBestLanes(), GUIGLObjectPopupMenu::myObject, and GUIGLObjectPopupMenu::myParent.

00173                                                                             {
00174     assert(myObject->getType()==GLO_VEHICLE);
00175     myParent->hideBestLanes(static_cast<GUIVehicle*>(myObject));
00176     return 1;
00177 }

long GUIVehicle::GUIVehiclePopupMenu::onCmdHideCurrentRoute ( FXObject ,
FXSelector  ,
void *   
)

Called if the current route of the vehicle shall be hidden.

Definition at line 166 of file GUIVehicle.cpp.

References GUIGlObject::getType(), GLO_VEHICLE, GUISUMOAbstractView::hideRoute(), GUIGLObjectPopupMenu::myObject, and GUIGLObjectPopupMenu::myParent.

00166                                                                                {
00167     assert(myObject->getType()==GLO_VEHICLE);
00168     myParent->hideRoute(static_cast<GUIVehicle*>(myObject), 0);
00169     return 1;
00170 }

long GUIGLObjectPopupMenu::onCmdRemoveSelected ( FXObject ,
FXSelector  ,
void *   
) [inherited]

Called if the object shall be removed from the list of selected objects.

Definition at line 121 of file GUIGLObjectPopupMenu.cpp.

References GUISelectedStorage::deselect(), GUIGlObject::getGlID(), GUIGlObject::getType(), gSelected, GUIGLObjectPopupMenu::myObject, and GUIGLObjectPopupMenu::myParent.

00121                                                                     {
00122     gSelected.deselect(myObject->getType(), myObject->getGlID());
00123     myParent->update();
00124     return 1;
00125 }

long GUIVehicle::GUIVehiclePopupMenu::onCmdShowAllRoutes ( FXObject ,
FXSelector  ,
void *   
)

Called if all routes of the vehicle shall be shown.

Definition at line 134 of file GUIVehicle.cpp.

References GUIGlObject::getType(), GLO_VEHICLE, GUIGLObjectPopupMenu::myObject, GUIGLObjectPopupMenu::myParent, and GUISUMOAbstractView::showRoute().

00134                                                                             {
00135     assert(myObject->getType()==GLO_VEHICLE);
00136     myParent->showRoute(static_cast<GUIVehicle*>(myObject), -1);
00137     return 1;
00138 }

long GUIVehicle::GUIVehiclePopupMenu::onCmdShowBestLanes ( FXObject ,
FXSelector  ,
void *   
)

Called if the current route of the vehicle shall be shown.

Definition at line 158 of file GUIVehicle.cpp.

References GUIGlObject::getType(), GLO_VEHICLE, GUIGLObjectPopupMenu::myObject, GUIGLObjectPopupMenu::myParent, and GUISUMOAbstractView::showBestLanes().

00158                                                                             {
00159     assert(myObject->getType()==GLO_VEHICLE);
00160     myParent->showBestLanes(static_cast<GUIVehicle*>(myObject));
00161     return 1;
00162 }

long GUIVehicle::GUIVehiclePopupMenu::onCmdShowCurrentRoute ( FXObject ,
FXSelector  ,
void *   
)

Called if the current route of the vehicle shall be shown.

Definition at line 150 of file GUIVehicle.cpp.

References GUIGlObject::getType(), GLO_VEHICLE, GUIGLObjectPopupMenu::myObject, GUIGLObjectPopupMenu::myParent, and GUISUMOAbstractView::showRoute().

00150                                                                                {
00151     assert(myObject->getType()==GLO_VEHICLE);
00152     myParent->showRoute(static_cast<GUIVehicle*>(myObject), 0);
00153     return 1;
00154 }

long GUIGLObjectPopupMenu::onCmdShowPars ( FXObject ,
FXSelector  ,
void *   
) [inherited]

Called if the parameter of this object shall be shown.

Definition at line 106 of file GUIGLObjectPopupMenu.cpp.

References GUIGlObject::getParameterWindow(), GUIGLObjectPopupMenu::myApplication, GUIGLObjectPopupMenu::myObject, and GUIGLObjectPopupMenu::myParent.

00106                                                               {
00107     myObject->getParameterWindow(*myApplication, *myParent); // !!! showParameterWindow would be more appropriate
00108     return 1;
00109 }

long GUIVehicle::GUIVehiclePopupMenu::onCmdStartTrack ( FXObject ,
FXSelector  ,
void *   
)

Called if the vehicle shall be tracked.

Definition at line 180 of file GUIVehicle.cpp.

References GUIGlObject::getGlID(), GUIGlObject::getType(), GLO_VEHICLE, GUIGLObjectPopupMenu::myObject, GUIGLObjectPopupMenu::myParent, and GUISUMOAbstractView::startTrack().

00180                                                                          {
00181     assert(myObject->getType()==GLO_VEHICLE);
00182     myParent->startTrack(static_cast<GUIVehicle*>(myObject)->getGlID());
00183     return 1;
00184 }

long GUIVehicle::GUIVehiclePopupMenu::onCmdStopTrack ( FXObject ,
FXSelector  ,
void *   
)

Called if the current shall not be tracked any longer.

Definition at line 187 of file GUIVehicle.cpp.

References GUIGlObject::getType(), GLO_VEHICLE, GUIGLObjectPopupMenu::myObject, GUIGLObjectPopupMenu::myParent, and GUISUMOAbstractView::stopTrack().

00187                                                                         {
00188     assert(myObject->getType()==GLO_VEHICLE);
00189     myParent->stopTrack();
00190     return 1;
00191 }


Field Documentation

The position within the network the cursor was above when instanting the popup.

Definition at line 105 of file GUIGLObjectPopupMenu.h.

Referenced by GUIGLObjectPopupMenu::onCmdCopyCursorPosition().


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

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