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-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // Abstract class for lateral frames in NetEdit
16 /****************************************************************************/
17 #ifndef GNEFrame_h
18 #define GNEFrame_h
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 
24 #include "GNEFrameModuls.h"
26 
27 // ===========================================================================
28 // class definitions
29 // ===========================================================================
30 
35 class GNEFrame : public FXVerticalFrame {
36 
38  friend class GNEFrameModuls;
40 
41 public:
47  GNEFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet, const std::string& frameLabel);
48 
50  ~GNEFrame();
51 
53  void focusUpperElement();
54 
58  virtual void show();
59 
63  virtual void hide();
64 
66  void setFrameWidth(int newWidth);
67 
69  GNEViewNet* getViewNet() const;
70 
72  FXLabel* getFrameHeaderLabel() const;
73 
75  FXFont* getFrameHeaderFont() const;
76 
78  virtual void updateFrameAfterUndoRedo();
79 
80 protected:
82  GNEFrame() {}
83 
86 
88  virtual void tagSelected();
89 
91  virtual void demandElementSelected();
92 
94  virtual void edgePathCreated();
95 
97  virtual bool shapeDrawed();
98 
100  virtual void attributeUpdated();
101 
104 
106 
108  void openHelpAttributesDialog(const GNEAttributeCarrier::TagProperties& tagProperties) const;
109 
111  const RGBColor& getEdgeCandidateColor() const;
112 
115 
117  const std::map<int, std::string>& getPredefinedTagsMML() const;
118 
121 
123  FXVerticalFrame* myContentFrame;
124 
126  FXHorizontalFrame* myHeaderFrame;
127 
129  FXHorizontalFrame* myHeaderLeftFrame;
130 
132  FXHorizontalFrame* myHeaderRightFrame;
133 
134 private:
136  FXScrollWindow* myScrollWindowsContents;
137 
139  static FXFont* myFrameHeaderFont;
140 
143 
146 
149 
151  std::map<int, std::string> myPredefinedTagsMML;
152 
154  GNEFrame(const GNEFrame&) = delete;
155 
157  GNEFrame& operator=(const GNEFrame&) = delete;
158 };
159 
160 
161 #endif
162 
163 /****************************************************************************/
virtual void tagSelected()
Tag selected in TagSelector.
Definition: GNEFrame.cpp:160
GNEFrame()
FOX needs this.
Definition: GNEFrame.h:82
const RGBColor & getEdgeCandidateColor() const
get edge candidate color
Definition: GNEFrame.cpp:264
GNEFrame & operator=(const GNEFrame &)=delete
Invalidated assignment operator.
FXLabel * getFrameHeaderLabel() const
get the label for the frame&#39;s header
Definition: GNEFrame.cpp:139
FXHorizontalFrame * myHeaderRightFrame
fame for right header elements
Definition: GNEFrame.h:132
virtual void attributesEditorExtendedDialogOpened()
open AttributesCreator extended dialog (can be reimplemented in frame children)
Definition: GNEFrame.cpp:191
struct with the attribute Properties
const RGBColor & getEdgeCandidateSelectedColor() const
get selected color
Definition: GNEFrame.cpp:270
FXScrollWindow * myScrollWindowsContents
scroll windows that holds the content frame
Definition: GNEFrame.h:136
FXFont * getFrameHeaderFont() const
get font of the header&#39;s frame
Definition: GNEFrame.cpp:145
FXHorizontalFrame * myHeaderFrame
fame for header elements
Definition: GNEFrame.h:126
RGBColor myEdgeCandidateSelectedColor
selected edge candidate color (used by some modulds to selected mark edges)
Definition: GNEFrame.h:148
GNEViewNet * getViewNet() const
get view net
Definition: GNEFrame.cpp:133
const std::map< int, std::string > & getPredefinedTagsMML() const
get predefinedTagsMML
Definition: GNEFrame.cpp:276
GNEViewNet * myViewNet
View Net.
Definition: GNEFrame.h:120
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
Definition: GNEFrame.h:123
FXLabel * myFrameHeaderLabel
the label for the frame&#39;s header
Definition: GNEFrame.h:142
void setFrameWidth(int newWidth)
set width of GNEFrame
Definition: GNEFrame.cpp:126
void focusUpperElement()
focus upper element of frame
Definition: GNEFrame.cpp:102
virtual bool shapeDrawed()
build a shaped element using the drawed shape (can be reimplemented in frame children) ...
Definition: GNEFrame.cpp:178
RGBColor myEdgeCandidateColor
edge candidate color (used by some modulds to mark edges)
Definition: GNEFrame.h:145
~GNEFrame()
destructor
Definition: GNEFrame.cpp:92
virtual void show()
show Frame
Definition: GNEFrame.cpp:108
std::map< int, std::string > myPredefinedTagsMML
Map of attribute ids to their (readable) string-representation (needed for SUMOSAXAttributesImpl_Cach...
Definition: GNEFrame.h:151
virtual void hide()
hide Frame
Definition: GNEFrame.cpp:117
static FXFont * myFrameHeaderFont
static Font for the Header (it&#39;s common for all headers, then create only one time) ...
Definition: GNEFrame.h:139
void openHelpAttributesDialog(const GNEAttributeCarrier::TagProperties &tagProperties) const
Open help attributes dialog.
Definition: GNEFrame.cpp:197
virtual void updateFrameAfterUndoRedo()
function called after undo/redo in the current frame (can be reimplemented in frame children) ...
Definition: GNEFrame.cpp:151
virtual void attributeUpdated()
function called after set a valid attribute in AttributeCreator/AttributeEditor/GenericParametersEdit...
Definition: GNEFrame.cpp:185
virtual void edgePathCreated()
finish edge path creation
Definition: GNEFrame.cpp:172
virtual void demandElementSelected()
selected demand element in DemandElementSelector
Definition: GNEFrame.cpp:166
FXHorizontalFrame * myHeaderLeftFrame
fame for left header elements
Definition: GNEFrame.h:129