-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathEditorState.h
More file actions
52 lines (38 loc) · 973 Bytes
/
Copy pathEditorState.h
File metadata and controls
52 lines (38 loc) · 973 Bytes
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
#pragma once
#include "Value.h"
#include "CopyBuffer.h"
#include <string>
struct FileSection;
struct TrackEditorState
{
Value currentRow;
Value currentTrack;
Value currentColumn;
Value editSkip;
int blockStart, blockEnd;
TrackEditorState();
FileSection * pack();
bool unpack(const FileSection& section);
};
#define EDITOR_STATE_VALUES \
EDITOR_STATE_VALUE(macro) \
EDITOR_STATE_VALUE(octave) \
EDITOR_STATE_VALUE(editMode)
struct EditorState
{
#define EDITOR_STATE_VALUE(name) Value name;
EDITOR_STATE_VALUES
#undef EDITOR_STATE_VALUE
TrackEditorState sequenceEditor;
TrackEditorState patternEditor;
TrackEditorState macroEditor;
CopyBuffer copyBuffer;
bool followPlayPosition;
std::string audioDevice;
EditorState();
FileSection * pack();
bool unpack(const FileSection& section);
// Should use this to reset state instead of assigning
// to an empty EditorState() to avoid double frees in CopyBuffer
void reset();
};