-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWindow.h
More file actions
98 lines (87 loc) · 2.62 KB
/
Window.h
File metadata and controls
98 lines (87 loc) · 2.62 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#ifndef FFT_MUSIC_VISUALISER_WINDOW_H
#define FFT_MUSIC_VISUALISER_WINDOW_H
#include <wx/wx.h>
#include <wx/display.h>
#include <iostream>
#include <vector>
#include <algorithm>
#include <random>
#include <memory>
#include "../../config/config.h"
#include "../../utils/visualiser/Visualiser.h"
#include "../visualisers/equalizer/Equalizer.h"
#include "../visualisers/circular/Circular.h"
#include "../visualisers/volumes/Volumes.h"
#include "../../utils/frame/Frame.h"
#include "../../utils/observer/Observer.h"
#include "../../utils/dialog/Dialog.h"
class Window : public Frame {
public:
Window();
~Window() noexcept;
/*
* Render components in the window
* This method renders custom components in the window
* @param graphics graphics object @see wxDC
*/
void render(Graphics graphics) override;
/*
* Update components in the window
* This method is used for updating custom components in the window
*/
void update() override;
/*
* Set observer
* This method sets the observer
* @param observer observer to be set
*/
void set_observer(std::unique_ptr<Observer> observer);
private:
std::shared_ptr<Equalizer> equalizer_visualiser;
std::shared_ptr<Circular> circular_visualiser;
std::shared_ptr<Volumes> volumes_visualiser;
std::shared_ptr<Visualiser> visualiser;
std::unique_ptr<Observer> observer;
wxMenuBar * menu_bar;
/*
* Choose new audio file
* This method opens the file chooser dialog and the user can select the next audio file to be played
*/
void on_choose(Event event);
/*
* Quit application
* This method quits the application
*/
void on_quit(Event event);
/*
* Resume audio playback
* This method resumes the audio playback if it has been paused
*/
void on_resume(Event event);
/*
* Pause audio playback
* This method pauses the audio playback if it has been resumed
*/
void on_pause(Event event);
/*
* Select equalizer visualiser
* This method changes the current visualiser to the equalizer visualiser
*/
void on_equalizer_select(Event event);
/*
* Select circular visualiser
* This method changes the current visualiser to the circular visualiser
*/
void on_circular_select(Event event);
/*
* Select volumes visualiser
* This method changes the current visualiser to the volumes visualiser
*/
void on_volumes_select(Event event);
/*
* Initialize menu bar
* This method initializes the native menu bar with all its options
*/
void init_menu_bar();
};
#endif