add_subwindow(displacement);
y1 += displacement->get_h() + 5;
add_subwindow(thumbnails = new ViewThumbnails(x1, y1, pwindow));
+ y1 += thumbnails->get_h() + 5;
+ add_subwindow(perpetual = new PerpetualSession(x1, y1, pwindow));
if( y < y1 ) y = y1;
}
return popup->handle_event();
}
+
+PerpetualSession::PerpetualSession(int x, int y, PreferencesWindow *pwindow)
+ : BC_CheckBox(x, y,
+ pwindow->thread->preferences->perpetual_session, _("Perpetual session"))
+{
+ this->pwindow = pwindow;
+}
+
+int PerpetualSession::handle_event()
+{
+ pwindow->thread->preferences->perpetual_session = get_value();
+ return 1;
+}
+
ViewThumbnails *thumbnails;
YuvColorSpace *yuv_color_space;
YuvColorRange *yuv_color_range;
+ PerpetualSession *perpetual;
};
int id;
};
+class PerpetualSession : public BC_CheckBox
+{
+public:
+ PerpetualSession(int x, int y, PreferencesWindow *pwindow);
+ int handle_event();
+ PreferencesWindow *pwindow;
+};
+
#endif
class YuvColorSpaceItem;
class YuvColorRange;
class YuvColorRangeItem;
+class PerpetualSession;
#endif
// The string is not terminated in this call.
int EDL::save_xml(FileXML *file, const char *output_path)
{
- copy(0, tracks->total_length(), 1, file, output_path, 0);
+ copy(1, file, output_path, 0);
return 0;
}
return copy(start, end, all,
"/EDL", file, output_path, rewind_it);
}
+int EDL::copy(int all, FileXML *file, const char *output_path, int rewind_it)
+{
+ return copy(0, tracks->total_length(), all, file, output_path, rewind_it);
+}
int EDL::copy_clip(double start, double end, int all,
FileXML *file, const char *output_path, int rewind_it)
return copy(start, end, all,
"/CLIP_EDL", file, output_path, rewind_it);
}
+int EDL::copy_clip(int all, FileXML *file, const char *output_path, int rewind_it)
+{
+ return copy_clip(0, tracks->total_length(), all, file, output_path, rewind_it);
+}
+
int EDL::copy_nested_edl(double start, double end, int all,
FileXML *file, const char *output_path, int rewind_it)
{
return copy(start, end, all,
"/NESTED_EDL", file, output_path, rewind_it);
}
+int EDL::copy_nested_edl(int all, FileXML *file, const char *output_path, int rewind_it)
+{
+ return copy_nested_edl(0, tracks->total_length(), all, file, output_path, rewind_it);
+}
+
int EDL::copy_vwindow_edl(double start, double end, int all,
FileXML *file, const char *output_path, int rewind_it)
{
return copy(start, end, all,
"/VWINDOW_EDL", file, output_path, rewind_it);
}
+int EDL::copy_vwindow_edl(int all, FileXML *file, const char *output_path, int rewind_it)
+{
+ return copy_vwindow_edl(0, tracks->total_length(), all, file, output_path, rewind_it);
+}
+
int EDL::copy(double start, double end, int all,
const char *closer, FileXML *file,
// Don't want this if using clipboard
if( all ) {
for( int i=0; i<total_vwindow_edls(); ++i )
- get_vwindow_edl(i)->copy_vwindow_edl(0, tracks->total_length(), 1,
- file, output_path, 0);
+ get_vwindow_edl(i)->copy_vwindow_edl(1, file, output_path, 0);
for( int i=0; i<clips.size(); ++i )
- clips[i]->copy_clip(0, tracks->total_length(), 1,
- file, output_path, 0);
+ clips[i]->copy_clip(1, file, output_path, 0);
mixers.save(file);
}
// Scale all sample values since everything is locked to audio
void rechannel();
void resample(double old_rate, double new_rate, int data_type);
+
int copy(double start, double end, int all,
FileXML *file, const char *output_path, int rewind_it);
+ int copy(int all, FileXML *file, const char *output_path, int rewind_it);
+
int copy_clip(double start, double end, int all,
FileXML *file, const char *output_path, int rewind_it);
+ int copy_clip(int all, FileXML *file, const char *output_path, int rewind_it);
+
int copy_nested_edl(double start, double end, int all,
FileXML *file, const char *output_path, int rewind_it);
+ int copy_nested_edl(int all, FileXML *file, const char *output_path, int rewind_it);
+
int copy_vwindow_edl(double start, double end, int all,
FileXML *file, const char *output_path, int rewind_it);
+ int copy_vwindow_edl(int all, FileXML *file, const char *output_path, int rewind_it);
void copy_tracks(EDL *edl);
// Copies project path, folders, EDLSession, and LocalSession from edl argument.
//PRINT_TRACE
mwindow->load_filenames(filenames, LOADMODE_REPLACE);
//PRINT_TRACE
- if(filenames->size() == 1)
+ if( filenames->size() == 1 )
mwindow->gui->mainmenu->add_load(filenames->get(0));
//PRINT_TRACE
mwindow->gui->unlock_window();
char config_path[BCTEXTLEN];
char batch_path[BCTEXTLEN];
int nice_value = 20;
+ int load_perpetual = 1;
config_path[0] = 0;
batch_path[0] = 0;
deamon_path[0] = 0;
// Extract from locale language & region
char locbuf[32], *p;
locbuf[0] = 0;
- if((p = strchr(loc, '.')) != 0 && (p - loc) < (int)sizeof(locbuf)-1) {
+ if( (p = strchr(loc, '.')) != 0 && (p - loc) < (int)sizeof(locbuf)-1 ) {
strncpy(locbuf, loc, p - loc);
locbuf[p - loc] = 0;
}
- else if(strlen(loc) < sizeof(locbuf)-1)
+ else if( strlen(loc) < sizeof(locbuf)-1 )
strcpy(locbuf, loc);
// Locale 'C' does not give useful language info - assume en
- if(!locbuf[0] || locbuf[0] == 'C')
+ if( !locbuf[0] || locbuf[0] == 'C' )
strcpy(locbuf, "en");
- if((p = strchr(locbuf, '_')) && p - locbuf < LEN_LANG) {
+ if( (p = strchr(locbuf, '_')) && p - locbuf < LEN_LANG ) {
*p++ = 0;
strcpy(BC_Resources::language, locbuf);
- if(strlen(p) < LEN_LANG)
+ if( strlen(p) < LEN_LANG )
strcpy(BC_Resources::region, p);
}
- else if(strlen(locbuf) < LEN_LANG)
+ else if( strlen(locbuf) < LEN_LANG )
strcpy(BC_Resources::language, locbuf);
}
else
int load_backup = 0;
int start_remote_control = 0;
- for(int i = 1; i < argc; i++)
- {
- if(!strcmp(argv[i], "-h"))
- {
+ for( int i = 1; i < argc; i++ ) {
+ if( !strcmp(argv[i], "-h") ) {
operation = DO_USAGE;
}
- else
- if(!strcmp(argv[i], "-z"))
- {
+ else if( !strcmp(argv[i], "-z") ) {
start_remote_control = 1;
}
- else
- if(!strcmp(argv[i], "-r"))
- {
+ else if( !strcmp(argv[i], "-r") ) {
operation = DO_BATCHRENDER;
- if(argc > i + 1)
- {
- if(argv[i + 1][0] != '-')
- {
+ if( argc > i + 1 ) {
+ if( argv[i + 1][0] != '-' ) {
strcpy(batch_path, argv[i + 1]);
i++;
}
}
}
- else
- if(!strcmp(argv[i], "-c"))
- {
- if(argc > i + 1)
- {
+ else if( !strcmp(argv[i], "-c") ) {
+ if( argc > i + 1 ) {
strcpy(config_path, argv[i + 1]);
i++;
}
- else
- {
+ else {
fprintf(stderr, _("%s: -c needs a filename.\n"), argv[0]);
}
}
- else
- if(!strcmp(argv[i], "-d") || !strcmp(argv[i], "-f"))
- {
- if(!strcmp(argv[i], "-d"))
- operation = DO_DEAMON;
- else
- operation = DO_DEAMON_FG;
-
- if(argc > i + 1)
- {
- if(atol(argv[i + 1]) > 0)
- {
+ else if( !strcmp(argv[i], "-d") || !strcmp(argv[i], "-f") ) {
+ operation = !strcmp(argv[i], "-d") ? DO_DEAMON : DO_DEAMON_FG;
+ if( argc > i + 1 ) {
+ if( atol(argv[i + 1]) > 0 ) {
deamon_port = atol(argv[i + 1]);
i++;
}
}
}
- else
- if(!strcmp(argv[i], "-b"))
- {
+ else if( !strcmp(argv[i], "-b") ) {
operation = DO_BRENDER;
- if(i > argc - 2)
- {
+ if( i > argc - 2 ) {
fprintf(stderr, _("-b may not be used by the user.\n"));
exit(1);
}
else
strcpy(deamon_path, argv[i + 1]);
}
- else
- if(!strcmp(argv[i], "-n"))
- {
- if(argc > i + 1)
- {
+ else if( !strcmp(argv[i], "-n") ) {
+ if( argc > i + 1 ) {
nice_value = atol(argv[i + 1]);
i++;
}
}
- else
- if(!strcmp(argv[i], "-x"))
- {
+ else if( !strcmp(argv[i], "-x") ) {
load_backup = 1;
}
- else
- {
+ else if( !strcmp(argv[i], "-S") ) {
+ load_perpetual = 0;
+ }
+ else {
char *new_filename;
new_filename = new char[BCTEXTLEN];
strcpy(new_filename, argv[i]);
- if(operation == DO_GUI ||
- operation == DO_DEAMON ||
- operation == DO_DEAMON_FG ||
- operation == DO_USAGE ||
- operation == DO_BATCHRENDER) {
+ if( operation == DO_GUI ||
+ operation == DO_DEAMON || operation == DO_DEAMON_FG ||
+ operation == DO_USAGE || operation == DO_BATCHRENDER) {
#ifndef REPOMAINTXT
#define REPOMAINTXT ""
PROGRAM_NAME, PROGRAM_NAME);
}
- switch(operation)
- {
+ switch( operation ) {
case DO_USAGE:
printf(_("\nUsage:\n"));
printf(_("%s [-f] [-c configuration] [-d port] [-n nice] [-r batch file] [filenames]\n\n"), argv[0]);
File::get_config_path(), CONFIG_FILE);
printf(_("-r = batch render the contents of the batch file (%s/%s) with no GUI. batch file is optional.\n"),
File::get_config_path(), BATCH_PATH);
+ printf(_("-S = do not reload perpetual session\n"));
+ printf(_("-x = reload from backup\n"));
printf(_("filenames = files to load\n\n\n"));
exit(0);
break;
case DO_DEAMON:
- case DO_DEAMON_FG:
- {
- if(operation == DO_DEAMON)
- {
+ case DO_DEAMON_FG: {
+ if( operation == DO_DEAMON ) {
int pid = fork();
- if(pid)
- {
+ if( pid ) {
// Redhat 9 requires _exit instead of exit here.
_exit(0);
}
nice_value,
config_path);
client.main_loop();
- break;
- }
+ break; }
// Same thing without detachment
- case DO_BRENDER:
- {
+ case DO_BRENDER: {
RenderFarmClient client(0,
deamon_path,
20,
config_path);
client.main_loop();
- break;
- }
+ break; }
- case DO_BATCHRENDER:
- {
+ case DO_BATCHRENDER: {
BatchRenderThread *thread = new BatchRenderThread;
thread->start_rendering(config_path,
batch_path);
- break;
- }
+ break; }
- case DO_GUI:
- {
+ case DO_GUI: {
int restart = 0, done = 0;
while( !done ) {
BC_WindowBase::get_resources()->vframe_shm = 0;
MWindow mwindow;
mwindow.create_objects(1, !filenames.total, config_path);
CommandLineThread *thread = 0;
+ if( mwindow.preferences->perpetual_session && load_perpetual )
+ mwindow.load_undo_data();
//SET_TRACE
// load the initial files on seperate tracks
// use a new thread so it doesn't block the GUI
done = 1;
mwindow.save_defaults();
+ if( mwindow.preferences->perpetual_session )
+ mwindow.save_undo_data();
//PRINT_TRACE
filenames.remove_all_objects();
delete thread;
av[ac++] = 0;
execv(exe_path, av);
}
- }
//SET_TRACE
DISABLE_BUFFER
- break;
+ break; }
}
filenames.remove_all_objects();
undo_stack->dump(fp);
}
+void MainUndo::save(FILE *fp)
+{
+ undo_stack->save(fp);
+}
+
+void MainUndo::load(FILE *fp)
+{
+ undo_stack->load(fp);
+ UndoStackItem *current = undo_stack->current;
+ char *current_data = current ? current->get_data() : 0;
+ if( !current_data ) return;
+ mwindow->gui->lock_window("MainUndo::load");
+ UndoStackItem *next = current->next;
+ mwindow->gui->mainmenu->redo->
+ update_caption(next ? next->get_description() : "");
+ mwindow->set_filename(current->get_filename());
+ FileXML file;
+ file.read_from_string(current_data);
+ load_from_undo(&file, LOAD_ALL);
+ delete [] current_data;
+ UndoStackItem *prev = current->previous;
+ mwindow->gui->mainmenu->undo->
+ update_caption(prev ? prev->get_description() : "");
+ mwindow->update_project(LOADMODE_REPLACE);
+ mwindow->gui->unlock_window();
+}
+
int undo_load_flags();
int redo_load_flags();
void dump(FILE *fp=stdout);
+
+ void save(FILE *fp);
+ void load(FILE *fp);
private:
// Entry point for all update commands
void update_undo_entry(const char *description,
FileXML file;
edl->optimize();
edl->set_path(session->filename);
- char backup_path[BCTEXTLEN];
+ char backup_path[BCTEXTLEN], backup_path1[BCTEXTLEN];
snprintf(backup_path, sizeof(backup_path), "%s/%s",
File::get_config_path(), BACKUP_FILE);
+ snprintf(backup_path1, sizeof(backup_path1), "%s/%s",
+ File::get_config_path(), BACKUP_FILE1);
+ rename(backup_path, backup_path1);
edl->save_xml(&file, backup_path);
file.terminate_string();
FileSystem fs;
save_backup();
}
+
+void MWindow::save_undo_data()
+{
+ char perpetual_path[BCTEXTLEN];
+ snprintf(perpetual_path, sizeof(perpetual_path), "%s/%s",
+ File::get_config_path(), PERPETUAL_FILE);
+ FILE *fp = fopen(perpetual_path,"w");
+ if( !fp ) return;
+ undo->save(fp);
+ fclose(fp);
+}
+
+void MWindow::load_undo_data()
+{
+ char perpetual_path[BCTEXTLEN];
+ snprintf(perpetual_path, sizeof(perpetual_path), "%s/%s",
+ File::get_config_path(), PERPETUAL_FILE);
+ FILE *fp = fopen(perpetual_path,"r");
+ if( !fp ) return;
+ undo->load(fp);
+ fclose(fp);
+}
+
static inline int gcd(int m, int n)
{
int r;
int toggle_label(int is_mwindow);
void undo_entry(BC_WindowBase *calling_window_gui);
void redo_entry(BC_WindowBase *calling_window_gui);
-
+ void save_undo_data();
+ void load_undo_data();
int cut_automation();
int copy_automation();
#define CONFIG_FILE "Cinelerra_rc"
// user presets
#define PRESETS_FILE "Cinelerra_presets"
+#define PERPETUAL_FILE "perpetual.dat"
// factory presets
#define FACTORY_FILE "Cinelerra_factory"
#define PICTURE_FILE "Cinelerra_picture"
get_value(),
this,
&patch->track->record);
+ patch->title->set_back_color(patch->track->record ?
+ get_resources()->text_background :
+ get_resources()->text_background_disarmed);
+ patch->title->set_text_row(0);
return 1;
}
return 0;
}
-
-
-
TitlePatch::TitlePatch(MWindow *mwindow, PatchGUI *patch, int x, int y)
- : BC_TextBox(x,
- y,
- patch->patchbay->get_w() - 10,
- 1,
- patch->track->title,
- 1, MEDIUMFONT, 1)
+ : BC_TextBox(x, y, patch->patchbay->get_w() - 10, 1,
+ patch->track->title, 1, MEDIUMFONT, 1)
{
this->mwindow = mwindow;
this->patch = patch;
+ set_back_color(patch->track->record ?
+ get_resources()->text_background :
+ get_resources()->text_background_disarmed);
+}
+
+void TitlePatch::update(const char *text)
+{
+ set_back_color(patch->track->record ?
+ get_resources()->text_background :
+ get_resources()->text_background_disarmed);
+ BC_TextBox::update(text);
}
int TitlePatch::handle_event()
}
-
-
-
-
-
-
-
NudgePatch::NudgePatch(MWindow *mwindow,
PatchGUI *patch,
int x,
public:
TitlePatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
int handle_event();
+ void update(const char *text);
MWindow *mwindow;
PatchGUI *patch;
};
index_count = 500;
use_thumbnails = 1;
keyframe_reticle = HAIRLINE_DRAGGING;
+ perpetual_session = 0;
trap_sigsegv = 1;
trap_sigintr = 1;
theme[0] = 0;
index_count = that->index_count;
use_thumbnails = that->use_thumbnails;
keyframe_reticle = that->keyframe_reticle;
+ perpetual_session = that->perpetual_session;
strcpy(theme, that->theme);
strcpy(plugin_icons, that->plugin_icons);
strcpy(snapshot_path, that->snapshot_path);
defaults->get("INDEX_DIRECTORY", index_directory);
index_size = defaults->get("INDEX_SIZE", index_size);
index_count = defaults->get("INDEX_COUNT", index_count);
- use_thumbnails = defaults->get("USE_THUMBNAILS", use_thumbnails);
keyframe_reticle = defaults->get("KEYFRAME_RETICLE", keyframe_reticle);
+ perpetual_session = defaults->get("PERPETUAL_SESSION", perpetual_session);
trap_sigsegv = defaults->get("TRAP_SIGSEGV", trap_sigsegv);
trap_sigintr = defaults->get("TRAP_SIGINTR", trap_sigintr);
defaults->update("INDEX_COUNT", index_count);
defaults->update("USE_THUMBNAILS", use_thumbnails);
defaults->update("KEYFRAME_RETICLE", keyframe_reticle);
+ defaults->update("PERPETUAL_SESSION", perpetual_session);
defaults->update("TRAP_SIGSEGV", trap_sigsegv);
defaults->update("TRAP_SIGINTR", trap_sigintr);
defaults->update("THEME", theme);
// Use thumbnails in AWindow assets.
int use_thumbnails;
int keyframe_reticle;
+ int perpetual_session;
int trap_sigsegv;
int trap_sigintr;
// Title of theme
// Run-time configuration directory
#define DEAMON_PORT 400
#define BACKUP_FILE "backup.xml"
+#define BACKUP_FILE1 "backup.prev"
#define FFMPEG_EARLY_TIP _("Currently: Try FFMpeg first\n Click to: Try FFMpeg last")
#define FFMPEG_LATE_TIP _("Currently: Try FFMpeg last\n Click to: Try FFMpeg first")
#include "formattools.h"
#include "language.h"
#include "mainerror.h"
+#include "mainindexes.h"
#include "mainprogress.h"
#include "mainundo.h"
#include "mutex.h"
}
proxy_render->update_progress();
}
+ if( !proxy_render->failed && !proxy_render->is_canceled() ) {
+ Asset *asset = mwindow->edl->assets->update(proxy);
+ mwindow->mainindexes->add_next_asset(0, asset);
+ mwindow->mainindexes->start_build();
+ }
}
#include "mwindow.h"
#include "mwindowgui.h"
#include "playback3d.h"
+#include "preferences.h"
#include "quit.h"
#include "record.h"
#include "render.h"
//printf("Quit::handle_event 1 %d\n", mwindow->session->changes_made);
Record *record = mwindow->gui->record;
- if( mwindow->session->changes_made || mwindow->render->in_progress ||
- record->capturing || record->recording || record->writing_file ) {
+ if( !mwindow->preferences->perpetual_session &&
+ ( mwindow->session->changes_made || mwindow->render->in_progress ||
+ record->capturing || record->recording || record->writing_file ) ) {
start();
}
else
return creator;
}
+void UndoStackItem::save(FILE *fp)
+{
+ fwrite(&key,1,sizeof(key),fp);
+ fwrite(&load_flags,1,sizeof(load_flags),fp);
+ fwrite(&data_size,1,sizeof(data_size),fp);
+ fwrite(data,1,data_size,fp);
+ for( char *bp=session_filename; *bp; ++bp ) fputc(*bp, fp);
+ fputc(0, fp);
+ for( char *bp=description; *bp; ++bp ) fputc(*bp, fp);
+ fputc(0, fp);
+}
+
+void UndoStackItem::load(FILE *fp)
+{
+ fread(&key,1,sizeof(key),fp);
+ fread(&load_flags,1,sizeof(load_flags),fp);
+ fread(&data_size,1,sizeof(data_size),fp);
+ fread(data=new char[data_size],1,data_size,fp);
+ char filename[BCTEXTLEN], descr[BCTEXTLEN];
+ char *bp = filename, *ep = bp+sizeof(filename)-1;
+ for( int ch; bp<ep && (ch=fgetc(fp))>0; ++bp ) *bp = ch;
+ *bp = 0;
+ session_filename = cstrdup(filename);
+ bp = descr; ep = bp+sizeof(descr)-1;
+ for( int ch; bp<ep && (ch=fgetc(fp))>0; ++bp ) *bp = ch;
+ *bp = 0;
+ description = cstrdup(descr);
+//printf("read undo key=%d,flags=%jx,data_size=%d,data=%p,file=%s,descr=%s\n",
+// key, load_flags, data_size, data, session_filename, description);
+}
+
+void UndoStack::save(FILE *fp)
+{
+ for( UndoStackItem *item=first; item; item=item->next ) {
+ int is_current = item == current ? 1 : 0;
+ fwrite(&is_current,1,sizeof(is_current),fp);
+ item->save(fp);
+// if( item == current ) break; // stop at current
+ }
+}
+
+void UndoStack::load(FILE *fp)
+{
+ while( last ) delete last;
+ current = 0;
+ UndoStackItem *current_item = 0;
+ int is_current = 0;
+ while( fread(&is_current,1,sizeof(is_current),fp) == sizeof(is_current) ) {
+ UndoStackItem *item = push();
+ item->load(fp);
+ if( is_current ) current_item = item;
+ }
+ if( current_item ) current = current_item;
+}
+
void set_creator(void *creator);
void* get_creator();
+ void save(FILE *fp);
+ void load(FILE *fp);
private:
// command description for the menu item
char *description;
// move to the next undo entry for a redo
UndoStackItem* pull_next();
+ void save(FILE *fp);
+ void load(FILE *fp);
void dump(FILE *fp=stdout);
UndoStackItem* current;
[ . source ])
PKG_3RD([libvpx],[auto],
- [libvpx-1.6.1],
+ [libvpx-1.7.0],
[ libvpx.a ],
[ . ])
text_default = BLACK;
highlight_inverse = WHITE ^ BLUE;
text_background = WHITE;
+ text_background_disarmed = 0xc08080;
text_background_hi = LTYELLOW;
text_background_noborder_hi = LTGREY;
text_background_noborder = -1;
int text_border2;
int text_border2_hi;
int text_background;
+ int text_background_disarmed;
int text_background_hi;
int text_background_noborder_hi;
int text_border3;
text_x = 0;
enabled = 1;
highlighted = 0;
+ back_color = -1;
+ high_color = -1;
precision = 4;
if (!skip_cursor)
skip_cursor = new Timer;
BC_Resources *resources = get_resources();
if(has_border)
{
- back_color = resources->text_background;
- high_color = resources->text_background_hi;
+ if( back_color < 0 ) back_color = resources->text_background;
+ if( high_color < 0 ) high_color = resources->text_background_hi;
}
else
{
- high_color = resources->text_background_noborder_hi;
- back_color = bg_color;
+ if( back_color < 0 ) back_color = bg_color;
+ if( high_color < 0 ) high_color = resources->text_background_noborder_hi;
}
draw(0);
{
//printf("BC_TextBox::update 1 %d %s %s\n", tstrcmp(text), text, this->text);
// Don't update if contents are the same
- if(!tstrcmp(text)) return 0;
+ int bg_color = has_border || !highlighted ? back_color : high_color;
+ if( bg_color == background_color && !tstrcmp(text)) return 0;
tstrcpy(text);
int wtext_len = wtext_update();
if(highlight_letter1 > wtext_len) highlight_letter1 = wtext_len;
int BC_TextBox::get_text_y() { return text_y; }
void BC_TextBox::set_text_x(int v) { text_x = v; }
void BC_TextBox::set_text_y(int v) { text_y = v; }
+int BC_TextBox::get_back_color() { return back_color; }
+void BC_TextBox::set_back_color(int v) { back_color = v; }
int BC_TextBox::pixels_to_rows(BC_WindowBase *window, int font, int pixels)
{
//printf("BC_TextBox::draw %d %s\n", __LINE__, text);
// Background
- if(has_border)
- background_color = resources->text_background;
- else if(highlighted)
- background_color = high_color;
- else
- background_color = back_color;
+ background_color = has_border || !highlighted ? back_color : high_color;
set_color(background_color);
draw_box(0, 0, w, h);
int get_text_y();
void set_text_x(int v);
void set_text_y(int v);
+ int get_back_color();
+ void set_back_color(int v);
int reposition_window(int x, int y, int w = -1, int rows = -1);
int uses_text();
BC_ThemeSet *existing_image_set = title[0] ? get_image_set_object(title) : 0;
if( existing_image_set ) {
image_sets.remove_object(existing_image_set);
+ last_image_set = 0;
+ last_image_data = 0;
}
BC_ThemeSet *result = new BC_ThemeSet(total, 0, title);
resources->text_default = 0x000000;
resources->text_background = 0xcecea2;
+ resources->text_background_disarmed = 0xefeddb;
resources->text_border1 = 0x202020;
resources->text_border2 = 0xcecea2;
resources->text_border3 = 0xcecea2;
resources->text_default = 0x000000;
resources->text_background = 0xffffff;
+ resources->text_background_disarmed = 0xff0000;
resources->text_border1 = 0x4a484a; // (top outer)
resources->text_border2 = 0x000000; // (top inner)
resources->text_border3 = 0xacaeac; // (bottom inner)
resources->text_default = 0xeeeeff;
resources->text_background = 0x1a1447;
+ resources->text_background_disarmed = 0x7282d4;
resources->text_border1 = 0x202020;
resources->text_border2 = 0x1a1447;
resources->text_border3 = 0x1a1447;
// COPIED FROM DEFAULT THEME 1>>
resources->text_default = 0x000000;
resources->text_background = 0xffffff;
+ resources->text_background_disarmed = 0xff3939;
//listbox borders
resources->text_border1 = 0x4a484a; // (top outer)
resources->text_border2 = 0x000000; // (top inner)
resources->text_default = 0x000000;
resources->text_background = 0xffffff;
+ resources->text_background_disarmed = 0xaaaaaa;
resources->text_background_hi = 0xffffff;
resources->text_border1 = 0x000000;
resources->text_border2 = 0xffffff;
resources->text_default = 0x001000;
resources->text_background = 0x75b697;
+ resources->text_background_disarmed = 0xce00ff;
resources->text_border1 = 0x202020;
resources->text_border2 = 0x75b697;
resources->text_border3 = 0x75b697;
resources->text_default = 0x1b0f11;
resources->text_background = 0xffb1d0;
+ resources->text_background_disarmed = 0x0000ff;
resources->text_border1 = 0x202020;
resources->text_border2 = 0xffb1d0;
resources->text_border3 = 0xffb1d0;
resources->text_default = 0xbfbfbf;
resources->text_background = 0x373737;
+ resources->text_background_disarmed = 0xaf0000;
resources->text_border1 = 0x202020;
resources->text_border2 = 0x373737;
resources->text_border3 = 0x373737;
resources->text_default = 0xbfbfbf;
resources->text_background = 0x333333;
+ resources->text_background_disarmed = 0xaf0000;
resources->text_border1 = 0x202020;
resources->text_border2 = 0x333333;
resources->text_border3 = 0x333333;
ftp://ftp.videolan.org/pub/x264/snapshots/x264-snapshot-20170426-2245-stable.tar.bz2
https://bitbucket.org/multicoreware/x265/downloads/x265_2.4.tar.gz
http://ffmpeg.org/releases/ffmpeg-3.3.tar.bz2
-https://chromium.googlesource.com/webm/libvpx/+archive/0c0a05046db1c0b59a7fcc29785a190fdbbe39c2.tar.gz = 1,6,1
+https://github.com/webmproject/libvpx/releases/tag/v1.7.0
https://github.com/swh/ladspa/releases/tag/v0.4.17, plugin.org.uk
https://archive.mozilla.org/pub/opus/opus-1.2.1.tar.gz