Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MFXDialogBox.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2006-2025 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// Custom FXDialogBox that supports internal tests
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
24
25#include "fxheader.h"
26
27// ===========================================================================
28// class definitions
29// ===========================================================================
30
31class MFXDialogBox : public FXDialogBox {
32 FXDECLARE(MFXDialogBox)
33
34public:
36 MFXDialogBox(FXApp* a, const FXString& name, FXuint opts = DECOR_TITLE | DECOR_BORDER, FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0, FXint pl = 10, FXint pr = 10, FXint pt = 10, FXint pb = 10, FXint hs = 4, FXint vs = 4);
37
39 MFXDialogBox(FXWindow* owner, const FXString& name, FXuint opts = DECOR_TITLE | DECOR_BORDER, FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0, FXint pl = 10, FXint pr = 10, FXint pt = 10, FXint pb = 10, FXint hs = 4, FXint vs = 4);
40
42 FXuint openModalDialog(InternalTest* internalTests, FXuint placement = PLACEMENT_CURSOR);
43
45 virtual void runInternalTest(const InternalTestStep::DialogTest* dialogTest);
46
49
51 long onCmdAccept(FXObject*, FXSelector, void*);
52
54 long onCmdCancel(FXObject*, FXSelector, void*);
55
57 long onCmdInternalTest(FXObject*, FXSelector, void* ptr);
58
60
61protected:
64
66 bool myTesting = false;
67
68private:
70 FXuint execute(FXuint placement = PLACEMENT_CURSOR);
71
73 MFXDialogBox(const MFXDialogBox&) = delete;
74
76 MFXDialogBox& operator=(const MFXDialogBox& src) = delete;
77};
dialog arguments (used for certain functions that opens modal dialogs)
virtual void runInternalTest(const InternalTestStep::DialogTest *dialogTest)
run internal test
long onCmdCancel(FXObject *, FXSelector, void *)
called when cancel button is pressed (or dialog is closed)
MFXDialogBox()
FOX needs this.
FXuint openModalDialog(InternalTest *internalTests, FXuint placement=PLACEMENT_CURSOR)
Run modal invocation of the dialog.
long onCmdAccept(FXObject *, FXSelector, void *)
called when accept button is pressed
bool myTesting
flag to indicate if this dialog is being tested using internal test
MFXDialogBox(const MFXDialogBox &)=delete
Invalidated copy constructor.
long onCmdInternalTest(FXObject *, FXSelector, void *ptr)
event used in internal tests
FXuint execute(FXuint placement=PLACEMENT_CURSOR)
make execute private
MFXDialogBox & operator=(const MFXDialogBox &src)=delete
Invalidated assignment operator.