Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GUICursorDialog Class Reference

Dialog for edit rerouter intervals. More...

#include <GUICursorDialog.h>

Inheritance diagram for GUICursorDialog:
[legend]
Collaboration diagram for GUICursorDialog:
[legend]

Public Member Functions

 GUICursorDialog (GUIGLObjectPopupMenu::PopupType type, GUISUMOAbstractView *view, const std::vector< GUIGlObject * > &objects)
 FOX-declaration.
 
 ~GUICursorDialog ()
 destructor
 
FOX-callbacks
long onCmdSetFrontElement (FXObject *, FXSelector, void *)
 set front element
 
long onCmdDeleteElement (FXObject *, FXSelector, void *)
 delete element
 
long onCmdSelectElement (FXObject *, FXSelector, void *)
 select element
 
long onCmdOpenPropertiesPopUp (FXObject *, FXSelector, void *)
 open properties popUp
 
long onCmdMoveListUp (FXObject *, FXSelector, void *)
 move list up
 
long onCmdMoveListDown (FXObject *, FXSelector, void *)
 move list down
 
long onCmdProcessFront (FXObject *, FXSelector, void *)
 move list down
 
long onCmdUnpost (FXObject *, FXSelector, void *ptr)
 unpost
 
FX Calls

Called if the assigned objects shall be centered

long onCmdCenter (FXObject *, FXSelector, void *)
 
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 onCmdCopyEdgeName (FXObject *, FXSelector, void *)
 Called if the edge name shall be copied to clipboard (for lanes only)
 
long onCmdCopyCursorPosition (FXObject *, FXSelector, void *)
 Called if the cursor position shall be copied to clipboard.
 
long onCmdCopyCursorGeoPosition (FXObject *, FXSelector, void *)
 Called if the cursor geo-position shall be copied to clipboard.
 
long onCmdCopyViewGeoBoundary (FXObject *, FXSelector, void *)
 Called if the current geo-boundary shall be copied to clipboard.
 
long onCmdShowCursorGeoPositionOnline (FXObject *, FXSelector, void *)
 Called if the cursor geo-position shall be shown online.
 
long onCmdShowPars (FXObject *, FXSelector, void *)
 Called if the parameter of this object shall be shown.
 
long onCmdShowTypePars (FXObject *, FXSelector, void *)
 Called if the type parameter of this object shall be shown.
 
long onCmdAddSelected (FXObject *, FXSelector, void *)
 Called if the object shall be added to the list of selected objects.
 
long onCmdRemoveSelected (FXObject *, FXSelector, void *)
 Called if the object shall be removed from the list of selected objects.
 

Protected Member Functions

void updateList ()
 update list
 

Protected Attributes

GUIMainWindow * myApplication
 The main application.
 
int myListIndex = 0
 list index
 
std::vector< std::pair< FXMenuCommand *, GUIGlObject * > > myMenuCommandGLObjects
 container for menu commands and GLObjects
 
MFXMenuHeader * myMenuHeader = nullptr
 header
 
std::vector< FXMenuPane * > myMenuPanes
 vector mit Sub-MenuPanes
 
FXMenuCommand * myMoveDownMenuCommand = nullptr
 menu command for move down list
 
FXMenuCommand * myMoveUpMenuCommand = nullptr
 menu command for move up list
 
const Position myNetworkPosition
 The position within the network the cursor was above when instanting the popup.
 
GUIGlObject * myObject
 The object that belongs to this popup-menu.
 
GUISUMOAbstractView * myParent
 The parent window.
 
const PopupType myPopupType
 popup type;
 
GUIGLObjectPopupMenu::PopupType myType
 FOX need this.
 
GUISUMOAbstractView * myView
 pointer to view
 

Private Member Functions

void buildDialogElements (GUISUMOAbstractView *view, const FXString text, GUIIcon icon, FXSelector sel, const std::vector< GUIGlObject * > &objects)
 build dialog elements
 
 GUICursorDialog (const GUICursorDialog &)=delete
 Invalidated copy constructor.
 
GUICursorDialog & operator= (const GUICursorDialog &)=delete
 Invalidated assignment operator.
 

cursor dialog type

