12#include <imgui_node_editor.h>
22 auto& io = ImGui::GetIO();
29 if (!io.KeyCtrl && !io.KeyAlt && !io.KeyShift && !io.KeySuper)
31 if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_F)))
33 ed::NavigateToContent();
35 else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_F7)))
43 else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Escape)))
55 else if (io.KeyCtrl && !io.KeyAlt && !io.KeyShift && !io.KeySuper)
57 if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_N)))
70 else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_S)))
74 else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_O)))
78 else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Q)))
82 else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_X))
87 else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_C))
92 else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_V))
98 else if (io.KeyCtrl && !io.KeyAlt && io.KeyShift && !io.KeySuper)
100 if (io.KeyShift && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_S)))
GlobalActions
Possible Global Actions to perform in the GUI.
@ SaveAs
Save the flow as filename.
#define LOG_INFO
Info to the user on the state of the program.
Defines all available shortcuts.
bool isRunning() noexcept
Checks if the thread is running.
void start()
Starts the Thread.
void stop()
Stops the Thread.
void SetCurrentFilename(const std::string &newFilename)
Set the current filename of the open flow.
void DisableAllCallbacks()
Disables all Node callbacks.
void DeleteAllNodes()
Delete all nodes.
void DiscardChanges()
Discards the unsaved changes flag. Does not really discard the changes.
void ClearAllNodeQueues()
Clears all nodes queues.
bool HasUnsavedChanges()
Checks if the currently open flow has unsaved changes.
void SaveFlow(GlobalActions &globalAction)
Saves the current flow into a file.
bool canPasteFlowElements()
Checks if elements can be pasted.
void copyFlowElements()
Copies the currently selected elements.
bool canCutOrCopyFlowElements()
Checks if elements can be cutted/copied.
void pasteFlowElements()
Pastes the copied/cutted elements.
void checkShortcuts(GlobalActions &globalAction)
Checks if a shortcut was pressed.
void cutFlowElements()
Cuts the currently selected elements.