-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathInterface.h
82 lines (60 loc) · 1.6 KB
/
Interface.h
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//
// Interface.h
// Evaluator
//
// Created by Damien Quartz
//
#pragma once
#include "Params.h"
class Evaluator;
class IGraphics;
class ITextEdit;
class ITextControl;
class ConsoleText;
class IControl;
class Oscilloscope;
class TransportButtons;
class WDL_String;
class Interface
{
public:
Interface(Evaluator* plug, IGraphics* pGraphics);
~Interface();
void SetDirty(int paramIdx, bool pushToPlug);
const char * GetProgramText() const;
unsigned int GetProgramMemorySize() const;
void SetProgramName(const char * programName);
const char * GetProgramName() const;
void SetProgramText(const char * programText);
void SetConsoleText(const char * consoleText);
void SetWatchValue(int idx, const char* watchText);
void UpdateOscilloscope(double left, double right);
int GetOscilloscopeWidth() const;
const char * GetWatch(int idx) const;
void SetWatch(int idx, const char * text);
// made this so that the interface can update the program name when we load a preset
void LoadPreset(int idx);
TransportState GetTransportState() const;
void ToggleHelp();
bool GetSupportPath(WDL_String* outPath) const;
IGraphics* GetGUI() const { return mGraphics; }
private:
void CreateControls(IGraphics* pGraphics);
Evaluator* mPlug;
IGraphics* mGraphics;
ITextEdit* textEdit;
ITextControl* programName;
ConsoleText* consoleTextControl;
IControl* bitDepthControl;
Oscilloscope* oscilloscope;
TransportButtons* transportButtons;
IControl* timeResetLabel;
IControl* timeResetToggle;
IControl* compilePrompt;
struct Watch
{
ITextEdit* var;
ConsoleText* val;
};
Watch watches[kWatchNum];
};