File tree Expand file tree Collapse file tree 4 files changed +25
-5
lines changed Expand file tree Collapse file tree 4 files changed +25
-5
lines changed Original file line number Diff line number Diff line change
1
+ #include " MIDIContentViewer.h"
2
+
3
+ MIDIContentViewer::MIDIContentViewer () {}
Original file line number Diff line number Diff line change
1
+ #pragma once
2
+
3
+ #include < JuceHeader.h>
4
+
5
+ class MIDIContentViewer final : public juce::Component {
6
+ public:
7
+ MIDIContentViewer ();
8
+
9
+ private:
10
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MIDIContentViewer)
11
+ };
Original file line number Diff line number Diff line change @@ -95,6 +95,10 @@ MIDISourceEditor::MIDISourceEditor() {
95
95
);
96
96
this ->addAndMakeVisible (this ->piano .get ());
97
97
98
+ /* * Content */
99
+ this ->content = std::make_unique<MIDIContentViewer>();
100
+ this ->addAndMakeVisible (this ->content .get ());
101
+
98
102
/* * Set Default V Pos */
99
103
juce::MessageManager::callAsync ([scroller = Scroller::SafePointer{ this ->vScroller .get () }] {
100
104
if (scroller) {
@@ -144,11 +148,11 @@ void MIDISourceEditor::resized() {
144
148
pianoWidth, hScrollerRect.getY () - rulerRect.getBottom ());
145
149
this ->piano ->setBounds (pianoRect);
146
150
147
- /* * Track List */
148
- /* juce::Rectangle<int> listRect (
149
- 0 , vScrollerRect.getY(),
150
- vScrollerRect.getX (), vScrollerRect.getHeight());
151
- this->trackList ->setBounds(listRect); */
151
+ /* * Content */
152
+ juce::Rectangle<int > contentRect (
153
+ hScrollerRect. getX () , vScrollerRect.getY (),
154
+ hScrollerRect. getWidth (), vScrollerRect.getHeight ());
155
+ this ->content ->setBounds (contentRect);
152
156
153
157
/* * Update View Pos */
154
158
this ->hScroller ->update ();
Original file line number Diff line number Diff line change 3
3
#include < JuceHeader.h>
4
4
#include " PianoComponent.h"
5
5
#include " SourceTimeRuler.h"
6
+ #include " MIDIContentViewer.h"
6
7
#include " ../base/Scroller.h"
7
8
8
9
class MIDISourceEditor final : public juce::Component {
@@ -25,6 +26,7 @@ class MIDISourceEditor final : public juce::Component {
25
26
26
27
std::unique_ptr<SourceTimeRuler> ruler = nullptr ;
27
28
std::unique_ptr<PianoComponent> piano = nullptr ;
29
+ std::unique_ptr<MIDIContentViewer> content = nullptr ;
28
30
29
31
bool viewMoving = false ;
30
32
double moveStartPosX = 0 , moveStartPosY = 0 ;
You can’t perform that action at this time.
0 commit comments