Skip to content

Commit 62acdbd

Browse files
committed
Move some API methods definition from header to cpp file
1 parent 8049176 commit 62acdbd

4 files changed

Lines changed: 78 additions & 22 deletions

File tree

Source/Processors/Editors/GenericEditor.cpp

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,11 @@ bool GenericEditor::isMerger()
715715
return getProcessor()->isMerger();
716716
}
717717

718+
void GenericEditor::buttonEvent(Button* button)
719+
{
720+
721+
}
722+
718723

719724
/////////////////////// BUTTONS ///////////////////////////////
720725

@@ -723,6 +728,11 @@ DrawerButton::DrawerButton(const String& name) : Button(name)
723728
setClickingTogglesState(true);
724729
}
725730

731+
DrawerButton::~DrawerButton()
732+
{
733+
734+
}
735+
726736
void DrawerButton::paintButton(Graphics& g, bool isMouseOver, bool isButtonDown)
727737
{
728738
if (isMouseOver)
@@ -753,6 +763,16 @@ UtilityButton::UtilityButton(String label_, Font font_) :
753763

754764
}
755765

766+
UtilityButton::~UtilityButton()
767+
{
768+
769+
}
770+
771+
bool UtilityButton::getEnabledState()
772+
{
773+
return isEnabled;
774+
}
775+
756776
void UtilityButton::setCorners(bool UL, bool UR, bool LL, bool LR)
757777
{
758778
roundUL = UL;
@@ -945,6 +965,16 @@ void UtilityButton::setLabel(String label_)
945965
repaint();
946966
}
947967

968+
TriangleButton::TriangleButton(int direction_) : Button("Arrow")
969+
{
970+
direction = direction_;
971+
}
972+
973+
TriangleButton::~TriangleButton()
974+
{
975+
976+
}
977+
948978
void TriangleButton::paintButton(Graphics& g, bool isMouseOver, bool isButtonDown)
949979
{
950980

@@ -1014,6 +1044,11 @@ LoadButton::LoadButton() : ImageButton("Load")
10141044

10151045
}
10161046

1047+
LoadButton::~LoadButton()
1048+
{
1049+
1050+
}
1051+
10171052
SaveButton::SaveButton() : ImageButton("Save")
10181053
{
10191054
Image icon = ImageCache::getFromMemory(BinaryData::floppy5_png,
@@ -1034,6 +1069,11 @@ SaveButton::SaveButton() : ImageButton("Save")
10341069
);
10351070
}
10361071

1072+
SaveButton::~SaveButton()
1073+
{
1074+
1075+
}
1076+
10371077

10381078
void GenericEditor::updateParameterButtons(int parameterIndex)
10391079
{
@@ -1139,6 +1179,16 @@ ColorButton::ColorButton(String label_, Font font_) :
11391179
showEnabledStatus = false;
11401180
}
11411181

1182+
ColorButton::~ColorButton()
1183+
{
1184+
1185+
}
1186+
1187+
bool ColorButton::getEnabledState()
1188+
{
1189+
return isEnabled;
1190+
}
1191+
11421192
void ColorButton::setShowEnabled(bool state)
11431193
{
11441194
showEnabledStatus = state;
@@ -1259,6 +1309,11 @@ ThresholdSlider::ThresholdSlider(Font f) : Slider("name"), font(f)
12591309

12601310
}
12611311

