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

#include <GNEKeepElementsDialog.h>

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

Public Types

enum class  Result { ACCEPT , CANCEL , OVERWRITE }
 FOX-declaration. More...
 

Public Member Functions

Result getResult () const
 get result
 
 GNEKeepElementsDialog (GNEApplicationWindow *applicationWindow, const std::string elementType)
 Constructor.
 
FXuint openModalDialog (InternalTest *internalTests, FXuint placement=PLACEMENT_CURSOR)
 Run modal invocation of the dialog.
 
void runInternalTest (const InternalTestStep::DialogTest *modalArguments)
 run internal test
 
 ~GNEKeepElementsDialog ()
 destructor
 
FOX-callbacks

event when user select an option

long onCmdSelectOption (FXObject *obj, FXSelector, void *)
 
long onCmdClose (FXObject *obj, FXSelector, void *)
 event when dialog is closed
 
FOX-callbacks
long onCmdAccept (FXObject *, FXSelector, void *)
 called when accept button is pressed
 
long onCmdCancel (FXObject *, FXSelector, void *)
 called when cancel button is pressed (or dialog is closed)
 
long onCmdInternalTest (FXObject *, FXSelector, void *ptr)
 event used in internal tests
 

Protected Attributes

FXButton * myCancelButton = nullptr
 button for cancel
 
FXButton * myKeepNewButton = nullptr
 button for overwrite
 
FXButton * myKeepOldButton = nullptr
 FOX need this.
 
Result myResult = Result::CANCEL
 result (by default cancel)
 
bool myTesting = false
 flag to indicate if this dialog is being tested using internal test
 

Private Member Functions

FXuint execute (FXuint placement=PLACEMENT_CURSOR)
 make execute private
 
 GNEKeepElementsDialog (const GNEKeepElementsDialog &)=delete
 Invalidated copy constructor.
 
GNEKeepElementsDialogoperator= (const GNEKeepElementsDialog &)=delete
 Invalidated assignment operator.
 

Detailed Description

Definition at line 36 of file GNEKeepElementsDialog.h.

Member Enumeration Documentation

◆ Result

FOX-declaration.

result

Enumerator
ACCEPT 
CANCEL 
OVERWRITE 

Definition at line 42 of file GNEKeepElementsDialog.h.

Constructor & Destructor Documentation

◆ GNEKeepElementsDialog() [1/2]

GNEKeepElementsDialog::GNEKeepElementsDialog ( GNEApplicationWindow applicationWindow,
const std::string  elementType 
)

◆ ~GNEKeepElementsDialog()

GNEKeepElementsDialog::~GNEKeepElementsDialog ( )

destructor

Definition at line 76 of file GNEKeepElementsDialog.cpp.

◆ GNEKeepElementsDialog() [2/2]

GNEKeepElementsDialog::GNEKeepElementsDialog ( const GNEKeepElementsDialog )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ execute()

FXuint MFXDialogBox::execute ( FXuint  placement = PLACEMENT_CURSOR)
privateinherited

make execute private

Definition at line 128 of file MFXDialogBox.cpp.

◆ getResult()

GNEKeepElementsDialog::Result GNEKeepElementsDialog::getResult ( ) const

get result

Definition at line 87 of file GNEKeepElementsDialog.cpp.

References myResult.

Referenced by GNEApplicationWindow::onCmdOpenAdditionalElements(), GNEApplicationWindow::onCmdOpenDataElements(), GNEApplicationWindow::onCmdOpenDemandElements(), and GNEApplicationWindow::onCmdOpenMeanDataElements().

Here is the caller graph for this function:

◆ onCmdAccept()

long MFXDialogBox::onCmdAccept ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

called when accept button is pressed

Definition at line 93 of file MFXDialogBox.cpp.

References MFXDialogBox::myTesting.

Referenced by FXDEFMAP(), and GNEAllowVClassesDialog::onCmdAccept().

Here is the caller graph for this function:

◆ onCmdCancel()

long MFXDialogBox::onCmdCancel ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

called when cancel button is pressed (or dialog is closed)

Definition at line 104 of file MFXDialogBox.cpp.

References MFXDialogBox::myTesting.

Referenced by FXDEFMAP(), FXDEFMAP(), GNEAllowVClassesDialog::onCmdAccept(), and GNEAllowVClassesDialog::onCmdCancel().

Here is the caller graph for this function:

◆ onCmdClose()

long GNEKeepElementsDialog::onCmdClose ( FXObject *  obj,
FXSelector  ,
void *   
)

event when dialog is closed

Definition at line 105 of file GNEKeepElementsDialog.cpp.

◆ onCmdInternalTest()

long MFXDialogBox::onCmdInternalTest ( FXObject *  ,
FXSelector  ,
void *  ptr 
)
inherited

event used in internal tests

Definition at line 115 of file MFXDialogBox.cpp.

References MFXDialogBox::runInternalTest().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdSelectOption()

long GNEKeepElementsDialog::onCmdSelectOption ( FXObject *  obj,
FXSelector  ,
void *   
)

Definition at line 93 of file GNEKeepElementsDialog.cpp.

References ACCEPT, myKeepNewButton, myKeepOldButton, myResult, and OVERWRITE.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ openModalDialog()

FXuint MFXDialogBox::openModalDialog ( InternalTest internalTests,
FXuint  placement = PLACEMENT_CURSOR 
)
inherited

Run modal invocation of the dialog.

Definition at line 64 of file MFXDialogBox.cpp.

References InternalTest::getCurrentStep(), InternalTestStep::getModalDialogTestSteps(), and MFXDialogBox::myTesting.

Referenced by GNETLSEditorFrame::TLSAttributes::onCmdParametersDialog(), GNEAllowVClassesDialog::openDialog(), GNEFixElementsDialog::openFixDialog(), GNEOptionsDialog::Options(), and GNEOptionsDialog::Run().

Here is the caller graph for this function:

◆ operator=()

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

Invalidated assignment operator.

◆ runInternalTest()

void GNEKeepElementsDialog::runInternalTest ( const InternalTestStep::DialogTest modalArguments)
virtual

run internal test

Reimplemented from MFXDialogBox.

Definition at line 81 of file GNEKeepElementsDialog.cpp.

Field Documentation

◆ myCancelButton

FXButton* GNEKeepElementsDialog::myCancelButton = nullptr
protected

button for cancel

Definition at line 78 of file GNEKeepElementsDialog.h.

◆ myKeepNewButton

FXButton* GNEKeepElementsDialog::myKeepNewButton = nullptr
protected

button for overwrite

Definition at line 81 of file GNEKeepElementsDialog.h.

Referenced by onCmdSelectOption().

◆ myKeepOldButton

FXButton* GNEKeepElementsDialog::myKeepOldButton = nullptr
protected

FOX need this.

button for accept

Definition at line 75 of file GNEKeepElementsDialog.h.

Referenced by onCmdSelectOption().

◆ myResult

Result GNEKeepElementsDialog::myResult = Result::CANCEL
protected

result (by default cancel)

Definition at line 84 of file GNEKeepElementsDialog.h.

Referenced by getResult(), and onCmdSelectOption().

◆ myTesting

bool MFXDialogBox::myTesting = false
protectedinherited

flag to indicate if this dialog is being tested using internal test

Definition at line 66 of file MFXDialogBox.h.

Referenced by MFXDialogBox::onCmdAccept(), MFXDialogBox::onCmdCancel(), and MFXDialogBox::openModalDialog().


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