temp->draw_line(x,0, x,vh);
return temp;
}
+ int ww = picon->gui->vicon_thread->view_w;
+ int hh = picon->gui->vicon_thread->view_h;
+ if( !asset->video_data ) {
+ if( !temp ) {
+ temp = new VFrame(0, -1, ww, hh, BC_RGB888, -1);
+ temp->clear_frame();
+ }
+ return temp;
+ }
if( seq_no >= images.size() ) {
MWindow *mwindow = picon->mwindow;
File *file = mwindow->video_cache->check_out(asset, mwindow->edl, 1);
}
if( !temp )
temp = new VFrame(0, -1, asset->width, asset->height, BC_RGB888, -1);
- int ww = picon->gui->vicon_thread->view_w;
- int hh = picon->gui->vicon_thread->view_h;
while( seq_no >= images.size() ) {
file->set_layer(0);
int64_t pos = images.size() / picon->gui->vicon_thread->refresh_rate * frame_rate;
int AssetVIcon::get_vy()
{
BC_ListBox *lbox = picon->gui->asset_list;
- return lbox->get_item_y(picon) + lbox->get_title_h();
+ return lbox->get_item_y(picon);
}
void AssetVIcon::load_audio()
open_render_engine(edl, 0);
render_video(0, gui->temp_picon);
close_render_engine();
- gui->lock_window("AssetPicon::create_objects 0");
icon_vframe = new VFrame(0,
-1, pixmap_w, pixmap_h, BC_RGB888, -1);
icon_vframe->transfer_from(gui->temp_picon);
pixmap_w = icon_vframe->get_w();
pixmap_h = icon_vframe->get_h();
}
+ gui->lock_window("AssetPicon::create_objects 0");
icon = new BC_Pixmap(gui, pixmap_w, pixmap_h);
icon->draw_vframe(icon_vframe,
0, 0, pixmap_w, pixmap_h, 0, 0);
add_subwindow(asset_list = new AWindowAssets(mwindow, this, x1, y1, w1, h1));
vicon_thread = new VIconThread(asset_list);
+ int x0 = 0, y0 = asset_list->get_title_h();
+ vicon_thread->set_drawing_area(x0,y0, get_w(),get_h());
vicon_thread->start();
vicon_audio = new AssetVIconAudio(this);
{
if( !vicon_drawing ) return;
if( mwindow->edl->session->awindow_folder != AW_MEDIA_FOLDER ) return;
- if( mwindow->edl->session->assetlist_format != ASSETS_ICONS ) return;
- vicon_thread->start_drawing();
+ switch( mwindow->edl->session->assetlist_format ) {
+ case ASSETS_ICONS:
+ case ASSETS_ICONS_PACKED:
+ case ASSETS_ICON_LIST:
+ vicon_thread->start_drawing();
+ break;
+ default:
+ break;
+ }
}
void AWindowGUI::stop_vicon_drawing()
vicon_thread->stop_drawing();
}
+int AWindowGUI::cycle_assetlist_format()
+{
+ EDLSession *session = mwindow->edl->session;
+ int format = ASSETS_TEXT;
+ if( allow_iconlisting ) {
+ switch( session->assetlist_format ) {
+ case ASSETS_TEXT:
+ format = ASSETS_ICONS;
+ break;
+ case ASSETS_ICONS:
+ format = ASSETS_ICONS_PACKED;
+ break;
+ case ASSETS_ICONS_PACKED:
+ format = ASSETS_ICON_LIST;
+ break;
+ case ASSETS_ICON_LIST:
+ format = ASSETS_TEXT;
+ break;
+ }
+ }
+ stop_vicon_drawing();
+ session->assetlist_format = format;
+ asset_list->update_format(session->assetlist_format, 0);
+ int x0 = 0;
+ int x1 = asset_list->get_w();
+ int y0 = asset_list->get_title_h();
+ int y1 = asset_list->get_h();
+ vicon_thread->set_drawing_area(x0,y0, x1,y1);
+ async_update_assets();
+ start_vicon_drawing();
+ return 1;
+}
+
AWindowRemovePluginGUI::
AWindowRemovePluginGUI(AWindow *awindow, AWindowRemovePlugin *thread,
int x, int y, PluginServer *plugin)
void AWindowRemovePluginGUI::create_objects()
{
+ lock_window("AWindowRemovePluginGUI::create_objects");
BC_Button *ok_button = new BC_OKButton(this);
add_subwindow(ok_button);
BC_Button *cancel_button = new BC_CancelButton(this);
0, 0, 1, 0, 0, LISTBOX_SINGLE, ICON_LEFT, 0);
add_subwindow(list);
show_window();
+ unlock_window();
}
int AWindowRemovePlugin::remove_plugin(PluginServer *plugin, ArrayList<BC_ListBoxItem*> &folder)
return 1;
}
break;
+ case 'v':
+ return cycle_assetlist_format();
case DELETE:
if( shift_down() ) {
PluginServer* plugin = selected_plugin();
if( mwindow->edl->session->assetlist_format != asset_list->get_format() ) {
asset_list->update_format(mwindow->edl->session->assetlist_format, 0);
+ int x0 = 0;
+ int x1 = asset_list->get_w();
+ int y0 = asset_list->get_title_h();
+ int y1 = asset_list->get_h();
+ vicon_thread->set_drawing_area(x0,y0, x1,y1);
}
int asset_xposition = asset_list->get_xposition();
int asset_yposition = asset_list->get_yposition();
AWindowFolders::AWindowFolders(MWindow *mwindow, AWindowGUI *gui, int x, int y, int w, int h)
: BC_ListBox(x, y, w, h,
- mwindow->edl->session->folderlist_format == ASSETS_ICONS ?
+ mwindow->edl->session->folderlist_format == FOLDERS_ICONS ?
LISTBOX_ICONS : LISTBOX_TEXT,
&gui->folders, // Each column has an ArrayList of BC_ListBoxItems.
0, // Titles for columns. Set to 0 for no titles
AWindowAssets::AWindowAssets(MWindow *mwindow, AWindowGUI *gui, int x, int y, int w, int h)
- : BC_ListBox(x, y, w, h,
- (mwindow->edl->session->assetlist_format == ASSETS_ICONS && gui->allow_iconlisting ) ?
- LISTBOX_ICONS : LISTBOX_TEXT,
+ : BC_ListBox(x, y, w, h, !gui->allow_iconlisting ? LISTBOX_TEXT :
+ mwindow->edl->session->assetlist_format == ASSETS_ICONS ? LISTBOX_ICONS :
+ mwindow->edl->session->assetlist_format == ASSETS_ICONS_PACKED ? LISTBOX_ICONS_PACKED :
+ mwindow->edl->session->assetlist_format == ASSETS_ICON_LIST ? LISTBOX_ICON_LIST :
+ LISTBOX_TEXT,
&gui->assets, // Each column has an ArrayList of BC_ListBoxItems.
gui->asset_titles,// Titles for columns. Set to 0 for no titles
mwindow->edl->session->asset_columns, // width of each column
AWindowListFormat::AWindowListFormat(MWindow *mwindow, AWindowGUI *gui)
- : BC_MenuItem("")
+ : BC_MenuItem("","v",'v')
{
this->mwindow = mwindow;
this->gui = gui;
int AWindowListFormat::handle_event()
{
- gui->stop_vicon_drawing();
+ return gui->cycle_assetlist_format();
+}
+void AWindowListFormat::update()
+{
EDLSession *session = mwindow->edl->session;
+ const char *text = 0;
switch( session->assetlist_format ) {
case ASSETS_TEXT:
- session->assetlist_format = ASSETS_ICONS;
+ text = _("Display icons");
break;
case ASSETS_ICONS:
- session->assetlist_format = ASSETS_TEXT;
+ text = _("Display icons packed");
+ break;
+ case ASSETS_ICONS_PACKED:
+ text = _("Display icon list");
+ break;
+ case ASSETS_ICON_LIST:
+ text = _("Display text");
break;
}
-
- gui->asset_list->update_format(session->assetlist_format, 1);
- if( !mwindow->awindow->gui->allow_iconlisting ) {
- mwindow->edl->session->assetlist_format = ASSETS_TEXT;
- }
-
- gui->start_vicon_drawing();
- return 1;
-}
-
-void AWindowListFormat::update()
-{
- set_text(mwindow->edl->session->assetlist_format == ASSETS_TEXT ?
- (char*)_("Display icons") : (char*)_("Display text"));
+ set_text(text);
}
AWindowListSort::AWindowListSort(MWindow *mwindow, AWindowGUI *gui)