Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
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
23#include <string>
24#include <vector>
25
28
29// ===========================================================================
30// class declaration
31// ===========================================================================
32
34class GNEViewNet;
35class GNEViewParent;
36
37// ===========================================================================
38// class definitions
39// ===========================================================================
40
41class GNEFrame : public FXVerticalFrame {
42
43public:
49 GNEFrame(GNEViewParent* viewParent, GNEViewNet* viewNet, const std::string& frameLabel);
50
52 ~GNEFrame();
53
55 void focusUpperElement();
56
60 virtual void show();
61
65 virtual void hide();
66
68 void setFrameWidth(const int newWidth);
69
71 GNEViewNet* getViewNet() const;
72
74 FXVerticalFrame* getContentFrame() const;
75
77 FXLabel* getFrameHeaderLabel() const;
78
80 FXFont* getFrameHeaderFont() const;
81
83 int getScrollBarWidth() const;
84
87
89 virtual void updateFrameAfterUndoRedo();
90
92 virtual void frameWidthUpdated();
93
96
98 virtual void tagSelected();
99
101 virtual void demandElementSelected();
102
104 virtual bool shapeDrawed();
105
107 virtual void attributeUpdated(SumoXMLAttr attribute);
108
111
113 virtual bool createPath(const bool useLastRoute);
114
116
117protected:
119 FOX_CONSTRUCTOR(GNEFrame)
120
121
123
125 FXVerticalFrame* myContentFrame = nullptr;
126
128 FXHorizontalFrame* myHeaderFrame = nullptr;
129
131 FXHorizontalFrame* myHeaderLeftFrame = nullptr;
132
134 FXHorizontalFrame* myHeaderRightFrame = nullptr;
135
137 const std::vector<std::string>& getPredefinedTagsMML() const;
138
140 static FXLabel* buildRainbow(FXComposite* parent);
141
142private:
144 FXScrollWindow* myScrollWindowsContents = nullptr;
145
147 static FXFont* myFrameHeaderFont;
148
150 FXLabel* myFrameHeaderLabel = nullptr;
151
153 std::vector<std::string> myPredefinedTagsMML;
154
156 GNEFrame(const GNEFrame&) = delete;
157
159 GNEFrame& operator=(const GNEFrame&) = delete;
160};
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
FXHorizontalFrame * myHeaderRightFrame
fame for right header elements
Definition GNEFrame.h:134
int getScrollBarWidth() const
get scrollBar width (zero if is hidden)
Definition GNEFrame.cpp:169
virtual void attributeUpdated(SumoXMLAttr attribute)
function called after set a valid attribute in AttributeCreator/AttributeEditor/ParametersEditor/....
Definition GNEFrame.cpp:220
void setFrameWidth(const int newWidth)
set width of GNEFrame
Definition GNEFrame.cpp:128
void focusUpperElement()
focus upper element of frame
Definition GNEFrame.cpp:104
virtual void updateFrameAfterUndoRedo()
function called after undo/redo in the current frame (can be reimplemented in frame children)
Definition GNEFrame.cpp:186
static FXLabel * buildRainbow(FXComposite *parent)
build rainbow in frame modul
Definition GNEFrame.cpp:245
virtual void tagSelected()
Tag selected in GNETagSelector.
Definition GNEFrame.cpp:201
GNEViewNet * getViewNet() const
get view net
Definition GNEFrame.cpp:145
FXLabel * getFrameHeaderLabel() const
get the label for the frame's header
Definition GNEFrame.cpp:157
FXScrollWindow * myScrollWindowsContents
scroll windows that holds the content frame
Definition GNEFrame.h:144
virtual void demandElementSelected()
selected demand element in DemandElementSelector
Definition GNEFrame.cpp:207
GNEViewNet * myViewNet
FOX need this.
Definition GNEFrame.h:122
FXFont * getFrameHeaderFont() const
get font of the header's frame
Definition GNEFrame.cpp:163
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
Definition GNEFrame.h:125
FXHorizontalFrame * myHeaderFrame
fame for header elements
Definition GNEFrame.h:128
~GNEFrame()
destructor
Definition GNEFrame.cpp:94
virtual void show()
show Frame
Definition GNEFrame.cpp:110
virtual void hide()
hide Frame
Definition GNEFrame.cpp:119
virtual void selectedOverlappedElement(GNEAttributeCarrier *AC)
open GNEAttributesCreator extended dialog
Definition GNEFrame.cpp:226
virtual void frameWidthUpdated()
function called after setting new width in current frame (can be reimplemented in frame children)
Definition GNEFrame.cpp:192
virtual bool shapeDrawed()
build a shaped element using the drawed shape
Definition GNEFrame.cpp:213
virtual bool createPath(const bool useLastRoute)
create path between two elements
Definition GNEFrame.cpp:232
void openHelpAttributesDialog(const GNEAttributeCarrier *AC) const
Open help attributes dialog.
Definition GNEFrame.cpp:179
std::vector< std::string > myPredefinedTagsMML
Map of attribute ids to their (readable) string-representation (needed for SUMOSAXAttributesImpl_Cach...
Definition GNEFrame.h:153
FXLabel * myFrameHeaderLabel
the label for the frame's header
Definition GNEFrame.h:150
static FXFont * myFrameHeaderFont
static Font for the Header (it's common for all headers, then create only one time)
Definition GNEFrame.h:147
const std::vector< std::string > & getPredefinedTagsMML() const
get predefinedTagsMML
Definition GNEFrame.cpp:239
FXVerticalFrame * getContentFrame() const
get vertical frame that holds all widgets of frame
Definition GNEFrame.cpp:151
FXHorizontalFrame * myHeaderLeftFrame
fame for left header elements
Definition GNEFrame.h:131
A single child window which contains a view of the simulation area.
Definition json.hpp:4471