void insertMenuPaneChild (FXMenuPane *child)
 Insert a sub-menu pane in this GUIGLObjectPopupMenu.
 
void removePopupFromObject ()
 
GUISUMOAbstractView * getParentView ()
 return the real owner of this popup
 
PopupType getPopupType () const
 popup type;
 
enum class  PopupType {
  ATTRIBUTES , PROPERTIES , SELECT_ELEMENT , DELETE_ELEMENT ,
  FRONT_ELEMENT
}
 

Detailed Description

Dialog for edit rerouter intervals.

Definition at line 38 of file GUICursorDialog.h.

Member Enumeration Documentation

◆ PopupType

enum class GUIGLObjectPopupMenu::PopupType
stronginherited
Enumerator
ATTRIBUTES 
PROPERTIES 
SELECT_ELEMENT 
DELETE_ELEMENT 
FRONT_ELEMENT 

Definition at line 52 of file GUIGLObjectPopupMenu.h.

Constructor & Destructor Documentation

◆ GUICursorDialog() [1/2]

◆ ~GUICursorDialog()

GUICursorDialog::~GUICursorDialog ( )

destructor

Definition at line 73 of file GUICursorDialog.cpp.

References myMenuCommandGLObjects.

◆ GUICursorDialog() [2/2]

GUICursorDialog::GUICursorDialog ( const GUICursorDialog &  )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ buildDialogElements()

void GUICursorDialog::buildDialogElements ( GUISUMOAbstractView *  view,
const FXString  text,
GUIIcon  icon,
FXSelector  sel,
const std::vector< GUIGlObject * > &  objects 
)
private

◆ getParentView()

GUISUMOAbstractView * GUIGLObjectPopupMenu::getParentView ( )
inherited

return the real owner of this popup

Definition at line 120 of file GUIGLObjectPopupMenu.cpp.

References GUIGLObjectPopupMenu::myParent.

Referenced by GNEInternalLane::onDefault(), and GUIBaseVehicle::~GUIBaseVehicle().

Here is the caller graph for this function:

◆ getPopupType()

GUIGLObjectPopupMenu::PopupType GUIGLObjectPopupMenu::getPopupType ( ) const
inherited

popup type;

Definition at line 126 of file GUIGLObjectPopupMenu.cpp.

References GUIGLObjectPopupMenu::myPopupType.

◆ insertMenuPaneChild()

◆ onCmdAddSelected()

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

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

Definition at line 247 of file GUIGLObjectPopupMenu.cpp.

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

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdCenter()

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

Definition at line 132 of file GUIGLObjectPopupMenu.cpp.

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

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdCopyCursorGeoPosition()

long GUIGLObjectPopupMenu::onCmdCopyCursorGeoPosition ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

Called if the cursor geo-position shall be copied to clipboard.

Definition at line 186 of file GUIGLObjectPopupMenu.cpp.

References GeoConvHelper::cartesian2geo(), GUIUserIO::copyToClipboard(), GeoConvHelper::getFinal(), gPrecisionGeo, GUIGLObjectPopupMenu::myNetworkPosition, GUIGLObjectPopupMenu::myParent, toString(), Position::x(), and Position::y().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdCopyCursorPosition()

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

Called if the cursor position shall be copied to clipboard.

Definition at line 179 of file GUIGLObjectPopupMenu.cpp.

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

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdCopyEdgeName()

long GUIGLObjectPopupMenu::onCmdCopyEdgeName ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

Called if the edge name shall be copied to clipboard (for lanes only)

Definition at line 166 of file GUIGLObjectPopupMenu.cpp.

References GUIUserIO::copyToClipboard(), GUIGlObject::getParentName(), GUIGlObject::getType(), GLO_LANE, GUIGLObjectPopupMenu::myObject, GUIGLObjectPopupMenu::myParent, and TL.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdCopyName()

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

Called if the name shall be copied to clipboard.

Definition at line 144 of file GUIGLObjectPopupMenu.cpp.

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

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdCopyTypedName()

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

Called if the typed name shall be copied to clipboard.

Definition at line 155 of file GUIGLObjectPopupMenu.cpp.

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

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdCopyViewGeoBoundary()

long GUIGLObjectPopupMenu::onCmdCopyViewGeoBoundary ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

