Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEColorDialog.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-2026 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 GNEColorDialog used in Netedit that supports internal tests
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
24
25#include "GNEDialog.h"
26
27// ===========================================================================
28// class definitions
29// ===========================================================================
30
31class GNEColorDialog : public GNEDialog {
32 FXDECLARE(GNEColorDialog)
33
34public:
36 GNEColorDialog(GNEApplicationWindow* applicationWindow, const RGBColor color);
37
39 GNEColorDialog(GNEApplicationWindow* applicationWindow, GNEDialog* parentDialog,
40 const RGBColor color);
41
43 virtual ~GNEColorDialog();
44
46 void runInternalTest(const InternalTestStep::DialogArgument* dialogArgument);
47
49 RGBColor getColor() const;
50
53
55 long onCmdReset(FXObject*, FXSelector, void*);
56
58 long onChgColor(FXObject*, FXSelector, void*);
59
61 long onCmdColor(FXObject*, FXSelector, void*);
62
64
65protected:
67 FOX_CONSTRUCTOR(GNEColorDialog)
68
69
70 FXColorSelector* myColorbox = nullptr;
71
74
75private:
77 void builder(const RGBColor color);
78
81
83 GNEColorDialog& operator=(const GNEColorDialog& src) = delete;
84};
RGBColor getColor() const
Get the color.
GNEColorDialog(GNEApplicationWindow *applicationWindow, const RGBColor color)
Constructor.
long onCmdReset(FXObject *, FXSelector, void *)
called when reset button is pressed
virtual ~GNEColorDialog()
Destructor.
long onChgColor(FXObject *, FXSelector, void *)
Called when color is changed.
long onCmdColor(FXObject *, FXSelector, void *)
Called when color is selected.
void builder(const RGBColor color)
builder
void runInternalTest(const InternalTestStep::DialogArgument *dialogArgument)
run internal test
const RGBColor myOriginalColor
Original color to restore pressing reset button.
FXColorSelector * myColorbox
Default constructor.
GNEDialog(GNEApplicationWindow *applicationWindow, const std::string &name, GUIIcon titleIcon, DialogType type, Buttons buttons, OpenType openType, ResizeMode resizeMode)
basic constructor
Definition GNEDialog.cpp:60
dialog arguments, used for certain modal dialogs that can not be edited using tab