4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 #include "awindow.inc"
28 #include "bitspopup.inc"
29 #include "browsebutton.h"
30 #include "formatpopup.h"
32 #include "indexable.inc"
35 #include "resizetrackthread.inc"
38 class AssetEditByteOrderHILO;
39 class AssetEditByteOrderLOHI;
41 class AssetEditPathText;
42 class AssetEditWindow;
44 class DetailAssetWindow;
45 class DetailAssetThread;
46 class DetailAssetButton;
48 class AssetEdit : public BC_DialogThread
51 AssetEdit(MWindow *mwindow);
54 void edit_asset(Indexable *indexable);
55 int set_asset(Indexable *indexable);
56 void handle_close_event(int result);
61 AssetEditWindow *window;
65 Asset *changed_params;
70 // Pcm is the only format users should be able to fix.
71 // All other formats display information about the file in read-only.
73 class AssetEditWindow : public BC_Window
76 AssetEditWindow(MWindow *mwindow, AssetEdit *asset_edit);
79 void create_objects();
80 AssetEditPathText *path_text;
81 AssetEditPath *path_button;
82 AssetEditByteOrderHILO *hilo;
83 AssetEditByteOrderLOHI *lohi;
87 AssetEdit *asset_edit;
90 DetailAssetThread *detail_thread;
91 void show_info_detail();
95 class AssetEditPath : public BrowseButton
98 AssetEditPath(MWindow *mwindow,
99 AssetEditWindow *fwindow,
103 const char *window_title = _(PROGRAM_NAME ": Path"),
104 const char *window_caption = _("Select a file"));
107 AssetEditWindow *fwindow;
111 class AssetEditPathText : public BC_TextBox
114 AssetEditPathText(AssetEditWindow *fwindow, int y);
115 ~AssetEditPathText();
118 AssetEditWindow *fwindow;
123 class AssetEditFormat : public FormatPopup
126 AssetEditFormat(AssetEditWindow *fwindow, char* default_, int y);
130 AssetEditWindow *fwindow;
134 class AssetEditChannels : public BC_TumbleTextBox
137 AssetEditChannels(AssetEditWindow *fwindow, char *text, int x, int y);
141 AssetEditWindow *fwindow;
144 class AssetEditRate : public BC_TextBox
147 AssetEditRate(AssetEditWindow *fwindow, char *text, int x, int y);
151 AssetEditWindow *fwindow;
154 class AssetEditFRate : public BC_TextBox
157 AssetEditFRate(AssetEditWindow *fwindow, char *text, int x, int y);
161 AssetEditWindow *fwindow;
164 class AssetEditHeader : public BC_TextBox
167 AssetEditHeader(AssetEditWindow *fwindow, char *text, int x, int y);
171 AssetEditWindow *fwindow;
174 class AssetEditByteOrderLOHI : public BC_Radial
177 AssetEditByteOrderLOHI(AssetEditWindow *fwindow, int value, int x, int y);
181 AssetEditWindow *fwindow;
184 class AssetEditByteOrderHILO : public BC_Radial
187 AssetEditByteOrderHILO(AssetEditWindow *fwindow, int value, int x, int y);
191 AssetEditWindow *fwindow;
194 class AssetEditSigned : public BC_CheckBox
197 AssetEditSigned(AssetEditWindow *fwindow, int value, int x, int y);
201 AssetEditWindow *fwindow;
204 class DetailAssetWindow : public BC_Window
209 BC_ScrollTextBox *text;
211 DetailAssetWindow(MWindow *mwindow, Asset *asset);
212 ~DetailAssetWindow();
213 void create_objects();
216 class DetailAssetThread : public Thread
219 DetailAssetWindow *dwindow;
221 DetailAssetThread(MWindow *mwindow);
222 ~DetailAssetThread();
224 void start(Asset *asset);
230 class DetailAssetButton : public BC_GenericButton
233 DetailAssetButton(AssetEditWindow *fwindow, int x, int y);
234 ~DetailAssetButton();
236 AssetEditWindow *fwindow;