Eclipse SUMO - Simulation of Urban MObility
GNEFrame.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2022 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 #include "GNEFrameModules.h"
24 
25 // ===========================================================================
26 // class definitions
27 // ===========================================================================
28 
33 class GNEFrame : public FXVerticalFrame {
34 
36  friend class GNEFrameModules;
38 
39 public:
45  GNEFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet, const std::string& frameLabel);
46 
48  ~GNEFrame();
49 
51  void focusUpperElement();
52 
56  virtual void show();
57 
61  virtual void hide();
62 
64  void setFrameWidth(int newWidth);
65 
67  GNEViewNet* getViewNet() const;
68 
70  FXLabel* getFrameHeaderLabel() const;
71 
73  FXFont* getFrameHeaderFont() const;
74 
76  virtual void updateFrameAfterUndoRedo();
77 
78 protected:
79  FOX_CONSTRUCTOR(GNEFrame)
80 
81 
83 
85  virtual void tagSelected();
86 
88  virtual void demandElementSelected();
89 
91  virtual bool shapeDrawed();
92 
94  virtual void attributeUpdated();
95 
98 
101 
103  virtual void createPath();
104 
106 
108  void openHelpAttributesDialog(const GNEAttributeCarrier* AC) const;
109 
111  const std::vector<std::string>& getPredefinedTagsMML() const;
112 
114  GNEViewNet* myViewNet = nullptr;
115 
117  FXVerticalFrame* myContentFrame = nullptr;
118 
120  FXHorizontalFrame* myHeaderFrame = nullptr;
121 
123  FXHorizontalFrame* myHeaderLeftFrame = nullptr;
124 
126  FXHorizontalFrame* myHeaderRightFrame = nullptr;
127 
128 private:
130  FXScrollWindow* myScrollWindowsContents = nullptr;
131 
133  static FXFont* myFrameHeaderFont;
134 
136  FXLabel* myFrameHeaderLabel = nullptr;
137 
139  std::vector<std::string> myPredefinedTagsMML;
140 
142  GNEFrame(const GNEFrame&) = delete;
143 
145  GNEFrame& operator=(const GNEFrame&) = delete;
146 };
FXHorizontalFrame * myHeaderRightFrame
fame for right header elements
Definition: GNEFrame.h:126
virtual void attributeUpdated()
function called after set a valid attribute in AttributeCreator/AttributeEditor/ParametersEditor/....
Definition: GNEFrame.cpp:179
void focusUpperElement()
focus upper element of frame
Definition: GNEFrame.cpp:102
virtual void updateFrameAfterUndoRedo()
function called after undo/redo in the current frame (can be reimplemented in frame children)
Definition: GNEFrame.cpp:151
GNEFrame(const GNEFrame &)=delete
Invalidated copy constructor.
virtual void attributesEditorExtendedDialogOpened()
open AttributesCreator extended dialog (can be reimplemented in frame children)
Definition: GNEFrame.cpp:185
virtual void tagSelected()
Tag selected in TagSelector.
Definition: GNEFrame.cpp:160
GNEViewNet * getViewNet() const
get view net
Definition: GNEFrame.cpp:133
FXLabel * getFrameHeaderLabel() const
get the label for the frame's header
Definition: GNEFrame.cpp:139
FXScrollWindow * myScrollWindowsContents
scroll windows that holds the content frame
Definition: GNEFrame.h:130
virtual void demandElementSelected()
selected demand element in DemandElementSelector
Definition: GNEFrame.cpp:166
GNEFrame & operator=(const GNEFrame &)=delete
Invalidated assignment operator.
GNEViewNet * myViewNet
View Net.
Definition: GNEFrame.h:114
FXFont * getFrameHeaderFont() const
get font of the header's frame
Definition: GNEFrame.cpp:145
virtual void createPath()
create path (can be reimplemented in frame children)
Definition: GNEFrame.cpp:197
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
Definition: GNEFrame.h:117
FXHorizontalFrame * myHeaderFrame
fame for header elements
Definition: GNEFrame.h:120
~GNEFrame()
destructor
Definition: GNEFrame.cpp:92
virtual void show()
show Frame
Definition: GNEFrame.cpp:108
virtual void hide()
hide Frame
Definition: GNEFrame.cpp:117
virtual void selectedOverlappedElement(GNEAttributeCarrier *AC)
open AttributesCreator extended dialog (can be reimplemented in frame children)
Definition: GNEFrame.cpp:191
virtual bool shapeDrawed()
build a shaped element using the drawed shape (can be reimplemented in frame children)
Definition: GNEFrame.cpp:172
void openHelpAttributesDialog(const GNEAttributeCarrier *AC) const
Open help attributes dialog.
Definition: GNEFrame.cpp:202
std::vector< std::string > myPredefinedTagsMML
Map of attribute ids to their (readable) string-representation (needed for SUMOSAXAttributesImpl_Cach...
Definition: GNEFrame.h:139
FXLabel * myFrameHeaderLabel
the label for the frame's header
Definition: GNEFrame.h:136
void setFrameWidth(int newWidth)
set width of GNEFrame
Definition: GNEFrame.cpp:126
static FXFont * myFrameHeaderFont
static Font for the Header (it's common for all headers, then create only one time)
Definition: GNEFrame.h:133
const std::vector< std::string > & getPredefinedTagsMML() const
get predefinedTagsMML
Definition: GNEFrame.cpp:269
FXHorizontalFrame * myHeaderLeftFrame
fame for left header elements
Definition: GNEFrame.h:123
GNEFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet, const std::string &frameLabel)
Constructor.
Definition: GNEFrame.cpp:40