GUIGLObjectPopupMenu Class Reference

#include <GUIGLObjectPopupMenu.h>

Inheritance diagram for GUIGLObjectPopupMenu:

FXMenuPane GUIEmitter::GUIEmitterPopupMenu GUILaneSpeedTrigger::GUILaneSpeedTriggerPopupMenu GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu GUITriggeredRerouter::GUITriggeredRerouterPopupMenu GUIVehicle::GUIVehiclePopupMenu

Detailed Description

The popup menu of a globject.

Definition at line 52 of file GUIGLObjectPopupMenu.h.


Public Member Functions

 GUIGLObjectPopupMenu (GUIMainWindow &app, GUISUMOAbstractView &parent, GUIGlObject &o) throw ()
 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 onCmdRemoveSelected (FXObject *, FXSelector, void *)
 Called if the object shall be removed from the list of selected objects.
long onCmdShowPars (FXObject *, FXSelector, void *)
 Called if the parameter of this object shall be shown.
virtual ~GUIGLObjectPopupMenu () throw ()
 Destructor.

Protected Member Functions

 GUIGLObjectPopupMenu ()
 FOX needs this.

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

GUIGLObjectPopupMenu::GUIGLObjectPopupMenu ( GUIMainWindow app,
GUISUMOAbstractView parent,
GUIGlObject o 
) throw ()

Constructor.

Parameters:
[in] app The main window for instantiation of other windows
[in] parent The parent view for changing it
[in] o The object of interest

GUIGLObjectPopupMenu::~GUIGLObjectPopupMenu (  )  throw () [virtual]

Destructor.

Definition at line 74 of file GUIGLObjectPopupMenu.cpp.

00074 {}

GUIGLObjectPopupMenu::GUIGLObjectPopupMenu (  )  [inline, protected]

FOX needs this.

Definition at line 110 of file GUIGLObjectPopupMenu.h.

00110 { }


Member Function Documentation

long GUIGLObjectPopupMenu::onCmdAddSelected ( FXObject ,
FXSelector  ,
void *   
)

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, myObject, 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 *   
)

Called if the assigned objects shall be centered.

Definition at line 78 of file GUIGLObjectPopupMenu.cpp.

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

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

long GUIGLObjectPopupMenu::onCmdCopyCursorPosition ( FXObject ,
FXSelector  ,
void *   
)

Called if the cursor position shall be copied to clipboard.

Definition at line 99 of file GUIGLObjectPopupMenu.cpp.

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

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

long GUIGLObjectPopupMenu::onCmdCopyName ( FXObject ,
FXSelector  ,
void *   
)

Called if the name shall be copied to clipboard.

Definition at line 85 of file GUIGLObjectPopupMenu.cpp.

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

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

long GUIGLObjectPopupMenu::onCmdCopyTypedName ( FXObject ,
FXSelector  ,
void *   
)

Called if the typed name shall be copied to clipboard.

Definition at line 92 of file GUIGLObjectPopupMenu.cpp.

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

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

long GUIGLObjectPopupMenu::onCmdRemoveSelected ( FXObject ,
FXSelector  ,
void *   
)

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, myObject, and myParent.

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

long GUIGLObjectPopupMenu::onCmdShowPars ( FXObject ,
FXSelector  ,
void *   
)

Called if the parameter of this object shall be shown.

Definition at line 106 of file GUIGLObjectPopupMenu.cpp.

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

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


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 onCmdCopyCursorPosition().


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