Path: blob/main/src/utils/gui/windows/GUIGlChildWindow.h
169684 views
/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file GUIGlChildWindow.h14/// @author Daniel Krajzewicz15/// @author Jakob Erdmann16/// @author Michael Behrisch17/// @date Fri, 29.04.200518///19//20/****************************************************************************/21#pragma once22#include <config.h>2324#include "GUISUMOAbstractView.h"252627// ===========================================================================28// class declaration29// ===========================================================================3031class MFXCheckableButton;32class MFXMenuButtonTooltip;3334// ===========================================================================35// class definitions36// ===========================================================================3738class GUIGlChildWindow : public FXMDIChild {39FXDECLARE(GUIGlChildWindow)4041public:42/// @brief constructor43GUIGlChildWindow(FXMDIClient* p, GUIMainWindow* GUIMainWindowParent,44FXMDIMenu* mdimenu, const FXString& name, FXMenuBar* gripNavigationToolbar,45FXIcon* ic = NULL, FXuint opts = 0, FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0);4647/// @brief destructor48virtual ~GUIGlChildWindow();4950/// @brief get build GL Canvas51virtual FXGLCanvas* getBuildGLCanvas() const;5253/// @brief create GUIGlChildWindow54virtual void create();5556/// @brief return GUISUMOAbstractView57GUISUMOAbstractView* getView() const;5859/// @brief Returns the GUIMainWindow parent60GUIMainWindow* getGUIMainWindowParent();6162/// @name buttons call backs63/// @{64long onCmdRecenterView(FXObject*, FXSelector, void*);65long onCmdEditViewport(FXObject*, FXSelector, void*);66long onCmdEditViewScheme(FXObject*, FXSelector, void*);67long onCmdShowToolTipsView(FXObject* sender, FXSelector, void*);68long onCmdShowToolTipsMenu(FXObject* sender, FXSelector, void*);69long onCmdZoomStyle(FXObject* sender, FXSelector, void*);70long onCmdChangeColorScheme(FXObject*, FXSelector sel, void*);71/// @}7273/// @brief return a reference to navigation toolbar74FXToolBar* getNavigationToolBar(GUISUMOAbstractView& v);7576virtual std::vector<GUIGlID> getObjectIDs(int messageId) const {77// FOX does not allow abstract virtual function here78UNUSED_PARAMETER(messageId);79return std::vector<GUIGlID>();80}8182/// @ brief return a pointer to locator popup83FXPopup* getLocatorPopup();8485/// @brief return combobox with the current coloring schemes (standard, fastest standard, real world...)86MFXComboBoxIcon* getColoringSchemesCombo();8788/// @brief get menu for tooltips menu89MFXCheckableButton* getShowToolTipsMenu() const;9091/** @brief Centers the view onto the given artifact92* @param[in] id The id of the object to center the view on93*/94void setView(GUIGlID id);9596/// @brief true if the object is selected (may include extra logic besides calling gSelected)97virtual bool isSelected(GUIGlObject* o) const;9899protected:100/// @brief FOX needs this101FOX_CONSTRUCTOR(GUIGlChildWindow)102103/// @brief The parent window104GUIMainWindow* myGUIMainWindowParent = nullptr;105106/// @brief The grip navigation tool bar107FXMenuBar* myGripNavigationToolbar = nullptr;108109/// @brief The static navigation tool bar110FXToolBar* myStaticNavigationToolBar = nullptr;111112/// @brief The view113GUISUMOAbstractView* myView = nullptr;114115/// @brief Zoom but116MFXCheckableButton* myZoomStyle = nullptr;117118/// The locator menu119FXPopup* myLocatorPopup = nullptr;120121/// @brief The locator button122MFXMenuButtonTooltip* myLocatorButton = nullptr;123124/// @brief menu for tooltips view125MFXCheckableButton* myShowToolTipsView = nullptr;126127/// @brief menu for tooltips menu128MFXCheckableButton* myShowToolTipsMenu = nullptr;129130/// @brief The contents frame131FXVerticalFrame* myChildWindowContentFrame = nullptr;132133/// @brief The coloring schemes134MFXComboBoxIcon* myColoringSchemes = nullptr;135136/// @brief build navigation toolbar137void buildNavigationToolBar();138139/// @brief build coloring toolbar140void buildColoringToolBar();141142/// @brief build screenshot toolbar143void buildScreenshotToolBar();144145private:146/// @brief Invalidated copy constructor.147GUIGlChildWindow(const GUIGlChildWindow&) = delete;148149/// @brief Invalidated assignment operator.150GUIGlChildWindow& operator=(const GUIGlChildWindow&) = delete;151};152153154