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
25 #include "assetedit.inc"
26 #include "assetpopup.inc"
27 #include "awindowgui.inc"
31 #include "mwindow.inc"
35 class AssetPopup : public BC_PopupMenu
38 AssetPopup(MWindow *mwindow, AWindowGUI *gui);
41 void create_objects();
42 // Set mainsession with the current selections
54 AWindowListFormat *format;
55 AssetPopupOpenEDL *open_edl;
56 AssetPopupCloseEDL *close_edl;
57 AssetPopupToClip *to_clip;
59 AssetPopupBuildIndex *index;
61 AssetPopupViewWindow *view_window;
62 AssetPopupOpenMixer *open_mixer;
63 AssetPopupInsertMixer *insert_mixer;
64 AssetPopupPaste *paste;
67 class AssetPopupInfo : public BC_MenuItem
70 AssetPopupInfo(MWindow *mwindow, AssetPopup *popup);
74 int button_press_event();
80 class AssetPopupOpenEDL : public BC_MenuItem
83 AssetPopupOpenEDL(MWindow *mwindow, AssetPopup *popup);
92 class AssetPopupCloseEDL : public BC_MenuItem
95 AssetPopupCloseEDL(MWindow *mwindow, AWindowGUI *gui);
96 ~AssetPopupCloseEDL();
104 class AssetPopupToClip : public BC_MenuItem
107 AssetPopupToClip(MWindow *mwindow, AssetPopup *popup);
116 class AssetPopupSort : public BC_MenuItem
119 AssetPopupSort(MWindow *mwindow, AssetPopup *popup);
128 class AssetPopupBuildIndex : public BC_MenuItem
131 AssetPopupBuildIndex(MWindow *mwindow, AssetPopup *popup);
132 ~AssetPopupBuildIndex();
141 class AssetPopupView : public BC_MenuItem
144 AssetPopupView(MWindow *mwindow, AssetPopup *popup);
154 class AssetPopupViewWindow : public BC_MenuItem
157 AssetPopupViewWindow(MWindow *mwindow, AssetPopup *popup);
158 ~AssetPopupViewWindow();
166 class AssetPopupOpenMixer : public BC_MenuItem
169 AssetPopupOpenMixer(MWindow *mwindow, AssetPopup *popup);
170 ~AssetPopupOpenMixer();
178 class AssetPopupInsertMixer : public BC_MenuItem
181 AssetPopupInsertMixer(MWindow *mwindow, AssetPopup *popup);
182 ~AssetPopupInsertMixer();
190 class AssetPopupPaste : public BC_MenuItem
193 AssetPopupPaste(MWindow *mwindow, AssetPopup *popup);
202 class AssetMatchSize : public BC_MenuItem
205 AssetMatchSize(MWindow *mwindow, AssetPopup *popup);
213 class AssetMatchRate : public BC_MenuItem
216 AssetMatchRate(MWindow *mwindow, AssetPopup *popup);
224 class AssetMatchAll : public BC_MenuItem
227 AssetMatchAll(MWindow *mwindow, AssetPopup *popup);
235 class AssetPopupProjectRemove : public BC_MenuItem
238 AssetPopupProjectRemove(MWindow *mwindow, AssetPopup *popup);
239 ~AssetPopupProjectRemove();
247 class AssetPopupDiskRemove : public BC_MenuItem
250 AssetPopupDiskRemove(MWindow *mwindow, AssetPopup *popup);
251 ~AssetPopupDiskRemove();
259 class AssetListMenu : public BC_PopupMenu
262 AssetListMenu(MWindow *mwindow, AWindowGUI *gui);
265 void create_objects();
266 void update_titles(int shots);
270 AssetPopupLoadFile *load_file;
271 AWindowListFormat *format;
272 AssetPopupCloseEDL *close_edl;
273 AssetSnapshot *asset_snapshot;
274 AssetGrabshot *asset_grabshot;
275 AssetSelectUsed *select_used;
278 class AssetPopupLoadFile : public BC_MenuItem
281 AssetPopupLoadFile(MWindow *mwindow, AWindowGUI *gui);
282 ~AssetPopupLoadFile();
290 class AssetListCopy : public BC_MenuItem
293 AssetListCopy(MWindow *mwindow, AWindowGUI *gui);
300 AssetCopyDialog *copy_dialog;
303 class AssetCopyDialog : public BC_DialogThread
306 AssetCopyDialog(AssetListCopy *copy);
309 void start(char *text, int x, int y);
310 BC_Window* new_gui();
311 void handle_done_event(int result);
312 void handle_close_event(int result);
317 AssetCopyWindow *copy_window;
320 class AssetCopyWindow : public BC_Window
323 AssetCopyWindow(AssetCopyDialog *copy_dialog);
326 void create_objects();
327 int resize_event(int w, int h);
329 AssetCopyDialog *copy_dialog;
330 BC_ScrollTextBox *file_list;
333 class AssetListPaste : public BC_MenuItem
336 AssetListPaste(MWindow *mwindow, AWindowGUI *gui);
343 AssetPasteDialog *paste_dialog;
346 class AssetPasteDialog : public BC_DialogThread
349 AssetPasteDialog(AssetListPaste *paste);
352 BC_Window* new_gui();
353 void handle_done_event(int result);
354 void handle_close_event(int result);
355 void start(int x, int y);
357 AssetListPaste *paste;
358 AssetPasteWindow *paste_window;
362 class AssetPasteWindow : public BC_Window
365 AssetPasteWindow(AssetPasteDialog *paste_dialog);
368 void create_objects();
369 int resize_event(int w, int h);
371 AssetPasteDialog *paste_dialog;
372 BC_ScrollTextBox *file_list;
375 class AssetSnapshot : public BC_MenuItem
378 AssetSnapshot(MWindow *mwindow, AssetListMenu *asset_list_menu);
382 AssetListMenu *asset_list_menu;
385 class SnapshotSubMenu : public BC_SubMenu
388 SnapshotSubMenu(AssetSnapshot *asset_snapshot);
391 AssetSnapshot *asset_snapshot;
394 class SnapshotMenuItem : public BC_MenuItem
397 SnapshotMenuItem(SnapshotSubMenu *submenu, const char *text, int mode);
401 SnapshotSubMenu *submenu;
406 class AssetGrabshot : public BC_MenuItem
409 AssetGrabshot(MWindow *mwindow, AssetListMenu *asset_list_menu);
413 AssetListMenu *asset_list_menu;
416 class GrabshotSubMenu : public BC_SubMenu
419 GrabshotSubMenu(AssetGrabshot *asset_grabshot);
422 AssetGrabshot *asset_grabshot;
425 class GrabshotMenuItem : public BC_MenuItem
428 GrabshotMenuItem(GrabshotSubMenu *submenu, const char *text, int mode);
432 GrabshotSubMenu *submenu;
433 GrabshotThread *grab_thread;
437 class GrabshotThread : public BC_DragBox
440 GrabshotThread(MWindow* mwindow);
442 void start(GrabshotMenuItem *menu_item);
443 int handle_done_event(int x0, int y0, int x1, int y1);