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-2020 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 "GNEFrameModuls.h"
23 
24 // ===========================================================================
25 // class definitions
26 // ===========================================================================
27 
32 class GNEFrame : public FXVerticalFrame {
33 
35  friend class GNEFrameModuls;
37 
38 public:
44  GNEFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet, const std::string& frameLabel);
45 
47  ~GNEFrame();
48 
50  void focusUpperElement();
51 
55  virtual void show();
56 
60  virtual void hide();
61 
63  void setFrameWidth(int newWidth);
64 
66  GNEViewNet* getViewNet() const;
67 
69  FXLabel* getFrameHeaderLabel() const;
70 
72  FXFont* getFrameHeaderFont() const;
73 
75  virtual void updateFrameAfterUndoRedo();
76 
77 protected:
78  FOX_CONSTRUCTOR(GNEFrame)
79 
80 
82 
84  virtual void tagSelected();
85 
87  virtual void demandElementSelected();
88 
90  virtual bool shapeDrawed();
91 
93  virtual void attributeUpdated();
94 
97 
100 
102  virtual void createPath();
103 
105 
107  void openHelpAttributesDialog(const GNETagProperties& tagProperties) const;
108 
110  const std::vector<std::string>& getPredefinedTagsMML() const;
111 
113  GNEViewNet* myViewNet = nullptr;
114 
116  FXVerticalFrame* myContentFrame = nullptr;
117 
119  FXHorizontalFrame* myHeaderFrame = nullptr;
120 
122  FXHorizontalFrame* myHeaderLeftFrame = nullptr;
123 
125  FXHorizontalFrame* myHeaderRightFrame = nullptr;
126 
127 private:
129  FXScrollWindow* myScrollWindowsContents = nullptr;
130 
132  static FXFont* myFrameHeaderFont;
133 
135  FXLabel* myFrameHeaderLabel = nullptr;
136 
138  std::vector<std::string> myPredefinedTagsMML;
139 
141  GNEFrame(const GNEFrame&) = delete;
142 
144  GNEFrame& operator=(const GNEFrame&) = delete;
145 };
FXHorizontalFrame * myHeaderRightFrame
fame for right header elements
Definition: GNEFrame.h:125
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:129
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:113
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
void openHelpAttributesDialog(const GNETagProperties &tagProperties) const
Open help attributes dialog.
Definition: GNEFrame.cpp:202
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
Definition: GNEFrame.h:116
FXHorizontalFrame * myHeaderFrame
fame for header elements
Definition: GNEFrame.h:119
~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
std::vector< std::string > myPredefinedTagsMML
Map of attribute ids to their (readable) string-representation (needed for SUMOSAXAttributesImpl_Cach...
Definition: GNEFrame.h:138
FXLabel * myFrameHeaderLabel
the label for the frame's header
Definition: GNEFrame.h:135
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:132
const std::vector< std::string > & getPredefinedTagsMML() const
get predefinedTagsMML
Definition: GNEFrame.cpp:269
FXHorizontalFrame * myHeaderLeftFrame
fame for left header elements
Definition: GNEFrame.h:122
GNEFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet, const std::string &frameLabel)
Constructor.
Definition: GNEFrame.cpp:40