Called if the current geo-boundary shall be copied to clipboard.

Definition at line 197 of file GUIGLObjectPopupMenu.cpp.

References GeoConvHelper::cartesian2geo(), GUIUserIO::copyToClipboard(), GeoConvHelper::getFinal(), GUISUMOAbstractView::getVisibleBoundary(), gPrecisionGeo, GUIGLObjectPopupMenu::myParent, toString(), Position::x(), Boundary::xmax(), Boundary::xmin(), Position::y(), Boundary::ymax(), and Boundary::ymin().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdDeleteElement()

long GUICursorDialog::onCmdDeleteElement ( FXObject *  obj,
FXSelector  ,
void *   
)

delete element

Definition at line 96 of file GUICursorDialog.cpp.

References GUISUMOAbstractView::destroyPopup(), myMenuCommandGLObjects, and myView.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdMoveListDown()

long GUICursorDialog::onCmdMoveListDown ( FXObject *  ,
FXSelector  ,
void *   
)

move list down

Definition at line 146 of file GUICursorDialog.cpp.

References myListIndex, NUM_VISIBLE_ITEMS, and updateList().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdMoveListUp()

long GUICursorDialog::onCmdMoveListUp ( FXObject *  ,
FXSelector  ,
void *   
)

move list up

Definition at line 137 of file GUICursorDialog.cpp.

References myListIndex, NUM_VISIBLE_ITEMS, and updateList().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdOpenPropertiesPopUp()

long GUICursorDialog::onCmdOpenPropertiesPopUp ( FXObject *  obj,
FXSelector  ,
void *   
)

open properties popUp

Definition at line 124 of file GUICursorDialog.cpp.

References GUISUMOAbstractView::getMainWindow(), myMenuCommandGLObjects, myView, and GUISUMOAbstractView::replacePopup().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdProcessFront()

long GUICursorDialog::onCmdProcessFront ( FXObject *  ,
FXSelector  ,
void *   
)

move list down

Definition at line 155 of file GUICursorDialog.cpp.

References GUIGLObjectPopupMenu::DELETE_ELEMENT, GUIGLObjectPopupMenu::FRONT_ELEMENT, myMenuCommandGLObjects, myType, and GUIGLObjectPopupMenu::SELECT_ELEMENT.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdRemoveSelected()

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

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

Definition at line 259 of file GUIGLObjectPopupMenu.cpp.

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

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdSelectElement()

long GUICursorDialog::onCmdSelectElement ( FXObject *  obj,
FXSelector  ,
void *   
)

select element

Definition at line 110 of file GUICursorDialog.cpp.

References GUISUMOAbstractView::destroyPopup(), myMenuCommandGLObjects, and myView.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdSetFrontElement()

long GUICursorDialog::onCmdSetFrontElement ( FXObject *  obj,
FXSelector  ,
void *   
)

set front element

Definition at line 82 of file GUICursorDialog.cpp.

References GUISUMOAbstractView::destroyPopup(), myMenuCommandGLObjects, and myView.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdShowCursorGeoPositionOnline()

long GUIGLObjectPopupMenu::onCmdShowCursorGeoPositionOnline ( FXObject *  item,
FXSelector  ,
void *   
)
inherited

Called if the cursor geo-position shall be shown online.

Definition at line 212 of file GUIGLObjectPopupMenu.cpp.

References GeoConvHelper::cartesian2geo(), MFXLinkLabel::fxexecute(), GeoConvHelper::getFinal(), GUIMainWindow::getOnlineMaps(), gPrecisionGeo, GUIGLObjectPopupMenu::myApplication, GUIGLObjectPopupMenu::myNetworkPosition, StringUtils::replace(), toString(), Position::x(), and Position::y().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdShowPars()

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

Called if the parameter of this object shall be shown.

Definition at line 224 of file GUIGLObjectPopupMenu.cpp.

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

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdShowTypePars()

long GUIGLObjectPopupMenu::onCmdShowTypePars ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

Called if the type parameter of this object shall be shown.

Definition at line 236 of file GUIGLObjectPopupMenu.cpp.

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

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdUnpost()

long GUICursorDialog::onCmdUnpost ( FXObject *  obj,
FXSelector  ,
void *  ptr 
)

unpost

