}
if( !vframe ) {
int wh = toggle->get_h() - yS(4);
+ if( wh < 1 ) wh = 1;
GWindowColorButton *color_button =
new GWindowColorButton(toggle, get_w()-wh-ys10, y+yS(2), wh, color);
add_tool(color_button);
#include "playbackengine.h"
#include "playbackprefs.h"
#include "preferences.h"
+#include "record.h"
#include "recordprefs.h"
+#include "render.h"
#include "shbtnprefs.h"
#include "theme.h"
#include "trackcanvas.h"
this->mwindow = mwindow;
window = 0;
thread_running = 0;
+ confirm_dialog = 0;
}
PreferencesThread::~PreferencesThread()
{
+ delete confirm_dialog;
close_window();
}
return 0;
}
+const char *PreferencesThread::busy()
+{
+ if( mwindow->render->thread->running() )
+ return _("render");
+ Record *record = mwindow->gui->record;
+ if( record->capturing || record->recording || record->writing_file )
+ return _("record");
+ return 0;
+}
+
+void PreferencesThread::confirm_update(const char *reason, int close)
+{
+ delete confirm_dialog;
+ confirm_dialog = new PreferencesConfirmDialog(this, reason, close);
+ confirm_dialog->start();
+}
+
const char* PreferencesThread::category_to_text(int category)
{
PlaybackConfig *playback_config = edl->session->playback_config;
}
int PreferencesApply::handle_event()
{
- thread->apply_settings();
- mwindow->save_defaults();
+ const char *reason = thread->busy();
+ if( reason )
+ thread->confirm_update(reason, 0);
+ else {
+ thread->apply_settings();
+ mwindow->save_defaults();
+ }
return 1;
}
int PreferencesApply::resize_event(int w, int h)
this->mwindow = mwindow;
this->thread = thread;
}
+PreferencesOK::~PreferencesOK()
+{
+}
+
int PreferencesOK::keypress_event()
{
- if(get_keypress() == RETURN)
- {
- thread->window->set_done(0);
- return 1;
- }
+ if( get_keypress() == RETURN )
+ return handle_event();
return 0;
}
+
int PreferencesOK::handle_event()
{
- thread->window->set_done(0);
+ const char *reason = mwindow->restart() ? _("restart") : thread->busy();
+ if( reason )
+ thread->confirm_update(reason, 1);
+ else
+ thread->window->set_done(0);
return 1;
}
int PreferencesOK::resize_event(int w, int h)
}
+PreferencesConfirmDialog::PreferencesConfirmDialog(PreferencesThread *thread,
+ const char *reason, int close)
+{
+ this->thread = thread;
+ this->close = close;
+ sprintf(query, _("Busy: %s in progress. Are you sure?"), reason);
+}
+PreferencesConfirmDialog::~PreferencesConfirmDialog()
+{
+}
+BC_Window *PreferencesConfirmDialog::new_gui()
+{
+ qwindow = new PreferencesConfirmWindow(this);
+ qwindow->create_objects(query, 0);
+ return qwindow;
+}
+void PreferencesConfirmDialog::handle_done_event(int result)
+{
+ if( !result ) return; // no
+ if( !close ) {
+ thread->window->lock_window("PreferencesConfirmDialog::handle_done_event");
+ thread->apply_settings();
+ thread->mwindow->save_defaults();
+ thread->window->unlock_window();
+ }
+ else
+ thread->window->set_done(0);
+}
+
+PreferencesConfirmWindow::PreferencesConfirmWindow(PreferencesConfirmDialog *dialog)
+ : QuestionWindow(dialog->thread->mwindow)
+{
+ this->dialog = dialog;
+}
+PreferencesConfirmWindow::~PreferencesConfirmWindow()
+{
+}
+
+
PreferencesCancel::PreferencesCancel(MWindow *mwindow, PreferencesThread *thread)
: BC_GenericButton(thread->window->get_w() - BC_GenericButton::calculate_w(thread->window, _("Cancel")) - xS(10),
thread->window->get_h() - BC_GenericButton::calculate_h() - yS(10),
#include "guicast.h"
#include "mutex.inc"
#include "mwindow.inc"
+#include "question.h"
#include "preferences.inc"
#include "preferencesthread.inc"
const char* category_to_text(int category);
int text_to_category(const char *category);
+ const char *busy();
+ void confirm_update(const char *reason, int close);
+ PreferencesConfirmDialog *confirm_dialog;
+
int current_dialog;
int thread_running;
int redraw_indexes;
{
public:
PreferencesOK(MWindow *mwindow, PreferencesThread *thread);
+ ~PreferencesOK();
int keypress_event();
int handle_event();
int resize_event(int w, int h);
MWindow *mwindow;
PreferencesThread *thread;
+ PreferencesConfirmDialog *confirm_dialog;
+};
+
+class PreferencesConfirmDialog : public BC_DialogThread
+{
+public:
+ PreferencesConfirmDialog(PreferencesThread *thread,
+ const char *reason, int close);
+ ~PreferencesConfirmDialog();
+ BC_Window *new_gui();
+ void handle_done_event(int result);
+
+ PreferencesThread *thread;
+ PreferencesConfirmWindow *qwindow;
+ char query[BCTEXTLEN];
+ int close;
};
+class PreferencesConfirmWindow : public QuestionWindow
+{
+public:
+ PreferencesConfirmWindow(PreferencesConfirmDialog *dialog);
+ ~PreferencesConfirmWindow();
+
+ PreferencesConfirmDialog *dialog;
+};
+
+
class PreferencesCancel : public BC_GenericButton
{
public:
#ifndef PREFERENCESTHREAD_INC
#define PREFERENCESTHREAD_INC
-class PreferencesDialog;
-class PreferencesMenuItem;
+class PreferencesMenuitem;
class PreferencesThread;
+class PreferencesDialog;
+class PreferencesCategory;
+class PreferencesButton;
class PreferencesWindow;
+class PreferencesButton;
+class PreferencesCategory;
+class PreferencesApply;
+class PreferencesOK;
+class PreferencesConfirmDialog;
+class PreferencesConfirmWindow;
+class PreferencesCancel;
#endif
#include "ctype.h"
#define WIDTH xS(375)
-#define HEIGHT yS(160)
+#define HEIGHT yS(120)
QuestionWindow::QuestionWindow(MWindow *mwindow)
: BC_Window(_(PROGRAM_NAME ": Question"),
Render::~Render()
{
+ stop_operation();
close_window();
delete package_lock;
delete counter_lock;
return new_image("", path);
}
+VFrame* BC_Theme::new_image1(const char *title, const char *path)
+{
+ VFrame *existing_image = title[0] ? get_image(title, 0) : 0;
+ if( existing_image ) return existing_image;
+
+ BC_ThemeSet *result = new BC_ThemeSet(1, 0, title);
+ result->data[0] = new VFramePng(get_image_data(path), 1.);
+ add_image_set(result);
+ return result->data[0];
+}
+
// These create image sets which are stored in the image_sets table.
VFrame** BC_Theme::new_image_set(const char *title, int total, va_list *args)
{
// Decompresses image and puts on images table before returning it.
VFrame* new_image(const char *title, const char *path);
VFrame* new_image(const char *path);
+// xy_scale = 1
+ VFrame* new_image1(const char *title, const char *path);
// These retrieve images based on case sensitive title
return 1;
}
int ww = w * xscale, hh = h * yscale;
+ if( ww < 1 ) ww = 1;
+ if( hh < 1 ) hh = 1;
if( ww != w || hh != h ) {
VFrame vframe(*this);
reallocate(NULL, -1, 0, 0, 0, ww, hh, color_model, -1);
char *text)
: BC_PopupMenu(x,
y,
- xS(80),
+ xS(110),
text)
{
this->plugin = plugin;
CompressorInput::CompressorInput(CompressorEffect *plugin, int x, int y)
: BC_PopupMenu(x,
y,
- xS(100),
+ xS(120),
CompressorInput::value_to_text(plugin->config.input),
1)
{
DelayAudioWindow::DelayAudioWindow(DelayAudio *plugin)
- : PluginClientWindow(plugin, xS(285), yS(80), xS(285), yS(80), 0)
+ : PluginClientWindow(plugin, xS(200), yS(80), xS(200), yS(80), 0)
{
this->plugin = plugin;
}
DenoiseWindow::DenoiseWindow(DenoiseEffect *plugin)
- : PluginClientWindow(plugin, xS(280), yS(50), xS(280), yS(50), 0)
+ : PluginClientWindow(plugin, xS(200), yS(60), xS(200), yS(60), 0)
{
this->plugin = plugin;
}
GraphicSize::GraphicSize(GraphicGUI *window, GraphicEQ *plugin, int x, int y)
- : BC_PopupMenu(x, y, xS(100), "4096", 1)
+ : BC_PopupMenu(x, y, xS(120), "4096", 1)
{
this->plugin = plugin;
this->window = window;
LoopAudioWindow::LoopAudioWindow(LoopAudio *plugin)
: PluginClientWindow(plugin,
- xS(210),
- yS(160),
- xS(200),
- yS(160),
+ xS(180),
+ yS(65),
+ xS(180),
+ yS(65),
0)
{
this->plugin = plugin;
OverlayAudioWindow::OverlayAudioWindow(OverlayAudio *plugin)
: PluginClientWindow(plugin,
- xS(400),
- yS(100),
- xS(400),
- yS(100),
+ xS(300),
+ yS(70),
+ xS(300),
+ yS(70),
0)
{
this->plugin = plugin;
ParametricSize::ParametricSize(ParametricWindow *window, ParametricEQ *plugin, int x, int y)
- : BC_PopupMenu(x, y, xS(100), "4096", 1)
+ : BC_PopupMenu(x, y, xS(120), "4096", 1)
{
this->plugin = plugin;
this->window = window;
PitchSize::PitchSize(PitchWindow *window, PitchEffect *plugin, int x, int y)
- : BC_PopupMenu(x, y, xS(100), "4096", 1)
+ : BC_PopupMenu(x, y, xS(110), "4096", 1)
{
this->plugin = plugin;
}
RemoveGapsWindow::RemoveGapsWindow(RemoveGaps *plugin)
: PluginClientWindow(plugin,
xS(320),
- yS(160),
+ yS(100),
xS(320),
- yS(160),
+ yS(100),
0)
{
this->plugin = plugin;
ResampleRTWindow::ResampleRTWindow(ResampleRT *plugin)
: PluginClientWindow(plugin,
- xS(210),
- yS(160),
- xS(200),
- yS(160),
+ xS(180),
+ yS(110),
+ xS(180),
+ yS(110),
0)
{
this->plugin = plugin;
for(sample = 0; sample < length; sample++)
{
output[sample] += sin((x + phase_offset) /
- period *
- 2 *
- M_PI) * power;
+ period * 2 * M_PI) * power;
x += step;
}
break;
{
case DC:
return power;
- break;
case SINE:
return sin((x + config->phase) * config->freq_factor * 2 * M_PI) * power;
- break;
case SAWTOOTH:
return function_sawtooth((x + config->phase) * config->freq_factor) * power;
- break;
case SQUARE:
return function_square((x + config->phase) * config->freq_factor) * power;
- break;
case TRIANGLE:
return function_triangle((x + config->phase) * config->freq_factor) * power;
- break;
case PULSE:
return function_pulse((x + config->phase) * config->freq_factor) * power;
- break;
case NOISE:
return function_noise() * power;
- break;
}
return 0;
}
{
double normalize_constant = 1.0 / get_total_power();
for(int i = 0; i < config.oscillator_config.total; i++)
- solve_eqn(output,
- length,
- freq,
- normalize_constant,
- i);
+ solve_eqn(output, length, freq, normalize_constant, i);
return length;
}
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
SynthWindow::SynthWindow(Synth *synth)
- : PluginClientWindow(synth,
- synth->window_w,
- synth->window_h,
- xS(400),
- yS(350),
- 1)
+ : PluginClientWindow(synth, synth->window_w, synth->window_h,
+ xS(400), yS(350), 1)
{
this->synth = synth;
white_key[0] = 0;
black_key[4] = new VFramePng(black_checkedhi_png);
- add_subwindow(note_subwindow = new BC_SubWindow(x1,
+ add_subwindow(note_subwindow = new BC_SubWindow(x1+xS(20),
y,
- get_w() - x1,
+ get_w() - (x1+xS(20)),
white_key[0]->get_h() + MARGIN +
get_text_height(MEDIUMFONT) + MARGIN +
get_text_height(MEDIUMFONT) + MARGIN));
note_subwindow->get_y() + note_subwindow->get_h(),
note_subwindow->get_w()));
- add_subwindow(momentary = new SynthMomentary(this,
- x1,
+ add_subwindow(momentary = new SynthMomentary(this, x1,
note_scroll->get_y() + note_scroll->get_h() + MARGIN,
_("Momentary notes")));
- add_subwindow(note_instructions = new BC_Title(
- x1,
+ add_subwindow(note_instructions = new BC_Title( x1,
momentary->get_y() + momentary->get_h() + MARGIN,
_("Ctrl or Shift to select multiple notes.")));
{
gui = oscillators.values[i];
- gui->title->reposition_window(gui->title->get_x(), y + 15);
+ gui->title->reposition_window(gui->title->get_x(), y + yS(15));
gui->level->reposition_window(gui->level->get_x(), y);
gui->level->update(config->level);
SynthMomentary::SynthMomentary(SynthWindow *window, int x, int y, char *text)
- : BC_CheckBox(x,
- y,
- window->synth->config.momentary_notes,
- text)
+ : BC_CheckBox(x, y, window->synth->config.momentary_notes, text)
{
this->window = window;
}
-SynthNote::SynthNote(SynthWindow *window,
- VFrame **images,
- int number,
- int x,
- int y)
- : BC_Toggle(x,
- y,
- images,
- window->synth->freq_exists(keyboard_freqs[number]))
+SynthNote::SynthNote(SynthWindow *window, VFrame **images, int number, int x, int y)
+ : BC_Toggle(x, y, images, window->synth->freq_exists(keyboard_freqs[number]))
{
this->window = window;
this->number = number;
}
-
-
-
-
-
SynthOscGUI::SynthOscGUI(SynthWindow *window, int number)
{
this->window = window;
{
char text[BCTEXTLEN];
sprintf(text, "%d:", number + 1);
- window->osc_subwindow->add_subwindow(title = new BC_Title(10, y + 15, text));
+ window->osc_subwindow->add_subwindow(title = new BC_Title(xS(10), y+yS(15), text));
window->osc_subwindow->add_subwindow(level = new SynthOscGUILevel(window->synth, this, y));
window->osc_subwindow->add_subwindow(phase = new SynthOscGUIPhase(window->synth, this, y));
SynthOscGUILevel::SynthOscGUILevel(Synth *synth, SynthOscGUI *gui, int y)
- : BC_FPot(50,
- y,
+ : BC_FPot(xS(50), y,
synth->config.oscillator_config.values[gui->number]->level,
- INFINITYGAIN,
- 0)
+ INFINITYGAIN, 0)
{
this->synth = synth;
this->gui = gui;
SynthOscGUIPhase::SynthOscGUIPhase(Synth *synth, SynthOscGUI *gui, int y)
- : BC_IPot(125,
- y,
+ : BC_IPot(xS(125), y,
(int64_t)(synth->config.oscillator_config.values[gui->number]->phase * 360),
- 0,
- 360)
+ 0, 360)
{
this->synth = synth;
this->gui = gui;
SynthOscGUIFreq::SynthOscGUIFreq(Synth *synth, SynthOscGUI *gui, int y)
- : BC_IPot(200,
- y,
+ : BC_IPot(xS(200), y,
(int64_t)(synth->config.oscillator_config.values[gui->number]->freq_factor),
- 1,
- 100)
+ 1, 100)
{
this->synth = synth;
this->gui = gui;
}
-
-
-
-
-
SynthAddOsc::SynthAddOsc(Synth *synth, SynthWindow *window, int x, int y)
: BC_GenericButton(x, y, _("Add"))
{
}
-
SynthDelOsc::SynthDelOsc(Synth *synth, SynthWindow *window, int x, int y)
: BC_GenericButton(x, y, _("Delete"))
{
}
-OscScroll::OscScroll(Synth *synth,
- SynthWindow *window,
- int x,
- int y,
- int h)
- : BC_ScrollBar(x,
- y,
- SCROLL_VERT,
- h,
+OscScroll::OscScroll(Synth *synth, SynthWindow *window,
+ int x, int y, int h)
+ : BC_ScrollBar(x, y, SCROLL_VERT, h,
synth->config.oscillator_config.total * OSCILLATORHEIGHT,
- 0,
- window->osc_subwindow->get_h())
+ 0, window->osc_subwindow->get_h())
{
this->synth = synth;
this->window = window;
-NoteScroll::NoteScroll(Synth *synth,
- SynthWindow *window,
- int x,
- int y,
- int w)
- : BC_ScrollBar(x,
- y,
- SCROLL_HORIZ,
- w,
+NoteScroll::NoteScroll(Synth *synth, SynthWindow *window,
+ int x, int y, int w)
+ : BC_ScrollBar(x, y, SCROLL_HORIZ, w,
window->white_key[0]->get_w() * TOTALNOTES * 7 / 12 + window->white_key[0]->get_w(),
- 0,
- window->note_subwindow->get_w())
+ 0, window->note_subwindow->get_w())
{
this->synth = synth;
this->window = window;
}
-
-
-
-
-
-
-
-
-
-
-
-
SynthClear::SynthClear(Synth *synth, int x, int y)
: BC_GenericButton(x, y, _("Clear"))
{
}
-
-
-
-
SynthWaveForm::SynthWaveForm(Synth *synth, int x, int y, char *text)
: BC_PopupMenu(x, y, xS(120), text)
{
SynthWetness::SynthWetness(Synth *synth, int x, int y)
- : BC_FPot(x,
- y,
- synth->config.wetness,
- INFINITYGAIN,
- 0)
+ : BC_FPot(x, y, synth->config.wetness, INFINITYGAIN, 0)
{
this->synth = synth;
}
-SynthCanvas::SynthCanvas(Synth *synth,
- SynthWindow *window,
- int x,
- int y,
- int w,
- int h)
- : BC_SubWindow(x,
- y,
- w,
- h,
- BLACK)
+SynthCanvas::SynthCanvas(Synth *synth, SynthWindow *window,
+ int x, int y, int w, int h)
+ : BC_SubWindow(x, y, w, h, BLACK)
{
this->synth = synth;
this->window = window;
}
-
-
-
-
-
-
// ======================= level calculations
SynthLevelZero::SynthLevelZero(Synth *synth)
: BC_MenuItem(_("Zero"))
for(int i = 0; i < synth->config.oscillator_config.total; i++)
{
synth->config.oscillator_config.values[i]->freq_factor = last_value1 + last_value2;
- if(synth->config.oscillator_config.values[i]->freq_factor > 100) synth->config.oscillator_config.values[i]->freq_factor = 100;
+ if(synth->config.oscillator_config.values[i]->freq_factor > 100)
+ synth->config.oscillator_config.values[i]->freq_factor = 100;
last_value1 = last_value2;
last_value2 = synth->config.oscillator_config.values[i]->freq_factor;
}
#include "guicast.h"
#include "mutex.h"
#include "pluginaclient.h"
+#include "synthesizer.inc"
#include "vframe.inc"
-class Synth;
-class SynthWindow;
-
// Frequency table for piano
float keyboard_freqs[] =
{
#define MAX_FREQS 16
#define TOTALOSCILLATORS 1
-#define OSCILLATORHEIGHT 40
#define TOTALNOTES ((int)(sizeof(keyboard_freqs) / sizeof(float)))
#define MIDDLE_C 24
#define FIRST_TITLE (MIDDLE_C - 12)
#define LAST_TITLE (MIDDLE_C + 12)
-#define MARGIN 10
+#define MARGIN yS(10)
#define SINE 0
#define SAWTOOTH 1
class Synth;
class SynthOscillator;
-
+#define OSCILLATORHEIGHT yS(40)
#endif
#ifndef SYNTHWINDOW_INC
#define SYNTHWINDOW_INC
-
-
class SynthThread;
class SynthOscGUI;
class SynthOscGUILevel;
class SynthScroll;
class SynthClear;
-#define OSCILLATORHEIGHT 40
-
-
#endif
channel_position_data = new VFramePng(get_image_data("channel_position.png"));
// Track bitmaps
- new_image("resource1024", "resource1024.png");
- new_image("resource512", "resource512.png");
- new_image("resource256", "resource256.png");
- new_image("resource128", "resource128.png");
- new_image("resource64", "resource64.png");
- new_image("resource32", "resource32.png");
- new_image("plugin_bg_data", "plugin_bg.png");
- new_image("title_bg_data", "title_bg.png");
- new_image("vtimebar_bg_data", "vwindow_timebar.png");
+ new_image1("resource1024", "resource1024.png");
+ new_image1("resource512", "resource512.png");
+ new_image1("resource256", "resource256.png");
+ new_image1("resource128", "resource128.png");
+ new_image1("resource64", "resource64.png");
+ new_image1("resource32", "resource32.png");
+ new_image1("plugin_bg_data", "plugin_bg.png");
+ new_image1("title_bg_data", "title_bg.png");
+ new_image1("vtimebar_bg_data", "vwindow_timebar.png");
}
channel_position_data = new VFramePng(get_image_data("channel_position.png"));
// Track bitmaps
- new_image("resource1024", "resource1024.png");
- new_image("resource512", "resource512.png");
- new_image("resource256", "resource256.png");
- new_image("resource128", "resource128.png");
- new_image("resource64", "resource64.png");
- new_image("resource32", "resource32.png");
- new_image("plugin_bg_data", "plugin_bg.png");
- new_image("title_bg_data", "title_bg.png");
- new_image("vtimebar_bg_data", "vwindow_timebar.png");
+ new_image1("resource1024", "resource1024.png");
+ new_image1("resource512", "resource512.png");
+ new_image1("resource256", "resource256.png");
+ new_image1("resource128", "resource128.png");
+ new_image1("resource64", "resource64.png");
+ new_image1("resource32", "resource32.png");
+ new_image1("plugin_bg_data", "plugin_bg.png");
+ new_image1("title_bg_data", "title_bg.png");
+ new_image1("vtimebar_bg_data", "vwindow_timebar.png");
}
channel_position_data = new VFramePng(get_image_data("channel_position.png"));
// Track bitmaps
- new_image("resource1024", "resource1024.png");
- new_image("resource512", "resource512.png");
- new_image("resource256", "resource256.png");
- new_image("resource128", "resource128.png");
- new_image("resource64", "resource64.png");
- new_image("resource32", "resource32.png");
- new_image("plugin_bg_data", "plugin_bg.png");
- new_image("title_bg_data", "title_bg.png");
- new_image("vtimebar_bg_data", "vwindow_timebar.png");
+ new_image1("resource1024", "resource1024.png");
+ new_image1("resource512", "resource512.png");
+ new_image1("resource256", "resource256.png");
+ new_image1("resource128", "resource128.png");
+ new_image1("resource64", "resource64.png");
+ new_image1("resource32", "resource32.png");
+ new_image1("plugin_bg_data", "plugin_bg.png");
+ new_image1("title_bg_data", "title_bg.png");
+ new_image1("vtimebar_bg_data", "vwindow_timebar.png");
}
void BlueDotTheme::build_overlays()
channel_position_data = new VFramePng(get_image_data("channel_position.png"));
// Track bitmaps
- new_image("resource1024", "resource1024.png");
- new_image("resource512", "resource512.png");
- new_image("resource256", "resource256.png");
- new_image("resource128", "resource128.png");
- new_image("resource64", "resource64.png");
- new_image("resource32", "resource32.png");
+ new_image1("resource1024", "resource1024.png");
+ new_image1("resource512", "resource512.png");
+ new_image1("resource256", "resource256.png");
+ new_image1("resource128", "resource128.png");
+ new_image1("resource64", "resource64.png");
+ new_image1("resource32", "resource32.png");
//Graphic Copied from default. Improve!!
- new_image("plugin_bg_data", "plugin_bg.png");
- new_image("title_bg_data", "title_bg.png");
- new_image("vtimebar_bg_data", "vwindow_timebar.png");
+ new_image1("plugin_bg_data", "plugin_bg.png");
+ new_image1("title_bg_data", "title_bg.png");
+ new_image1("vtimebar_bg_data", "vwindow_timebar.png");
}
channel_position_data = new VFramePng(get_image_data("channel_position.png"));
// Track bitmaps
- new_image("resource1024", "resource1024.png");
- new_image("resource512", "resource512.png");
- new_image("resource256", "resource256.png");
- new_image("resource128", "resource128.png");
- new_image("resource64", "resource64.png");
- new_image("resource32", "resource32.png");
- new_image("plugin_bg_data", "plugin_bg.png");
- new_image("title_bg_data", "title_bg.png");
- new_image("vtimebar_bg_data", "vwindow_timebar.png");
+ new_image1("resource1024", "resource1024.png");
+ new_image1("resource512", "resource512.png");
+ new_image1("resource256", "resource256.png");
+ new_image1("resource128", "resource128.png");
+ new_image1("resource64", "resource64.png");
+ new_image1("resource32", "resource32.png");
+ new_image1("plugin_bg_data", "plugin_bg.png");
+ new_image1("title_bg_data", "title_bg.png");
+ new_image1("vtimebar_bg_data", "vwindow_timebar.png");
}
void CAKEWALKTHEME::build_bg_data()
{
channel_position_data = new VFramePng(get_image_data("channel_position.png"));
- new_image("resource1024", "resource1024.png");
- new_image("resource512", "resource512.png");
- new_image("resource256", "resource256.png");
- new_image("resource128", "resource128.png");
- new_image("resource64", "resource64.png");
- new_image("resource32", "resource32.png");
- new_image("plugin_bg_data", "plugin_bg.png");
- new_image("title_bg_data", "title_bg.png");
- new_image("vtimebar_bg_data", "vwindow_timebar.png");
+ new_image1("resource1024", "resource1024.png");
+ new_image1("resource512", "resource512.png");
+ new_image1("resource256", "resource256.png");
+ new_image1("resource128", "resource128.png");
+ new_image1("resource64", "resource64.png");
+ new_image1("resource32", "resource32.png");
+ new_image1("plugin_bg_data", "plugin_bg.png");
+ new_image1("title_bg_data", "title_bg.png");
+ new_image1("vtimebar_bg_data", "vwindow_timebar.png");
}
void CAKEWALKTHEME::build_overlays()
{
channel_position_data = new VFramePng(get_image_data("channel_position.png"));
// Track bitmaps
- new_image("resource1024", "resource1024.png");
- new_image("resource512", "resource512.png");
- new_image("resource256", "resource256.png");
- new_image("resource128", "resource128.png");
- new_image("resource64", "resource64.png");
- new_image("resource32", "resource32.png");
- new_image("plugin_bg_data", "plugin_bg.png");
- new_image("title_bg_data", "title_bg.png");
- new_image("vtimebar_bg_data", "vwindow_timebar.png");
+ new_image1("resource1024", "resource1024.png");
+ new_image1("resource512", "resource512.png");
+ new_image1("resource256", "resource256.png");
+ new_image1("resource128", "resource128.png");
+ new_image1("resource64", "resource64.png");
+ new_image1("resource32", "resource32.png");
+ new_image1("plugin_bg_data", "plugin_bg.png");
+ new_image1("title_bg_data", "title_bg.png");
+ new_image1("vtimebar_bg_data", "vwindow_timebar.png");
}
// Audio settings
channel_position_data = new VFramePng(get_image_data("channel_position.png"));
// Track bitmaps
- new_image("resource1024", "resource1024.png");
- new_image("resource512", "resource512.png");
- new_image("resource256", "resource256.png");
- new_image("resource128", "resource128.png");
- new_image("resource64", "resource64.png");
- new_image("resource32", "resource32.png");
- new_image("plugin_bg_data", "plugin_bg.png");
- new_image("title_bg_data", "title_bg.png");
- new_image("vtimebar_bg_data", "vwindow_timebar.png");
+ new_image1("resource1024", "resource1024.png");
+ new_image1("resource512", "resource512.png");
+ new_image1("resource256", "resource256.png");
+ new_image1("resource128", "resource128.png");
+ new_image1("resource64", "resource64.png");
+ new_image1("resource32", "resource32.png");
+ new_image1("plugin_bg_data", "plugin_bg.png");
+ new_image1("title_bg_data", "title_bg.png");
+ new_image1("vtimebar_bg_data", "vwindow_timebar.png");
}
void NEOPHYTETHEME::build_overlays()
channel_position_data = new VFramePng(get_image_data("channel_position.png"));
// Track bitmaps
- new_image("resource1024", "resource1024.png");
- new_image("resource512", "resource512.png");
- new_image("resource256", "resource256.png");
- new_image("resource128", "resource128.png");
- new_image("resource64", "resource64.png");
- new_image("resource32", "resource32.png");
- new_image("plugin_bg_data", "plugin_bg.png");
- new_image("title_bg_data", "title_bg.png");
- new_image("vtimebar_bg_data", "vwindow_timebar.png");
+ new_image1("resource1024", "resource1024.png");
+ new_image1("resource512", "resource512.png");
+ new_image1("resource256", "resource256.png");
+ new_image1("resource128", "resource128.png");
+ new_image1("resource64", "resource64.png");
+ new_image1("resource32", "resource32.png");
+ new_image1("plugin_bg_data", "plugin_bg.png");
+ new_image1("title_bg_data", "title_bg.png");
+ new_image1("vtimebar_bg_data", "vwindow_timebar.png");
}
void PINKLADY::build_overlays()
channel_position_data = new VFramePng(get_image_data("channel_position.png"));
// Track bitmaps
- new_image("resource1024", "resource1024.png");
- new_image("resource512", "resource512.png");
- new_image("resource256", "resource256.png");
- new_image("resource128", "resource128.png");
- new_image("resource64", "resource64.png");
- new_image("resource32", "resource32.png");
- new_image("plugin_bg_data", "plugin_bg.png");
- new_image("title_bg_data", "title_bg.png");
- new_image("vtimebar_bg_data", "vwindow_timebar.png");
+ new_image1("resource1024", "resource1024.png");
+ new_image1("resource512", "resource512.png");
+ new_image1("resource256", "resource256.png");
+ new_image1("resource128", "resource128.png");
+ new_image1("resource64", "resource64.png");
+ new_image1("resource32", "resource32.png");
+ new_image1("plugin_bg_data", "plugin_bg.png");
+ new_image1("title_bg_data", "title_bg.png");
+ new_image1("vtimebar_bg_data", "vwindow_timebar.png");
}
channel_position_data = new VFramePng(get_image_data("channel_position.png"));
// Track bitmaps
- new_image("resource1024", "resource1024.png");
- new_image("resource512", "resource512.png");
- new_image("resource256", "resource256.png");
- new_image("resource128", "resource128.png");
- new_image("resource64", "resource64.png");
- new_image("resource32", "resource32.png");
- new_image("plugin_bg_data", "plugin_bg.png");
- new_image("title_bg_data", "title_bg.png");
- new_image("vtimebar_bg_data", "vwindow_timebar.png");
+ new_image1("resource1024", "resource1024.png");
+ new_image1("resource512", "resource512.png");
+ new_image1("resource256", "resource256.png");
+ new_image1("resource128", "resource128.png");
+ new_image1("resource64", "resource64.png");
+ new_image1("resource32", "resource32.png");
+ new_image1("plugin_bg_data", "plugin_bg.png");
+ new_image1("title_bg_data", "title_bg.png");
+ new_image1("vtimebar_bg_data", "vwindow_timebar.png");
}
void UNFLATTHEME::build_overlays()
TimeStretchRTWindow::TimeStretchRTWindow(TimeStretchRT *plugin)
: PluginClientWindow(plugin,
- xS(210),
- yS(200),
- xS(200),
- yS(210),
+ xS(180),
+ yS(160),
+ xS(180),
+ yS(160),
0)
{
this->plugin = plugin;
#include "language.h"
yuv411Window::yuv411Window(yuv411Main *client)
- : PluginClientWindow(client, xS(250), yS(255), xS(250), yS(255), 0)
+ : PluginClientWindow(client, xS(260), yS(230), xS(260), yS(230), 0)
{
this->client = client;
}
void yuv411Window::create_objects()
{
int xs10 = xS(10), xs90 = xS(90);
- int ys10 = yS(10), ys30 = yS(30), ys35 = yS(35);
+ int ys10 = yS(10), ys30 = yS(30);
int x = xs10, y = ys10, x1=xs90;
add_tool(avg_vertical = new yuv411Toggle(client,
&(client->config.avg_vertical),
add_subwindow(new BC_Title(x, y, _("Bias:")));
add_subwindow(bias=new yuv411Bias(client,x1,y));
y += ys30;
- add_subwindow(reset = new yuv411Reset(client, this, x, y+ys35));
+ add_subwindow(reset = new yuv411Reset(client, this, x, y+ys10));
show_window();
flush();
}
yuv411Offset::yuv411Offset(yuv411Main *client, int x, int y)
- : BC_FSlider(x, y, 0, xS(100), yS(100), (float)0, (float)2,
+ : BC_FSlider(x+xS(60), y, 0, xS(100), yS(100), (float)0, (float)2,
(float)client->config.offset)
{
this->client = client;
}
yuv411Thresh::yuv411Thresh(yuv411Main *client, int x, int y)
- : BC_FSlider(x, y, 0, xS(100), yS(100), (float)1, (float)100,
+ : BC_FSlider(x+xS(60), y, 0, xS(100), yS(100), (float)1, (float)100,
(float)client->config.thresh)
{
this->client = client;
}
yuv411Bias::yuv411Bias(yuv411Main *client, int x, int y)
- : BC_FSlider(x, y, 0, xS(100), yS(100), (float)0, (float)25,
+ : BC_FSlider(x+xS(60), y, 0, xS(100), yS(100), (float)0, (float)25,
(float)client->config.bias)
{
this->client = client;