12#include <imgui_node_editor.h>
25 auto& io = ImGui::GetIO();
32 if (!io.KeyCtrl && !io.KeyAlt && !io.KeyShift && !io.KeySuper)
34 if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_F)))
36 ed::NavigateToContent();
38 else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_F7)))
46 else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Escape)))
58 else if (io.KeyCtrl && !io.KeyAlt && !io.KeyShift && !io.KeySuper)
60 if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_N)))
73 else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_S)))
77 else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_O)))
81 else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Q)))
85 else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_X))
90 else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_C))
95 else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_V))
100 else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Z))
105 else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Y))
111 else if (io.KeyCtrl && !io.KeyAlt && io.KeyShift && !io.KeySuper)
113 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 ClearAllNodeQueues()
Clears all nodes queues.
void DisableAllCallbacks()
Disables all Node callbacks.
void DeleteAllNodes()
Delete all nodes.
void SetCurrentFilename(const std::string &newFilename)
Set the current filename of the open flow.
void DiscardChanges()
Discards the unsaved changes flag. Does not really discard the changes.
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 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 checkShortcuts(GlobalActions &globalAction)
Checks if a shortcut was pressed.
void cutFlowElements()
Cuts the currently selected elements.
void redoLastAction()
Redo the last action.
void undoLastAction()
Undo the last action.