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

awindowgui.C

Go to the documentation of this file.
00001 #include "asset.h"
00002 #include "assetedit.h"
00003 #include "assetpopup.h"
00004 #include "assets.h"
00005 #include "awindowgui.h"
00006 #include "awindowgui.inc"
00007 #include "awindow.h"
00008 #include "awindowmenu.h"
00009 #include "cache.h"
00010 #include "colormodels.h"
00011 #include "cursors.h"
00012 #include "cwindowgui.h"
00013 #include "cwindow.h"
00014 #include "edl.h"
00015 #include "edlsession.h"
00016 #include "file.h"
00017 #include "filesystem.h"
00018 #include "language.h"
00019 #include "localsession.h"
00020 #include "mainmenu.h"
00021 #include "mainsession.h"
00022 #include "mwindowgui.h"
00023 #include "mwindow.h"
00024 #include "newfolder.h"
00025 #include "preferences.h"
00026 #include "theme.h"
00027 #include "vframe.h"
00028 #include "vwindowgui.h"
00029 #include "vwindow.h"
00030 
00031 
00032 
00033 
00034 AssetPicon::AssetPicon(MWindow *mwindow, 
00035         AWindowGUI *gui, 
00036         Asset *asset)
00037  : BC_ListBoxItem()
00038 {
00039         reset();
00040         this->mwindow = mwindow;
00041         this->gui = gui;
00042         this->asset = asset;
00043         this->id = asset->id;
00044 }
00045 
00046 AssetPicon::AssetPicon(MWindow *mwindow, 
00047         AWindowGUI *gui, 
00048         EDL *edl)
00049  : BC_ListBoxItem()
00050 {
00051         reset();
00052         this->mwindow = mwindow;
00053         this->gui = gui;
00054         this->edl = edl;
00055         this->id = edl->id;
00056 }
00057 
00058 AssetPicon::AssetPicon(MWindow *mwindow, 
00059         AWindowGUI *gui, 
00060         char *folder)
00061  : BC_ListBoxItem(folder, gui->folder_icon)
00062 {
00063         reset();
00064         this->mwindow = mwindow;
00065         this->gui = gui;
00066 }
00067 
00068 AssetPicon::AssetPicon(MWindow *mwindow, 
00069         AWindowGUI *gui, 
00070         PluginServer *plugin)
00071  : BC_ListBoxItem()
00072 {
00073         reset();
00074         this->mwindow = mwindow;
00075         this->gui = gui;
00076         this->plugin = plugin;
00077         asset = 0;
00078         icon = 0;
00079         id = 0;
00080 }
00081 
00082 AssetPicon::~AssetPicon()
00083 {
00084         if(icon)
00085         {
00086                 if(icon != gui->file_icon &&
00087                         icon != gui->audio_icon &&
00088                         icon != gui->folder_icon &&
00089                         icon != gui->clip_icon &&
00090                         icon != gui->video_icon) 
00091                 {
00092                         delete icon;
00093                         delete icon_vframe;
00094                 }
00095         }
00096 }
00097 
00098 void AssetPicon::reset()
00099 {
00100         plugin = 0;
00101         asset = 0;
00102         edl = 0;
00103         icon = 0;
00104         icon_vframe = 0;
00105         in_use = 1;
00106         id = 0;
00107         persistent = 0;
00108 }
00109 
00110 void AssetPicon::create_objects()
00111 {
00112         FileSystem fs;
00113         char name[BCTEXTLEN];
00114         int pixmap_w, pixmap_h;
00115 
00116 
00117         pixmap_h = 50;
00118 
00119         if(asset)
00120         {
00121                 fs.extract_name(name, asset->path);
00122                 set_text(name);
00123                 if(asset->video_data)
00124                 {
00125                         if(mwindow->preferences->use_thumbnails)
00126                         {
00127                                 File *file = mwindow->video_cache->check_out(asset);
00128 
00129                                 if(file)
00130                                 {
00131                                         pixmap_w = pixmap_h * asset->width / asset->height;
00132 
00133                                         file->set_layer(0);
00134                                         file->set_video_position(0, mwindow->edl->session->frame_rate);
00135 
00136                                         if(gui->temp_picon && 
00137                                                 (gui->temp_picon->get_w() != asset->width ||
00138                                                 gui->temp_picon->get_h() != asset->height))
00139                                         {
00140                                                 delete gui->temp_picon;
00141                                                 gui->temp_picon = 0;
00142                                         }
00143 
00144                                         if(!gui->temp_picon)
00145                                         {
00146                                                 gui->temp_picon = new VFrame(0, 
00147                                                         asset->width, 
00148                                                         asset->height, 
00149                                                         BC_RGB888);
00150                                         }
00151 
00152                                         file->read_frame(gui->temp_picon);
00153 
00154                                         icon = new BC_Pixmap(gui, pixmap_w, pixmap_h);
00155                                         icon->draw_vframe(gui->temp_picon,
00156                                                 0, 
00157                                                 0, 
00158                                                 pixmap_w, 
00159                                                 pixmap_h,
00160                                                 0,
00161                                                 0);
00162 //printf("%d %d\n", gui->temp_picon->get_w(), gui->temp_picon->get_h());
00163                                         icon_vframe = new VFrame(0, 
00164                                                 pixmap_w, 
00165                                                 pixmap_h, 
00166                                                 BC_RGB888);
00167                                         cmodel_transfer(icon_vframe->get_rows(), /* Leave NULL if non existent */
00168                                                 gui->temp_picon->get_rows(),
00169                                                 0, /* Leave NULL if non existent */
00170                                                 0,
00171                                                 0,
00172                                                 0, /* Leave NULL if non existent */
00173                                                 0,
00174                                                 0,
00175                                                 0,        /* Dimensions to capture from input frame */
00176                                                 0, 
00177                                                 gui->temp_picon->get_w(), 
00178                                                 gui->temp_picon->get_h(),
00179                                                 0,       /* Dimensions to project on output frame */
00180                                                 0, 
00181                                                 pixmap_w, 
00182                                                 pixmap_h,
00183                                                 BC_RGB888, 
00184                                                 BC_RGB888,
00185                                                 0,         /* When transfering BC_RGBA8888 to non-alpha this is the background color in 0xRRGGBB hex */
00186                                                 0,       /* For planar use the luma rowspan */
00187                                                 0);     /* For planar use the luma rowspan */
00188 
00189 
00190                                         mwindow->video_cache->check_in(asset);
00191                                 }
00192                                 else
00193                                 {
00194                                         icon = gui->video_icon;
00195                                         icon_vframe = BC_WindowBase::get_resources()->type_to_icon[ICON_FILM];
00196 
00197                                 }
00198                         }
00199                         else
00200                         {
00201                                 icon = gui->video_icon;
00202                                 icon_vframe = BC_WindowBase::get_resources()->type_to_icon[ICON_FILM];                  
00203                         }
00204                 }
00205                 else
00206                 if(asset->audio_data)
00207                 {
00208                         icon = gui->audio_icon;
00209                         icon_vframe = BC_WindowBase::get_resources()->type_to_icon[ICON_SOUND];
00210                 }
00211 //printf("AssetPicon::create_objects 2\n");
00212 
00213                 set_icon(icon);
00214                 set_icon_vframe(icon_vframe);
00215 //printf("AssetPicon::create_objects 4\n");
00216         }
00217         else
00218         if(edl)
00219         {
00220 //printf("AssetPicon::create_objects 4 %s\n", edl->local_session->clip_title);
00221                 strcpy(name, edl->local_session->clip_title);
00222                 set_text(name);
00223                 set_icon(gui->clip_icon);
00224                 set_icon_vframe(mwindow->theme->get_image("clip_icon"));
00225         }
00226         else
00227         if(plugin)
00228         {
00229                 strcpy(name, _(plugin->title));
00230                 set_text(name);
00231                 if(plugin->picon)
00232                 {
00233                         if(plugin->picon->get_color_model() == BC_RGB888)
00234                         {
00235                                 icon = new BC_Pixmap(gui, 
00236                                         plugin->picon->get_w(), 
00237                                         plugin->picon->get_h());
00238                                 icon->draw_vframe(plugin->picon,
00239                                         0,
00240                                         0,
00241                                         plugin->picon->get_w(), 
00242                                         plugin->picon->get_h(),
00243                                         0,
00244                                         0);
00245                         }
00246                         else
00247                         {
00248                                 icon = new BC_Pixmap(gui, 
00249                                         plugin->picon, 
00250                                         PIXMAP_ALPHA);
00251                         }
00252                         icon_vframe = new VFrame (*plugin->picon);
00253                 }
00254                 else
00255                 {
00256                         icon = gui->file_icon;
00257                         icon_vframe = BC_WindowBase::get_resources()->type_to_icon[ICON_UNKNOWN];
00258                 }
00259                 set_icon(icon);
00260                 set_icon_vframe(icon_vframe);
00261         }
00262 
00263 }
00264 
00265 
00266 
00267 
00268 
00269 
00270 AWindowGUI::AWindowGUI(MWindow *mwindow, AWindow *awindow)
00271  : BC_Window(PROGRAM_NAME ": Resources",
00272         mwindow->session->awindow_x, 
00273     mwindow->session->awindow_y, 
00274     mwindow->session->awindow_w, 
00275     mwindow->session->awindow_h,
00276     100,
00277     100,
00278     1,
00279     1,
00280     1)
00281 {
00282 // printf("AWindowGUI::AWindowGUI %d %d %d %d\n",
00283 // mwindow->session->awindow_x, 
00284 // mwindow->session->awindow_y, 
00285 // mwindow->session->awindow_w, 
00286 // mwindow->session->awindow_h);
00287         this->mwindow = mwindow;
00288         this->awindow = awindow;
00289         temp_picon = 0;
00290 }
00291 
00292 AWindowGUI::~AWindowGUI()
00293 {
00294         assets.remove_all_objects();
00295         folders.remove_all_objects();
00296         aeffects.remove_all_objects();
00297         veffects.remove_all_objects();
00298         atransitions.remove_all_objects();
00299         vtransitions.remove_all_objects();
00300         displayed_assets[1].remove_all_objects();
00301         delete file_icon;
00302         delete audio_icon;
00303         delete folder_icon;
00304         delete clip_icon;
00305         delete newfolder_thread;
00306         delete asset_menu;
00307         delete assetlist_menu;
00308         delete folderlist_menu;
00309         if(temp_picon) delete temp_picon;
00310 }
00311 
00312 int AWindowGUI::create_objects()
00313 {
00314         int x, y;
00315         AssetPicon *picon;
00316 
00317 //printf("AWindowGUI::create_objects 1\n");
00318         asset_titles[0] = _("Title");
00319         asset_titles[1] = _("Comments");
00320 
00321         set_icon(mwindow->theme->get_image("awindow_icon"));
00322         file_icon = new BC_Pixmap(this, 
00323                 BC_WindowBase::get_resources()->type_to_icon[ICON_UNKNOWN],
00324                 PIXMAP_ALPHA);
00325 
00326         folder_icon = new BC_Pixmap(this, 
00327                 BC_WindowBase::get_resources()->type_to_icon[ICON_FOLDER],
00328                 PIXMAP_ALPHA);
00329 
00330         audio_icon = new BC_Pixmap(this, 
00331                 BC_WindowBase::get_resources()->type_to_icon[ICON_SOUND],
00332                 PIXMAP_ALPHA);
00333 
00334         video_icon = new BC_Pixmap(this, 
00335                 BC_WindowBase::get_resources()->type_to_icon[ICON_FILM],
00336                 PIXMAP_ALPHA);
00337 
00338         clip_icon = new BC_Pixmap(this, 
00339                 mwindow->theme->get_image("clip_icon"),
00340                 PIXMAP_ALPHA);
00341 
00342 // Mandatory folders
00343         folders.append(picon = new AssetPicon(mwindow,
00344                 this,
00345                 AEFFECT_FOLDER));
00346         picon->persistent = 1;
00347         folders.append(picon = new AssetPicon(mwindow,
00348                 this,
00349                 VEFFECT_FOLDER));
00350         picon->persistent = 1;
00351         folders.append(picon = new AssetPicon(mwindow,
00352                 this,
00353                 ATRANSITION_FOLDER));
00354         picon->persistent = 1;
00355         folders.append(picon = new AssetPicon(mwindow,
00356                 this,
00357                 VTRANSITION_FOLDER));
00358         picon->persistent = 1;
00359 
00360         create_persistent_folder(&aeffects, 1, 0, 1, 0);
00361         create_persistent_folder(&veffects, 0, 1, 1, 0);
00362         create_persistent_folder(&atransitions, 1, 0, 0, 1);
00363         create_persistent_folder(&vtransitions, 0, 1, 0, 1);
00364 
00365         mwindow->theme->get_awindow_sizes(this);
00366         add_subwindow(asset_list = new AWindowAssets(mwindow,
00367                 this,
00368                 mwindow->theme->alist_x, 
00369         mwindow->theme->alist_y, 
00370         mwindow->theme->alist_w, 
00371         mwindow->theme->alist_h));
00372         add_subwindow(divider = new AWindowDivider(mwindow,
00373                 this,
00374                 mwindow->theme->adivider_x,
00375                 mwindow->theme->adivider_y,
00376                 mwindow->theme->adivider_w,
00377                 mwindow->theme->adivider_h));
00378         divider->set_cursor(HSEPARATE_CURSOR);
00379         add_subwindow(folder_list = new AWindowFolders(mwindow,
00380                 this,
00381                 mwindow->theme->afolders_x, 
00382         mwindow->theme->afolders_y, 
00383         mwindow->theme->afolders_w, 
00384         mwindow->theme->afolders_h));
00385         
00386         x = mwindow->theme->abuttons_x;
00387         y = mwindow->theme->abuttons_y;
00388 
00389         newfolder_thread = new NewFolderThread(mwindow, this);
00390 
00391         add_subwindow(asset_menu = new AssetPopup(mwindow, this));
00392         asset_menu->create_objects();
00393 
00394         add_subwindow(assetlist_menu = new AssetListMenu(mwindow, this));
00395         assetlist_menu->create_objects();
00396 
00397         add_subwindow(folderlist_menu = new FolderListMenu(mwindow, this));
00398         folderlist_menu->create_objects();
00399 //printf("AWindowGUI::create_objects 2\n");
00400 
00401         return 0;
00402 }
00403 
00404 int AWindowGUI::resize_event(int w, int h)
00405 {
00406         mwindow->session->awindow_x = get_x();
00407         mwindow->session->awindow_y = get_y();
00408         mwindow->session->awindow_w = w;
00409         mwindow->session->awindow_h = h;
00410 
00411         mwindow->theme->get_awindow_sizes(this);
00412         mwindow->theme->draw_awindow_bg(this);
00413 
00414         asset_list->reposition_window(mwindow->theme->alist_x, 
00415         mwindow->theme->alist_y, 
00416         mwindow->theme->alist_w, 
00417         mwindow->theme->alist_h);
00418         divider->reposition_window(mwindow->theme->adivider_x,
00419                 mwindow->theme->adivider_y,
00420                 mwindow->theme->adivider_w,
00421                 mwindow->theme->adivider_h);
00422         folder_list->reposition_window(mwindow->theme->afolders_x, 
00423         mwindow->theme->afolders_y, 
00424         mwindow->theme->afolders_w, 
00425         mwindow->theme->afolders_h);
00426         
00427         int x = mwindow->theme->abuttons_x;
00428         int y = mwindow->theme->abuttons_y;
00429 
00430 //      new_bin->reposition_window(x, y);
00431 //      x += new_bin->get_w();
00432 //      delete_bin->reposition_window(x, y);
00433 //      x += delete_bin->get_w();
00434 //      rename_bin->reposition_window(x, y);
00435 //      x += rename_bin->get_w();
00436 //      delete_disk->reposition_window(x, y);
00437 //      x += delete_disk->get_w();
00438 //      delete_project->reposition_window(x, y);
00439 //      x += delete_project->get_w();
00440 //      info->reposition_window(x, y);
00441 //      x += info->get_w();
00442 //      redraw_index->reposition_window(x, y);
00443 //      x += redraw_index->get_w();
00444 //      paste->reposition_window(x, y);
00445 //      x += paste->get_w();
00446 //      append->reposition_window(x, y);
00447 //      x += append->get_w();
00448 //      view->reposition_window(x, y);
00449 
00450         BC_WindowBase::resize_event(w, h);
00451         return 1;
00452 }
00453 
00454 int AWindowGUI::translation_event()
00455 {
00456         mwindow->session->awindow_x = get_x();
00457         mwindow->session->awindow_y = get_y();
00458         return 0;
00459 }
00460 
00461 void AWindowGUI::reposition_objects()
00462 {
00463         mwindow->theme->get_awindow_sizes(this);
00464         asset_list->reposition_window(mwindow->theme->alist_x, 
00465         mwindow->theme->alist_y, 
00466         mwindow->theme->alist_w, 
00467         mwindow->theme->alist_h);
00468         divider->reposition_window(mwindow->theme->adivider_x,
00469                 mwindow->theme->adivider_y,
00470                 mwindow->theme->adivider_w,
00471                 mwindow->theme->adivider_h);
00472         folder_list->reposition_window(mwindow->theme->afolders_x, 
00473         mwindow->theme->afolders_y, 
00474         mwindow->theme->afolders_w, 
00475         mwindow->theme->afolders_h);
00476         flush();
00477 }
00478 
00479 int AWindowGUI::close_event()
00480 {
00481         hide_window();
00482         mwindow->session->show_awindow = 0;
00483         unlock_window();
00484 
00485         mwindow->gui->lock_window("AWindowGUI::close_event");
00486         mwindow->gui->mainmenu->show_awindow->set_checked(0);
00487         mwindow->gui->unlock_window();
00488 
00489         lock_window("AWindowGUI::close_event");
00490         mwindow->save_defaults();
00491         return 1;
00492 }
00493 
00494 
00495 int AWindowGUI::keypress_event()
00496 {
00497         switch(get_keypress())
00498         {
00499                 case 'w':
00500                 case 'W':
00501                         if(ctrl_down())
00502                         {
00503                                 close_event();
00504                                 return 1;
00505                         }
00506                         break;
00507         }
00508         return 0;
00509 }
00510 
00511 void AWindowGUI::update_folder_list()
00512 {
00513 //printf("AWindowGUI::update_folder_list 1\n");
00514         for(int i = 0; i < folders.total; i++)
00515         {
00516                 AssetPicon *picon = (AssetPicon*)folders.values[i];
00517                 picon->in_use--;
00518         }
00519 //printf("AWindowGUI::update_folder_list 1\n");
00520 
00521 // Search assets for folders
00522         for(int i = 0; i < mwindow->edl->folders.total; i++)
00523         {
00524                 char *folder = mwindow->edl->folders.values[i];
00525                 int exists = 0;
00526 //printf("AWindowGUI::update_folder_list 1.1\n");
00527 
00528                 for(int j = 0; j < folders.total; j++)
00529                 {
00530                         AssetPicon *picon = (AssetPicon*)folders.values[j];
00531                         if(!strcasecmp(picon->get_text(), folder))
00532                         {
00533                                 exists = 1;
00534                                 picon->in_use = 1;
00535                                 break;
00536                         }
00537                 }
00538 
00539                 if(!exists)
00540                 {
00541                         AssetPicon *picon = new AssetPicon(mwindow, this, folder);
00542                         picon->create_objects();
00543                         folders.append(picon);
00544                 }
00545 //printf("AWindowGUI::update_folder_list 1.3\n");
00546         }
00547 //printf("AWindowGUI::update_folder_list 1\n");
00548 //for(int i = 0; i < folders.total; i++)
00549 //      printf("AWindowGUI::update_folder_list %s\n", folders.values[i]->get_text());
00550 
00551 // Delete excess
00552         for(int i = folders.total - 1; i >= 0; i--)
00553         {
00554                 AssetPicon *picon = (AssetPicon*)folders.values[i];
00555                 if(!picon->in_use && !picon->persistent)
00556                 {
00557                         delete picon;
00558                         folders.remove_number(i);
00559                 }
00560         }
00561 //for(int i = 0; i < folders.total; i++)
00562 //      printf("AWindowGUI::update_folder_list %s\n", folders.values[i]->get_text());
00563 //printf("AWindowGUI::update_folder_list 2\n");
00564 }
00565 
00566 void AWindowGUI::create_persistent_folder(ArrayList<BC_ListBoxItem*> *output, 
00567         int do_audio, 
00568         int do_video, 
00569         int is_realtime, 
00570         int is_transition)
00571 {
00572         ArrayList<PluginServer*> plugindb;
00573 
00574 // Get pointers to plugindb entries
00575         mwindow->create_plugindb(do_audio, 
00576                         do_video, 
00577                         is_realtime, 
00578                         is_transition,
00579                         0,
00580                         plugindb);
00581 
00582         for(int i = 0; i < plugindb.total; i++)
00583         {
00584                 PluginServer *server = plugindb.values[i];
00585                 int exists = 0;
00586 
00587 // Create new listitem
00588                 if(!exists)
00589                 {
00590                         AssetPicon *picon = new AssetPicon(mwindow, this, server);
00591                         picon->create_objects();
00592                         output->append(picon);
00593                 }
00594         }
00595 }
00596 
00597 void AWindowGUI::update_asset_list()
00598 {
00599 //printf("AWindowGUI::update_asset_list 1\n");
00600         for(int i = 0; i < assets.total; i++)
00601         {
00602                 AssetPicon *picon = (AssetPicon*)assets.values[i];
00603                 picon->in_use--;
00604         }
00605 
00606 
00607 
00608 
00609 
00610 //printf("AWindowGUI::update_asset_list 2\n");
00611 
00612 
00613 // Synchronize EDL clips
00614         for(int i = 0; i < mwindow->edl->clips.total; i++)
00615         {
00616                 int exists = 0;
00617                 
00618 // Look for clip in existing listitems
00619                 for(int j = 0; j < assets.total && !exists; j++)
00620                 {
00621                         AssetPicon *picon = (AssetPicon*)assets.values[j];
00622                         
00623                         if(picon->id == mwindow->edl->clips.values[i]->id)
00624                         {
00625                                 picon->edl = mwindow->edl->clips.values[i];
00626                                 picon->set_text(mwindow->edl->clips.values[i]->local_session->clip_title);
00627                                 exists = 1;
00628                                 picon->in_use = 1;
00629                         }
00630                 }
00631 
00632 // Create new listitem
00633                 if(!exists)
00634                 {
00635                         AssetPicon *picon = new AssetPicon(mwindow, 
00636                                 this, 
00637                                 mwindow->edl->clips.values[i]);
00638                         picon->create_objects();
00639                         assets.append(picon);
00640                 }
00641         }
00642 
00643 
00644 
00645 
00646 
00647 
00648 
00649 //printf("AWindowGUI::update_asset_list 3 %d\n", assets.total);
00650 // Synchronize EDL assets
00651         for(Asset *current = mwindow->edl->assets->first; 
00652                 current; 
00653                 current = NEXT)
00654         {
00655                 int exists = 0;
00656 
00657 //printf("AWindowGUI::update_asset_list 3 %s\n", current->path);
00658 // Look for asset in existing listitems
00659                 for(int j = 0; j < assets.total && !exists; j++)
00660                 {
00661                         AssetPicon *picon = (AssetPicon*)assets.values[j];
00662 
00663                         if(picon->id == current->id)
00664                         {
00665 //printf("AWindowGUI::update_asset_list 4 %p %d %d\n", picon->asset, picon->get_icon_x(), picon->get_icon_y());
00666                                 picon->asset = current;
00667                                 exists = 1;
00668                                 picon->in_use = 1;
00669                                 break;
00670                         }
00671                 }
00672 
00673 //printf("AWindowGUI::update_asset_list 5\n");
00674 // Create new listitem
00675                 if(!exists)
00676                 {
00677 //printf("AWindowGUI::update_asset_list 4.1 %s\n", current->path);
00678                         AssetPicon *picon = new AssetPicon(mwindow, this, current);
00679 //printf("AWindowGUI::update_asset_list 4.2 %s\n", current->path);
00680                         picon->create_objects();
00681 //printf("AWindowGUI::update_asset_list 4.3 %s\n", current->path);
00682                         assets.append(picon);
00683 //printf("AWindowGUI::update_asset_list 4.4 %s\n", current->path);
00684                 }
00685         }
00686 
00687 
00688 
00689 
00690 
00691 
00692 
00693 
00694 
00695 //printf("AWindowGUI::update_asset_list 6\n");
00696         for(int i = assets.total - 1; i >= 0; i--)
00697         {
00698                 AssetPicon *picon = (AssetPicon*)assets.values[i];
00699 //printf("AWindowGUI::update_asset_list %s %d\n", picon->asset->path, picon->in_use);
00700                 if(!picon->in_use)
00701                 {
00702                         delete picon;
00703                         assets.remove_number(i);
00704                 }
00705         }
00706 //printf("AWindowGUI::update_asset_list 7 %d\n", assets.total);
00707 }
00708 
00709 
00710 
00711 
00712 
00713 void AWindowGUI::sort_assets()
00714 {
00715 //printf("AWindowGUI::sort_assets 1 %s\n", mwindow->edl->session->current_folder);
00716         if(!strcasecmp(mwindow->edl->session->current_folder, AEFFECT_FOLDER))
00717                 sort_picons(&aeffects, 
00718                         0);
00719         else
00720         if(!strcasecmp(mwindow->edl->session->current_folder, VEFFECT_FOLDER))
00721                 sort_picons(&veffects, 
00722                         0);
00723         else
00724         if(!strcasecmp(mwindow->edl->session->current_folder, ATRANSITION_FOLDER))
00725                 sort_picons(&atransitions, 
00726                         0);
00727         else
00728         if(!strcasecmp(mwindow->edl->session->current_folder, VTRANSITION_FOLDER))
00729                 sort_picons(&vtransitions, 
00730                         0);
00731         else
00732                 sort_picons(&assets, 
00733                         mwindow->edl->session->current_folder);
00734 
00735         update_assets();
00736 }
00737 
00738 
00739 
00740 
00741 
00742 
00743 
00744 
00745 
00746 
00747 
00748 void AWindowGUI::collect_assets()
00749 {
00750         int i = 0;
00751         mwindow->session->drag_assets->remove_all();
00752         mwindow->session->drag_clips->remove_all();
00753         while(1)
00754         {
00755                 AssetPicon *result = (AssetPicon*)asset_list->get_selection(0, i++);
00756                 if(!result) break;
00757 
00758                 if(result->asset) mwindow->session->drag_assets->append(result->asset);
00759                 if(result->edl) mwindow->session->drag_clips->append(result->edl);
00760         }
00761 }
00762 
00763 void AWindowGUI::copy_picons(ArrayList<BC_ListBoxItem*> *dst, 
00764         ArrayList<BC_ListBoxItem*> *src, 
00765         char *folder)
00766 {
00767 // Remove current pointers
00768         dst[0].remove_all();
00769         dst[1].remove_all_objects();
00770 
00771 // Create new pointers
00772 //if(folder) printf("AWindowGUI::copy_picons 1 %s\n", folder);
00773         for(int i = 0; i < src->total; i++)
00774         {
00775                 AssetPicon *picon = (AssetPicon*)src->values[i];
00776 //printf("AWindowGUI::copy_picons 2 %s\n", picon->asset->folder);
00777                 if(!folder ||
00778                         (folder && picon->asset && !strcasecmp(picon->asset->folder, folder)) ||
00779                         (folder && picon->edl && !strcasecmp(picon->edl->local_session->folder, folder)))
00780                 {
00781                         BC_ListBoxItem *item2, *item1;
00782                         dst[0].append(item1 = picon);
00783                         if(picon->edl)
00784                                 dst[1].append(item2 = new BC_ListBoxItem(picon->edl->local_session->clip_notes));
00785                         else
00786                                 dst[1].append(item2 = new BC_ListBoxItem(""));
00787                         item1->set_autoplace_text(1);
00788                         item2->set_autoplace_text(1);
00789 //printf("AWindowGUI::copy_picons 3 %s\n", picon->get_text());
00790                 }
00791         }
00792 }
00793 
00794 void AWindowGUI::sort_picons(ArrayList<BC_ListBoxItem*> *src, 
00795                 char *folder)
00796 {
00797 //printf("AWindowGUI::sort_picons 1\n")
00798         int done = 0;
00799         while(!done)
00800         {
00801                 done = 1;
00802                 for(int i = 0; i < src->total - 1; i++)
00803                 {
00804                         BC_ListBoxItem *item1 = src->values[i];
00805                         BC_ListBoxItem *item2 = src->values[i + 1];
00806                         item1->set_autoplace_icon(1);
00807                         item2->set_autoplace_icon(1);
00808                         item1->set_autoplace_text(1);
00809                         item2->set_autoplace_text(1);
00810                         if(strcmp(item1->get_text(), item2->get_text()) > 0)
00811                         {
00812                                 src->values[i + 1] = item1;
00813                                 src->values[i] = item2;
00814                                 done = 0;
00815                         }
00816                 }
00817         }
00818 }
00819 
00820 
00821 void AWindowGUI::filter_displayed_assets()
00822 {
00823         if(!strcasecmp(mwindow->edl->session->current_folder, AEFFECT_FOLDER))
00824                 copy_picons(displayed_assets, 
00825                         &aeffects, 
00826                         0);
00827         else
00828         if(!strcasecmp(mwindow->edl->session->current_folder, VEFFECT_FOLDER))
00829                 copy_picons(displayed_assets, 
00830                         &veffects, 
00831                         0);
00832         else
00833         if(!strcasecmp(mwindow->edl->session->current_folder, ATRANSITION_FOLDER))
00834                 copy_picons(displayed_assets, 
00835                         &atransitions, 
00836                         0);
00837         else
00838         if(!strcasecmp(mwindow->edl->session->current_folder, VTRANSITION_FOLDER))
00839                 copy_picons(displayed_assets, 
00840                         &vtransitions, 
00841                         0);
00842         else
00843                 copy_picons(displayed_assets, 
00844                         &assets, 
00845                         mwindow->edl->session->current_folder);
00846 }
00847 
00848 
00849 void AWindowGUI::update_assets()
00850 {
00851 //printf("AWindowGUI::update_assets 1\n");
00852         update_folder_list();
00853 //printf("AWindowGUI::update_assets 2\n");
00854         update_asset_list();
00855 //printf("AWindowGUI::update_assets 3\n");
00856         filter_displayed_assets();
00857 
00858 //for(int i = 0; i < folders.total; i++)
00859 //printf("AWindowGUI::update_assets 4\n");
00860 //      printf("AWindowGUI::update_assets %s\n", folders.values[i]->get_text());
00861         if(mwindow->edl->session->folderlist_format != folder_list->get_format())
00862                 folder_list->update_format(mwindow->edl->session->folderlist_format, 0);
00863         folder_list->update(&folders,
00864                 0,
00865                 0,
00866                 1,
00867                 folder_list->get_xposition(),
00868                 folder_list->get_yposition(),
00869                 -1);
00870 //printf("AWindowGUI::update_assets 5\n");
00871 
00872         if(mwindow->edl->session->assetlist_format != asset_list->get_format())
00873                 asset_list->update_format(mwindow->edl->session->assetlist_format, 0);
00874 
00875 
00876 //printf("AWindowGUI::update_assets 6 %d\n", displayed_assets[0].total);
00877         asset_list->update(displayed_assets,
00878                 asset_titles,
00879                 mwindow->edl->session->asset_columns,
00880                 ASSET_COLUMNS, 
00881                 asset_list->get_xposition(),
00882                 asset_list->get_yposition(),
00883                 -1,
00884                 0);
00885 //printf("AWindowGUI::update_assets 7\n");
00886 
00887         flush();
00888 //printf("AWindowGUI::update_assets 8\n");
00889         return;
00890 }
00891 
00892 int AWindowGUI::current_folder_number()
00893 {
00894         int result = -1;
00895         for(int i = 0; i < folders.total; i++)
00896         {
00897                 if(!strcasecmp(folders.values[i]->get_text(), mwindow->edl->session->current_folder))
00898                 {
00899                         result = i;
00900                         break;
00901                 }
00902         }
00903         return result;
00904 }
00905 
00906 int AWindowGUI::drag_motion()
00907 {
00908         if(get_hidden()) return 0;
00909 
00910         int result = 0;
00911         return result;
00912 }
00913 
00914 int AWindowGUI::drag_stop()
00915 {
00916         if(get_hidden()) return 0;
00917 
00918         return 0;
00919 }
00920 
00921 Asset* AWindowGUI::selected_asset()
00922 {
00923         AssetPicon *picon = (AssetPicon*)asset_list->get_selection(0, 0);
00924         if(picon) return picon->asset;
00925 }
00926 
00927 PluginServer* AWindowGUI::selected_plugin()
00928 {
00929         AssetPicon *picon = (AssetPicon*)asset_list->get_selection(0, 0);
00930         if(picon) return picon->plugin;
00931 }
00932 
00933 AssetPicon* AWindowGUI::selected_folder()
00934 {
00935         AssetPicon *picon = (AssetPicon*)folder_list->get_selection(0, 0);
00936     return picon;
00937 }
00938 
00939 
00940 
00941 
00942 
00943 
00944 
00945 
00946 
00947 
00948 AWindowDivider::AWindowDivider(MWindow *mwindow, AWindowGUI *gui, int x, int y, int w, int h)
00949  : BC_SubWindow(x, y, w, h)
00950 {
00951         this->mwindow = mwindow;
00952         this->gui = gui;
00953 }
00954 AWindowDivider::~AWindowDivider()
00955 {
00956 }
00957 
00958 int AWindowDivider::button_press_event()
00959 {
00960         if(is_event_win() && cursor_inside())
00961         {
00962                 mwindow->session->current_operation = DRAG_PARTITION;
00963                 return 1;
00964         }
00965         return 0;
00966 }
00967 
00968 int AWindowDivider::cursor_motion_event()
00969 {
00970         if(mwindow->session->current_operation == DRAG_PARTITION)
00971         {
00972                 mwindow->session->afolders_w = gui->get_relative_cursor_x();
00973                 gui->reposition_objects();
00974         }
00975         return 0;
00976 }
00977 
00978 int AWindowDivider::button_release_event()
00979 {
00980         if(mwindow->session->current_operation == DRAG_PARTITION)
00981         {
00982                 mwindow->session->current_operation = NO_OPERATION;
00983                 return 1;
00984         }
00985         return 0;
00986 }
00987 
00988 
00989 
00990 
00991 
00992 
00993 AWindowFolders::AWindowFolders(MWindow *mwindow, AWindowGUI *gui, int x, int y, int w, int h)
00994  : BC_ListBox(x, 
00995                 y, 
00996                 w, 
00997                 h,
00998                 mwindow->edl->session->folderlist_format == FOLDERS_ICONS ? 
00999                         LISTBOX_ICONS : LISTBOX_TEXT, 
01000                 &gui->folders, // Each column has an ArrayList of BC_ListBoxItems.
01001                 0,             // Titles for columns.  Set to 0 for no titles
01002                 0,                // width of each column
01003                 1,                      // Total columns.
01004                 0,                    // Pixel of top of window.
01005                 0,                        // If this listbox is a popup window
01006                 LISTBOX_SINGLE,  // Select one item or multiple items
01007                 ICON_TOP,        // Position of icon relative to text of each item
01008                 1)               // Allow drags
01009 {
01010         this->mwindow = mwindow;
01011         this->gui = gui;
01012         set_drag_scroll(0);
01013 }
01014 
01015 AWindowFolders::~AWindowFolders()
01016 {
01017 }
01018         
01019 int AWindowFolders::selection_changed()
01020 {
01021         AssetPicon *picon = (AssetPicon*)get_selection(0, 0);
01022         if(picon)
01023         {
01024                 strcpy(mwindow->edl->session->current_folder, picon->get_text());
01025 //printf("AWindowFolders::selection_changed 1\n");
01026                 gui->asset_list->draw_background();
01027                 gui->update_assets();
01028         }
01029         return 1;
01030 }
01031 
01032 int AWindowFolders::button_press_event()
01033 {
01034         int result = 0;
01035 
01036         result = BC_ListBox::button_press_event();
01037 
01038         if(!result)
01039         {
01040                 if(get_buttonpress() == 3 && is_event_win() && cursor_inside())
01041                 {
01042                         gui->folderlist_menu->update_titles();
01043                         gui->folderlist_menu->activate_menu();
01044                         result = 1;
01045                 }
01046         }
01047 
01048 
01049         return result;
01050 }
01051 
01052 
01053 
01054 
01055 
01056 
01057 
01058 AWindowAssets::AWindowAssets(MWindow *mwindow, AWindowGUI *gui, int x, int y, int w, int h)
01059  : BC_ListBox(x, 
01060                 y, 
01061                 w, 
01062                 h,
01063                 mwindow->edl->session->assetlist_format == ASSETS_ICONS ? 
01064                         LISTBOX_ICONS : LISTBOX_TEXT,
01065                 &gui->assets,     // Each column has an ArrayList of BC_ListBoxItems.
01066                 gui->asset_titles,             // Titles for columns.  Set to 0 for no titles
01067                 mwindow->edl->session->asset_columns,                // width of each column
01068                 1,                      // Total columns.
01069                 0,                    // Pixel of top of window.
01070                 0,                        // If this listbox is a popup window
01071                 LISTBOX_MULTIPLE,  // Select one item or multiple items
01072                 ICON_TOP,        // Position of icon relative to text of each item
01073                 1)               // Allow drag
01074 {
01075         this->mwindow = mwindow;
01076         this->gui = gui;
01077         set_drag_scroll(0);
01078 }
01079 
01080 AWindowAssets::~AWindowAssets()
01081 {
01082 }
01083 
01084 int AWindowAssets::button_press_event()
01085 {
01086         int result = 0;
01087 
01088         result = BC_ListBox::button_press_event();
01089 
01090         if(!result && get_buttonpress() == 3 && is_event_win() && cursor_inside())
01091         {
01092                 BC_ListBox::deactivate_selection();
01093                 gui->assetlist_menu->update_titles();
01094                 gui->assetlist_menu->activate_menu();
01095                 result = 1;
01096         }
01097 
01098 
01099         return result;
01100 }
01101 
01102 
01103 int AWindowAssets::handle_event()
01104 {
01105 //printf("AWindowAssets::handle_event 1 %d %d\n", get_buttonpress(), get_selection(0, 0));
01106         if(get_selection(0, 0))
01107         {
01108                 if(!strcasecmp(mwindow->edl->session->current_folder, AEFFECT_FOLDER))
01109                 {
01110                 }
01111                 else
01112                 if(!strcasecmp(mwindow->edl->session->current_folder, VEFFECT_FOLDER))
01113                 {
01114                 }
01115                 else
01116                 if(!strcasecmp(mwindow->edl->session->current_folder, ATRANSITION_FOLDER))
01117                 {
01118                 }
01119                 else
01120                 if(!strcasecmp(mwindow->edl->session->current_folder, VTRANSITION_FOLDER))
01121                 {
01122                 }
01123                 else
01124                 {
01125 //printf("AWindowAssets::handle_event 2 %d %d\n", get_buttonpress(), get_selection(0, 0));
01126                         mwindow->vwindow->gui->lock_window("AWindowAssets::handle_event");
01127                         
01128                         if(((AssetPicon*)get_selection(0, 0))->asset)
01129                                 mwindow->vwindow->change_source(((AssetPicon*)get_selection(0, 0))->asset);
01130                         else
01131                         if(((AssetPicon*)get_selection(0, 0))->edl)
01132                                 mwindow->vwindow->change_source(((AssetPicon*)get_selection(0, 0))->edl);
01133 
01134                         mwindow->vwindow->gui->unlock_window();
01135                 }
01136                 return 1;
01137         }
01138 
01139         return 0;
01140 }
01141 
01142 int AWindowAssets::selection_changed()
01143 {
01144 // Show popup window
01145         if(get_button_down() && get_buttonpress() == 3 && get_selection(0, 0))
01146         {
01147                 if(!strcasecmp(mwindow->edl->session->current_folder, AEFFECT_FOLDER) || 
01148                         !strcasecmp(mwindow->edl->session->current_folder, VEFFECT_FOLDER) ||
01149                         !strcasecmp(mwindow->edl->session->current_folder, ATRANSITION_FOLDER) ||
01150                         !strcasecmp(mwindow->edl->session->current_folder, VTRANSITION_FOLDER))
01151                 {
01152                         gui->assetlist_menu->update_titles();
01153                         gui->assetlist_menu->activate_menu();
01154                 }
01155                 else
01156                 {
01157                         if(((AssetPicon*)get_selection(0, 0))->asset)
01158                                 gui->asset_menu->update();
01159                         else
01160                         if(((AssetPicon*)get_selection(0, 0))->edl)
01161                                 gui->asset_menu->update();
01162 
01163 
01164 
01165                         gui->asset_menu->activate_menu();
01166                 }
01167 
01168                 BC_ListBox::deactivate_selection();
01169                 return 1;
01170         }
01171         return 0;
01172 }
01173 
01174 void AWindowAssets::draw_background()
01175 {
01176         BC_ListBox::draw_background();
01177         set_color(BC_WindowBase::get_resources()->audiovideo_color);
01178         set_font(LARGEFONT);
01179         draw_text(get_w() - 
01180                         get_text_width(LARGEFONT, mwindow->edl->session->current_folder) - 4, 
01181                 30, 
01182                 mwindow->edl->session->current_folder, 
01183                 -1, 
01184                 get_bg_surface());
01185 }
01186 
01187 int AWindowAssets::drag_start_event()
01188 {
01189         int collect_pluginservers = 0;
01190         int collect_assets = 0;
01191 
01192         if(BC_ListBox::drag_start_event())
01193         {
01194                 if(!strcasecmp(mwindow->edl->session->current_folder, AEFFECT_FOLDER))
01195                 {
01196                         mwindow->session->current_operation = DRAG_AEFFECT;
01197                         collect_pluginservers = 1;
01198                 }
01199                 else
01200                 if(!strcasecmp(mwindow->edl->session->current_folder, VEFFECT_FOLDER))
01201                 {
01202                         mwindow->session->current_operation = DRAG_VEFFECT;
01203                         collect_pluginservers = 1;
01204                 }
01205                 else
01206                 if(!strcasecmp(mwindow->edl->session->current_folder, ATRANSITION_FOLDER))
01207                 {
01208                         mwindow->session->current_operation = DRAG_ATRANSITION;
01209                         collect_pluginservers = 1;
01210                 }
01211                 else
01212                 if(!strcasecmp(mwindow->edl->session->current_folder, VTRANSITION_FOLDER))
01213                 {
01214                         mwindow->session->current_operation = DRAG_VTRANSITION;
01215                         collect_pluginservers = 1;
01216                 }
01217                 else
01218                 {
01219                         mwindow->session->current_operation = DRAG_ASSET;
01220                         collect_assets = 1;
01221                 }
01222                 
01223                 
01224                 if(collect_pluginservers)
01225                 {
01226                         int i = 0;
01227                         mwindow->session->drag_pluginservers->remove_all();
01228                         while(1)
01229                         {
01230                                 AssetPicon *result = (AssetPicon*)get_selection(0, i++);
01231                                 if(!result) break;
01232                                 
01233                                 mwindow->session->drag_pluginservers->append(result->plugin);
01234                         }
01235                 }
01236                 
01237                 if(collect_assets)
01238                 {
01239                         gui->collect_assets();
01240                 }
01241 
01242                 return 1;
01243         }
01244         return 0;
01245 }
01246 
01247 int AWindowAssets::drag_motion_event()
01248 {
01249         BC_ListBox::drag_motion_event();
01250 
01251         mwindow->gui->lock_window("AWindowAssets::drag_motion_event");
01252         mwindow->gui->drag_motion();
01253         mwindow->gui->unlock_window();
01254 
01255         mwindow->vwindow->gui->lock_window("AWindowAssets::drag_motion_event");
01256         mwindow->vwindow->gui->drag_motion();
01257         mwindow->vwindow->gui->unlock_window();
01258 
01259         mwindow->cwindow->gui->lock_window("AWindowAssets::drag_motion_event");
01260         mwindow->cwindow->gui->drag_motion();
01261         mwindow->cwindow->gui->unlock_window();
01262         return 0;
01263 }
01264 
01265 int AWindowAssets::drag_stop_event()
01266 {
01267         int result = 0;
01268 
01269         result = gui->drag_stop();
01270 
01271 
01272         if(!result)
01273         {
01274                 mwindow->gui->lock_window("AWindowAssets::drag_stop_event");
01275                 result = mwindow->gui->drag_stop();
01276                 mwindow->gui->unlock_window();
01277         }
01278 
01279         if(!result) 
01280         {
01281                 mwindow->vwindow->gui->lock_window("AWindowAssets::drag_stop_event");
01282                 result = mwindow->vwindow->gui->drag_stop();
01283                 mwindow->vwindow->gui->unlock_window();
01284         }
01285 
01286         if(!result) 
01287         {
01288                 mwindow->cwindow->gui->lock_window("AWindowAssets::drag_stop_event");
01289                 result = mwindow->cwindow->gui->drag_stop();
01290                 mwindow->cwindow->gui->unlock_window();
01291         }
01292 
01293 
01294 
01295         if(result) get_drag_popup()->set_animation(0);
01296 
01297         BC_ListBox::drag_stop_event();
01298         mwindow->session->current_operation = ::NO_OPERATION; // since NO_OPERATION is also defined in listbox, we have to reach for global scope...
01299         return 0;
01300 }
01301 
01302 int AWindowAssets::column_resize_event()
01303 {
01304         mwindow->edl->session->asset_columns[0] = get_column_width(0);
01305         mwindow->edl->session->asset_columns[1] = get_column_width(1);
01306         return 1;
01307 }
01308 
01309 
01310 
01311 
01312 
01313 
01314 
01315 
01316 
01317 
01318 
01319 
01320 AWindowNewFolder::AWindowNewFolder(MWindow *mwindow, AWindowGUI *gui, int x, int y)
01321  : BC_Button(x, y, mwindow->theme->newbin_data)
01322 {
01323         this->mwindow = mwindow;
01324         this->gui = gui;
01325         set_tooltip(_("New bin"));
01326 }
01327 
01328 int AWindowNewFolder::handle_event()
01329 {
01330         gui->newfolder_thread->start_new_folder();
01331         return 1;
01332 }
01333 
01334 AWindowDeleteFolder::AWindowDeleteFolder(MWindow *mwindow, AWindowGUI *gui, int x, int y)
01335  : BC_Button(x, y, mwindow->theme->deletebin_data)
01336 {
01337         this->mwindow = mwindow;
01338         this->gui = gui;
01339         set_tooltip(_("Delete bin"));
01340 }
01341 
01342 int AWindowDeleteFolder::handle_event()
01343 {
01344         if(gui->folder_list->get_selection(0, 0))
01345         {
01346                 BC_ListBoxItem *folder = gui->folder_list->get_selection(0, 0);
01347                 mwindow->delete_folder(folder->get_text());
01348         }
01349         return 1;
01350 }
01351 
01352 AWindowRenameFolder::AWindowRenameFolder(MWindow *mwindow, AWindowGUI *gui, int x, int y)
01353  : BC_Button(x, y, mwindow->theme->renamebin_data)
01354 {
01355         this->mwindow = mwindow;
01356         this->gui = gui;
01357         set_tooltip(_("Rename bin"));
01358 }
01359 
01360 int AWindowRenameFolder::handle_event()
01361 {
01362         return 1;
01363 }
01364 
01365 AWindowDeleteDisk::AWindowDeleteDisk(MWindow *mwindow, AWindowGUI *gui, int x, int y)
01366  : BC_Button(x, y, mwindow->theme->deletedisk_data)
01367 {
01368         this->mwindow = mwindow;
01369         this->gui = gui;
01370         set_tooltip(_("Delete asset from disk"));
01371 }
01372 
01373 int AWindowDeleteDisk::handle_event()
01374 {
01375         return 1;
01376 }
01377 
01378 AWindowDeleteProject::AWindowDeleteProject(MWindow *mwindow, AWindowGUI *gui, int x, int y)
01379  : BC_Button(x, y, mwindow->theme->deleteproject_data)
01380 {
01381         this->mwindow = mwindow;
01382         this->gui = gui;
01383         set_tooltip(_("Delete asset from project"));
01384 }
01385 
01386 int AWindowDeleteProject::handle_event()
01387 {
01388         return 1;
01389 }
01390 
01391 AWindowInfo::AWindowInfo(MWindow *mwindow, AWindowGUI *gui, int x, int y)
01392  : BC_Button(x, y, mwindow->theme->infoasset_data)
01393 {
01394         this->mwindow = mwindow;
01395         this->gui = gui;
01396         set_tooltip(_("Edit information on asset"));
01397 }
01398 
01399 int AWindowInfo::handle_event()
01400 {
01401         gui->awindow->asset_edit->edit_asset(gui->selected_asset());
01402         return 1;
01403 }
01404 
01405 AWindowRedrawIndex::AWindowRedrawIndex(MWindow *mwindow, AWindowGUI *gui, int x, int y)
01406  : BC_Button(x, y, mwindow->theme->redrawindex_data)
01407 {
01408         this->mwindow = mwindow;
01409         this->gui = gui;
01410         set_tooltip(_("Redraw index"));
01411 }
01412 
01413 int AWindowRedrawIndex::handle_event()
01414 {
01415         return 1;
01416 }
01417 
01418 AWindowPaste::AWindowPaste(MWindow *mwindow, AWindowGUI *gui, int x, int y)
01419  : BC_Button(x, y, mwindow->theme->pasteasset_data)
01420 {
01421         this->mwindow = mwindow;
01422         this->gui = gui;
01423         set_tooltip(_("Paste asset on recordable tracks"));
01424 }
01425 
01426 int AWindowPaste::handle_event()
01427 {
01428         return 1;
01429 }
01430 
01431 AWindowAppend::AWindowAppend(MWindow *mwindow, AWindowGUI *gui, int x, int y)
01432  : BC_Button(x, y, mwindow->theme->appendasset_data)
01433 {
01434         this->mwindow = mwindow;
01435         this->gui = gui;
01436         set_tooltip(_("Append asset in new tracks"));
01437 }
01438 
01439 int AWindowAppend::handle_event()
01440 {
01441         return 1;
01442 }
01443 
01444 AWindowView::AWindowView(MWindow *mwindow, AWindowGUI *gui, int x, int y)
01445  : BC_Button(x, y, mwindow->theme->viewasset_data)
01446 {
01447         this->mwindow = mwindow;
01448         this->gui = gui;
01449         set_tooltip(_("View asset"));
01450 }
01451 
01452 int AWindowView::handle_event()
01453 {
01454         return 1;
01455 }

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