1312+
ThresholdSlider::~ThresholdSlider()
1313+
{
1314+
1315+
}
1316+
12621317
void ThresholdSlider::paint(Graphics& g)
12631318
{
12641319

Source/Processors/Editors/GenericEditor.h

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ class PLUGIN_API GenericEditor : public AudioProcessorEditor,
185185

186186
/** Called by buttonClicked(). Deals with clicks on custom buttons. Subclasses of
187187
GenericEditor should modify this method only.*/
188-
virtual void buttonEvent(Button* button) {}
188+
virtual void buttonEvent(Button* button);
189189

190190
/** Handles slider events for all editors. */
191191
virtual void sliderValueChanged(Slider* slider);
@@ -360,7 +360,7 @@ class PLUGIN_API DrawerButton : public Button
360360
{
361361
public:
362362
DrawerButton(const String& name);
363-
~DrawerButton() {}
363+
~DrawerButton();
364364
private:
365365
void paintButton(Graphics& g, bool isMouseOver, bool isButtonDown);
366366

@@ -379,11 +379,8 @@ class PLUGIN_API DrawerButton : public Button
379379
class PLUGIN_API TriangleButton : public Button
380380
{
381381
public:
382-
TriangleButton(int direction_) : Button("Arrow")
383-
{
384-
direction = direction_;
385-
}
386-
~TriangleButton() {}
382+
TriangleButton(int direction_);
383+
~TriangleButton();
387384
private:
388385
void paintButton(Graphics& g, bool isMouseOver, bool isButtonDown);
389386

@@ -402,7 +399,7 @@ class PLUGIN_API LoadButton : public ImageButton
402399
{
403400
public:
404401
LoadButton();
405-
~LoadButton() {}
402+
~LoadButton();
406403
};
407404

408405
/**
@@ -417,7 +414,7 @@ class PLUGIN_API SaveButton : public ImageButton
417414
{
418415
public:
419416
SaveButton();
420-
~SaveButton() {}
417+
~SaveButton();
421418
private:
422419
};
423420

@@ -433,16 +430,13 @@ class PLUGIN_API UtilityButton : public Button
433430
{
434431
public:
435432
UtilityButton(String label_, Font font_);
436-
~UtilityButton() {}
433+
~UtilityButton();
437434

438435
void setCorners(bool UL, bool UR, bool LL, bool LR);
439436
void setRadius(float r);
440437

441438
void setEnabledState(bool);
442-
bool getEnabledState()
443-
{
444-
return isEnabled;
445-
}
439+
bool getEnabledState();
446440

447441
void setLabel(String label);
448442
String getLabel();
@@ -470,13 +464,10 @@ class PLUGIN_API ColorButton : public Button
470464
{
471465
public:
472466
ColorButton(String label_, Font font_);
473-
~ColorButton() {}
467+
~ColorButton();
474468

475469
void setEnabledState(bool);
476-
bool getEnabledState()
477-
{
478-
return isEnabled;
479-
}
470+
bool getEnabledState();
480471
void setColors(Colour foreground, Colour background);
481472
void setLabel(String label);
482473
String getLabel();
@@ -507,7 +498,7 @@ class PLUGIN_API ThresholdSlider : public Slider
507498
{
508499
public:
509500
ThresholdSlider(Font f);
510-
~ThresholdSlider() {}
501+
~ThresholdSlider();
511502

512503
void setActive(bool);
513504

Source/Processors/Visualization/MatlabLikePlot.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,11 @@ AxesComponent::AxesComponent(bool horizontal, bool flip) : flipDirection(flip),
409409
setRange(minv,maxv,5,false,false);
410410
}
411411

412+
AxesComponent::~AxesComponent()
413+
{
414+
415+
}
416+
412417
void AxesComponent::setFlip(bool state)
413418
{
414419
flipDirection = state;
@@ -1104,6 +1109,11 @@ DrawComponent::DrawComponent(MatlabLikePlot *mlp_) : mlp(mlp_)
11041109
setMode(ZOOM); // default mode
11051110
}
11061111

1112+
DrawComponent::~DrawComponent()
1113+
{
1114+
1115+
}
1116+
11071117
void DrawComponent::setMode(DrawComponentMode m)
11081118
{
11091119
mode = m;

Source/Processors/Visualization/MatlabLikePlot.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class PLUGIN_API DrawComponent : public Component
8383
{
8484
public:
8585
DrawComponent(MatlabLikePlot *mlp);
86-
~DrawComponent() {}
86+
~DrawComponent();
8787
void setMode(DrawComponentMode m);
8888
void setHorizonal0Visible(bool state);
8989
void setVertical0Visible(bool state);
@@ -145,7 +145,7 @@ class PLUGIN_API AxesComponent : public Component
145145
{
146146
public:
147147
AxesComponent(bool horizontal, bool flip);
148-
~AxesComponent() {}
148+
~AxesComponent();
149149
void setTicks(std::vector<float> ticks_, std::vector<String> labels);
150150
void paint(Graphics &g);
151151
void setFontHeight(int height);

0 commit comments

Comments
 (0)