0.4.1
Loading...
Searching...
No Matches
EditMenu.cpp
Go to the documentation of this file.
1// This file is part of INSTINCT, the INS Toolkit for Integrated
2// Navigation Concepts and Training by the Institute of Navigation of
3// the University of Stuttgart, Germany.
4//
5// This Source Code Form is subject to the terms of the Mozilla Public
6// License, v. 2.0. If a copy of the MPL was not distributed with this
7// file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
9#include "EditMenu.hpp"
10
11#include <imgui.h>
14
16{
17 if (ImGui::MenuItem("Undo", "CTRL+Z", false, canUndoLastAction()))
18 {
20 }
21 if (ImGui::MenuItem("Redo", "CTRL+Y", false, canRedoLastAction()))
22 {
24 }
25 ImGui::Separator();
26 if (ImGui::MenuItem("Cut", "CTRL+X", false, canCutOrCopyFlowElements()))
27 {
29 }
30 if (ImGui::MenuItem("Copy", "CTRL+C", false, canCutOrCopyFlowElements()))
31 {
33 }
34 if (ImGui::MenuItem("Paste", "CTRL+V", false, canPasteFlowElements()))
35 {
37 }
38 ImGui::Separator();
39 ImGui::MenuItem("Node Editor Style", nullptr, &gui::windows::showNodeEditorStyleEditor);
40 ImGui::MenuItem("ImPlot Style", nullptr, &gui::windows::showImPlotStyleEditor);
41 ImGui::MenuItem("Font Size", nullptr, &gui::windows::showFontSizeEditor);
42 ImGui::MenuItem("Colormap Editor", nullptr, &gui::windows::showColormapEditor);
43#ifdef IMGUI_IMPL_OPENGL_LOADER_GL3W
44 ImGui::MenuItem("Screenshots", nullptr, &gui::windows::showScreenshotter);
45#endif
46}
Edit Menu.
Global Gui Actions.
Global windows.
void ShowEditMenu()
Show the edit menu dropdown.
Definition EditMenu.cpp:15
bool showNodeEditorStyleEditor
Flag whether the NodeEditor style editor windows should be displayed.
Definition Global.cpp:24
bool showFontSizeEditor
Flag whether the Font size editor window should be displayed.
Definition Global.cpp:26
bool showColormapEditor
Flag whether the Colormap editor window should be displayed.
Definition Global.cpp:27
bool showImPlotStyleEditor
Flag whether the ImPlot style editor windows should be displayed.
Definition Global.cpp:25
bool showScreenshotter
Flag whether the Screenshotter window should be displayed.
Definition Global.cpp:28
bool canPasteFlowElements()
Checks if elements can be pasted.
void copyFlowElements()
Copies the currently selected elements.
bool canUndoLastAction()
Checks if an action can be undone.
bool canCutOrCopyFlowElements()
Checks if elements can be cutted/copied.
bool canRedoLastAction()
Checks if an action can be redone.
void pasteFlowElements()
Pastes the copied/cutted elements.
void cutFlowElements()
Cuts the currently selected elements.
void redoLastAction()
Redo the last action.
void undoLastAction()
Undo the last action.