Eclipse SUMO - Simulation of Urban MObility
GUIGlChildWindow.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 /****************************************************************************/
20 //
21 /****************************************************************************/
22 #pragma once
23 #include <config.h>
24 
25 #include "GUISUMOAbstractView.h"
26 
27 
28 // ===========================================================================
29 // class declaration
30 // ===========================================================================
31 
32 class MFXCheckableButton;
34 
35 // ===========================================================================
36 // class definitions
37 // ===========================================================================
38 
39 class GUIGlChildWindow : public FXMDIChild {
40  FXDECLARE(GUIGlChildWindow)
41 
42 public:
44  GUIGlChildWindow(FXMDIClient* p, GUIMainWindow* GUIMainWindowParent,
45  FXMDIMenu* mdimenu, const FXString& name, FXMenuBar* gripNavigationToolbar,
46  FXIcon* ic = NULL, FXuint opts = 0, FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0);
47 
49  virtual ~GUIGlChildWindow();
50 
52  virtual FXGLCanvas* getBuildGLCanvas() const;
53 
55  virtual void create();
56 
59 
62 
65  long onCmdRecenterView(FXObject*, FXSelector, void*);
66  long onCmdEditViewport(FXObject*, FXSelector, void*);
67  long onCmdEditViewScheme(FXObject*, FXSelector, void*);
68  long onCmdShowToolTipsView(FXObject* sender, FXSelector, void*);
69  long onCmdShowToolTipsMenu(FXObject* sender, FXSelector, void*);
70  long onCmdZoomStyle(FXObject* sender, FXSelector, void*);
71  long onCmdChangeColorScheme(FXObject*, FXSelector sel, void*);
73 
76 
77  virtual std::vector<GUIGlID> getObjectIDs(int messageId) const {
78  // FOX does not allow abstract virtual function here
79  UNUSED_PARAMETER(messageId);
80  return std::vector<GUIGlID>();
81  }
82 
84  FXPopup* getLocatorPopup();
85 
88 
91 
95  void setView(GUIGlID id);
96 
98  virtual bool isSelected(GUIGlObject* o) const;
99 
100 protected:
102  FOX_CONSTRUCTOR(GUIGlChildWindow)
103 
104 
106 
108  FXMenuBar* myGripNavigationToolbar = nullptr;
109 
111  FXToolBar* myStaticNavigationToolBar = nullptr;
112 
115 
118 
120  FXPopup* myLocatorPopup = nullptr;
121 
124 
127 
130 
132  FXVerticalFrame* myChildWindowContentFrame = nullptr;
133 
136 
138  void buildNavigationToolBar();
139 
141  void buildColoringToolBar();
142 
144  void buildScreenshotToolBar();
145 
146 private:
149 
151  GUIGlChildWindow& operator=(const GUIGlChildWindow&) = delete;
152 };
unsigned int GUIGlID
Definition: GUIGlObject.h:43
#define UNUSED_PARAMETER(x)
Definition: StdDefs.h:30
MFXComboBoxIcon * getColoringSchemesCombo()
return combobox with the current coloring schemes (standard, fastest standard, real world....
GUIMainWindow * myGUIMainWindowParent
FOX needs this.
virtual void create()
create GUIGlChildWindow
long onCmdShowToolTipsView(FXObject *sender, FXSelector, void *)
MFXCheckableButton * myShowToolTipsView
menu for tooltips view
MFXCheckableButton * getShowToolTipsMenu() const
get menu for tooltips menu
GUIGlChildWindow(FXMDIClient *p, GUIMainWindow *GUIMainWindowParent, FXMDIMenu *mdimenu, const FXString &name, FXMenuBar *gripNavigationToolbar, FXIcon *ic=NULL, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0)
constructor
virtual std::vector< GUIGlID > getObjectIDs(int messageId) const
GUISUMOAbstractView * myView
The view.
long onCmdChangeColorScheme(FXObject *, FXSelector sel, void *)
long onCmdEditViewScheme(FXObject *, FXSelector, void *)
virtual ~GUIGlChildWindow()
destructor
long onCmdEditViewport(FXObject *, FXSelector, void *)
FXToolBar * getNavigationToolBar(GUISUMOAbstractView &v)
return a reference to navigation toolbar
FXPopup * myLocatorPopup
The locator menu.
void setView(GUIGlID id)
Centers the view onto the given artifact.
MFXComboBoxIcon * myColoringSchemes
The coloring schemes.
long onCmdZoomStyle(FXObject *sender, FXSelector, void *)
MFXMenuButtonTooltip * myLocatorButton
The locator button.
void buildColoringToolBar()
build coloring toolbar
MFXCheckableButton * myZoomStyle
Zoom but.
void buildScreenshotToolBar()
build screenshot toolbar
virtual bool isSelected(GUIGlObject *o) const
true if the object is selected (may include extra logic besides calling gSelected)
long onCmdRecenterView(FXObject *, FXSelector, void *)
FXVerticalFrame * myChildWindowContentFrame
The contents frame.
FXPopup * getLocatorPopup()
@ brief return a pointer to locator popup
GUISUMOAbstractView * getView() const
return GUISUMOAbstractView
GUIMainWindow * getGUIMainWindowParent()
Returns the GUIMainWindow parent.
virtual FXGLCanvas * getBuildGLCanvas() const
get build GL Canvas
MFXCheckableButton * myShowToolTipsMenu
menu for tooltips menu
FXToolBar * myStaticNavigationToolBar
The static navigation tool bar.
void buildNavigationToolBar()
build navigation toolbar
long onCmdShowToolTipsMenu(FXObject *sender, FXSelector, void *)
FXMenuBar * myGripNavigationToolbar
The grip navigation tool bar.
ComboBox with icon.