Debian Codegraph @

include/gui/main_joblist.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_JOBLIST
14 #define H_FREAC_MAIN_JOBLIST
15
16 #include <smooth.h>
17 #include <boca.h>
18
19 #include "../engine/converter.h"
20
21 using namespace smooth;
22 using namespace smooth::GUI;
23
24 namespace freac
25 {
26 class JobList;
27 class PlaybackWidget;
28
29 const Int CHARSET_ISO_8859_1 = 0;
30 const Int CHARSET_ISO_8859_2 = 1;
31 const Int CHARSET_ISO_8859_5 = 2;
32 const Int CHARSET_ISO_8859_7 = 3;
33 const Int CHARSET_CP1251 = 4;
34 const Int CHARSET_SHIFT_JIS = 5;
35 const Int CHARSET_GBK = 6;
36 const Int CHARSET_BIG_5 = 7;
37 const Int CHARSET_UTF_8 = 8;
38 const Int CHARSET_OTHER = 255;
39
40 class LayerJoblist : public Layer
41 {
42 private:
43 CheckBox *check_single;
44 CheckBox *check_playlist;
45 CheckBox *check_cuesheet;
46
47 Divider *info_divider;
48 Layer *info_background;
49 CheckBox *info_checkbox;
50 Divider *info_bottom;
51 ActiveArea *info_area_artwork;
52 Image *info_image_artwork;
53 Text *info_text_artist;
54 EditBox *info_edit_artist;
55 Text *info_text_title;
56 EditBox *info_edit_title;
57 Text *info_text_album;
58 EditBox *info_edit_album;
59 Text *info_text_track;
60 EditBox *info_edit_track;
61 Text *info_text_year;
62 EditBox *info_edit_year;
63 Text *info_text_genre;
64 EditBox *info_edit_genre;
65 List *info_list_genre;
66
67 Text *txt_filename;
68 EditBox *edb_filename;
69
70 Button *btn_skip;
71
72 Text *txt_filters;
73 EditBox *edb_filters;
74
75 Button *btn_configure_dsp;
76
77 Text *txt_format;
78 EditBox *edb_format;
79
80 Text *txt_encoder;
81 ComboBox *combo_encoder;
82
83 Button *btn_configure_encoder;
84
85 Text *txt_progress;
86 Progressbar *progress;
87 Progressbar *progress_total;
88 EditBox *edb_trackPercent;
89 Text *txt_splitPercent;
90 EditBox *edb_totalPercent;
91
92 Text *txt_time;
93 EditBox *edb_trackTime;
94 Text *txt_splitTime;
95 EditBox *edb_totalTime;
96
97 Text *txt_outdir;
98 EditBox *edb_outdir;
99 List *list_outdir;
100
101 Button *btn_open;
102 Button *btn_browse;
103
104 MicroMenu *menu_edit_artist;
105 MicroMenu *menu_edit_title;
106 MicroMenu *menu_edit_album;
107 MicroMenu *menu_edit_year;
108 MicroMenu *menu_edit_genre;
109
110 PopupMenu *menu_charsets;
111 PopupMenu *menu_charsets_all;
112 PopupMenu *menu_case;
113 PopupMenu *menu_case_all;
114
115 Hotspot *htsp_edit_artist;
116 Hotspot *htsp_edit_title;
117 Hotspot *htsp_edit_album;
118 Hotspot *htsp_edit_year;
119 Hotspot *htsp_edit_genre;
120
121 PopupMenu *menu_trackmenu;
122
123 JobList *joblist;
124
125 Shortcut *shortcut_previous;
126 Shortcut *shortcut_next;
127 Shortcut *shortcut_first;
128 Shortcut *shortcut_last;
129 Shortcut *shortcut_move_up;
130 Shortcut *shortcut_move_down;
131 Shortcut *shortcut_move_top;
132 Shortcut *shortcut_move_bottom;
133 Shortcut *shortcut_toggle_mark;
134 Shortcut *shortcut_remove;
135
136 PlaybackWidget *player;
137
138 BoCA::Picture currentArtwork;
139
140 Bool dontUpdateInfo;
141
142 Int clicked_charset;
143 Int clicked_case;
144
145 Int activePopup;
146
147 Int previousTrackSeconds;
148 Int previousTotalSeconds;
149
150 Void FillMenus();
151
152 EditBox *GetActiveEditBox();
153 Void FocusEditBox(EditBox *);
154
155 Void ShowArtworkArea();
156 Void HideArtworkArea();
157
158 static Bool IsWordBreakingCharacter(Int);
159
160 static String AdjustCaseFirstCapital(const String &);
161 static String AdjustCaseWordsFirstCapital(const String &);
162 static String AdjustCaseLongWordsFirstCapital(const String &);
163 public:
164 LayerJoblist();
165 ~LayerJoblist();
166
167 Void UpdateEncoderText();
168 Void UpdateOutputDir();
169 accessors:
170 JobList *GetJoblist() { return joblist; }
171 signals:
172 Signal0<Void> onRequestSkipTrack;
173 slots:
174 Void OnChangeSize(const Size &);
175
176 Void OnChangeConfigurationSettings();
177 Void OnChangeLanguageSettings();
178
179 Void OnJoblistSelectTrack(const BoCA::Track &);
180 Void OnJoblistModifyTrack(const BoCA::Track &);
181 Void OnJoblistRemoveTrack(const BoCA::Track &);
182
183 Void OnJoblistRemoveAllTracks();
184
185 Void OnShortcutPrevious();
186 Void OnShortcutNext();
187 Void OnShortcutFirst();
188 Void OnShortcutLast();
189 Void OnShortcutMoveUp();
190 Void OnShortcutMoveDown();
191 Void OnShortcutMoveTop();
192 Void OnShortcutMoveBottom();
193 Void OnShortcutToggleMark();
194 Void OnShortcutRemove();
195
196 Void OnEditBoxEnter(EditBox *);
197
198 Void OnEditBoxEnterArtist() { OnEditBoxEnter(info_edit_artist); }
199 Void OnEditBoxEnterTitle() { OnEditBoxEnter(info_edit_title); }
200 Void OnEditBoxEnterAlbum() { OnEditBoxEnter(info_edit_album); }
201 Void OnEditBoxEnterTrack() { OnEditBoxEnter(info_edit_track); }
202 Void OnEditBoxEnterYear() { OnEditBoxEnter(info_edit_year); }
203 Void OnEditBoxEnterGenre() { OnEditBoxEnter(info_edit_genre); }
204
205 Void OnEncoderStartEncoding();
206 Void OnEncoderFinishEncoding(Bool);
207
208 Void OnEncoderEncodeTrack(const BoCA::Track &, const String &, const String &, ConversionStep);
209 Void OnEncoderReportProgress(Int, Int, Int, Int);
210
211 PopupMenu *GetContextMenu();
212
213 Void ShowHideTitleInfo();
214 Void UpdateTitleInfo();
215
216 Void OnOpenFolder();
217 Void OnBrowseForFolder();
218
219 Void OnSelectFolder();
220 Void OnSelectEncoder();
221
222 Void ToggleEditPopup();
223
224 Void UseStringForSelectedTracks();
225 Void InterpretStringAs();
226 Void InterpretStringAsAll();
227 Void AdjustStringCase();
228 Void AdjustStringCaseAll();
229 };
230 };
231
232 #endif