Debian Codegraph @

include/startgui.h

raw symbols SCIP
1 /* fre:ac - free audio converter
2 * Copyright (C) 2001-2023 Robert Kausch <[email protected]>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation, either version 2 of
7 * the License, or (at your option) any later version.
8 *
9 * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
10 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
11 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */
12
13 #ifndef H_FREAC_MAIN
14 #define H_FREAC_MAIN
15
16 #include <smooth.h>
17 #include <boca.h>
18
19 #include "freac.h"
20
21 #include "dialogs/config/config.h"
22
23 #ifdef __WIN32__
24 # define DLLEXPORT __declspec (dllexport)
25 #else
26 # define DLLEXPORT __attribute__ ((visibility ("default")))
27 #endif
28
29 using namespace smooth;
30 using namespace smooth::GUI;
31
32 extern "C"
33 {
34 Int DLLEXPORT StartGUI(const Array<String> &);
35 }
36
37 namespace freac
38 {
39 class Player;
40 class JobList;
41
42 class LayerJoblist;
43 class LayerThreads;
44
45 class Notification;
46
47 class freacGUI : public freac
48 {
49 private:
50 /* Singleton class, therefore protected constructor/destructor
51 */
52 freacGUI();
53 ~freacGUI();
54
55 Window *mainWnd;
56
57 Titlebar *mainWnd_titlebar;
58 Statusbar *mainWnd_statusbar;
59
60 Menubar *mainWnd_menubar;
61 Menubar *mainWnd_iconbar;
62
63 PopupMenu *menu_file;
64 PopupMenu *menu_addsubmenu;
65 PopupMenu *menu_files;
66 PopupMenu *menu_drives;
67
68 PopupMenu *menu_database;
69 PopupMenu *menu_database_query;
70
71 PopupMenu *menu_options;
72 PopupMenu *menu_configurations;
73 PopupMenu *menu_seldrive;
74
75 PopupMenu *menu_processing;
76 PopupMenu *menu_processors;
77
78 PopupMenu *menu_encode;
79 PopupMenu *menu_encoders;
80 PopupMenu *menu_encoder_options;
81
82 PopupMenu *menu_help;
83
84 Array<PopupMenu *, Void *> formatMenus;
85
86 MenuEntry *allowOverwriteMenuEntry;
87
88 Hyperlink *hyperlink;
89
90 TabWidget *tabs_main;
91 LayerJoblist *tab_layer_joblist;
92 LayerThreads *tab_layer_threads;
93
94 Player *player;
95 JobList *joblist;
96
97 Notification *notification;
98
99 Int clicked_configuration;
100 Int clicked_drive;
101 Int clicked_encoder;
102 Int clicked_processor;
103
104 Array<BoCA::AS::ExtensionComponent *, Void *> extensionComponents;
105
106 Void InitExtensionComponents();
107 Void FreeExtensionComponents();
108
109 Void Close();
110 Void About();
111
112 Void ConfigureSettings(ConfigurePage);
113 Void ConfigureComponent(const String &);
114
115 Void ShowHelp();
116 Void ShowTipOfTheDay();
117
118 Void ReportIssue();
119 Void SuggestFeature();
120
121 Void CheckForUpdates();
122
123 Bool SetLanguage();
124 Void FillMenus();
125
126 Void Convert();
127
128 Void PauseResumeEncoding();
129 Void StopEncoding();
130
131 Void ParseArguments(const Array<String> &);
132 slots:
133 Bool ExitProc();
134
135 Void MessageProc(Int, Int, Int);
136
137 Void OnChangePosition(const Point &);
138 Void OnChangeSize(const Size &);
139
140 Void OnSelectConfiguration();
141 Void OnChangeConfiguration();
142
143 Void OnAddTrack() { OnUpdateTracks(); }
144 Void OnRemoveTrack() { OnUpdateTracks(True); }
145 Void OnRemoveAllTracks() { OnUpdateTracks(True, True); }
146
147 Void OnUpdateTracks(Bool = False, Bool = False);
148
149 Void OnDriveChange();
150 Void OnDiscInsert(Int);
151 Void OnDiscRemove(Int);
152
153 Void ReadCD() { ReadCD(False); }
154 Void ReadCD(Bool);
155
156 Void QueryCDDB();
157 Void QueryCDDBLater();
158 Void SubmitCDDBData();
159
160 Void ManageCDDBData();
161 Void ManageCDDBBatchData();
162 Void ManageCDDBBatchQueries();
163
164 Void AddFilesFromDirectory();
165 Void AddFilesByPattern();
166
167 Void ToggleSignalProcessing();
168
169 Void ToggleUseInputDirectory();
170 Void ToggleEncodeToSingleFile();
171
172 Void ConfigureSettings();
173 Void ConfigureProcessing();
174
175 Void ConfigureEncoder();
176 Void ConfigureProcessor();
177
178 Void ConfirmDeleteAfterEncoding();
179
180 Void ShowSplitterTool();
181 public:
182 Player *GetPlayer() { return player; }
183
184 /* Returns a new or existing instance of freacGUI
185 */
186 static freacGUI *Get();
187
188 /* Destroys an existing instance of freacGUI
189 */
190 static Void Free();
191 };
192 };
193
194 #endif