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()
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()
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
gui->stop_vicon_drawing();
EDLSession *session = mwindow->edl->session;
- switch( session->assetlist_format ) {
- case ASSETS_TEXT:
- session->assetlist_format = ASSETS_ICONS;
- break;
- case ASSETS_ICONS:
- session->assetlist_format = ASSETS_TEXT;
- break;
+ if( mwindow->awindow->gui->allow_iconlisting ) {
+ switch( session->assetlist_format ) {
+ case ASSETS_TEXT:
+ session->assetlist_format = ASSETS_ICONS;
+ break;
+ case ASSETS_ICONS:
+ session->assetlist_format = ASSETS_ICONS_PACKED;
+ break;
+ case ASSETS_ICONS_PACKED:
+ session->assetlist_format = ASSETS_ICON_LIST;
+ break;
+ case ASSETS_ICON_LIST:
+ session->assetlist_format = ASSETS_TEXT;
+ break;
+ }
}
-
- gui->asset_list->update_format(session->assetlist_format, 1);
- if( !mwindow->awindow->gui->allow_iconlisting ) {
+ else
mwindow->edl->session->assetlist_format = ASSETS_TEXT;
- }
+ gui->asset_list->update_format(session->assetlist_format, 0);
+ int x0 = 0;
+ int x1 = gui->asset_list->get_w();
+ int y0 = gui->asset_list->get_title_h();
+ int y1 = gui->asset_list->get_h();
+ gui->vicon_thread->set_drawing_area(x0,y0, x1,y1);
+ gui->async_update_assets();
gui->start_vicon_drawing();
return 1;
}
void AWindowListFormat::update()
{
- set_text(mwindow->edl->session->assetlist_format == ASSETS_TEXT ?
- (char*)_("Display icons") : (char*)_("Display text"));
+ EDLSession *session = mwindow->edl->session;
+ const char *text = 0;
+ switch( session->assetlist_format ) {
+ case ASSETS_TEXT:
+ text = _("Display icons");
+ break;
+ case ASSETS_ICONS:
+ text = _("Display icons packed");
+ break;
+ case ASSETS_ICONS_PACKED:
+ text = _("Display icon list");
+ break;
+ case ASSETS_ICON_LIST:
+ text = _("Display text");
+ break;
+ }
+ set_text(text);
}
AWindowListSort::AWindowListSort(MWindow *mwindow, AWindowGUI *gui)