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-2024 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
25
26// ===========================================================================
27// class definitions
28// ===========================================================================
29
34class GNEFrame : public FXVerticalFrame {
35
36public:
42 GNEFrame(GNEViewParent* viewParent, GNEViewNet* viewNet, const std::string& frameLabel);
43
45 ~GNEFrame();
46
48 void focusUpperElement();
49
53 virtual void show();
54
58 virtual void hide();
59
61 void setFrameWidth(const int newWidth);
62
64 GNEViewNet* getViewNet() const;
65
67 FXVerticalFrame* getContentFrame() const;
68
70 FXLabel* getFrameHeaderLabel() const;
71
73 FXFont* getFrameHeaderFont() const;
74
76 int getScrollBarWidth() const;
77
80
82 virtual void updateFrameAfterUndoRedo();
83
85 virtual void frameWidthUpdated();
86
89
91 virtual void tagSelected();
92
94 virtual void demandElementSelected();
95
97 virtual bool shapeDrawed();
98
100 virtual void attributeUpdated(SumoXMLAttr attribute);
101
104
106 virtual bool createPath(const bool useLastRoute);
107
109
110protected:
112 FOX_CONSTRUCTOR(GNEFrame)
113
114
116
118 FXVerticalFrame* myContentFrame = nullptr;
119
121 FXHorizontalFrame* myHeaderFrame = nullptr;
122
124 FXHorizontalFrame* myHeaderLeftFrame = nullptr;
125
127 FXHorizontalFrame* myHeaderRightFrame = nullptr;
128
130 const std::vector<std::string>& getPredefinedTagsMML() const;
131
133 static FXLabel* buildRainbow(FXComposite* parent);
134
135private:
137 FXScrollWindow* myScrollWindowsContents = nullptr;
138
140 static FXFont* myFrameHeaderFont;
141
143 FXLabel* myFrameHeaderLabel = nullptr;
144
146 std::vector<std::string> myPredefinedTagsMML;
147
149 GNEFrame(const GNEFrame&) = delete;
150
152 GNEFrame& operator=(const GNEFrame&) = delete;
153};
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
FXHorizontalFrame * myHeaderRightFrame
fame for right header elements
Definition GNEFrame.h:127
int getScrollBarWidth() const
get scrollBar width (zero if is hidden)
Definition GNEFrame.cpp:174
virtual void attributeUpdated(SumoXMLAttr attribute)
function called after set a valid attribute in AttributeCreator/AttributeEditor/ParametersEditor/....
Definition GNEFrame.cpp:286
void setFrameWidth(const int newWidth)
set width of GNEFrame
Definition GNEFrame.cpp:133
void focusUpperElement()
focus upper element of frame
Definition GNEFrame.cpp:109
virtual void updateFrameAfterUndoRedo()
function called after undo/redo in the current frame (can be reimplemented in frame children)
Definition GNEFrame.cpp:252
static FXLabel * buildRainbow(FXComposite *parent)
build rainbow in frame modul
Definition GNEFrame.cpp:311
virtual void tagSelected()
Tag selected in GNETagSelector.
Definition GNEFrame.cpp:267
GNEViewNet * getViewNet() const
get view net
Definition GNEFrame.cpp:150
FXLabel * getFrameHeaderLabel() const
get the label for the frame's header
Definition GNEFrame.cpp:162
FXScrollWindow * myScrollWindowsContents
scroll windows that holds the content frame
Definition GNEFrame.h:137
virtual void demandElementSelected()
selected demand element in DemandElementSelector
Definition GNEFrame.cpp:273
GNEViewNet * myViewNet
FOX need this.
Definition GNEFrame.h:115
FXFont * getFrameHeaderFont() const
get font of the header's frame
Definition GNEFrame.cpp:168
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
Definition GNEFrame.h:118
FXHorizontalFrame * myHeaderFrame
fame for header elements
Definition GNEFrame.h:121
~GNEFrame()
destructor
Definition GNEFrame.cpp:99
virtual void show()
show Frame
Definition GNEFrame.cpp:115
virtual void hide()
hide Frame
Definition GNEFrame.cpp:124
virtual void selectedOverlappedElement(GNEAttributeCarrier *AC)
open GNEAttributesCreator extended dialog
Definition GNEFrame.cpp:292
virtual void frameWidthUpdated()
function called after setting new width in current frame (can be reimplemented in frame children)
Definition GNEFrame.cpp:258
virtual bool shapeDrawed()
build a shaped element using the drawed shape
Definition GNEFrame.cpp:279
virtual bool createPath(const bool useLastRoute)
create path between two elements
Definition GNEFrame.cpp:298
void openHelpAttributesDialog(const GNEAttributeCarrier *AC) const
Open help attributes dialog.
Definition GNEFrame.cpp:184
std::vector< std::string > myPredefinedTagsMML
Map of attribute ids to their (readable) string-representation (needed for SUMOSAXAttributesImpl_Cach...
Definition GNEFrame.h:146
FXLabel * myFrameHeaderLabel
the label for the frame's header
Definition GNEFrame.h:143
static FXFont * myFrameHeaderFont
static Font for the Header (it's common for all headers, then create only one time)
Definition GNEFrame.h:140
const std::vector< std::string > & getPredefinedTagsMML() const
get predefinedTagsMML
Definition GNEFrame.cpp:305
FXVerticalFrame * getContentFrame() const
get vertical frame that holds all widgets of frame
Definition GNEFrame.cpp:156
FXHorizontalFrame * myHeaderLeftFrame
fame for left header elements
Definition GNEFrame.h:124
A single child window which contains a view of the simulation area.
Definition json.hpp:4471