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 AssetPopupBuildIndex *index;
56 AssetPopupViewWindow *view_window;
57 AssetPopupMixer *mixer;
58 AWindowListFormat *format;
61 class AssetPopupInfo : public BC_MenuItem
64 AssetPopupInfo(MWindow *mwindow, AssetPopup *popup);
68 int button_press_event();
74 class AssetPopupSortNames : public BC_MenuItem
77 AssetPopupSortNames(MWindow *mwindow, AssetPopup *popup);
78 ~AssetPopupSortNames();
86 class AssetPopupSortTimes : public BC_MenuItem
89 AssetPopupSortTimes(MWindow *mwindow, AssetPopup *popup);
90 ~AssetPopupSortTimes();
98 class AssetPopupBuildIndex : public BC_MenuItem
101 AssetPopupBuildIndex(MWindow *mwindow, AssetPopup *popup);
102 ~AssetPopupBuildIndex();
111 class AssetPopupView : public BC_MenuItem
114 AssetPopupView(MWindow *mwindow, AssetPopup *popup);
124 class AssetPopupViewWindow : public BC_MenuItem
127 AssetPopupViewWindow(MWindow *mwindow, AssetPopup *popup);
128 ~AssetPopupViewWindow();
136 class AssetPopupMixer : public BC_MenuItem
139 AssetPopupMixer(MWindow *mwindow, AssetPopup *popup);
148 class AssetPopupPaste : public BC_MenuItem
151 AssetPopupPaste(MWindow *mwindow, AssetPopup *popup);
160 class AssetMatchSize : public BC_MenuItem
163 AssetMatchSize(MWindow *mwindow, AssetPopup *popup);
171 class AssetMatchRate : public BC_MenuItem
174 AssetMatchRate(MWindow *mwindow, AssetPopup *popup);
182 class AssetMatchAll : public BC_MenuItem
185 AssetMatchAll(MWindow *mwindow, AssetPopup *popup);
193 class AssetPopupProjectRemove : public BC_MenuItem
196 AssetPopupProjectRemove(MWindow *mwindow, AssetPopup *popup);
197 ~AssetPopupProjectRemove();
205 class AssetPopupDiskRemove : public BC_MenuItem
208 AssetPopupDiskRemove(MWindow *mwindow, AssetPopup *popup);
209 ~AssetPopupDiskRemove();
217 class AssetListMenu : public BC_PopupMenu
220 AssetListMenu(MWindow *mwindow, AWindowGUI *gui);
223 void create_objects();
224 void update_titles(int shots);
228 AssetPopupLoadFile *load_file;
229 AWindowListFormat *format;
230 AssetSnapshot *asset_snapshot;
231 AssetGrabshot *asset_grabshot;
235 class AssetPopupLoadFile : public BC_MenuItem
238 AssetPopupLoadFile(MWindow *mwindow, AWindowGUI *gui);
239 ~AssetPopupLoadFile();
247 class AssetListCopy : public BC_MenuItem
250 AssetListCopy(MWindow *mwindow, AWindowGUI *gui);
257 AssetCopyDialog *copy_dialog;
260 class AssetCopyDialog : public BC_DialogThread
263 AssetCopyDialog(AssetListCopy *copy);
266 void start(char *text, int x, int y);
267 BC_Window* new_gui();
268 void handle_done_event(int result);
269 void handle_close_event(int result);
274 AssetCopyWindow *copy_window;
277 class AssetCopyWindow : public BC_Window
280 AssetCopyWindow(AssetCopyDialog *copy_dialog);
283 void create_objects();
284 int resize_event(int w, int h);
286 AssetCopyDialog *copy_dialog;
287 BC_ScrollTextBox *file_list;
290 class AssetListPaste : public BC_MenuItem
293 AssetListPaste(MWindow *mwindow, AWindowGUI *gui);
300 AssetPasteDialog *paste_dialog;
303 class AssetPasteDialog : public BC_DialogThread
306 AssetPasteDialog(AssetListPaste *paste);
309 BC_Window* new_gui();
310 void handle_done_event(int result);
311 void handle_close_event(int result);
312 void start(int x, int y);
314 AssetListPaste *paste;
315 AssetPasteWindow *paste_window;
319 class AssetPasteWindow : public BC_Window
322 AssetPasteWindow(AssetPasteDialog *paste_dialog);
325 void create_objects();
326 int resize_event(int w, int h);
328 AssetPasteDialog *paste_dialog;
329 BC_ScrollTextBox *file_list;
332 class AssetSnapshot : public BC_MenuItem
335 AssetSnapshot(MWindow *mwindow, AssetListMenu *asset_list_menu);
339 AssetListMenu *asset_list_menu;
342 class SnapshotSubMenu : public BC_SubMenu
345 SnapshotSubMenu(AssetSnapshot *asset_snapshot);
348 AssetSnapshot *asset_snapshot;
351 class SnapshotMenuItem : public BC_MenuItem
354 SnapshotMenuItem(SnapshotSubMenu *submenu, const char *text, int mode);
358 SnapshotSubMenu *submenu;
363 class AssetGrabshot : public BC_MenuItem
366 AssetGrabshot(MWindow *mwindow, AssetListMenu *asset_list_menu);
370 AssetListMenu *asset_list_menu;
373 class GrabshotSubMenu : public BC_SubMenu
376 GrabshotSubMenu(AssetGrabshot *asset_grabshot);
379 AssetGrabshot *asset_grabshot;
382 class GrabshotMenuItem : public BC_MenuItem
385 GrabshotMenuItem(GrabshotSubMenu *submenu, const char *text, int mode);
389 GrabshotSubMenu *submenu;
391 GrabshotThread *grab_thread;
394 class GrabshotThread : public Thread
397 GrabshotThread(MWindow* mwindow);
401 GrabshotPopup *popup;
405 void start(GrabshotMenuItem *menu_item);
409 class GrabshotPopup : public BC_Popup
412 GrabshotPopup(GrabshotThread *grab_thread, int mode);
414 int grab_event(XEvent *event);
415 void draw_selection(int invert);
418 GrabshotThread *grab_thread;
423 int lx0, ly0, lx1, ly1;