Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

awindowgui.h

Go to the documentation of this file.
00001 #ifndef AWINDOWGUI_H
00002 #define AWINDOWGUI_H
00003 
00004 #include "arraylist.h"
00005 #include "assetpopup.inc"
00006 #include "asset.inc"
00007 #include "assets.inc"
00008 #include "awindow.inc"
00009 #include "awindowmenu.inc"
00010 #include "edl.inc"
00011 #include "guicast.h"
00012 #include "mwindow.inc"
00013 #include "newfolder.inc"
00014 #include "pluginserver.inc"
00015 
00016 class AWindowAssets;
00017 class AWindowFolders;
00018 class AWindowNewFolder;
00019 class AWindowDeleteFolder;
00020 class AWindowRenameFolder;
00021 class AWindowDeleteDisk;
00022 class AWindowDeleteProject;
00023 class AWindowDivider;
00024 class AWindowInfo;
00025 class AWindowRedrawIndex;
00026 class AWindowPaste;
00027 class AWindowAppend;
00028 class AWindowView;
00029 
00030 
00031 class AWindowGUI;
00032 
00033 class AssetPicon : public BC_ListBoxItem
00034 {
00035 public:
00036         AssetPicon(MWindow *mwindow, AWindowGUI *gui, Asset *asset);
00037         AssetPicon(MWindow *mwindow, AWindowGUI *gui, EDL *edl);
00038         AssetPicon(MWindow *mwindow, AWindowGUI *gui, PluginServer *plugin);
00039         AssetPicon(MWindow *mwindow, AWindowGUI *gui, char *folder);
00040         virtual ~AssetPicon();
00041 
00042         void create_objects();
00043         void reset();
00044 
00045         MWindow *mwindow;
00046         AWindowGUI *gui;
00047         BC_Pixmap *icon;
00048         VFrame *icon_vframe;
00049 // ID of thing pointed to
00050         int id;
00051 
00052 // Check ID first.  Update these next before dereferencing
00053 // Asset if asset
00054         Asset *asset;
00055 // EDL if clip
00056         EDL *edl;
00057 
00058         int in_use;
00059 
00060 
00061         int persistent;
00062         PluginServer *plugin;
00063 };
00064 
00065 
00066 class AWindowGUI : public BC_Window
00067 {
00068 public:
00069         AWindowGUI(MWindow *mwindow, AWindow *awindow);
00070         ~AWindowGUI();
00071 
00072         int create_objects();
00073         int resize_event(int w, int h);
00074         int translation_event();
00075         int close_event();
00076         int keypress_event();
00077         void update_assets();
00078         void sort_assets();
00079         void reposition_objects();
00080         int current_folder_number();
00081 // Call back for MWindow entry point
00082         int drag_motion();
00083         int drag_stop();
00084 // Collect items into the drag vectors of MainSession
00085         void collect_assets();
00086         void create_persistent_folder(ArrayList<BC_ListBoxItem*> *output, 
00087                 int do_audio, 
00088                 int do_video, 
00089                 int is_realtime, 
00090                 int is_transition);
00091         void copy_picons(ArrayList<BC_ListBoxItem*> *dst, 
00092                 ArrayList<BC_ListBoxItem*> *src, 
00093                 char *folder);
00094         void sort_picons(ArrayList<BC_ListBoxItem*> *src, 
00095                 char *folder);
00096 // Return the selected asset in asset_list
00097         Asset* selected_asset();
00098         PluginServer* selected_plugin();
00099         AssetPicon* selected_folder();
00100 
00101         MWindow *mwindow;
00102         AWindow *awindow;
00103 
00104         AWindowAssets *asset_list;
00105         AWindowFolders *folder_list;
00106         AWindowDivider *divider;
00107 
00108 // Store data to speed up responses
00109 // Persistant data for listboxes
00110 // All assets in current EDL
00111         ArrayList<BC_ListBoxItem*> assets;
00112         ArrayList<BC_ListBoxItem*> folders;
00113         ArrayList<BC_ListBoxItem*> aeffects;
00114         ArrayList<BC_ListBoxItem*> veffects;
00115         ArrayList<BC_ListBoxItem*> atransitions;
00116         ArrayList<BC_ListBoxItem*> vtransitions;
00117 
00118 // Currently displayed data for listboxes
00119 // Currently displayed assets + comments
00120         ArrayList<BC_ListBoxItem*> displayed_assets[2];
00121 
00122         char *asset_titles[ASSET_COLUMNS];
00123 
00124 // Persistent icons
00125         BC_Pixmap *folder_icon;
00126         BC_Pixmap *file_icon;
00127         BC_Pixmap *audio_icon;
00128         BC_Pixmap *video_icon;
00129         BC_Pixmap *clip_icon;
00130         NewFolderThread *newfolder_thread;
00131 
00132 // Popup menus
00133         AssetPopup *asset_menu;
00134         AssetListMenu *assetlist_menu;
00135         FolderListMenu *folderlist_menu;
00136 // Temporary for reading picons from files
00137         VFrame *temp_picon;
00138 
00139 private:
00140         void update_folder_list();
00141         void update_asset_list();
00142         void filter_displayed_assets();
00143 };
00144 
00145 class AWindowAssets : public BC_ListBox
00146 {
00147 public:
00148         AWindowAssets(MWindow *mwindow, AWindowGUI *gui, int x, int y, int w, int h);
00149         ~AWindowAssets();
00150         
00151         int handle_event();
00152         int selection_changed();
00153         void draw_background();
00154         int drag_start_event();
00155         int drag_motion_event();
00156         int drag_stop_event();
00157         int button_press_event();
00158         int column_resize_event();
00159 
00160         MWindow *mwindow;
00161         AWindowGUI *gui;
00162 };
00163 
00164 class AWindowDivider : public BC_SubWindow
00165 {
00166 public:
00167         AWindowDivider(MWindow *mwindow, AWindowGUI *gui, int x, int y, int w, int h);
00168         ~AWindowDivider();
00169 
00170         int button_press_event();
00171         int cursor_motion_event();
00172         int button_release_event();
00173 
00174         MWindow *mwindow;
00175         AWindowGUI *gui;
00176 };
00177 
00178 class AWindowFolders : public BC_ListBox
00179 {
00180 public:
00181         AWindowFolders(MWindow *mwindow, AWindowGUI *gui, int x, int y, int w, int h);
00182         ~AWindowFolders();
00183         
00184         int selection_changed();
00185         int button_press_event();
00186 
00187         MWindow *mwindow;
00188         AWindowGUI *gui;
00189 };
00190 
00191 class AWindowNewFolder : public BC_Button
00192 {
00193 public:
00194         AWindowNewFolder(MWindow *mwindow, AWindowGUI *gui, int x, int y);
00195         int handle_event();
00196         MWindow *mwindow;
00197         AWindowGUI *gui;
00198         int x, y;
00199 };
00200 
00201 class AWindowDeleteFolder : public BC_Button
00202 {
00203 public:
00204         AWindowDeleteFolder(MWindow *mwindow, AWindowGUI *gui, int x, int y);
00205         int handle_event();
00206         MWindow *mwindow;
00207         AWindowGUI *gui;
00208         int x, y;
00209 };
00210 
00211 class AWindowRenameFolder : public BC_Button
00212 {
00213 public:
00214         AWindowRenameFolder(MWindow *mwindow, AWindowGUI *gui, int x, int y);
00215         int handle_event();
00216         MWindow *mwindow;
00217         AWindowGUI *gui;
00218         int x, y;
00219 };
00220 
00221 class AWindowDeleteDisk : public BC_Button
00222 {
00223 public:
00224         AWindowDeleteDisk(MWindow *mwindow, AWindowGUI *gui, int x, int y);
00225         int handle_event();
00226         MWindow *mwindow;
00227         AWindowGUI *gui;
00228         int x, y;
00229 };
00230 
00231 class AWindowDeleteProject : public BC_Button
00232 {
00233 public:
00234         AWindowDeleteProject(MWindow *mwindow, AWindowGUI *gui, int x, int y);
00235         int handle_event();
00236         MWindow *mwindow;
00237         AWindowGUI *gui;
00238         int x, y;
00239 };
00240 
00241 class AWindowInfo : public BC_Button
00242 {
00243 public:
00244         AWindowInfo(MWindow *mwindow, AWindowGUI *gui, int x, int y);
00245         int handle_event();
00246         MWindow *mwindow;
00247         AWindowGUI *gui;
00248         int x, y;
00249 };
00250 
00251 class AWindowRedrawIndex : public BC_Button
00252 {
00253 public:
00254         AWindowRedrawIndex(MWindow *mwindow, AWindowGUI *gui, int x, int y);
00255         int handle_event();
00256         MWindow *mwindow;
00257         AWindowGUI *gui;
00258         int x, y;
00259 };
00260 
00261 class AWindowPaste : public BC_Button
00262 {
00263 public:
00264         AWindowPaste(MWindow *mwindow, AWindowGUI *gui, int x, int y);
00265         int handle_event();
00266         MWindow *mwindow;
00267         AWindowGUI *gui;
00268         int x, y;
00269 };
00270 
00271 class AWindowAppend : public BC_Button
00272 {
00273 public:
00274         AWindowAppend(MWindow *mwindow, AWindowGUI *gui, int x, int y);
00275         int handle_event();
00276         MWindow *mwindow;
00277         AWindowGUI *gui;
00278         int x, y;
00279 };
00280 
00281 class AWindowView : public BC_Button
00282 {
00283 public:
00284         AWindowView(MWindow *mwindow, AWindowGUI *gui, int x, int y);
00285         int handle_event();
00286         MWindow *mwindow;
00287         AWindowGUI *gui;
00288         int x, y;
00289 };
00290 
00291 #endif

Generated on Sun Jan 8 13:38:50 2006 for Cinelerra-svn by  doxygen 1.4.4