Line |
Branch |
Exec |
Source |
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> |
12 |
|
|
#include "internal/gui/GlobalActions.hpp" |
13 |
|
|
#include "internal/gui/windows/Global.hpp" |
14 |
|
|
|
15 |
|
✗ |
void NAV::gui::menus::ShowEditMenu() |
16 |
|
|
{ |
17 |
|
✗ |
if (ImGui::MenuItem("Undo", "CTRL+Z", false, canUndoLastAction())) |
18 |
|
|
{ |
19 |
|
✗ |
undoLastAction(); |
20 |
|
|
} |
21 |
|
✗ |
if (ImGui::MenuItem("Redo", "CTRL+Y", false, canRedoLastAction())) |
22 |
|
|
{ |
23 |
|
✗ |
redoLastAction(); |
24 |
|
|
} |
25 |
|
✗ |
ImGui::Separator(); |
26 |
|
✗ |
if (ImGui::MenuItem("Cut", "CTRL+X", false, canCutOrCopyFlowElements())) |
27 |
|
|
{ |
28 |
|
✗ |
cutFlowElements(); |
29 |
|
|
} |
30 |
|
✗ |
if (ImGui::MenuItem("Copy", "CTRL+C", false, canCutOrCopyFlowElements())) |
31 |
|
|
{ |
32 |
|
✗ |
copyFlowElements(); |
33 |
|
|
} |
34 |
|
✗ |
if (ImGui::MenuItem("Paste", "CTRL+V", false, canPasteFlowElements())) |
35 |
|
|
{ |
36 |
|
✗ |
pasteFlowElements(); |
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 |
|
✗ |
} |
47 |
|
|
|