GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu Class Reference

#include <GUITrafficLightLogicWrapper.h>

Inheritance diagram for GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu:

GUIGLObjectPopupMenu FXMenuPane

Detailed Description

The popup-menu for a TLS-logic. Adds the functionality to open a view on the tls-logic and to start tracking of the tls-logic.

Definition at line 143 of file GUITrafficLightLogicWrapper.h.


Public Member Functions

 GUITrafficLightLogicWrapperPopupMenu (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 onCmdBegin2TrackPhases (FXObject *, FXSelector, void *)
 Called if the phases shall be begun to track.
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.
long onCmdShowPhases (FXObject *, FXSelector, void *)
 Called if the phases shall be shown.
long onCmdSwitchTLS2Off (FXObject *, FXSelector, void *)
long onCmdSwitchTLSLogic (FXObject *, FXSelector, void *)
 ~GUITrafficLightLogicWrapperPopupMenu () throw ()
 Destructor.

Protected Member Functions

 GUITrafficLightLogicWrapperPopupMenu ()
 protected constructor for FOX

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

GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::GUITrafficLightLogicWrapperPopupMenu ( GUIMainWindow app,
GUISUMOAbstractView parent,
GUIGlObject o 
)

Constructor.

GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::~GUITrafficLightLogicWrapperPopupMenu (  )  throw ()

Destructor.

Definition at line 80 of file GUITrafficLightLogicWrapper.cpp.

00080 {}

GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::GUITrafficLightLogicWrapperPopupMenu (  )  [inline, protected]

protected constructor for FOX

Definition at line 164 of file GUITrafficLightLogicWrapper.h.

00164 { }


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 GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdBegin2TrackPhases ( FXObject ,
FXSelector  ,
void *   
)

Called if the phases shall be begun to track.

Definition at line 85 of file GUITrafficLightLogicWrapper.cpp.

References GUITrafficLightLogicWrapper::begin2TrackPhases(), GUIGlObject::getType(), GLO_TLLOGIC, and GUIGLObjectPopupMenu::myObject.

00086                                 {
00087     assert(myObject->getType()==GLO_TLLOGIC);
00088     static_cast<GUITrafficLightLogicWrapper*>(myObject)->begin2TrackPhases();
00089     return 1;
00090 }

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 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 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 GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdShowPhases ( FXObject ,
FXSelector  ,
void *   
)

Called if the phases shall be shown.

Definition at line 94 of file GUITrafficLightLogicWrapper.cpp.

References GUIGlObject::getType(), GLO_TLLOGIC, GUIGLObjectPopupMenu::myObject, and GUITrafficLightLogicWrapper::showPhases().

00095                                 {
00096     assert(myObject->getType()==GLO_TLLOGIC);
00097     static_cast<GUITrafficLightLogicWrapper*>(myObject)->showPhases();
00098     return 1;
00099 }

long GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdSwitchTLS2Off ( FXObject ,
FXSelector  sel,
void *   
)

long GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdSwitchTLSLogic ( FXObject ,
FXSelector  sel,
void *   
)


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:45 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6