Definition at line 171 of file GUICursorDialog.cpp.

References myMenuHeader, myMoveDownMenuCommand, and myMoveUpMenuCommand.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ operator=()

GUICursorDialog & GUICursorDialog::operator= ( const GUICursorDialog &  )
privatedelete

Invalidated assignment operator.

◆ removePopupFromObject()

void GUIGLObjectPopupMenu::removePopupFromObject ( )
inherited

Definition at line 112 of file GUIGLObjectPopupMenu.cpp.

References GUIGLObjectPopupMenu::myObject, and GUIGlObject::removedPopupMenu().

Referenced by GUISUMOAbstractView::destroyPopup(), and GUISUMOAbstractView::replacePopup().

Here is the caller graph for this function:

◆ updateList()

void GUICursorDialog::updateList ( )
protected

update list

Definition at line 189 of file GUICursorDialog.cpp.

References myListIndex, myMenuCommandGLObjects, myMoveDownMenuCommand, myMoveUpMenuCommand, and NUM_VISIBLE_ITEMS.

Referenced by buildDialogElements(), onCmdMoveListDown(), and onCmdMoveListUp().

Here is the caller graph for this function:

Field Documentation

◆ myApplication

GUIMainWindow* GUIGLObjectPopupMenu::myApplication
protectedinherited

◆ myListIndex

int GUICursorDialog::myListIndex = 0
protected

list index

Definition at line 101 of file GUICursorDialog.h.

Referenced by onCmdMoveListDown(), onCmdMoveListUp(), and updateList().

◆ myMenuCommandGLObjects

std::vector<std::pair<FXMenuCommand*, GUIGlObject*> > GUICursorDialog::myMenuCommandGLObjects
protected

◆ myMenuHeader

MFXMenuHeader* GUICursorDialog::myMenuHeader = nullptr
protected

header

Definition at line 89 of file GUICursorDialog.h.

Referenced by buildDialogElements(), and onCmdUnpost().

◆ myMenuPanes

std::vector<FXMenuPane*> GUIGLObjectPopupMenu::myMenuPanes
protectedinherited

vector mit Sub-MenuPanes

Definition at line 148 of file GUIGLObjectPopupMenu.h.

Referenced by GUIGLObjectPopupMenu::insertMenuPaneChild(), and GUIGLObjectPopupMenu::~GUIGLObjectPopupMenu().

◆ myMoveDownMenuCommand

FXMenuCommand* GUICursorDialog::myMoveDownMenuCommand = nullptr
protected

menu command for move down list

Definition at line 95 of file GUICursorDialog.h.

Referenced by buildDialogElements(), onCmdUnpost(), and updateList().

◆ myMoveUpMenuCommand

FXMenuCommand* GUICursorDialog::myMoveUpMenuCommand = nullptr
protected

menu command for move up list

Definition at line 92 of file GUICursorDialog.h.

Referenced by buildDialogElements(), onCmdUnpost(), and updateList().

◆ myNetworkPosition

const Position GUIGLObjectPopupMenu::myNetworkPosition
protectedinherited

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

Definition at line 145 of file GUIGLObjectPopupMenu.h.

Referenced by GUIGLObjectPopupMenu::onCmdCopyCursorGeoPosition(), GUIGLObjectPopupMenu::onCmdCopyCursorPosition(), and GUIGLObjectPopupMenu::onCmdShowCursorGeoPositionOnline().

◆ myObject

◆ myParent

◆ myPopupType

const PopupType GUIGLObjectPopupMenu::myPopupType
protectedinherited

popup type;

Definition at line 142 of file GUIGLObjectPopupMenu.h.

Referenced by GUIGLObjectPopupMenu::getPopupType().

◆ myType

GUIGLObjectPopupMenu::PopupType GUICursorDialog::myType
protected

FOX need this.

PopupType

Definition at line 83 of file GUICursorDialog.h.

Referenced by onCmdProcessFront().

◆ myView

GUISUMOAbstractView* GUICursorDialog::myView
protected

pointer to view

Definition at line 86 of file GUICursorDialog.h.

Referenced by onCmdDeleteElement(), onCmdOpenPropertiesPopUp(), onCmdSelectElement(), and onCmdSetFrontElement().


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