Skip to content

Commit 20e95de

Browse files
committed
refactor: stop using ElementApp.h
1 parent 0769139 commit 20e95de

2 files changed

Lines changed: 13 additions & 10 deletions

File tree

src/ui/window.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
namespace element {
88

9+
using namespace juce;
10+
911
Dialog::Dialog (const String& name)
1012
: DialogWindow (name, Colours::darkgrey, true, true)
1113
{

src/ui/window.hpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,22 @@
33

44
#pragma once
55

6-
#include "ElementApp.h"
6+
#include <element/juce/core.hpp>
7+
#include <element/juce/gui_basics.hpp>
78
#include <element/signals.hpp>
89

910
namespace element {
1011

1112
class GuiApp;
1213

13-
struct DialogOptions : public DialogWindow::LaunchOptions
14+
struct DialogOptions : public juce::DialogWindow::LaunchOptions
1415
{
1516
DialogOptions()
16-
: DialogWindow::LaunchOptions()
17+
: juce::DialogWindow::LaunchOptions()
1718
{
18-
dialogBackgroundColour = Colours::darkgrey;
19+
dialogBackgroundColour = juce::Colours::darkgrey;
1920
content.set (nullptr, true);
20-
dialogTitle = String();
21+
dialogTitle = juce::String();
2122
resizable = false;
2223
useBottomRightCornerResizer = false;
2324
#if JUCE_IOS
@@ -34,29 +35,29 @@ class WindowHook
3435
{
3536
public:
3637
WindowHook() {}
37-
virtual ~WindowHook() { Logger::writeToLog ("~WindowHook()"); }
38+
virtual ~WindowHook() { juce::Logger::writeToLog ("~WindowHook()"); }
3839
inline Signal<void()>& signalClosed() { return closedSignal; }
3940

4041
protected:
4142
Signal<void()> closedSignal;
4243
};
4344

4445
/** A juce DialogWindow that emits a closed signal */
45-
class Dialog : public DialogWindow,
46+
class Dialog : public juce::DialogWindow,
4647
public WindowHook
4748
{
4849
public:
49-
Dialog (const String& name);
50+
Dialog (const juce::String& name);
5051
virtual ~Dialog();
5152
virtual void closeButtonPressed();
5253
};
5354

5455
/** A juce DocumentWindow that emits a closed signal */
55-
class Window : public DocumentWindow,
56+
class Window : public juce::DocumentWindow,
5657
public WindowHook
5758
{
5859
public:
59-
Window (const String& name);
60+
Window (const juce::String& name);
6061
virtual ~Window();
6162
void closeButtonPressed();
6263
};

0 commit comments

Comments
 (0)