Path: blob/main/src/utils/gui/shortcuts/GUIShortcutsSubSys.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 GUIShortcutsSubSys.h14/// @author Pablo Alvarez Lopez15/// @date Feb 201916///17// Helper for Shortcuts18/****************************************************************************/19#pragma once20#include <config.h>2122#include <utils/foxtools/fxheader.h>2324#include "GUIShortcuts.h"2526// ===========================================================================27// class definitions28// ===========================================================================2930class GUIShortcutsSubSys {3132public:33/// @brief build accelerators34static void buildAccelerators(FXAccelTable* accelTable, FXObject* target, const bool sumogui);3536/// @brief change accelerator (used for toggle dynamically binding space key with start/end simulation)37static void changeAccelerator(FXAccelTable* accelTable, FXObject* target, GUIShortcut keysym, long msg);3839private:40// @brief parse GUIShortcut to int41static int parseKey(GUIShortcut key);4243// @brief parse GUIShortcut to int with a modifier44static int parseKey(GUIShortcut key, GUIShortcutModifier firstModifier);4546// @brief parse GUIShortcut to int with two modifiers47static int parseKey(GUIShortcut key, GUIShortcutModifier firstModifier, GUIShortcutModifier secondModifier);48};495051