Eclipse SUMO - Simulation of Urban MObility
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
GNEFrame.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-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// Abstract class for lateral frames in NetEdit
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
24
25// ===========================================================================
26// class declaration
27// ===========================================================================
28
29class GNEViewParent;
30class GNEViewNet;
31
32// ===========================================================================
33// class definitions
34// ===========================================================================
35
40class GNEFrame : public FXVerticalFrame {
41
42public:
48 GNEFrame(GNEViewParent* viewParent, GNEViewNet* viewNet, const std::string& frameLabel);
49
51 ~GNEFrame();
52
54 void focusUpperElement();
55
59 virtual void show();
60
64 virtual void hide();
65
67 void setFrameWidth(const int newWidth);
68
70 GNEViewNet* getViewNet() const;
71
73 FXVerticalFrame* getContentFrame() const;
74
76 FXLabel* getFrameHeaderLabel() const;
77
79 FXFont* getFrameHeaderFont() const;
80
82 int getScrollBarWidth() const;
83
86
88 virtual void updateFrameAfterUndoRedo();
89
91 virtual void frameWidthUpdated();
92
95
97 virtual void tagSelected();
98
100 virtual void demandElementSelected();
101
103 virtual bool shapeDrawed();
104
106 virtual void attributeUpdated(SumoXMLAttr attribute);
107
110
112 virtual bool createPath(const bool useLastRoute);
113
115
116protected:
118 FOX_CONSTRUCTOR(GNEFrame)
119
120
122
124 FXVerticalFrame* myContentFrame = nullptr;
125
127 FXHorizontalFrame* myHeaderFrame = nullptr;
128
130 FXHorizontalFrame* myHeaderLeftFrame = nullptr;
131
133 FXHorizontalFrame* myHeaderRightFrame = nullptr;
134
136 const std::vector<std::string>& getPredefinedTagsMML() const;
137
139 static FXLabel* buildRainbow(FXComposite* parent);
140
141private:
143 FXScrollWindow* myScrollWindowsContents = nullptr;
144
146 static FXFont* myFrameHeaderFont;
147
149 FXLabel* myFrameHeaderLabel = nullptr;
150
152 std::vector<std::string> myPredefinedTagsMML;
153
155 GNEFrame(const GNEFrame&) = delete;
156
158 GNEFrame& operator=(const GNEFrame&) = delete;
159};
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
FXHorizontalFrame * myHeaderRightFrame
fame for right header elements
Definition GNEFrame.h:133
int getScrollBarWidth() const
get scrollBar width (zero if is hidden)
Definition GNEFrame.cpp:178
virtual void attributeUpdated(SumoXMLAttr attribute)
function called after set a valid attribute in AttributeCreator/AttributeEditor/ParametersEditor/....
Definition GNEFrame.cpp:295
void setFrameWidth(const int newWidth)
set width of GNEFrame
Definition GNEFrame.cpp:137
void focusUpperElement()
focus upper element of frame
Definition GNEFrame.cpp:113
virtual void updateFrameAfterUndoRedo()
function called after undo/redo in the current frame (can be reimplemented in frame children)
Definition GNEFrame.cpp:261
static FXLabel * buildRainbow(FXComposite *parent)
build rainbow in frame modul
Definition GNEFrame.cpp:320
virtual void tagSelected()
Tag selected in GNETagSelector.
Definition GNEFrame.cpp:276
GNEViewNet * getViewNet() const
get view net
Definition GNEFrame.cpp:154
FXLabel * getFrameHeaderLabel() const
get the label for the frame's header
Definition GNEFrame.cpp:166
FXScrollWindow * myScrollWindowsContents
scroll windows that holds the content frame
Definition GNEFrame.h:143
virtual void demandElementSelected()
selected demand element in DemandElementSelector
Definition GNEFrame.cpp:282
GNEViewNet * myViewNet
FOX need this.
Definition GNEFrame.h:121
FXFont * getFrameHeaderFont() const
get font of the header's frame
Definition GNEFrame.cpp:172
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
Definition GNEFrame.h:124
FXHorizontalFrame * myHeaderFrame
fame for header elements
Definition GNEFrame.h:127
~GNEFrame()
destructor
Definition GNEFrame.cpp:103
virtual void show()
show Frame
Definition GNEFrame.cpp:119
virtual void hide()
hide Frame
Definition GNEFrame.cpp:128
virtual void selectedOverlappedElement(GNEAttributeCarrier *AC)
open GNEAttributesCreator extended dialog
Definition GNEFrame.cpp:301
virtual void frameWidthUpdated()
function called after setting new width in current frame (can be reimplemented in frame children)
Definition GNEFrame.cpp:267
virtual bool shapeDrawed()
build a shaped element using the drawed shape
Definition GNEFrame.cpp:288
virtual bool createPath(const bool useLastRoute)
create path between two elements
Definition GNEFrame.cpp:307
void openHelpAttributesDialog(const GNEAttributeCarrier *AC) const
Open help attributes dialog.
Definition GNEFrame.cpp:188
std::vector< std::string > myPredefinedTagsMML
Map of attribute ids to their (readable) string-representation (needed for SUMOSAXAttributesImpl_Cach...
Definition GNEFrame.h:152
FXLabel * myFrameHeaderLabel
the label for the frame's header
Definition GNEFrame.h:149
static FXFont * myFrameHeaderFont
static Font for the Header (it's common for all headers, then create only one time)
Definition GNEFrame.h:146
const std::vector< std::string > & getPredefinedTagsMML() const
get predefinedTagsMML
Definition GNEFrame.cpp:314
FXVerticalFrame * getContentFrame() const
get vertical frame that holds all widgets of frame
Definition GNEFrame.cpp:160
FXHorizontalFrame * myHeaderLeftFrame
fame for left header elements
Definition GNEFrame.h:130
A single child window which contains a view of the simulation area.
Definition json.hpp:4471