-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAXENodeEditor.hpp
More file actions
66 lines (43 loc) · 1.4 KB
/
AXENodeEditor.hpp
File metadata and controls
66 lines (43 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef SHADOW_NATIVE_AXE_AXE_NODE_EDITOR_HPP
#define SHADOW_NATIVE_AXE_AXE_NODE_EDITOR_HPP
#include "AXETypes.hpp"
namespace Shadow::AXE {
namespace ed = ax::NodeEditor;
class AXENodeEditor {
public:
AXENodeEditor(Song* song, EditorState* editorState);
~AXENodeEditor();
void onUpdate(bool& p_open);
void updateDebugMenu(bool& p_open);
void shutdown();
// void getMasterNodeGraph();
private:
Song* song;
EditorState* editorState;
NodeGraph* openedNodeGraph = nullptr;
bool mainMenuOpen = true;
// Temporary container to take actions on things from ctx menus
ed::NodeId contextNodeId;
ed::LinkId contextLinkId;
std::vector<ed::NodeId> selectedNodes;
std::vector<ed::LinkId> selectedLinks;
int selectedNodeCount = 0;
int selectedLinkCount = 0;
int getNextId() { return song->lastKnownGraphId++; }
// int getNextLinkId() { return ed::LinkId(getNextId()); }
void markGraphDirty(NodeGraph* graph);
// Really a terrible name on my part. When a new node graph is loaded into
// `openedNodeGraph`, the contents of the node editor need to reflect this.
// This method is for just that.
void reloadNodeEditorContents();
void nodeAddMenu();
void SpawnInputNode();
void SpawnOutputNode();
void SpawnLowPassFilterNode();
void SpawnDelayNode();
void SpawnComment();
NodeGraph* createNodeGraph(const std::string& name);
std::string helpText;
};
}
#endif /* SHADOW_NATIVE_AXE_AXE_NODE_EDITOR_HPP */