5 #include "assetpopup.inc"
9 #include "awindowmenu.inc"
13 #include "mwindow.inc"
14 #include "newfolder.inc"
15 #include "pluginserver.inc"
19 class AWindowNewFolder
;
20 class AWindowDeleteFolder
;
21 class AWindowRenameFolder
;
22 class AWindowDeleteDisk
;
23 class AWindowDeleteProject
;
26 class AWindowRedrawIndex
;
36 class AssetPicon
: public BC_ListBoxItem
39 AssetPicon(MWindow
*mwindow
, AWindowGUI
*gui
, Asset
*asset
);
40 AssetPicon(MWindow
*mwindow
, AWindowGUI
*gui
, EDL
*edl
);
41 AssetPicon(MWindow
*mwindow
, AWindowGUI
*gui
, PluginServer
*plugin
);
42 AssetPicon(MWindow
*mwindow
, AWindowGUI
*gui
, Label
*plugin
);
43 AssetPicon(MWindow
*mwindow
, AWindowGUI
*gui
, char *folder
);
44 virtual ~AssetPicon();
46 void create_objects();
53 // ID of thing pointed to
56 // Check ID first. Update these next before dereferencing
71 class AWindowGUI
: public BC_Window
74 AWindowGUI(MWindow
*mwindow
, AWindow
*awindow
);
78 int resize_event(int w
, int h
);
79 int translation_event();
82 void async_update_assets(); // Sends update asset event
84 void reposition_objects();
85 int current_folder_number();
86 // Call back for MWindow entry point
89 // Collect items into the drag vectors of MainSession
90 void collect_assets();
91 void create_persistent_folder(ArrayList
<BC_ListBoxItem
*> *output
,
96 void create_label_folder();
97 void copy_picons(ArrayList
<BC_ListBoxItem
*> *dst
,
98 ArrayList
<BC_ListBoxItem
*> *src
,
100 void sort_picons(ArrayList
<BC_ListBoxItem
*> *src
,
102 // Return the selected asset in asset_list
103 Asset
* selected_asset();
104 PluginServer
* selected_plugin();
105 AssetPicon
* selected_folder();
110 AWindowAssets
*asset_list
;
111 AWindowFolders
*folder_list
;
112 AWindowDivider
*divider
;
114 // Store data to speed up responses
115 // Persistant data for listboxes
116 // All assets in current EDL
117 ArrayList
<BC_ListBoxItem
*> assets
;
118 ArrayList
<BC_ListBoxItem
*> folders
;
119 ArrayList
<BC_ListBoxItem
*> aeffects
;
120 ArrayList
<BC_ListBoxItem
*> veffects
;
121 ArrayList
<BC_ListBoxItem
*> atransitions
;
122 ArrayList
<BC_ListBoxItem
*> vtransitions
;
123 ArrayList
<BC_ListBoxItem
*> labellist
;
125 // Currently displayed data for listboxes
126 // Currently displayed assets + comments
127 ArrayList
<BC_ListBoxItem
*> displayed_assets
[2];
129 char *asset_titles
[ASSET_COLUMNS
];
132 BC_Pixmap
*folder_icon
;
133 BC_Pixmap
*file_icon
;
134 BC_Pixmap
*audio_icon
;
135 BC_Pixmap
*video_icon
;
136 BC_Pixmap
*clip_icon
;
137 NewFolderThread
*newfolder_thread
;
140 AssetPopup
*asset_menu
;
141 LabelPopup
*label_menu
;
142 AssetListMenu
*assetlist_menu
;
143 FolderListMenu
*folderlist_menu
;
144 // Temporary for reading picons from files
147 int allow_iconlisting
;
149 // Create custom atoms to be used for async messages between windows
150 int create_custom_xatoms();
151 // Function to overload to recieve customly defined atoms
152 virtual int recieve_custom_xatoms(xatom_event
*event
);
157 void update_folder_list();
158 void update_asset_list();
159 void filter_displayed_assets();
160 Atom UpdateAssetsXAtom
;
161 void update_assets();
165 class AWindowAssets
: public BC_ListBox
168 AWindowAssets(MWindow
*mwindow
, AWindowGUI
*gui
, int x
, int y
, int w
, int h
);
172 int selection_changed();
173 void draw_background();
174 int drag_start_event();
175 int drag_motion_event();
176 int drag_stop_event();
177 int button_press_event();
178 int column_resize_event();
184 class AWindowDivider
: public BC_SubWindow
187 AWindowDivider(MWindow
*mwindow
, AWindowGUI
*gui
, int x
, int y
, int w
, int h
);
190 int button_press_event();
191 int cursor_motion_event();
192 int button_release_event();
198 class AWindowFolders
: public BC_ListBox
201 AWindowFolders(MWindow
*mwindow
, AWindowGUI
*gui
, int x
, int y
, int w
, int h
);
204 int selection_changed();
205 int button_press_event();
211 class AWindowNewFolder
: public BC_Button
214 AWindowNewFolder(MWindow
*mwindow
, AWindowGUI
*gui
, int x
, int y
);
221 class AWindowDeleteFolder
: public BC_Button
224 AWindowDeleteFolder(MWindow
*mwindow
, AWindowGUI
*gui
, int x
, int y
);
231 class AWindowRenameFolder
: public BC_Button
234 AWindowRenameFolder(MWindow
*mwindow
, AWindowGUI
*gui
, int x
, int y
);
241 class AWindowDeleteDisk
: public BC_Button
244 AWindowDeleteDisk(MWindow
*mwindow
, AWindowGUI
*gui
, int x
, int y
);
251 class AWindowDeleteProject
: public BC_Button
254 AWindowDeleteProject(MWindow
*mwindow
, AWindowGUI
*gui
, int x
, int y
);
261 class AWindowInfo
: public BC_Button
264 AWindowInfo(MWindow
*mwindow
, AWindowGUI
*gui
, int x
, int y
);
271 class AWindowRedrawIndex
: public BC_Button
274 AWindowRedrawIndex(MWindow
*mwindow
, AWindowGUI
*gui
, int x
, int y
);
281 class AWindowPaste
: public BC_Button
284 AWindowPaste(MWindow
*mwindow
, AWindowGUI
*gui
, int x
, int y
);
291 class AWindowAppend
: public BC_Button
294 AWindowAppend(MWindow
*mwindow
, AWindowGUI
*gui
, int x
, int y
);
301 class AWindowView
: public BC_Button
304 AWindowView(MWindow
*mwindow
, AWindowGUI
*gui
, int x
, int y
);
311 class LabelPopup
: public BC_PopupMenu
314 LabelPopup(MWindow
*mwindow
, AWindowGUI
*gui
);
317 void create_objects();
318 // Set mainsession with the current selections
324 LabelPopupEdit
*editlabel
;
327 class LabelPopupEdit
: public BC_MenuItem
330 LabelPopupEdit(MWindow
*mwindow
, LabelPopup
*popup
);