{
lock_window("AboutPrefs::create_objects");
int x, y;
-
-
BC_Resources *resources = BC_WindowBase::get_resources();
// add_subwindow(new BC_Title(mwindow->theme->preferencestitle_x,
about.append(new BC_ListBoxItem(msg));
}
BC_ListBox *listbox;
- add_subwindow(listbox = new BC_ListBox(x, y, 450, 280,
+ add_subwindow(listbox = new BC_ListBox(x, y, xS(450), yS(280),
LISTBOX_TEXT, &about, 0, 0, 1));
- y += listbox->get_h() + get_text_height(LARGEFONT) + 10;
+ y += listbox->get_h() + get_text_height(LARGEFONT) + yS(10);
}
else
- y += 300 + get_text_height(LARGEFONT) + 10;
+ y += yS(300) + get_text_height(LARGEFONT) + yS(10);
set_font(LARGEFONT);
set_color(resources->text_default);
draw_text(x, y, REPOMAINTXT);
#endif
- x = get_w() - mwindow->theme->about_bg->get_w() - 10;
+ x = get_w() - mwindow->theme->about_bg->get_w() - xS(10);
y = mwindow->theme->preferencesoptions_y;
BC_Pixmap *temp_pixmap = new BC_Pixmap(this,
mwindow->theme->about_bg,
PIXMAP_ALPHA);
- draw_pixmap(temp_pixmap,
- x,
- y);
-
+ draw_pixmap(temp_pixmap, x, y);
delete temp_pixmap;
-
- x += mwindow->theme->about_bg->get_w() + 10;
+ x += mwindow->theme->about_bg->get_w() + xS(10);
y += get_text_height(LARGEFONT) * 2;
-
flash();
flush();
unlock_window();
if(!menu) {
dialog->add_subwindow(menu = new ADriverMenu(x,
- y + 10,
- this,
- (mode == MODERECORD),
- driver));
+ y + yS(10), this, (mode == MODERECORD), driver));
menu->create_objects();
}
BC_Resources *resources = BC_WindowBase::get_resources();
for(int i = 0; i < MAXDEVICES; i++) {
- int x1 = x + menu->get_w() + 5;
+ int x1 = x + menu->get_w() + xS(5);
#if 0
switch(mode) {
case MODEPLAY:
output_int = &out_config->oss_enable[i];
break;
}
- dialog->add_subwindow(oss_enable[i] = new OSSEnable(x1, y1 + 20, output_int));
+ dialog->add_subwindow(oss_enable[i] = new OSSEnable(x1, y1 + yS(20), output_int));
x1 += oss_enable[i]->get_w() + margin;
#endif
switch(mode) {
alsa_device->create_objects();
int x2 = x1;
- x1 += alsa_device->get_w() + 5;
+ x1 += alsa_device->get_w() + xS(5);
switch(mode) {
case MODEPLAY:
output_int = &out_config->alsa_out_bits;
int ADevicePrefs::create_esound_objs()
{
- int x1 = x + menu->get_w() + 5;
+ int x1 = x + menu->get_w() + xS(5);
char *output_char = 0;
int *output_int = 0;
BC_Resources *resources = BC_WindowBase::get_resources();
server_title = new BC_Title(x1, y, _("Server:"),
MEDIUMFONT, resources->text_default);
dialog->add_subwindow(server_title);
- esound_server = new ADeviceTextBox(x1, y + 20, output_char);
+ esound_server = new ADeviceTextBox(x1, y + yS(20), output_char);
dialog->add_subwindow(esound_server);
switch(mode) {
output_int = &out_config->esound_out_port;
break;
}
- x1 += esound_server->get_w() + 5;
+ x1 += esound_server->get_w() + xS(5);
port_title = new BC_Title(x1, y, _("Port:"),
MEDIUMFONT, resources->text_default);
dialog->add_subwindow(port_title);
- esound_port = new ADeviceIntBox(x1, y + 20, output_int);
+ esound_port = new ADeviceIntBox(x1, y + yS(20), output_int);
dialog->add_subwindow(esound_port);
return 0;
}
int ADevicePrefs::create_firewire_objs()
{
- int x1 = x + menu->get_w() + 5;
+ int xs5 = xS(5);
+ int ys20 = yS(20);
+ int x1 = x + menu->get_w() + xs5;
int *output_int = 0;
char *output_char = 0;
BC_Resources *resources = BC_WindowBase::get_resources();
if(output_char) {
dialog->add_subwindow(path_title = new BC_Title(x1, y, _("Device Path:"), MEDIUMFONT, resources->text_default));
- dialog->add_subwindow(firewire_path = new ADeviceTextBox(x1, y + 20, output_char));
- x1 += firewire_path->get_w() + 5;
+ dialog->add_subwindow(firewire_path = new ADeviceTextBox(x1, y + ys20, output_char));
+ x1 += firewire_path->get_w() + xs5;
}
// Firewire port
port_title = new BC_Title(x1, y, _("Port:"),
MEDIUMFONT, resources->text_default);
dialog->add_subwindow(port_title);
- firewire_port = new ADeviceIntBox(x1, y + 20, output_int);
+ firewire_port = new ADeviceIntBox(x1, y + ys20, output_int);
dialog->add_subwindow(firewire_port);
- x1 += firewire_port->get_w() + 5;
+ x1 += firewire_port->get_w() + xs5;
// Firewire channel
switch(mode) {
channel_title = new BC_Title(x1, y, _("Channel:"),
MEDIUMFONT, resources->text_default);
dialog->add_subwindow(channel_title);
- firewire_channel = new ADeviceIntBox(x1, y + 20, output_int);
+ firewire_channel = new ADeviceIntBox(x1, y + ys20, output_int);
dialog->add_subwindow(firewire_channel);
- x1 += firewire_channel->get_w() + 5;
+ x1 += firewire_channel->get_w() + xs5;
// Syt offset
switch(mode) {
syt_title = new BC_Title(x1, y, _("Syt Offset:"),
MEDIUMFONT, resources->text_default);
dialog->add_subwindow(syt_title);
- firewire_syt = new ADeviceIntBox(x1, y + 20, output_int);
+ firewire_syt = new ADeviceIntBox(x1, y + ys20, output_int);
dialog->add_subwindow(firewire_syt);
- x1 += firewire_syt->get_w() + 5;
+ x1 += firewire_syt->get_w() + xs5;
}
return 0;
int ADevicePrefs::create_dvb_objs()
{
- int x1 = x + menu->get_w() + 30;
- int y1 = y + 10;
+ int x1 = x + menu->get_w() + xS(30);
+ int y1 = y + yS(10);
char *output_char = in_config->dvb_in_adapter;
- int y2 = y1 - BC_Title::calculate_h(dialog, _("DVB Adapter:"), MEDIUMFONT) - 5;
+ int y2 = y1 - BC_Title::calculate_h(dialog, _("DVB Adapter:"), MEDIUMFONT) - yS(5);
BC_Resources *resources = BC_WindowBase::get_resources();
dvb_adapter_title = new BC_Title(x1, y2, _("DVB Adapter:"),
MEDIUMFONT, resources->text_default);
dialog->add_subwindow(dvb_adapter_title);
dvb_adapter_path = new ADeviceTextBox(x1, y1, output_char);
dialog->add_subwindow(dvb_adapter_path);
- int x2 = x1 + dvb_adapter_path->get_w() + 5;
+ int x2 = x1 + dvb_adapter_path->get_w() + xS(5);
dvb_device_title = new BC_Title(x2, y2, _("dev:"),
MEDIUMFONT, resources->text_default);
dialog->add_subwindow(dvb_device_title);
int *output_int = &in_config->dvb_in_device;
- dvb_adapter_device = new ADeviceTumbleBox(this, x2, y1, output_int, 0, 9, 20);
+ dvb_adapter_device = new ADeviceTumbleBox(this, x2, y1, output_int, 0, 9, xS(20));
dvb_adapter_device->create_objects();
- x2 += dvb_device_title->get_w() + 30;
+ x2 += dvb_device_title->get_w() + xS(30);
bits_title = new BC_Title(x2, y2, _("Bits:"),
MEDIUMFONT, resources->text_default);
dialog->add_subwindow(bits_title);
output_int = &in_config->dvb_in_bits;
dvb_bits = new BitsPopup(dialog, x2, y1, output_int, 0, 0, 0, 0, 1);
dvb_bits->create_objects();
- x1 += 100; y1 += dvb_adapter_path->get_h() + 5;
+ x1 += xS(100); y1 += dvb_adapter_path->get_h() + yS(5);
output_int = &in_config->follow_audio;
follow_audio_config = new BC_CheckBox(x1, y1, output_int, _("Follow audio config"));
dialog->add_subwindow(follow_audio_config);
int ADevicePrefs::create_v4l2mpeg_objs()
{
- int x1 = x + menu->get_w() + 30;
- int y1 = y + 10;
- int y2 = y1 - BC_Title::calculate_h(dialog, _("Bits:"), MEDIUMFONT) - 5;
+ int x1 = x + menu->get_w() + xS(30);
+ int y1 = y + yS(10);
+ int y2 = y1 - BC_Title::calculate_h(dialog, _("Bits:"), MEDIUMFONT) - yS(5);
BC_Resources *resources = BC_WindowBase::get_resources();
bits_title = new BC_Title(x1, y2, _("Bits:"),
MEDIUMFONT, resources->text_default);
int *output_int = &in_config->v4l2_in_bits;
v4l2_bits = new BitsPopup(dialog, x1, y1, output_int, 0, 0, 0, 0, 1);
v4l2_bits->create_objects();
- x1 += v4l2_bits->get_w() + 10;
+ x1 += v4l2_bits->get_w() + xS(10);
follow_audio_config = new BC_CheckBox(x1, y1,
&in_config->follow_audio, _("Follow audio config"));
dialog->add_subwindow(follow_audio_config);
ADriverMenu::ADriverMenu(int x, int y, ADevicePrefs *device_prefs,
int do_input, int *output)
- : BC_PopupMenu(x, y, 125, adriver_to_string(*output), 1)
+ : BC_PopupMenu(x, y, xS(125), adriver_to_string(*output), 1)
{
this->output = output;
this->do_input = do_input;
ADeviceTextBox::ADeviceTextBox(int x, int y, char *output)
- : BC_TextBox(x, y, 150, 1, output)
+ : BC_TextBox(x, y, xS(150), 1, output)
{
this->output = output;
}
}
ADeviceIntBox::ADeviceIntBox(int x, int y, int *output)
- : BC_TextBox(x, y, 80, 1, *output)
+ : BC_TextBox(x, y, xS(80), 1, *output)
{
this->output = output;
}
int y,
char *output,
ArrayList<BC_ListBoxItem*> *devices)
- : BC_PopupTextBox(dialog, devices, output, x, y, 200, 200)
+ : BC_PopupTextBox(dialog, devices, output, x, y, xS(200), yS(200))
{
this->output = output;
}
void APanel::create_objects()
{
- int x = this->x + 5, y = this->y + 10;
+ int ys10 = yS(10), ys20 = yS(20);
+ int x = this->x + xS(5), y = this->y + ys10;
char string[BCTEXTLEN];
int x1 = x;
subwindow->add_subwindow(new BC_Title(x, y, _("Automation")));
- y += 20;
+ y += ys20;
for(int i = 0; i < PLUGINS; i++)
{
sprintf(string, _("Plugin %d"), i + 1);
subwindow->add_subwindow(new BC_Title(x, y, string, SMALLFONT));
- subwindow->add_subwindow(plugin_autos[i] = new APanelPluginAuto(mwindow, this, x, y + 20));
+ subwindow->add_subwindow(plugin_autos[i] = new APanelPluginAuto(mwindow, this, x, y + ys20));
if(x == x1)
{
x += plugin_autos[i]->get_w();
else
{
x = x1;
- y += plugin_autos[i]->get_h() + 20;
+ y += plugin_autos[i]->get_h() + ys20;
}
}
APanelPluginAuto::APanelPluginAuto(MWindow *mwindow, APanel *gui, int x, int y)
- : BC_FPot(x,
- y,
- 0,
- -1,
- 1)
+ : BC_FPot(x, y, 0, -1, 1)
{
this->mwindow = mwindow;
this->gui = gui;
else if( h >= y2 ) {
float v = mwindow->get_float_auto(this, AUTOMATION_FADE)->get_value();
patchbay->add_subwindow(fade = new AFadePatch(this, x1+x, y1+y,
- patchbay->get_w() - 10, v));
+ patchbay->get_w() - xS(10), v));
}
y1 = y2;
}
else if( h >= y2 ) {
patchbay->add_subwindow(mix = new AMixPatch(mwindow, this, x1+x, y1+y+5));
- x1 += mix->get_w() + 10;
+ x1 += mix->get_w() + xS(10);
patchbay->add_subwindow(pan = new APanPatch(mwindow, this, x1+x, y1+y));
- x1 += pan->get_w() + 20;
+ x1 += pan->get_w() + xS(20);
patchbay->add_subwindow(nudge = new NudgePatch(mwindow, this, x1+x, y1+y,
- patchbay->get_w() - x1-x - 10));
+ patchbay->get_w() - x1-x - xS(10)));
}
y1 = y2;
}
AKeyFadePatch::AKeyFadePatch(MWindow *mwindow, APatchGUI *patch, int x, int y)
- : BC_SubWindow(x,y, 200,20, GWindowGUI::auto_colors[AUTOMATION_FADE])
+ : BC_SubWindow(x,y, xS(200),yS(20), GWindowGUI::auto_colors[AUTOMATION_FADE])
{
this->mwindow = mwindow;
this->patch = patch;
{
int x = 0, y = 0;
float v = mwindow->get_float_auto(patch, AUTOMATION_FADE)->get_value();
- add_subwindow(akey_fade_text = new AKeyFadeText(this, x, y, 64, v));
+ add_subwindow(akey_fade_text = new AKeyFadeText(this, x, y, xS(64), v));
x += akey_fade_text->get_w();
VFrame **lok_images = mwindow->theme->get_image_set("lok");
int w1 = get_w() - x - lok_images[0]->get_w();
AMeterPatch::AMeterPatch(MWindow *mwindow, APatchGUI *patch, int x, int y)
- : BC_Meter(x, y, METER_HORIZ, patch->patchbay->get_w() - 10,
+ : BC_Meter(x, y, METER_HORIZ, patch->patchbay->get_w() - xS(10),
mwindow->edl->session->min_meter_db, mwindow->edl->session->max_meter_db,
mwindow->edl->session->meter_format, 0, -1)
{
this->mwindow = mwindow;
this->patch = patch;
- set_delays(TRACKING_RATE * 10,
- TRACKING_RATE);
+ set_delays(TRACKING_RATE * 10, TRACKING_RATE);
}
int AMeterPatch::button_press_event()
void AppearancePrefs::create_objects()
{
+ int xs5 = xS(5), xs10 = xS(10), xs30 = xS(30);
+ int ys5 = yS(5), ys10 = yS(10), ys15 = yS(15);
+ int ys20 = yS(20), ys35 = yS(35);
BC_Resources *resources = BC_WindowBase::get_resources();
int margin = mwindow->theme->widget_border;
char string[BCTEXTLEN];
int x0 = mwindow->theme->preferencesoptions_x;
int y0 = mwindow->theme->preferencesoptions_y;
- int x = x0, y = y0, x1 = x + 100;
+ int x = x0, y = y0, x1 = x + xS(100);
add_subwindow(new BC_Title(x, y, _("Layout:"), LARGEFONT,
resources->text_default));
- y += 35;
+ y += ys35;
int y1 = y;
ViewTheme *theme;
add_subwindow(new BC_Title(x, y, _("Theme:")));
add_subwindow(theme = new ViewTheme(x1, y, pwindow));
theme->create_objects();
- y += theme->get_h() + 5;
+ y += theme->get_h() + ys5;
x = x0;
ViewPluginIcons *plugin_icons;
add_subwindow(new BC_Title(x, y, _("Plugin Icons:")));
add_subwindow(plugin_icons = new ViewPluginIcons(x1, y, pwindow));
plugin_icons->create_objects();
- y += plugin_icons->get_h() + 15;
+ y += plugin_icons->get_h() + ys15;
x1 = get_w()/2;
- int x2 = x1 + 160, y2 = y;
+ int x2 = x1 + xS(160), y2 = y;
y = y1;
add_subwindow(new BC_Title(x1, y, _("View thumbnail size:")));
thumbnail_size = new ViewThumbnailSize(pwindow, this, x2, y);
thumbnail_size->create_objects();
- y += thumbnail_size->get_h() + 5;
+ y += thumbnail_size->get_h() + ys5;
add_subwindow(new BC_Title(x1, y, _("Vicon quality:")));
vicon_size = new ViewViconSize(pwindow, this, x2, y);
vicon_size->create_objects();
- y += vicon_size->get_h() + 5;
+ y += vicon_size->get_h() + ys5;
add_subwindow(new BC_Title(x1, y, _("Vicon color mode:")));
add_subwindow(vicon_color_mode = new ViewViconColorMode(pwindow, x2, y));
vicon_color_mode->create_objects();
- y += vicon_color_mode->get_h() + 5;
+ y += vicon_color_mode->get_h() + ys5;
y = bmax(y, y2);
- y += 10;
- add_subwindow(new BC_Bar(5, y, get_w() - 10));
- y += 15;
+ y += ys10;
+ add_subwindow(new BC_Bar(xs5, y, get_w() - xs10));
+ y += ys15;
add_subwindow(new BC_Title(x, y, _("Time Format:"), LARGEFONT,
resources->text_default));
add_subwindow(new BC_Title(x1, y, _("Flags:"), LARGEFONT,
resources->text_default));
- y += get_text_height(LARGEFONT) + 5;
- y += 10;
+ y += get_text_height(LARGEFONT) + ys5;
+ y += ys10;
y1 = y;
add_subwindow(hms = new TimeFormatHMS(pwindow, this,
pwindow->thread->edl->session->time_format == TIME_HMS,
x, y));
- y += 20;
+ y += ys20;
add_subwindow(hmsf = new TimeFormatHMSF(pwindow, this,
pwindow->thread->edl->session->time_format == TIME_HMSF,
x, y));
- y += 20;
+ y += ys20;
add_subwindow(samples = new TimeFormatSamples(pwindow, this,
pwindow->thread->edl->session->time_format == TIME_SAMPLES,
x, y));
- y += 20;
+ y += ys20;
add_subwindow(hex = new TimeFormatHex(pwindow, this,
pwindow->thread->edl->session->time_format == TIME_SAMPLES_HEX,
x, y));
- y += 20;
+ y += ys20;
add_subwindow(frames = new TimeFormatFrames(pwindow, this,
pwindow->thread->edl->session->time_format == TIME_FRAMES,
x, y));
- y += 20;
+ y += ys20;
add_subwindow(feet = new TimeFormatFeet(pwindow, this,
pwindow->thread->edl->session->time_format == TIME_FEET_FRAMES,
x, y));
- x += feet->get_w() + 15;
+ x += feet->get_w() + xS(15);
BC_Title *title;
add_subwindow(title = new BC_Title(x, y, _("Frames per foot:")));
x += title->get_w() + margin;
sprintf(string, "%0.2f", pwindow->thread->edl->session->frames_per_foot);
add_subwindow(new TimeFormatFeetSetting(pwindow,
- x, y - 5, string));
+ x, y - ys5, string));
x = x0;
- y += 20;
+ y += ys20;
add_subwindow(seconds = new TimeFormatSeconds(pwindow, this,
pwindow->thread->edl->session->time_format == TIME_SECONDS,
x, y));
x = x0;
- y += 35;
- add_subwindow(new BC_Bar(5, y, get_w()/2 - 30));
- y += 15;
+ y += ys35;
+ add_subwindow(new BC_Bar(xs5, y, get_w()/2 - xs30));
+ y += ys15;
add_subwindow(new BC_Title(x, y, _("Color:"), LARGEFONT,
resources->text_default));
- y += 35;
+ y += ys35;
add_subwindow(title = new BC_Title(x, y, _("Highlighting Inversion color:")));
x += title->get_w() + margin;
char hex_color[BCSTRLEN];
sprintf(hex_color, "%06x", preferences->highlight_inverse);
add_subwindow(new HighlightInverseColor(pwindow, x, y, hex_color));
x2 = x; x = x0;
- y += 35;
+ y += ys35;
add_subwindow(title = new BC_Title(x, y, _("Composer BG Color:")));
int clr_color = pwindow->thread->edl->session->cwindow_clear_color;
int clr_alpha = pwindow->thread->edl->session->cwindow_clear_alpha;
add_subwindow(cwdw_bg_color = new Composer_BG_Color(pwindow,
- x2, y, 80, 24, clr_color, clr_alpha));
+ x2, y, xS(80), yS(24), clr_color, clr_alpha));
draw_3d_border(x2-2,y-2, 80+4,24+4, 1);
cwdw_bg_color->create_objects();
- y += 35;
+ y += ys35;
x = x0;
add_subwindow(title = new BC_Title(x, y, _("YUV color space:")));
x += title->get_w() + margin;
add_subwindow(yuv_color_space = new YuvColorSpace(x, y, pwindow));
yuv_color_space->create_objects();
- y += yuv_color_space->get_h() + 5;
+ y += yuv_color_space->get_h() + ys5;
x = x0;
add_subwindow(title = new BC_Title(x, y, _("YUV color range:")));
x += title->get_w() + margin;
add_subwindow(yuv_color_range = new YuvColorRange(x, y, pwindow));
yuv_color_range->create_objects();
- y += yuv_color_range->get_h() + 5;
+ y += yuv_color_range->get_h() + ys5;
UseTipWindow *tip_win = new UseTipWindow(pwindow, x1, y1);
add_subwindow(tip_win);
- y1 += tip_win->get_h() + 5;
+ y1 += tip_win->get_h() + ys5;
AutocolorAssets *autocolor_assets = new AutocolorAssets(pwindow, x1, y1);
add_subwindow(autocolor_assets);
- y1 += autocolor_assets->get_h() + 5;
+ y1 += autocolor_assets->get_h() + ys5;
UseWarnIndecies *idx_win = new UseWarnIndecies(pwindow, x1, y1);
add_subwindow(idx_win);
- y1 += idx_win->get_h() + 5;
+ y1 += idx_win->get_h() + ys5;
UseWarnVersion *ver_win = new UseWarnVersion(pwindow, x1, y1);
add_subwindow(ver_win);
- y1 += ver_win->get_h() + 5;
+ y1 += ver_win->get_h() + ys5;
BD_WarnRoot *bdwr_win = new BD_WarnRoot(pwindow, x1, y1);
add_subwindow(bdwr_win);
- y1 += bdwr_win->get_h() + 5;
+ y1 += bdwr_win->get_h() + ys5;
PopupMenuBtnup *pop_win = new PopupMenuBtnup(pwindow, x1, y1);
add_subwindow(pop_win);
- y1 += pop_win->get_h() + 5;
+ y1 += pop_win->get_h() + ys5;
GrabFocusPolicy *grab_input_focus = new GrabFocusPolicy(pwindow, x1, y1);
add_subwindow(grab_input_focus);
- y1 += grab_input_focus->get_h() + 5;
+ y1 += grab_input_focus->get_h() + ys5;
ActivateFocusPolicy *focus_activate = new ActivateFocusPolicy(pwindow, x1, y1);
add_subwindow(focus_activate);
- y1 += focus_activate->get_h() + 5;
+ y1 += focus_activate->get_h() + ys5;
DeactivateFocusPolicy *focus_deactivate = new DeactivateFocusPolicy(pwindow, x1, y1);
add_subwindow(focus_deactivate);
- y1 += focus_deactivate->get_h() + 5;
+ y1 += focus_deactivate->get_h() + ys5;
ForwardRenderDisplacement *displacement = new ForwardRenderDisplacement(pwindow, x1, y1);
add_subwindow(displacement);
- y1 += displacement->get_h() + 5;
+ y1 += displacement->get_h() + ys5;
add_subwindow(thumbnails = new ViewThumbnails(x1, y1, pwindow));
- y1 += thumbnails->get_h() + 5;
+ y1 += thumbnails->get_h() + ys5;
PerpetualSession *perpetual = new PerpetualSession(x1, y1, pwindow);
add_subwindow(perpetual);
- y1 += perpetual->get_h() + 5;
+ y1 += perpetual->get_h() + ys5;
CtrlToggle *ctrl_toggle = new CtrlToggle(x1, y1, pwindow);
add_subwindow(ctrl_toggle);
- y1 += ctrl_toggle->get_h() + 5;
+ y1 += ctrl_toggle->get_h() + ys5;
RectifyAudioToggle *rect_toggle = new RectifyAudioToggle(x1, y1, pwindow);
add_subwindow(rect_toggle);
- y1 += rect_toggle->get_h() + 5;
+ y1 += rect_toggle->get_h() + ys5;
if( y < y1 ) y = y1;
}
}
TimeFormatFeetSetting::TimeFormatFeetSetting(PreferencesWindow *pwindow, int x, int y, char *string)
- : BC_TextBox(x, y, 90, 1, string)
+ : BC_TextBox(x, y, xS(90), 1, string)
{ this->pwindow = pwindow; }
int TimeFormatFeetSetting::handle_event()
ViewTheme::ViewTheme(int x, int y, PreferencesWindow *pwindow)
- : BC_PopupMenu(x, y, 200, pwindow->thread->preferences->theme, 1)
+ : BC_PopupMenu(x, y, xS(200), pwindow->thread->preferences->theme, 1)
{
this->pwindow = pwindow;
}
ViewPluginIcons::ViewPluginIcons(int x, int y, PreferencesWindow *pwindow)
- : BC_PopupMenu(x, y, 200, pwindow->thread->preferences->plugin_icons, 1)
+ : BC_PopupMenu(x, y, xS(200), pwindow->thread->preferences->plugin_icons, 1)
{
this->pwindow = pwindow;
}
AppearancePrefs *aprefs, int x, int y)
: BC_TumbleTextBox(aprefs,
pwindow->thread->preferences->awindow_picon_h,
- 16, 512, x, y, 80)
+ 16, 512, x, y, xS(80))
{
this->pwindow = pwindow;
AppearancePrefs *aprefs, int x, int y)
: BC_TumbleTextBox(aprefs,
pwindow->thread->preferences->vicon_size,
- 16, 512, x, y, 80)
+ 16, 512, x, y, xS(80))
{
this->pwindow = pwindow;
}
ViewViconColorMode::ViewViconColorMode(PreferencesWindow *pwindow, int x, int y)
- : BC_PopupMenu(x, y, 100,
+ : BC_PopupMenu(x, y, xS(100),
_(vicon_color_modes[pwindow->thread->preferences->vicon_color_mode]), 1)
{
this->pwindow = pwindow;
}
HighlightInverseColor::HighlightInverseColor(PreferencesWindow *pwindow, int x, int y, const char *hex)
- : BC_TextBox(x, y, 80, 1, hex)
+ : BC_TextBox(x, y, xS(80), 1, hex)
{
this->pwindow = pwindow;
}
};
YuvColorSpace::YuvColorSpace(int x, int y, PreferencesWindow *pwindow)
- : BC_PopupMenu(x, y, 100,
+ : BC_PopupMenu(x, y, xS(100),
_(color_space[pwindow->thread->preferences->yuv_color_space]), 1)
{
this->pwindow = pwindow;
};
YuvColorRange::YuvColorRange(int x, int y, PreferencesWindow *pwindow)
- : BC_PopupMenu(x, y, 100,
+ : BC_PopupMenu(x, y, xS(100),
_(color_range[pwindow->thread->preferences->yuv_color_range]), 1)
{
this->pwindow = pwindow;
h += 42;
}
}
- return h;
+ return yS(h);
}
+#define AEW_W xS(450)
+
AssetEditWindow::AssetEditWindow(MWindow *mwindow, AssetEdit *asset_edit)
: BC_Window(_(PROGRAM_NAME ": Asset Info"),
- asset_edit->x - 450/2, asset_edit->y - asset_edit->window_height()/2,
- 450, asset_edit->window_height(), 0, 0, 1)
+ asset_edit->x - AEW_W/2, asset_edit->y - asset_edit->window_height()/2,
+ AEW_W, asset_edit->window_height(), 0, 0, 1)
{
this->mwindow = mwindow;
this->asset_edit = asset_edit;
void AssetEditWindow::create_objects()
{
- int y = 10, x = 10, x1 = 10, x2 = 190;
+ int xpad10 = xS(10);
+ int ypad5 = yS(5), ypad10 = yS(10), ypad20 = yS(20), ypad30 = yS(30);
+ int y = ypad10, x = xpad10, x1 = xpad10, x2 = xS(190);
char string[BCTEXTLEN];
- int vmargin;
FileSystem fs;
BC_Title *title;
Asset *asset = 0;
else
nested_edl = (EDL*)asset_edit->indexable;
- if( asset && asset->format == FILE_PCM )
- allow_edits = 1;
- else
- allow_edits = 0;
-
+ allow_edits = asset && asset->format == FILE_PCM ? 1 : 0;
+ int vmargin = yS(allow_edits ? 30 : 20);
lock_window("AssetEditWindow::create_objects");
- if( allow_edits )
- vmargin = 30;
- else
- vmargin = 20;
add_subwindow(path_text = new AssetEditPathText(this, y));
add_subwindow(path_button = new AssetEditPath(mwindow, this,
path_text, y, asset_edit->indexable->path,
_(PROGRAM_NAME ": Asset path"),
_("Select a file for this asset:")));
- y += 30;
+ y += yS(30);
if( asset ) {
add_subwindow(new BC_Title(x, y, _("File format:")));
MEDIUMFONT,
mwindow->theme->assetedit_color));
x = x1;
- y += 20;
+ y += ypad20;
int64_t bytes = fs.get_size(asset->path);
add_subwindow(new BC_Title(x, y, _("Bytes:")));
add_subwindow(new BC_Title(x2, y, string, MEDIUMFONT, mwindow->theme->assetedit_color));
if( asset->format == FILE_MPEG || asset->format == FILE_FFMPEG ) {
detail_dialog = new DetailAssetDialog(mwindow);
- BC_GenericButton *detail = new DetailAssetButton(this, x2+120, y);
+ BC_GenericButton *detail = new DetailAssetButton(this, x2+xS(120), y);
add_subwindow(detail);
}
- y += 20;
+ y += ypad20;
x = x1;
double length = 0.;
- y += 20;
+ y += ypad20;
x = x1;
if( asset->audio_length > 0 )
Units::punctuate(string);
add_subwindow(new BC_Title(x2, y, string, MEDIUMFONT, mwindow->theme->assetedit_color));
- y += 30;
+ y += ypad30;
x = x1;
}
if( (asset && asset->audio_data) || nested_edl ) {
add_subwindow(new BC_Bar(x, y, get_w() - x * 2));
- y += 5;
+ y += ypad5;
add_subwindow(new BC_Title(x, y, _("Audio:"), LARGEFONT, RED));
- y += 30;
+ y += ypad30;
if( asset ) {
if( asset->get_compression_text(1, 0) ) {
}
else {
add_subwindow(new BC_Title(x, y, string, MEDIUMFONT, mwindow->theme->assetedit_color));
- y += 20;
+ y += ypad20;
}
x = x1;
add_subwindow(new BC_Title(x, y, string, MEDIUMFONT, mwindow->theme->assetedit_color));
}
- y += 30;
+ y += ypad30;
x = x1;
if( asset ) {
x = x2;
add_subwindow(lohi = new AssetEditByteOrderLOHI(this,
- asset->byte_order,
- x,
- y));
- x += 70;
+ asset->byte_order, x, y));
+ x += xS(70);
add_subwindow(hilo = new AssetEditByteOrderHILO(this,
- !asset->byte_order,
- x,
- y));
+ !asset->byte_order, x, y));
y += vmargin;
}
else {
add_subwindow(new BC_Title(x, y, _("Values are signed")));
}
- y += 30;
+ y += ypad30;
}
}
x = x1;
if( (asset && asset->video_data) || nested_edl ) {
add_subwindow(new BC_Bar(x, y, get_w() - x * 2));
- y += 5;
+ y += ypad5;
add_subwindow(new BC_Title(x, y, _("Video:"), LARGEFONT, RED));
- y += 30;
+ y += ypad30;
x = x1;
if( asset ) {
BC_TextBox *framerate;
add_subwindow(framerate = new AssetEditFRate(this, string, x, y));
- x += 105;
+ x += framerate->get_w();
add_subwindow(new FrameRatePulldown(mwindow, framerate, x, y));
}
else {
add_subwindow(new BC_Title(x, y, string, MEDIUMFONT, mwindow->theme->assetedit_color));
}
- y += 30;
+ y += ypad30;
x = x1;
add_subwindow(new BC_Title(x, y, _("Width:")));
x = x2;
sprintf(string, "%d", asset_edit->changed_params->height);
win_height = new BC_Title(x, y, string, MEDIUMFONT, mwindow->theme->assetedit_color);
add_subwindow(win_height);
- y += win_height->get_h() + 5;
+ y += win_height->get_h() + ypad5;
if( asset && File::can_scale_input(asset) ) {
- y += 5;
+ y += ypad5;
x = x1;
add_subwindow(new BC_Title(x, y, _("Actual width:")));
x = x2;
sprintf(string, "%d", asset->actual_width);
add_subwindow(new BC_Title(x, y, string, MEDIUMFONT, mwindow->theme->assetedit_color));
- BC_GenericButton *resize = new ResizeAssetButton(this, x+64, y);
+ BC_GenericButton *resize = new ResizeAssetButton(this, x+xS(64), y);
add_subwindow(resize);
y += vmargin;
sprintf(string, "%d", asset->actual_height);
title = new BC_Title(x, y, string, MEDIUMFONT, mwindow->theme->assetedit_color);
add_subwindow(title);
- y += title->get_h() + 5;
+ y += title->get_h() + ypad5;
}
if( asset ) {
add_subwindow(title = new BC_Title(x1, y, _("Asset's interlacing:")));
ilacemode_to_text(string, asset->interlace_mode);
AssetEditILacemode *edit_ilace_mode;
- add_subwindow(edit_ilace_mode = new AssetEditILacemode(this, string, x2, y, 160));
+ add_subwindow(edit_ilace_mode = new AssetEditILacemode(this, string, x2, y, xS(160)));
add_subwindow(new AssetEditInterlacemodePulldown(mwindow, edit_ilace_mode,
&asset_edit->changed_params->interlace_mode,
(ArrayList<BC_ListBoxItem*>*)&mwindow->interlace_asset_modes,
char *text,
int x,
int y)
- : BC_TumbleTextBox(fwindow,
- (int)atol(text),
- (int)1,
- (int)MAXCHANNELS,
- x,
- y,
- 50)
+ : BC_TumbleTextBox(fwindow, (int)atol(text), (int)1,
+ (int)MAXCHANNELS, x, y, xS(50))
{
this->fwindow = fwindow;
}
}
AssetEditRate::AssetEditRate(AssetEditWindow *fwindow, char *text, int x, int y)
- : BC_TextBox(x, y, 100, 1, text)
+ : BC_TextBox(x, y, xS(100), 1, text)
{
this->fwindow = fwindow;
}
}
AssetEditFRate::AssetEditFRate(AssetEditWindow *fwindow, char *text, int x, int y)
- : BC_TextBox(x, y, 100, 1, text)
+ : BC_TextBox(x, y, xS(100), 1, text)
{
this->fwindow = fwindow;
}
AssetEditInterlacemodePulldown::AssetEditInterlacemodePulldown(MWindow *mwindow,
BC_TextBox *output_text, int *output_value,
ArrayList<BC_ListBoxItem*> *data, int x, int y)
- : BC_ListBox(x, y, 160, 80, LISTBOX_TEXT, data, 0, 0, 1, 0, 1)
+ : BC_ListBox(x, y, xS(160), yS(80), LISTBOX_TEXT, data, 0, 0, 1, 0, 1)
{
this->mwindow = mwindow;
this->output_text = output_text;
}
AssetEditHeader::AssetEditHeader(AssetEditWindow *fwindow, char *text, int x, int y)
- : BC_TextBox(x, y, 100, 1, text)
+ : BC_TextBox(x, y, xS(100), 1, text)
{
this->fwindow = fwindow;
}
AssetEditPathText::AssetEditPathText(AssetEditWindow *fwindow, int y)
- : BC_TextBox(5, y, 300, 1, fwindow->asset_edit->changed_params->path)
+ : BC_TextBox(5, y, xS(300), 1, fwindow->asset_edit->changed_params->path)
{
this->fwindow = fwindow;
}
AssetEditPath::AssetEditPath(MWindow *mwindow, AssetEditWindow *fwindow,
BC_TextBox *textbox, int y, const char *text,
const char *window_title, const char *window_caption)
- : BrowseButton(mwindow->theme, fwindow, textbox, 310, y, text,
+ : BrowseButton(mwindow->theme, fwindow, textbox, yS(310), y, text,
window_title, window_caption, 0)
{
this->fwindow = fwindow;
return 1;
}
+#define DTL_W xS(600)
+#define DTL_H yS(500)
+
DetailAssetWindow::DetailAssetWindow(MWindow *mwindow,
DetailAssetDialog *detail_dialog, Asset *asset)
: BC_Window(_("Asset Detail"),
- detail_dialog->x - 600/2, detail_dialog->y - 500/2, 600, 500)
+ detail_dialog->x - DTL_W/2, detail_dialog->y - DTL_H/2, DTL_W, DTL_H)
{
this->mwindow = mwindow;
this->detail_dialog = detail_dialog;
void DetailAssetWindow::create_objects()
{
- int y = 10, x = 10;
+ int y = yS(10), x = xS(10);
char file_name[BCTEXTLEN];
int len = sizeof(info);
strncpy(info,_("no info available"),len);
}
}
lock_window("DetailAssetWindow::create_objects");
- text = new BC_ScrollTextBox(this, x, y, get_w()-32, 23, info, -len);
+ int text_h = get_h()-y - BC_OKButton::calculate_h() - yS(15);
+ int lines = BC_TextBox::pixels_to_rows(this, MEDIUMFONT, text_h);
+ text = new BC_ScrollTextBox(this, x, y, get_w()-xS(32), lines, info, -len);
text->create_objects(); text->set_text_row(0);
add_subwindow(new BC_OKButton(this));
show_window();
popup->gui->get_abs_cursor(cur_x, cur_y);
int n = mwindow->session->drag_assets->size();
if( n > 0 ) {
+ int xs30 = xS(30), ys30 = yS(30);
for( int i=0; i<n; ++i ) {
AssetEdit *asset_edit = mwindow->awindow->get_asset_editor();
asset_edit->edit_asset(
- mwindow->session->drag_assets->values[i], cur_x-30*i, cur_y-30*i);
+ mwindow->session->drag_assets->values[i], cur_x-xs30*i, cur_y-ys30*i);
}
}
else if( mwindow->session->drag_clips->size() ) {
copy_window = 0;
}
+#define ACW_W xS(500)
+#define ACW_H yS(200)
AssetCopyWindow::AssetCopyWindow(AssetCopyDialog *copy_dialog)
: BC_Window(_(PROGRAM_NAME ": Copy File List"),
- copy_dialog->x - 500/2, copy_dialog->y - 200/2,
- 500, 200, 500, 200, 1, 0, 1)
+ copy_dialog->x - ACW_W/2, copy_dialog->y - ACW_H/2,
+ ACW_W, ACW_H, ACW_W, ACW_H, 1, 0, 1)
{
this->copy_dialog = copy_dialog;
}
{
lock_window("AssetCopyWindow::create_objects");
BC_Title *title;
- int x = 10, y = 10, pad = 5;
+ int xs10 = xS(10);
+ int ys5 = yS(5), ys10 = yS(10);
+ int x = xs10, y = ys10;
add_subwindow(title = new BC_Title(x, y, _("List of asset paths:")));
- y += title->get_h() + pad;
+ y += title->get_h() + ys5;
int text_w = get_w() - x - 10;
- int text_h = get_h() - y - BC_OKButton::calculate_h() - pad;
+ int text_h = get_h() - y - BC_OKButton::calculate_h() - ys5;
int text_rows = BC_TextBox::pixels_to_rows(this, MEDIUMFONT, text_h);
char *text = copy_dialog->text;
int len = strlen(text) + BCTEXTLEN;
int AssetCopyWindow::resize_event(int w, int h)
{
- int fx = file_list->get_x(), fy = file_list->get_y(), pad = 5;
- int text_w = w - fx - 10;
- int text_h = h - fy - BC_OKButton::calculate_h() - pad;
+ int fx = file_list->get_x(), fy = file_list->get_y();
+ int text_w = w - fx - xS(10);
+ int text_h = h - fy - BC_OKButton::calculate_h() - yS(5);
int text_rows = BC_TextBox::pixels_to_rows(this, MEDIUMFONT, text_h);
file_list->reposition_window(fx, fy, text_w, text_rows);
return 0;
BC_DialogThread::start();
}
+#define APW_W xS(500)
+#define APW_H yS(200)
+
AssetPasteWindow::AssetPasteWindow(AssetPasteDialog *paste_dialog)
: BC_Window(_(PROGRAM_NAME ": Paste File List"),
- paste_dialog->x - 500/2, paste_dialog->y - 200/2,
- 500, 200, 500, 200, 1, 0, 1)
+ paste_dialog->x - APW_W/2, paste_dialog->y - APW_H/2,
+ APW_W, APW_H, APW_W, APW_H, 1, 0, 1)
{
this->paste_dialog = paste_dialog;
}
{
lock_window("AssetPasteWindow::create_objects()");
BC_Title *title;
- int x = 10, y = 10, pad = 5;
+ int xs10 = xS(10);
+ int ys5 = yS(5), ys10 = yS(10);
+ int x = xs10, y = ys10;
add_subwindow(title = new BC_Title(x, y, _("Enter list of asset paths:")));
- y += title->get_h() + pad;
- int text_w = get_w() - x - 10;
- int text_h = get_h() - y - BC_OKButton::calculate_h() - pad;
+ y += title->get_h() + ys5;
+ int text_w = get_w() - x - xs10;
+ int text_h = get_h() - y - BC_OKButton::calculate_h() - ys5;
int text_rows = BC_TextBox::pixels_to_rows(this, MEDIUMFONT, text_h);
file_list = new BC_ScrollTextBox(this, x, y, text_w, text_rows, (char*)0, 65536);
file_list->create_objects();
int AssetPasteWindow::resize_event(int w, int h)
{
- int fx = file_list->get_x(), fy = file_list->get_y(), pad = 5;
- int text_w = w - fx - 10;
- int text_h = h - fy - BC_OKButton::calculate_h() - pad;
+ int fx = file_list->get_x(), fy = file_list->get_y();
+ int text_w = w - fx - xS(10);
+ int text_h = h - fy - BC_OKButton::calculate_h() - yS(5);
int text_rows = BC_TextBox::pixels_to_rows(this, MEDIUMFONT, text_h);
file_list->reposition_window(fx, fy, text_w, text_rows);
return 0;
: BC_Window(_(PROGRAM_NAME ": Remove assets"),
mwindow->gui->get_abs_cursor_x(1),
mwindow->gui->get_abs_cursor_y(1),
- 320,
- 400,
- -1,
- -1,
- 0,
- 0,
- 1)
+ xS(320), yS(400), -1, -1, 0, 0, 1)
{
this->mwindow = mwindow;
data = 0;
void AssetRemoveWindow::create_objects()
{
- int x = 10, y = 10;
+ int x = xS(10), y = yS(10);
int margin = mwindow->theme->widget_border;
data = new ArrayList<BC_ListBoxItem*>;
this->autos = 0;
position = 0;
skip = 0;
- WIDTH = 10;
- HEIGHT = 10;
+ WIDTH = xS(10);
+ HEIGHT = yS(10);
is_default = 0;
}
this->autos = autos;
position = 0;
skip = 0;
- WIDTH = 10;
- HEIGHT = 10;
+ WIDTH = xS(10);
+ HEIGHT = yS(10);
is_default = 0;
}
window->add_subwindow(end_button = new AVC1394GUISeekEnd(mwindow, avc, x, y));
x += end_button->get_w();
- x_end = x + 10;
+ x_end = x + xS(10);
}
x += fforward_button->get_w();
end_button->reposition_window(x, y);
- x_end = x + 10;
+ x_end = x + xS(10);
}
: BC_Window(_(PROGRAM_NAME ": Resources"),
mwindow->session->awindow_x, mwindow->session->awindow_y,
mwindow->session->awindow_w, mwindow->session->awindow_h,
- 100, 100, 1, 1, 1)
+ xS(100), yS(100), 1, 1, 1)
{
this->mwindow = mwindow;
this->awindow = awindow;
void AWindowGUI::create_objects()
{
+ int ys5 = yS(5), ys10 = yS(10);
lock_window("AWindowGUI::create_objects");
asset_titles[0] = C_("Title");
asset_titles[1] = _("Comments");
int x1 = mwindow->theme->alist_x, y1 = mwindow->theme->alist_y;
int w1 = mwindow->theme->alist_w, h1 = mwindow->theme->alist_h;
- search_text = new AWindowSearchText(mwindow, this, x1, y1+5);
+ search_text = new AWindowSearchText(mwindow, this, x1, y1+ys5);
search_text->create_objects();
- int dy = search_text->get_h() + 10;
+ int dy = search_text->get_h() + ys10;
y1 += dy; h1 -= dy;
add_subwindow(asset_list = new AWindowAssets(mwindow, this, x1, y1, w1, h1));
int nw = get_text_width(MEDIUMFONT, _(av_names[i]));
if( tw < nw ) tw = nw;
}
- int pw = BC_PopupMenu::calculate_w(16, tw, 1);
+ int pw = BC_PopupMenu::calculate_w(xS(16), tw, 1);
const char *text = _(AVIconDrawing::avicon_names[vicon_drawing]);
add_subwindow(avicon_drawing = new AVIconDrawing(this, fw, fy, pw, text));
avicon_drawing->create_objects();
void AWindowGUI::reposition_objects()
{
+ int ys5 = yS(5), ys10 = yS(10);
int x1 = mwindow->theme->alist_x, y1 = mwindow->theme->alist_y;
int w1 = mwindow->theme->alist_w, h1 = mwindow->theme->alist_h;
- search_text->reposition_window(x1, y1+5, w1);
- int dy = search_text->get_h() + 10;
+ search_text->reposition_window(x1, y1+ys5, w1);
+ int dy = search_text->get_h() + ys10;
y1 += dy; h1 -= dy;
asset_list->reposition_window(x1, y1, w1, h1);
divider->reposition_window(
AWindowRemovePluginGUI::
AWindowRemovePluginGUI(AWindow *awindow, AWindowRemovePlugin *thread,
int x, int y, PluginServer *plugin)
- : BC_Window(_(PROGRAM_NAME ": Remove plugin"), x,y, 500,200, 50, 50, 1, 0, 1, -1, "", 1)
+ : BC_Window(_(PROGRAM_NAME ": Remove plugin"), x,y,
+ xS(500),yS(200), xS(50), yS(50),
+ 1, 0, 1, -1, "", 1)
{
this->awindow = awindow;
this->thread = thread;
void AWindowRemovePluginGUI::create_objects()
{
+ int xs10 = xS(10), xs20 = xS(20);
+ int ys5 = yS(5), ys10 = yS(10);
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);
add_subwindow(cancel_button);
- int x = 10, y = 10;
+ int x = xs10, y = ys10;
BC_Title *title = new BC_Title(x, y, _("remove plugin?"));
add_subwindow(title);
- y += title->get_h() + 5;
+ y += title->get_h() + ys5;
list = new BC_ListBox(x, y,
- get_w() - 20, ok_button->get_y() - y - 5, LISTBOX_TEXT, &plugin_list,
+ get_w() - xs20, ok_button->get_y() - y - ys5, LISTBOX_TEXT, &plugin_list,
0, 0, 1, 0, 0, LISTBOX_SINGLE, ICON_LEFT, 0);
add_subwindow(list);
show_window();
int AWindowDivider::cursor_motion_event()
{
if( mwindow->session->current_operation == DRAG_PARTITION ) {
- int wmin = 25;
+ int wmin = xS(25);
int wmax = mwindow->session->awindow_w - mwindow->theme->adivider_w - wmin;
int fw = gui->get_relative_cursor_x();
if( fw > wmax ) fw = wmax;
set_font(LARGEFONT);
int folder = mwindow->edl->session->awindow_folder;
const char *title = mwindow->edl->get_folder_name(folder);
- draw_text(get_w() - get_text_width(LARGEFONT, title) - 4, 30,
+ draw_text(get_w() - get_text_width(LARGEFONT, title) - xS(4), yS(30),
title, -1, get_bg_surface());
}
void AWindowAssets::show_tip_info(const char *info, int no)
{
- int margin = 28;
int tw = get_text_width(MEDIUMFONT, info) + TOOLTIP_MARGIN * 2;
int th = get_text_height(MEDIUMFONT, info) + TOOLTIP_MARGIN * 2;
- int tx = get_w() - (tw + margin);
- int ty = get_h() - (th + margin);
+ int tx = get_w() - (tw + xS(28));
+ int ty = get_h() - (th + yS(28));
show_tooltip(info, tx, ty, tw, th);
info_tip = no;
}
void AWindowSearchText::create_objects()
{
- int x1 = x, y1 = y, margin = 10;
+ int xs10 = xS(10);
+ int x1 = x, y1 = y;
gui->add_subwindow(text_title = new BC_Title(x1, y1, _("Search:")));
- x1 += text_title->get_w() + margin;
- int w1 = gui->get_w() - x1 - 2*margin;
+ x1 += text_title->get_w() + xs10;
+ int w1 = gui->get_w() - x1 - 2*xs10;
gui->add_subwindow(text_box = new AWindowSearchTextBox(this, x1, y1, w1));
}
int AWindowSearchText::get_w()
{
- return text_box->get_w() + text_title->get_w() + 10;
+ return text_box->get_w() + text_title->get_w() + xS(10);
}
int AWindowSearchText::get_h()
void AWindowSearchText::reposition_window(int x, int y, int w)
{
- int x1 = x, y1 = y, margin = 10;
+ int xs10 = xS(10);
+ int x1 = x, y1 = y;
text_title->reposition_window(x1, y1);
- x1 += text_title->get_w() + margin;
- int w1 = gui->get_w() - x1 - 2*margin;
+ x1 += text_title->get_w() + xs10;
+ int w1 = gui->get_w() - x1 - 2*xs10;
text_box->reposition_window(x1, y1, w1);
}
for( int i = 0; i < BATCHRENDER_COLUMNS; i++ ) {
char string[BCTEXTLEN];
sprintf(string, "BATCHRENDER_COLUMN%d", i);
- list_width[i] = defaults->get(string, column_widths[i]);
+ list_width[i] = defaults->get(string, xS(column_widths[i]));
}
}
BatchRenderGUI::BatchRenderGUI(MWindow *mwindow,
BatchRenderThread *thread, int x, int y, int w, int h)
: BC_Window(_(PROGRAM_NAME ": Batch Render"),
- x, y, w, h, 730, 400, 1, 0, 1)
+ x, y, w, h, xS(730), yS(400), 1, 0, 1)
{
this->mwindow = mwindow;
this->thread = thread;
void BatchRenderGUI::create_objects()
{
+ int xs10 = xS(10), xs30 = xS(30), xs40 = xS(40);
+ int ys5 = yS(5), ys10 = yS(10), ys15 = yS(15);
lock_window("BatchRenderGUI::create_objects");
mwindow->theme->get_batchrender_sizes(this, get_w(), get_h());
create_list(0);
int x = mwindow->theme->batchrender_x1;
- int y = 5;
- int x1 = x, x2 = get_w()/2 + 30; // mwindow->theme->batchrender_x2;
- int y1 = 5, y2 = 5;
+ int y = ys5;
+ int x1 = x, x2 = get_w()/2 + xs30; // mwindow->theme->batchrender_x2;
+ int y1 = ys5, y2 = ys5;
// output file
add_subwindow(output_path_title = new BC_Title(x1, y1, _("Output path:")));
y1 += output_path_title->get_h() + mwindow->theme->widget_border;
format_tools = new BatchFormat(mwindow, this, thread->get_current_asset());
- format_tools->set_w(x2 - 40);
+ format_tools->set_w(x2 - xs40);
BatchRenderJob *current_job = thread->get_current_job();
format_tools->create_objects(x1, y1, 1, 1, 1, 1, 0, 1, 0, 0,
thread->do_labeled ? ¤t_job->labeled : 0, 0);
use_renderfarm = new BatchRenderUseFarm(thread, x1, y1,
¤t_job->farmed);
add_subwindow(use_renderfarm);
- y1 += use_renderfarm->get_h() + 10;
+ y1 += use_renderfarm->get_h() + ys10;
if( thread->do_farmed < 0 )
use_renderfarm->disable();
}
x = x2; y = y2;
add_subwindow(edl_path_text = new BatchRenderEDLPath( thread,
- x, y, get_w()-x - 40, thread->get_current_edl()));
+ x, y, get_w()-x - xs40, thread->get_current_edl()));
x = x2 + edl_path_text->get_w();
add_subwindow(edl_path_browse = new BrowseButton(
mwindow->theme, this, edl_path_text, x, y, thread->get_current_edl(),
add_subwindow(batch_path = new BC_Title(x1, y, thread->batch_path, MEDIUMFONT));
y += list_title->get_h() + mwindow->theme->widget_border;
y1 = get_h();
- y1 -= 15 + BC_GenericButton::calculate_h() + mwindow->theme->widget_border;
+ y1 -= ys15 + BC_GenericButton::calculate_h() + mwindow->theme->widget_border;
add_subwindow(batch_list = new BatchRenderList(thread, x, y,
- get_w() - x - 10, y1 - y));
+ get_w() - x - xs10, y1 - y));
y += batch_list->get_h() + mwindow->theme->widget_border;
add_subwindow(start_button = new BatchRenderStart(thread, x, y));
x = get_w() / 2 - BC_GenericButton::calculate_w(this, _("Stop")) / 2;
add_subwindow(stop_button = new BatchRenderStop(thread, x, y));
- x = get_w() - BC_GenericButton::calculate_w(this, _("Close")) - 10;
+ x = get_w() - BC_GenericButton::calculate_w(this, _("Close")) - xs10;
add_subwindow(cancel_button = new BatchRenderCancel(thread, x, y));
show_window(1);
int BatchRenderGUI::resize_event(int w, int h)
{
+ int xs10 = xS(10), xs40 = xS(40);
+ int ys5 = yS(5), ys15 = yS(15);
mwindow->session->batchrender_w = w;
mwindow->session->batchrender_h = h;
mwindow->theme->get_batchrender_sizes(this, w, h);
int x = mwindow->theme->batchrender_x1;
- int y = 5;
- int x1 = x, x2 = get_w()/2 + 10; // mwindow->theme->batchrender_x2;
- int y1 = 5, y2 = 5;
+ int y = ys5;
+ int x1 = x, x2 = get_w()/2 + xs10; // mwindow->theme->batchrender_x2;
+ int y1 = ys5, y2 = ys5;
// output file
output_path_title->reposition_window(x1, y1);
x = x2, y = y2;
edl_path_title->reposition_window(x, y);
y += edl_path_title->get_h() + mwindow->theme->widget_border;
- edl_path_text->reposition_window(x, y, w - x - 40);
+ edl_path_text->reposition_window(x, y, w - x - xs40);
x += edl_path_text->get_w();
edl_path_browse->reposition_window(x, y);
y2 = y + edl_path_browse->get_h() + mwindow->theme->widget_border;
y += loadlist_batch->get_h() + mwindow->theme->widget_border;
warning->reposition_window(x2, y);
- y1 = 15 + BC_GenericButton::calculate_h() + mwindow->theme->widget_border;
+ y1 = ys15 + BC_GenericButton::calculate_h() + mwindow->theme->widget_border;
y2 = get_h() - y1 - batch_list->get_h();
y2 -= list_title->get_h() + mwindow->theme->widget_border;
x = mwindow->theme->batchrender_x1; y = y2;
list_title->reposition_window(x, y);
y += list_title->get_h() + mwindow->theme->widget_border;
- batch_list->reposition_window(x, y, w - x - 10, h - y - y1);
+ batch_list->reposition_window(x, y, w - x - xs10, h - y - y1);
y += batch_list->get_h() + mwindow->theme->widget_border;
start_button->reposition_window(x, y);
x = w / 2 - stop_button->get_w() / 2;
stop_button->reposition_window(x, y);
- x = w - cancel_button->get_w() - 10;
+ x = w - cancel_button->get_w() - xs10;
cancel_button->reposition_window(x, y);
return 1;
}
char default_path[BCTEXTLEN];
sprintf(default_path, "~");
thread->mwindow->defaults->get("DEFAULT_BATCHLOADPATH", default_path);
- BC_FileBox filewindow(100, 100, default_path, _("Save Batch Render List"),
+ BC_FileBox filewindow(xS(100), yS(100), default_path,
+ _("Save Batch Render List"),
_("Enter a Batch Render filename to save as:"),
0, 0, 0, 0);
gui = &filewindow;
char default_path[BCTEXTLEN];
sprintf(default_path, "~");
thread->mwindow->defaults->get("DEFAULT_BATCHLOADPATH", default_path);
- BC_FileBox filewindow(100, 100, default_path, _("Load Batch Render List"),
+ BC_FileBox filewindow(xS(100), yS(100), default_path, _("Load Batch Render List"),
_("Enter a Batch Render filename to load from:"),
0, 0, 0, 0);
gui = &filewindow;
int scr_x = mwindow->gui->get_screen_x(0, -1);
int scr_w = mwindow->gui->get_screen_w(0, -1);
int scr_h = mwindow->gui->get_screen_h(0, -1);
- int w = 500, h = 290;
+ int w = xS(500), h = yS(290);
int x = scr_x + scr_w/2 - w/2, y = scr_h/2 - h/2;
gui = new CreateBD_GUI(this, x, y, w, h);
CreateBD_GUI::CreateBD_GUI(CreateBD_Thread *thread, int x, int y, int w, int h)
- : BC_Window(_(PROGRAM_NAME ": Create BD"), x, y, w, h, 50, 50, 1, 0, 1)
+ : BC_Window(_(PROGRAM_NAME ": Create BD"), x, y, w, h, xS(50), yS(50), 1, 0, 1)
{
this->thread = thread;
at_x = at_y = tmp_x = tmp_y = 0;
void CreateBD_GUI::create_objects()
{
+ int xs10 = xS(10), xs30 = xS(30), xs35 = xS(35);
+ int xs160 = xS(160), xs170 = xS(170);
+ int ys5 = yS(5), ys10 = yS(10);
lock_window("CreateBD_GUI::create_objects");
- int pady = BC_TextBox::calculate_h(this, MEDIUMFONT, 0, 1) + 5;
+ int pady = BC_TextBox::calculate_h(this, MEDIUMFONT, 0, 1) + ys5;
int padx = BC_Title::calculate_w(this, (char*)"X", MEDIUMFONT);
int x = padx/2, y = pady/2;
BC_Title *title = new BC_Title(x, y, _("Title:"), MEDIUMFONT, YELLOW);
add_subwindow(title);
at_x = x + title->get_w(); at_y = y;
- asset_title = new CreateBD_AssetTitle(this, at_x, at_y, get_w()-at_x-10);
+ asset_title = new CreateBD_AssetTitle(this, at_x, at_y, get_w()-at_x-xs10);
add_subwindow(asset_title);
y += title->get_h() + pady/2;
title = new BC_Title(x, y, _("Work path:"), MEDIUMFONT, YELLOW);
add_subwindow(title);
tmp_x = x + title->get_w(); tmp_y = y;
- tmp_path = new CreateBD_TmpPath(this, tmp_x, tmp_y, get_w()-tmp_x-35);
+ tmp_path = new CreateBD_TmpPath(this, tmp_x, tmp_y, get_w()-tmp_x-xs35);
add_subwindow(tmp_path);
btmp_path = new BrowseButton(thread->mwindow->theme, this, tmp_path,
tmp_x+tmp_path->get_w(), tmp_y, "/tmp",
y += title->get_h() + pady/2;
disk_space = new CreateBD_DiskSpace(this, x, y);
add_subwindow(disk_space);
- int x0 = get_w() - 170;
+ int x0 = get_w() - xs170;
title = new BC_Title(x0, y, _("Media:"), MEDIUMFONT, YELLOW);
add_subwindow(title);
int x1 = x0+title->get_w()+padx;
add_subwindow(standard);
standard->create_objects();
standard->set_text(bd_formats[thread->use_standard].name);
- x0 -= 30;
+ x0 -= xs30;
title = new BC_Title(x0, y, _("Scale:"), MEDIUMFONT, YELLOW);
add_subwindow(title);
x1 = x0+title->get_w()+padx;
need_histogram = new CreateBD_Histogram(this, x1, y);
add_subwindow(need_histogram);
y += need_histogram->get_h() + pady/2;
- non_standard = new BC_Title(x1, y+5, "", MEDIUMFONT, RED);
+ non_standard = new BC_Title(x1, y+ys5, "", MEDIUMFONT, RED);
add_subwindow(non_standard);
- x1 += 160; y = y1;
+ x1 += xs160; y = y1;
need_inverse_telecine = new CreateBD_InverseTelecine(this, x1, y);
add_subwindow(need_inverse_telecine);
y += need_inverse_telecine->get_h() + pady/2;
y += need_wide_audio->get_h() + pady/2;
need_resize_tracks = new CreateBD_ResizeTracks(this, x1, y);
add_subwindow(need_resize_tracks);
- x1 += 160; y = y1;
+ x1 += xs160; y = y1;
need_labeled = new CreateBD_LabelChapters(this, x1, y);
add_subwindow(need_labeled);
y += need_labeled->get_h() + pady/2;
add_subwindow(need_farmed);
ok_w = BC_OKButton::calculate_w();
ok_h = BC_OKButton::calculate_h();
- ok_x = 10;
- ok_y = get_h() - ok_h - 10;
+ ok_x = xs10;
+ ok_y = get_h() - ok_h - xs10;
ok = new CreateBD_OK(this, ok_x, ok_y);
add_subwindow(ok);
cancel_w = BC_CancelButton::calculate_w();
cancel_h = BC_CancelButton::calculate_h();
- cancel_x = get_w() - cancel_w - 10,
- cancel_y = get_h() - cancel_h - 10;
+ cancel_x = get_w() - cancel_w - xs10,
+ cancel_y = get_h() - cancel_h - ys10;
cancel = new CreateBD_Cancel(this, cancel_x, cancel_y);
add_subwindow(cancel);
show_window();
int CreateBD_GUI::resize_event(int w, int h)
{
- asset_title->reposition_window(at_x, at_y, get_w()-at_x-10);
- tmp_path->reposition_window(tmp_x, tmp_y, get_w()-tmp_x-35);
+ int xs10 = xS(10), xs35 = xS(35);
+ int ys10 = yS(10);
+ asset_title->reposition_window(at_x, at_y, get_w()-at_x-xs10);
+ tmp_path->reposition_window(tmp_x, tmp_y, get_w()-tmp_x-xs35);
btmp_path->reposition_window(tmp_x+tmp_path->get_w(), tmp_y);
- ok_y = h - ok_h - 10;
+ ok_y = h - ok_h - ys10;
ok->reposition_window(ok_x, ok_y);
- cancel_x = w - cancel_w - 10,
- cancel_y = h - cancel_h - 10;
+ cancel_x = w - cancel_w - xs10,
+ cancel_y = h - cancel_h - ys10;
cancel->reposition_window(cancel_x, cancel_y);
return 0;
}
CreateBD_Format::CreateBD_Format(CreateBD_GUI *gui, int x, int y)
- : BC_PopupMenu(x, y, 180, bd_formats[gui->thread->use_standard].name, 1)
+ : BC_PopupMenu(x, y, xS(180), bd_formats[gui->thread->use_standard].name, 1)
{
this->gui = gui;
}
CreateBD_Scale::CreateBD_Scale(CreateBD_GUI *gui, int x, int y)
- : BC_PopupMenu(x, y, 100, "", 1)
+ : BC_PopupMenu(x, y, xS(100), "", 1)
{
this->gui = gui;
}
CreateBD_MediaSize::CreateBD_MediaSize(CreateBD_GUI *gui, int x, int y)
- : BC_PopupTextBox(gui, 0, 0, x, y, 70,50)
+ : BC_PopupTextBox(gui, 0, 0, x, y, xS(70),yS(50))
{
this->gui = gui;
}
{
delete [] text;
}
-
+
void BinFolderTargetPatterns::save_xml(FileXML *file) {}
void BinFolderTargetPatterns::load_xml(FileXML *file) {}
list_titles[FOLDER_COLUMN_TARGET] = _("Target");
list_titles[FOLDER_COLUMN_OP] = _("Op");
list_titles[FOLDER_COLUMN_VALUE] = _("Value");
- list_width[FOLDER_COLUMN_ENABLE] = 80;
- list_width[FOLDER_COLUMN_TARGET] = 80;
- list_width[FOLDER_COLUMN_OP] = 50;
- list_width[FOLDER_COLUMN_VALUE] = 180;
+ list_width[FOLDER_COLUMN_ENABLE] = xS(80);
+ list_width[FOLDER_COLUMN_TARGET] = xS(80);
+ list_width[FOLDER_COLUMN_OP] = xS(50);
+ list_width[FOLDER_COLUMN_VALUE] = xS(180);
load_defaults(mwindow->defaults);
create_list();
add_subwindow(enabled_popup = new BinFolderEnabledPopup(this));
break;
case FOLDER_COLUMN_VALUE: {
modify_target->close_window();
- int cw = filter->target->type == FOLDER_TARGET_PATTERNS ? 400 : 320;
- int ch = filter->target->type == FOLDER_TARGET_PATTERNS ? 300 : 120;
+ int cw = xS(filter->target->type == FOLDER_TARGET_PATTERNS ? 400 : 320);
+ int ch = yS(filter->target->type == FOLDER_TARGET_PATTERNS ? 300 : 120);
int cx, cy; get_abs_cursor(cx, cy);
- if( (cx-=cw/2) < 50 ) cx = 50;
- if( (cy-=ch/2) < 50 ) cy = 50;
+ if( (cx-=cw/2) < xS(50) ) cx = xS(50);
+ if( (cy-=ch/2) < yS(50) ) cy = yS(50);
modify_target->start(filter->target, cx, cy, cw, ch);
break; }
}
NewFolderGUI::NewFolderGUI(NewFolderThread *thread, int x, int y, int w, int h)
: BC_Window(_(PROGRAM_NAME ": New folder"),
- x, y, w, h, -1, -1, 0, 0, 1)
+ x, y, xS(w), yS(h), -1, -1, 0, 0, 1)
{
this->thread = thread;
}
void NewFolderGUI::create_objects()
{
+ int xs10 = xS(10);
+ int ys5 = yS(5), ys10 = yS(10);
lock_window("NewFolderGUI::create_objects");
- int x = 10, y = 10;
+ int x = xs10, y = ys10;
BC_Title *title;
add_subwindow(title = new BC_Title(x, y, _("Folder name:")));
- y += title->get_h() + 5;
+ y += title->get_h() + ys5;
const char *text = !thread->is_clips ? _("media bin") : _("clip bin");
- add_subwindow(text_box = new BC_TextBox(x, y, 300, 1, text));
+ add_subwindow(text_box = new BC_TextBox(x, y, xS(300), 1, text));
add_subwindow(new BC_OKButton(this));
add_subwindow(new BC_CancelButton(this));
show_window();
}
ModifyFolderGUI::ModifyFolderGUI(ModifyFolderThread *thread, int x, int y, int w, int h)
- : BC_Window(_(PROGRAM_NAME ": Modify folder"), x, y, w, h, 320, 200, 1, 0, 1)
+ : BC_Window(_(PROGRAM_NAME ": Modify folder"), x, y, w, h, xS(320), yS(200), 1, 0, 1)
{
this->thread = thread;
}
void ModifyFolderGUI::create_objects()
{
+ int xs10 = xS(10), xs15 = xS(15);
+ int ys10 = yS(10), ys30 = yS(30);
lock_window("ModifyFolderGUI::create_objects");
modify_folder_xatom = create_xatom("CWINDOWGUI_UPDATE_FILTERS");
- int x = 10, y = 10;
+ int x = xs10, y = ys10;
BC_Title *title;
add_subwindow(title = new BC_Title(x, y, _("Enter the name of the folder:")));
const char *text = !thread->folder->is_clips ? _("Media") : _("Clips");
int tw = BC_Title::calculate_w(this, text, LARGEFONT);
- int x0 = get_w() - 50 - tw;
+ int x0 = get_w() - xS(50) - tw;
add_subwindow(text_title = new BC_Title(x0, y, text, LARGEFONT, YELLOW));
- y += title->get_h() + 10;
- add_subwindow(text_box = new BC_TextBox(x, y, 300, 1, thread->folder->title));
- y += text_box->get_h() + 10;
- int lh = get_h() - y - BC_OKButton::calculate_h() - 30;
- int lw = get_w() - x - 160;
+ y += title->get_h() + ys10;
+ add_subwindow(text_box = new BC_TextBox(x, y, xS(300), 1, thread->folder->title));
+ y += text_box->get_h() + ys10;
+ int lh = get_h() - y - BC_OKButton::calculate_h() - ys30;
+ int lw = get_w() - x - xS(160);
add_subwindow(folder_list =
new BinFolderList(thread->folder, thread->agui->mwindow, this, x, y, lw, lh));
folder_list->create_objects();
- int x1 = x + folder_list->get_w() + 15, y1 = y;
+ int x1 = x + folder_list->get_w() + xs15, y1 = y;
add_subwindow(add_filter = new BinFolderAddFilter(folder_list, x1, y1));
- y1 += add_filter->get_h() + 10;
+ y1 += add_filter->get_h() + ys10;
add_subwindow(del_filter = new BinFolderDelFilter(folder_list, x1, y1));
- y1 += del_filter->get_h() + 10;
+ y1 += del_filter->get_h() + ys10;
add_subwindow(apply_filter = new BinFolderApplyFilter(folder_list, x1, y1));
add_subwindow(ok_button = new BC_OKButton(this));
add_subwindow(cancel_button = new BC_CancelButton(this));
text_title->reposition_window(tx, ty);
int lx = folder_list->get_x();
int ly = folder_list->get_y();
- int lh = h - ly - BC_OKButton::calculate_h() - 30;
- int lw = w - lx - 160;
+ int lh = h - ly - BC_OKButton::calculate_h() - yS(30);
+ int lw = w - lx - xS(160);
folder_list->reposition_window(lx, ly, lw, lh);
- int x1 = lx + lw + 15;
+ int x1 = lx + lw + xS(15);
add_filter->reposition_window(x1, add_filter->get_y());
del_filter->reposition_window(x1, del_filter->get_y());
apply_filter->reposition_window(x1,apply_filter->get_y());
ModifyTargetGUI::ModifyTargetGUI(ModifyTargetThread *thread, int allow_resize)
: BC_Window(_(PROGRAM_NAME ": Modify target"),
- thread->wx, thread->wy, thread->ww, thread->wh,
+ thread->wx, thread->wy, xS(thread->ww), yS(thread->wh),
-1, -1, allow_resize, 0, 1)
{
this->thread = thread;
void ModifyTargetGUI::create_objects(BC_TextBox *&text_box)
{
+ int xs10 = xS(10), xs20 = xS(20);
+ int ys10 = yS(10);
lock_window("ModifyTargetGUI::create_objects");
- int x = 10, y = 10;
+ int x = xs10, y = ys10;
const char *text = thread->target->filter->value->get_text();
- add_subwindow(text_box = new BC_TextBox(x, y, get_w()-20, 1, text));
+ add_subwindow(text_box = new BC_TextBox(x, y, get_w()-xs20, 1, text));
add_subwindow(new BC_OKButton(this));
add_subwindow(new BC_CancelButton(this));
show_window();
void ModifyTargetPatternsGUI::create_objects()
{
+ int xs10 = xS(10), xs20 = xS(20);
+ int ys10 = yS(10), ys20 = yS(20);
lock_window("ModifyTargetPatternsGUI::create_objects");
BinFolderTargetPatterns *target = (BinFolderTargetPatterns *)thread->target;
- int x = 10, y = 10;
+ int x = xs10, y = ys10;
int text_font = MEDIUMFONT;
text_rowsz = get_text_ascent(text_font)+1 + get_text_descent(text_font)+1;
- int th = get_h() - y - BC_OKButton::calculate_h() - 20;
+ int th = get_h() - y - BC_OKButton::calculate_h() - ys20;
int rows = th / text_rowsz;
int text_len = strlen(target->text);
if( text_len < BCTEXTLEN ) text_len = BCTEXTLEN;
- scroll_text_box = new BC_ScrollTextBox(this, x, y, get_w()-20, rows,
+ scroll_text_box = new BC_ScrollTextBox(this, x, y, get_w()-xs20, rows,
target->text, 2*text_len);
scroll_text_box->create_objects();
add_subwindow(ok_button = new BC_OKButton(this));
int ModifyTargetPatternsGUI::resize_event(int w, int h)
{
+ int xs20 = xS(20);
+ int ys20 = yS(20);
int tx = scroll_text_box->get_x();
int ty = scroll_text_box->get_y();
- int th = h - ty - BC_OKButton::calculate_h() - 20;
- int tw = w - 20;
+ int th = h - ty - BC_OKButton::calculate_h() - ys20;
+ int tw = w - xs20;
int rows = th / text_rowsz;
scroll_text_box->reposition_window(tx, ty, tw, rows);
ok_button->resize_event(w, h);
#include "file.h"
-BitsPopup::BitsPopup(BC_WindowBase *parent_window,
- int x,
- int y,
- int *output,
- int use_ulaw,
- int use_adpcm,
- int use_float,
- int use_32linear,
- int use_8linear)
+BitsPopup::BitsPopup(BC_WindowBase *parent_window, int x, int y, int *output,
+ int use_ulaw, int use_adpcm, int use_float, int use_32linear,
+ int use_8linear)
{
this->parent_window = parent_window;
this->output = output;
}
BitsPopupMenu::BitsPopupMenu(BitsPopup *popup, int x, int y)
- : BC_ListBox(x,
- y,
- 120,
- 100,
- LISTBOX_TEXT,
- &popup->bits_items,
- 0,
- 0,
- 1,
- 0,
- 1)
+ : BC_ListBox(x, y, xS(120), yS(100), LISTBOX_TEXT,
+ &popup->bits_items, 0, 0, 1, 0, 1)
{
this->popup = popup;
}
}
BitsPopupText::BitsPopupText(BitsPopup *popup, int x, int y)
- : BC_TextBox(x, y, 120, 1, File::bitstostr(*popup->output))
+ : BC_TextBox(x, y, xS(120), 1, File::bitstostr(*popup->output))
{
this->popup = popup;
}
-Canvas::Canvas(MWindow *mwindow,
- BC_WindowBase *subwindow,
- int x,
- int y,
- int w,
- int h,
- int output_w,
- int output_h,
+Canvas::Canvas(MWindow *mwindow, BC_WindowBase *subwindow,
+ int x, int y, int w, int h, int output_w, int output_h,
int use_scrollbars)
{
reset();
- if(w < 10) w = 10;
- if(h < 10) h = 10;
+ int xs10 = xS(10), ys10 = yS(10);
+ if(w < xs10) w = xs10;
+ if(h < ys10) h = ys10;
this->mwindow = mwindow;
this->subwindow = subwindow;
this->x = x;
: BC_Window(_(PROGRAM_NAME ": Channels"),
channel_picker->mwindow->session->channels_x,
channel_picker->mwindow->session->channels_y,
- 375, 400, 375, 400, 0, 0, 1)
+ xS(375), yS(400), xS(375), yS(400), 0, 0, 1)
{
this->thread = thread;
this->channel_picker = channel_picker;
void ChannelEditWindow::create_objects()
{
+ int xs10 = xS(10), ys10 = yS(10), ys30 = yS(30);
lock_window("ChannelEditWindow::create_objects");
- int x = 10, y = 10;
+ int x = xs10, y = ys10;
// Create channel list
for(int i = 0; i < thread->new_channels->size(); i++)
}
add_subwindow(list_box = new ChannelEditList(this, x, y));
- x += 200;
+ x += xS(200);
if(channel_picker->use_select())
{
add_subwindow(new ChannelEditSelect(this, x, y));
- y += 30;
+ y += ys30;
}
add_subwindow(new ChannelEditAdd(this, x, y));
- y += 30;
+ y += ys30;
add_subwindow(new ChannelEdit(this, x, y));
- y += 30;
+ y += ys30;
add_subwindow(new ChannelEditMoveUp(this, x, y));
- y += 30;
+ y += ys30;
add_subwindow(new ChannelEditMoveDown(this, x, y));
- y += 30;
+ y += ys30;
add_subwindow(new ChannelEditSort(this, x, y));
- y += 30;
+ y += ys30;
Channel *channel_usage = channel_picker->get_channel_usage();
if(channel_usage && channel_usage->has_scanning)
{
add_subwindow(new ChannelEditScan(this, x, y));
- y += 30;
+ y += ys30;
}
add_subwindow(new ChannelEditDel(this, x, y));
- y += 30;
+ y += ys30;
add_subwindow(new ChannelEditPicture(this, x, y));
- y += 100;
- x = 10;
+ y += yS(100);
+ x = xs10;
add_subwindow(new BC_OKButton(this));
- x += 150;
+ x += xS(150);
add_subwindow(new BC_CancelButton(this));
temp_text = channel_list.values[number1];
channel_list.values[number1] = channel_list.values[number2];
channel_list.values[number2] = temp_text;
- list_box->update(&channel_list,
- 0,
- 0,
- 1,
- list_box->get_xposition(),
- list_box->get_yposition(),
- number1,
- 1);
+ list_box->update(&channel_list, 0, 0, 1,
+ list_box->get_xposition(), list_box->get_yposition(),
+ number1, 1);
}
return 0;
}
temp_text = channel_list.values[number1];
channel_list.values[number1] = channel_list.values[number2];
channel_list.values[number2] = temp_text;
- list_box->update(&channel_list,
- 0,
- 0,
- 1,
- list_box->get_xposition(),
- list_box->get_yposition(),
- number1,
- 1);
+ list_box->update(&channel_list, 0, 0, 1,
+ list_box->get_xposition(), list_box->get_yposition(),
+ number1, 1);
}
return 0;
}
}
ChannelEditList::ChannelEditList(ChannelEditWindow *window, int x, int y)
- : BC_ListBox(x,
- y,
- 185,
- window->get_h() - BC_OKButton::calculate_h() - y - 10,
- LISTBOX_TEXT,
- &(window->channel_list))
+ : BC_ListBox(x, y,
+ xS(185), window->get_h() - BC_OKButton::calculate_h() - y - yS(10),
+ LISTBOX_TEXT, &(window->channel_list))
{
this->window = window;
}
ConfirmScan::ConfirmScan(ChannelEditWindow *gui, int x, int y)
: BC_Window(_(PROGRAM_NAME ": Scan confirm"),
- x, y, 350, BC_OKButton::calculate_h() + 130,
+ x, y, xS(350), BC_OKButton::calculate_h() + yS(130),
0, 0, 0, 0, 1)
{
this->gui = gui;
void ConfirmScan::create_objects()
{
+ int xs5 = xS(5), xs10 = xS(10);
+ int ys10 = yS(10);
lock_window("ConfirmScan::create_objects");
- int x = 10, y = 10;
+ int x = xs10, y = ys10;
int y2 = 0, x2 = 0;
BC_Title *title;
add_subwindow(title = new BC_Title(x, y, _("Set parameters for channel scanning.")));
- y += title->get_h() + 10;
+ y += title->get_h() + ys10;
y2 = y;
add_subwindow(title = new BC_Title(x, y, _("Frequency table:")));
add_subwindow(title = new BC_Title(x, y, _("Input:")));
x2 = MAX(x2, title->get_w());
y += BC_PopupMenu::calculate_h();
- x2 += x + 5;
+ x2 += x + xs5;
y = y2;
x = x2;
ChannelEditEditFreqtable *table;
- add_subwindow(table = new ChannelEditEditFreqtable(x,
- y,
- 0,
- gui->thread));
+ add_subwindow(table = new ChannelEditEditFreqtable(x, y, 0, gui->thread));
table->add_items();
- y += table->get_h() + 10;
+ y += table->get_h() + ys10;
ChannelEditEditNorm *norm;
- add_subwindow(norm = new ChannelEditEditNorm(x,
- y,
- 0,
- gui->thread));
+ add_subwindow(norm = new ChannelEditEditNorm(x, y, 0, gui->thread));
norm->add_items();
- y += norm->get_h() + 10;
+ y += norm->get_h() + ys10;
ChannelEditEditInput *input;
- add_subwindow(input = new ChannelEditEditInput(x,
- y,
- 0,
- gui->thread));
+ add_subwindow(input = new ChannelEditEditInput(x, y, 0, gui->thread));
input->add_items();
ChannelEditWindow *window,
ChannelPicker *channel_picker)
: BC_Window(_(PROGRAM_NAME ": Edit Channel"),
- channel_picker->parent_window->get_abs_cursor_x(1),
+ channel_picker->parent_window->get_abs_cursor_x(1),
channel_picker->parent_window->get_abs_cursor_y(1),
- 390, 300, 390, 300, 0, 0, 1)
+ xS(390), yS(300), xS(390), yS(300), 0, 0, 1)
{
this->channel_picker = channel_picker;
this->window = window;
void ChannelEditEditWindow::create_objects(Channel *channel)
{
+ int xs10 = xS(10), xs130 = xS(130);
+ int ys10 = yS(10), ys20 = yS(20), ys30 = yS(30);
lock_window("ChannelEditEditWindow::create_objects");
this->new_channel = channel;
Channel *channel_usage = channel_picker->get_channel_usage();
title_text = 0;
- int x = 10, y = 10;
+ int x = xs10, y = ys10;
// if(!channel_usage ||
// (!channel_usage->use_frequency &&
// !channel_usage->use_fine &&
// !channel_usage->use_input))
// {
// add_subwindow(new BC_Title(x, y, MSG_NO_INP_SELECTION));
-// y += 30;
+// y += ys30;
// }
// else
// {
add_subwindow(new BC_Title(x, y, _("Title:")));
- add_subwindow(title_text = new ChannelEditEditTitle(x, y + 20, thread));
- y += 50;
+ add_subwindow(title_text = new ChannelEditEditTitle(x, y + ys20, thread));
+ y += yS(50);
// }
if(channel_usage && channel_usage->use_frequency)
{
add_subwindow(new BC_Title(x, y, _("Channel:")));
- y += 20;
+ y += ys20;
add_subwindow(thread->source_text = new ChannelEditEditSource(x, y, thread));
- add_subwindow(new ChannelEditEditSourceTumbler(x + 160, y, thread));
- y += 40;
+ add_subwindow(new ChannelEditEditSourceTumbler(x + xS(160), y, thread));
+ y += yS(40);
add_subwindow(new BC_Title(x, y, _("Frequency table:")));
ChannelEditEditFreqtable *table;
- add_subwindow(table = new ChannelEditEditFreqtable(x + 130,
- y,
- thread,
- window->thread));
+ add_subwindow(table = new ChannelEditEditFreqtable(x + xs130,
+ y, thread, window->thread));
table->add_items();
- y += 30;
+ y += ys30;
}
if(channel_usage && channel_usage->use_fine)
{
add_subwindow(new BC_Title(x, y, _("Fine:")));
- add_subwindow(new ChannelEditEditFine(x + 130, y, thread));
- y += 30;
+ add_subwindow(new ChannelEditEditFine(x + xs130, y, thread));
+ y += ys30;
}
if(channel_usage && channel_usage->use_norm)
{
add_subwindow(new BC_Title(x, y, _("Norm:")));
ChannelEditEditNorm *norm;
- add_subwindow(norm = new ChannelEditEditNorm(x + 130,
- y,
- thread,
- window->thread));
+ add_subwindow(norm = new ChannelEditEditNorm(x + xs130,
+ y, thread, window->thread));
norm->add_items();
- y += 30;
+ y += ys30;
}
if( (channel_usage && channel_usage->use_input) ||
{
add_subwindow(new BC_Title(x, y, _("Input:")));
ChannelEditEditInput *input;
- add_subwindow(input = new ChannelEditEditInput(x + 130,
- y,
- thread,
- window->thread));
+ add_subwindow(input = new ChannelEditEditInput(x + xs130,
+ y, thread, window->thread));
input->add_items();
- y += 30;
+ y += ys30;
}
add_subwindow(new BC_OKButton(this));
- x += 200;
+ x += xS(200);
add_subwindow(new BC_CancelButton(this));
show_window();
unlock_window();
ChannelEditEditTitle::ChannelEditEditTitle(int x,
int y,
ChannelEditEditThread *thread)
- : BC_TextBox(x, y, 150, 1, thread->new_channel.title)
+ : BC_TextBox(x, y, xS(150), 1, thread->new_channel.title)
{
this->thread = thread;
}
ChannelEditEditSource::ChannelEditEditSource(int x, int y, ChannelEditEditThread *thread)
- : BC_TextBox(x, y, 150, 1, chanlists[thread->new_channel.freqtable].list[thread->new_channel.entry].name)
+ : BC_TextBox(x, y, xS(150), 1, chanlists[thread->new_channel.freqtable].list[thread->new_channel.entry].name)
{
this->thread = thread;
}
int y,
ChannelEditEditThread *thread,
ChannelEditThread *edit)
- : BC_PopupMenu(x,
- y,
- 150,
+ : BC_PopupMenu(x, y, xS(150),
edit->value_to_input(thread ? thread->new_channel.input : edit->scan_params.input))
{
this->thread = thread;
int y,
ChannelEditEditThread *thread,
ChannelEditThread *edit)
- : BC_PopupMenu(x,
- y,
- 100,
+ : BC_PopupMenu(x, y, xS(100),
edit->value_to_norm(thread ? thread->new_channel.norm : edit->scan_params.norm))
{
this->thread = thread;
int y,
ChannelEditEditThread *thread,
ChannelEditThread *edit)
- : BC_PopupMenu(x,
- y,
- 150,
+ : BC_PopupMenu(x, y, xS(150),
edit->value_to_freqtable(thread ? thread->new_channel.freqtable : edit->scan_params.freqtable))
{
this->thread = thread;
ChannelEditEditFine::ChannelEditEditFine(int x,
int y,
ChannelEditEditThread *thread)
- : BC_ISlider(x,
- y,
- 0,
- 240,
- 240,
- -100,
- 100,
+ : BC_ISlider(x, y, 0, xS(240), xS(240), -100, 100,
thread->new_channel.fine_tune)
{
this->thread = thread;
PictureConfig *picture_usage = channel_picker->get_picture_usage();
int pad = BC_Pot::calculate_h();
int text_h = channel_picker->parent_window->get_text_height(MEDIUMFONT);
- int result = 20 + text_h + 5 + BC_OKButton::calculate_h();
+ int result = yS(20+5) + text_h + BC_OKButton::calculate_h();
// Only used for Video4Linux 1
if( !picture_usage || (
!channel_picker->get_controls()))
{
result = BC_Title::calculate_w(channel_picker->parent_window,
- MSG_NO_PIC_CONTROLS) + 20;
+ MSG_NO_PIC_CONTROLS) + xS(20);
}
// Only used for Video4Linux 1
void ChannelEditPictureWindow::create_objects()
{
+ int xs10 = xS(10), ys10 = yS(10);
lock_window("ChannelEditPictureWindow::create_objects");
- int x = 10, y = 10;
+ int x = xs10, y = ys10;
int widget_border = ((Theme*)channel_picker->get_theme())->widget_border;
int x1 = get_w() - BC_Pot::calculate_w() * 2 - widget_border * 2;
int x2 = get_w() - BC_Pot::calculate_w() - widget_border;
!channel_picker->get_controls()))
{
add_subwindow(new BC_Title(x, y, MSG_NO_PIC_CONTROLS));
- y += 50;
+ y += yS(50);
}
// Only used for Video4Linux 1
if(picture_usage && picture_usage->use_brightness)
{
- add_subwindow(new BC_Title(x, y + 10, _("Brightness:")));
+ add_subwindow(new BC_Title(x, y + ys10, _("Brightness:")));
add_subwindow(new ChannelEditBright(x1, y, channel_picker, channel_picker->get_brightness()));
y += pad;
SWAP_X
if(picture_usage && picture_usage->use_contrast)
{
- add_subwindow(new BC_Title(x, y + 10, _("Contrast:")));
+ add_subwindow(new BC_Title(x, y + ys10, _("Contrast:")));
add_subwindow(new ChannelEditContrast(x1, y, channel_picker, channel_picker->get_contrast()));
y += pad;
SWAP_X
if(picture_usage && picture_usage->use_color)
{
- add_subwindow(new BC_Title(x, y + 10, _("Color:")));
+ add_subwindow(new BC_Title(x, y + ys10, _("Color:")));
add_subwindow(new ChannelEditColor(x1, y, channel_picker, channel_picker->get_color()));
y += pad;
SWAP_X
if(picture_usage && picture_usage->use_hue)
{
- add_subwindow(new BC_Title(x, y + 10, _("Hue:")));
+ add_subwindow(new BC_Title(x, y + ys10, _("Hue:")));
add_subwindow(new ChannelEditHue(x1, y, channel_picker, channel_picker->get_hue()));
y += pad;
SWAP_X
if(picture_usage && picture_usage->use_whiteness)
{
- add_subwindow(new BC_Title(x, y + 10, _("Whiteness:")));
+ add_subwindow(new BC_Title(x, y + ys10, _("Whiteness:")));
add_subwindow(new ChannelEditWhiteness(x1, y, channel_picker, channel_picker->get_whiteness()));
y += pad;
SWAP_X
for(int i = 0; i < channel_picker->get_controls(); i++)
{
BC_Title *title;
- add_subwindow(title = new BC_Title(x,
- y + 10,
+ add_subwindow(title = new BC_Title(x, y + ys10,
_(channel_picker->get_control(i)->name)));
int x3 = x1;
ChannelEditBright::ChannelEditBright(int x, int y, ChannelPicker *channel_picker, int value)
- : BC_IPot(x,
- y,
- value,
- -100,
- 100)
+ : BC_IPot(x, y, value, -100, 100)
{
this->channel_picker = channel_picker;
}
}
ChannelEditContrast::ChannelEditContrast(int x, int y, ChannelPicker *channel_picker, int value)
- : BC_IPot(x,
- y,
- value,
- -100,
- 100)
+ : BC_IPot(x, y, value, -100, 100)
{
this->channel_picker = channel_picker;
}
ChannelEditColor::ChannelEditColor(int x, int y, ChannelPicker *channel_picker, int value)
- : BC_IPot(x,
- y,
- value,
- -100,
- 100)
+ : BC_IPot(x, y, value, -100, 100)
{
this->channel_picker = channel_picker;
}
}
ChannelEditHue::ChannelEditHue(int x, int y, ChannelPicker *channel_picker, int value)
- : BC_IPot(x,
- y,
- value,
- -100,
- 100)
+ : BC_IPot(x, y, value, -100, 100)
{
this->channel_picker = channel_picker;
}
}
ChannelEditWhiteness::ChannelEditWhiteness(int x, int y, ChannelPicker *channel_picker, int value)
- : BC_IPot(x,
- y,
- value,
- -100,
- 100)
+ : BC_IPot(x, y, value, -100, 100)
{
this->channel_picker = channel_picker;
}
-ChannelEditCommon::ChannelEditCommon(int x,
- int y,
- ChannelPicker *channel_picker,
- PictureItem *item)
- : BC_IPot(x,
- y,
- item->value,
- item->min,
- item->max)
+ChannelEditCommon::ChannelEditCommon(int x, int y,
+ ChannelPicker *channel_picker, PictureItem *item)
+ : BC_IPot(x, y, item->value, item->min, item->max)
{
this->channel_picker = channel_picker;
this->device_id = item->device_id;
void ChanSearchGUI::create_objects()
{
+ int xs10 = xS(10), xs20 = xS(20);
+ int ys5 = yS(5), ys10 = yS(10);
lock_window("ChanSearchGUI::create_objects");
- int pady = BC_TextBox::calculate_h(this, MEDIUMFONT, 0, 1) + 5;
+ int pady = BC_TextBox::calculate_h(this, MEDIUMFONT, 0, 1) + ys5;
int padx = BC_Title::calculate_w(this, (char*)"X", MEDIUMFONT);
int x = padx/2, y = pady/4;
BC_Title *title = new BC_Title(text_x, text_y, _("Text:"), MEDIUMFONT, YELLOW);
add_subwindow(title); x += title->get_w();
text_x = x; text_y = y;
- search_text = new ChanSearchText(this, x, y, get_w()-x-10);
+ search_text = new ChanSearchText(this, x, y, get_w()-x-xs10);
add_subwindow(search_text);
- x = padx; y += pady + 5;
+ x = padx; y += pady + ys5;
title_text = new ChanSearchTitleText(this, x, y);
add_subwindow(title_text); x += title_text->get_w() + padx;
info_text = new ChanSearchInfoText(this, x, y);
add_subwindow(info_text); x += title_text->get_w() + padx;
match_case = new ChanSearchMatchCase(this, x, y);
add_subwindow(match_case); x += match_case->get_w() + padx;
- results_x = x + 20; results_y = y + 5;
+ results_x = x + xs20; results_y = y + ys5;
results = new BC_Title(results_x, results_y, " ", MEDIUMFONT, YELLOW);
add_subwindow(results);
- x = padx; y += pady + 5;
- search_x = 10;
- search_y = get_h() - BC_GenericButton::calculate_h() - 10;
+ x = padx; y += pady + ys5;
+ search_x = xs10;
+ search_y = get_h() - BC_GenericButton::calculate_h() - ys10;
search_start = new ChanSearchStart(this, search_x, search_y);
add_subwindow(search_start);
cancel_w = ChanSearchCancel::calculate_w();
cancel_h = ChanSearchCancel::calculate_h();
- cancel_x = get_w() - cancel_w - 10;
- cancel_y = get_h() - cancel_h - 10;
+ cancel_x = get_w() - cancel_w - xs10;
+ cancel_y = get_h() - cancel_h - ys10;
cancel = new ChanSearchCancel(this, cancel_x, cancel_y);
add_subwindow(cancel);
list_x = x; list_y = y;
- int list_w = get_w()-10 - list_x;
- int list_h = min(search_y, cancel_y)-10 - list_y;
+ int list_w = get_w()-xs10 - list_x;
+ int list_h = min(search_y, cancel_y)-ys10 - list_y;
search_list = new ChanSearchList(this, list_x, list_y, list_w, list_h);
add_subwindow(search_list);
search_list->show_window();
int clktip_x = list_x;
- int clktip_y = list_y + list_h + 5;
+ int clktip_y = list_y + list_h + ys5;
click_tip = new BC_Title(clktip_x, clktip_y, _("dbl clk row to find title"));
add_subwindow(click_tip);
unlock_window();
}
+#define CSW_W xS(500)
+#define CSW_H yS(300)
+
ChanSearchGUI::ChanSearchGUI(ChanSearch *cswindow)
: BC_Window(_(PROGRAM_NAME ": ChanSearch"),
- cswindow->iwindow->gui->get_abs_cursor_x(1) - 500 / 2,
- cswindow->iwindow->gui->get_abs_cursor_y(1) - 300 / 2,
- 500, 300, 400, 300)
+ cswindow->iwindow->gui->get_abs_cursor_x(1) - CSW_W/2,
+ cswindow->iwindow->gui->get_abs_cursor_y(1) - CSW_H/2,
+ CSW_W, CSW_H, xS(400), yS(300))
{
this->cswindow = cswindow;
this->iwindow = cswindow->iwindow;
search_column_titles[0] = _("Source");
search_column_titles[1] = C_("Title");
search_column_titles[2] = _("Start time");
- search_column_widths[0] = 120;
- search_column_widths[2] = 120;
- search_column_widths[1] = get_w()-search_column_widths[0]-search_column_widths[2]-32;
+ search_column_widths[0] = xS(120);
+ search_column_widths[2] = xS(120);
+ search_column_widths[1] = get_w()-search_column_widths[0]-search_column_widths[2]-xS(32);
}
ChanSearchGUI::~ChanSearchGUI()
int ChanSearchGUI::resize_event(int w, int h)
{
+ int xs5 = xS(5), xs10 = xS(10);
+ int ys10 = yS(10);
search_text->reposition_window(text_x, text_y, w-text_x-10);
- int cancel_x = w - BC_CancelButton::calculate_w() - 10;
- int cancel_y = h - BC_CancelButton::calculate_h() - 10;
+ int cancel_x = w - BC_CancelButton::calculate_w() - xs10;
+ int cancel_y = h - BC_CancelButton::calculate_h() - ys10;
cancel->reposition_window(cancel_x, cancel_y);
- search_x = 10;
- search_y = h - BC_GenericButton::calculate_h() - 10;
+ search_x = xs10;
+ search_y = h - BC_GenericButton::calculate_h() - ys10;
search_start->reposition_window(search_x, search_y);
- int list_w = w-10 - list_x;
- int list_h = min(search_y, cancel_y)-10 - list_y;
- search_column_widths[1] = w-search_column_widths[0]-search_column_widths[2]-32;
+ int list_w = w-xs10 - list_x;
+ int list_h = min(search_y, cancel_y)-ys10 - list_y;
+ search_column_widths[1] = w-search_column_widths[0]-search_column_widths[2]-xS(32);
search_list->reposition_window(list_x, list_y, list_w, list_h);
int clktip_x = list_x;
- int clktip_y = list_y + list_h + 5;
+ int clktip_y = list_y + list_h + xs5;
click_tip->reposition_window(clktip_x, clktip_y);
update();
return 1;
void ChannelInfoGUI::create_objects()
{
+ int xs10 = xS(10);
+ int ys5 = yS(5), ys10 = yS(10);
lock_window("ChannelInfoGUI::create_objects");
panel = new ChannelPanel(this,0,0,panel_w,panel_h);
add_subwindow(panel);
batch_bay->set_current_batch(-1);
batch_bay->update_batches(-1);
- pad = BC_TextBox::calculate_h(this, MEDIUMFONT, 0, 1) + 5;
- x0 = bay_x+bay_w + 10;
- y0 = bay_y+10;
+ pad = BC_TextBox::calculate_h(this, MEDIUMFONT, 0, 1) + ys5;
+ x0 = bay_x+bay_w + xs10;
+ y0 = bay_y+ys10;
int ww = 0;
int x = x0;
int y = y0;
x = x0 + pad;
add_subwindow(channel_clear_batch = new ChannelClearBatch(this, x, y));
- x += channel_clear_batch->get_w() + 10;
+ x += channel_clear_batch->get_w() + xs10;
add_subwindow(channel_new_batch = new ChannelNewBatch(this, x, y));
- x += channel_new_batch->get_w() + 10;
+ x += channel_new_batch->get_w() + xs10;
add_subwindow(channel_delete_batch = new ChannelDeleteBatch(this, x, y));
x += channel_delete_batch->get_w();
ww = max(x-x0, ww);
ChannelInfoGUI::ChannelInfoGUI(ChannelInfo *iwindow,
int x, int y, int w, int h)
- : BC_Window(_(PROGRAM_NAME ": Channel Info"), x, y, w, h, 600, 400,
- 1, 0, 0 , -1, iwindow->mwindow->get_cwindow_display())
+ : BC_Window(_(PROGRAM_NAME ": Channel Info"), x, y,
+ w, h, xS(600), yS(400), 1, 0, 0 , -1,
+ iwindow->mwindow->get_cwindow_display())
{
+ int xs10 = xS(10), xs20 = xS(20);
+ int ys5 = yS(5), ys10 = yS(10);
this->iwindow = iwindow;
panel = 0;
batch_bay =0;
x0 = y0 = title_w = data_w = status_w = pad = 0;
ok_w = BC_OKButton::calculate_w();
ok_h = BC_OKButton::calculate_h();
- ok_x = 10;
- ok_y = h - ok_h - 10;
+ ok_x = xs10;
+ ok_y = h - ok_h - ys10;
BC_CheckBox::calculate_extents(this, &cron_w, &cron_h, cron_caption);
cron_x = ok_x;
- cron_y = ok_y - cron_h - 10;
+ cron_y = ok_y - cron_h - ys10;
BC_CheckBox::calculate_extents(this, &power_w, &power_h, power_caption);
power_x = cron_x;
- power_y = cron_y - power_h - 5;
+ power_y = cron_y - power_h - ys5;
find_h = BC_GenericButton::calculate_h();
find_x = power_x;
- find_y = power_y - find_h - 10;
+ find_y = power_y - find_h - ys10;
cancel_w = BC_CancelButton::calculate_w();
cancel_h = BC_CancelButton::calculate_h();
- cancel_x = w - cancel_w - 10,
- cancel_y = h - cancel_h - 10;
- max_bay_w = 700;
- bay_h = 150;
- bay_x = ok_w + 20;
- int x1 = cron_x+cron_w + 10;
+ cancel_x = w - cancel_w - xs10,
+ cancel_y = h - cancel_h - ys10;
+ max_bay_w = xS(700);
+ bay_h = yS(150);
+ bay_x = ok_w + xs20;
+ int x1 = cron_x+cron_w + xs10;
if( x1 > bay_x ) bay_x = x1;
- x1 = power_x+power_w + 10;
+ x1 = power_x+power_w + xs10;
if( x1 > bay_x ) bay_x = x1;
bay_y = h - bay_h;
// data_w,status_w zero, updated in create_objects
- bay_w = (w-bay_x) - (data_w+10) - (max(cancel_w, status_w)+20);
+ bay_w = (w-bay_x) - (data_w+xs10) - (max(cancel_w, status_w)+xs20);
if( bay_w > max_bay_w ) bay_w = max_bay_w;
panel_w = w;
panel_h = h - bay_h;
int ChannelInfoGUI::resize_event(int w, int h)
{
+ int xs10 = xS(10), xs20 = xS(20);
+ int ys5 = yS(5), ys10 = yS(10);
iwindow->mwindow->session->cswindow_w = w;
iwindow->mwindow->session->cswindow_h = h;
panel_w = w;
panel_h = h - bay_h;
panel->resize(panel_w,panel_h);
panel->reposition_window(0,0,panel_w,panel_h);
- ok_x = 10;
- ok_y = h - ok_h - 10;
+ ok_x = xs10;
+ ok_y = h - ok_h - ys10;
ok->reposition_window(ok_x, ok_y);
cron_x = ok_x;
- cron_y = ok_y - cron_h - 10;
+ cron_y = ok_y - cron_h - ys10;
channel_cron->reposition_window(cron_x, cron_y);
power_x = cron_x;
- power_y = cron_y - power_h - 5;
+ power_y = cron_y - power_h - ys5;
channel_poweroff->reposition_window(power_x, power_y);
find_x = power_x;
- find_y = power_y - find_h - 10;
+ find_y = power_y - find_h - ys10;
channel_find->reposition_window(find_x, find_y);
- cancel_x = w - cancel_w - 10,
- cancel_y = h - cancel_h - 10;
+ cancel_x = w - cancel_w - xs10,
+ cancel_y = h - cancel_h - ys10;
cancel->reposition_window(cancel_x, cancel_y);
- bay_x = ok_w + 20;
- int x1 = cron_x+cron_w + 10;
+ bay_x = ok_w + xs20;
+ int x1 = cron_x+cron_w + xs10;
if( x1 > bay_x ) bay_x = x1;
- x1 = power_x+power_w + 10;
+ x1 = power_x+power_w + xs10;
if( x1 > bay_x ) bay_x = x1;
bay_y = h - bay_h;
- bay_w = (w-bay_x) - (data_w+10) - (max(cancel_w, status_w)+20);
+ bay_w = (w-bay_x) - (data_w+xs10) - (max(cancel_w, status_w)+xs20);
if( bay_w > max_bay_w ) bay_w = max_bay_w;
batch_bay->reposition_window(bay_x, bay_y, bay_w, bay_h);
- int x0 = bay_x+bay_w + 10;
- int y0 = bay_y+10;
+ int x0 = bay_x+bay_w + xs10;
+ int y0 = bay_y+ys10;
int x = x0;
int y = y0;
x = x0 + pad;
channel_clear_batch->reposition_window(x, y);
- x += channel_clear_batch->get_w() + 10;
+ x += channel_clear_batch->get_w() + xs10;
channel_new_batch->reposition_window(x, y);
- x += channel_new_batch->get_w() + 10;
+ x += channel_new_batch->get_w() + xs10;
channel_delete_batch->reposition_window(x, y);
y = y0;
int y = mwindow->session->cswindow_y;
int w = mwindow->session->cswindow_w;
int h = mwindow->session->cswindow_h;
- if( w < 600 ) w = 600;
- if( h < 400 ) h = 400;
+ if( w < xS(600) ) w = xS(600);
+ if( h < yS(400) ) h = yS(400);
int scr_x = mwindow->gui->get_screen_x(1, -1);
int scr_w = mwindow->gui->get_screen_w(1, -1);
if( x < scr_x ) x = scr_x;
ChannelEarlyTime::ChannelEarlyTime(ChannelInfoGUI *gui, int x, int y,
double *output_time)
- : TimeEntryTumbler(gui, x, y, 0, output_time, 15, TIME_MS2, 75)
+ : TimeEntryTumbler(gui, x, y, 0, output_time, 15, TIME_MS2, xS(75))
{
this->gui = gui;
}
ChannelLateTime::ChannelLateTime(ChannelInfoGUI *gui, int x, int y,
double *output_time)
- : TimeEntryTumbler(gui, x, y, 0, output_time, 15, TIME_MS2, 75)
+ : TimeEntryTumbler(gui, x, y, 0, output_time, 15, TIME_MS2, xS(75))
{
this->gui = gui;
}
start();
}
+#define CEW_W xS(400)
+#define CEW_H yS(350)
ClipEditWindow::ClipEditWindow(MWindow *mwindow, ClipEdit *thread)
: BC_Window(_(PROGRAM_NAME ": Clip Info"),
- thread->x -400/2, thread->y - 350/2,
- 400, 350, 400, 430, 0, 0, 1)
+ thread->x - CEW_W/2, thread->y - CEW_H/2,
+ CEW_W, CEW_H, CEW_W, CEW_H, 0, 0, 1)
{
this->mwindow = mwindow;
this->thread = thread;
void ClipEditWindow::create_objects()
{
+ int xs10 = xS(10);
+ int ys5 = yS(5), ys10 = yS(10);
lock_window("ClipEditWindow::create_objects");
this->create_it = thread->create_it;
- int x = 10, y = 10;
+ int x = xs10, y = ys10;
int x1 = x;
BC_TextBox *textbox;
BC_Title *title;
add_subwindow(title = new BC_Title(x1, y, _("Title:")));
- y += title->get_h() + 5;
+ y += title->get_h() + ys5;
add_subwindow(titlebox = new ClipEditTitle(this, x1, y, get_w() - x1 * 2));
int end = strlen(titlebox->get_text());
titlebox->set_selection(0, end, end);
- y += titlebox->get_h() + 10;
+ y += titlebox->get_h() + ys10;
add_subwindow(title = new BC_Title(x1, y, _("Comments:")));
- y += title->get_h() + 5;
+ y += title->get_h() + ys5;
add_subwindow(textbox = new ClipEditComments(this,
x1,
y,
get_w() - x1 * 2,
BC_TextBox::pixels_to_rows(this,
MEDIUMFONT,
- get_h() - 10 - BC_OKButton::calculate_h() - y)));
+ get_h() - ys10 - BC_OKButton::calculate_h() - y)));
strcpy(window_title, _(PROGRAM_NAME ": "));
strcat(window_title, title ? title : _("Color Picker"));
BC_DisplayInfo display_info;
- int x = display_info.get_abs_cursor_x() + 25;
- int y = display_info.get_abs_cursor_y() - 100;
- int w = 540, h = 330;
+ int x = display_info.get_abs_cursor_x() + xS(25);
+ int y = display_info.get_abs_cursor_y() - yS(100);
+ int w = xS(540), h = yS(330);
if( ok_cancel )
h += bmax(BC_OKButton::calculate_h(),BC_CancelButton::calculate_h());
int root_w = display_info.get_root_w(), root_h = display_info.get_root_h();
void ColorWindow::create_objects()
{
- int x0 = 10, y0 = 10;
+ int xs5 = xS(5), xs10 = xS(10), xs15 = xS(15);
+ int ys10 = yS(10), ys15 = yS(15), ys25 = yS(25), ys40 = yS(40);
+ int x0 = xs10, y0 = ys10;
lock_window("ColorWindow::create_objects");
change_values();
add_tool(wheel = new PaletteWheel(this, x, y));
wheel->create_objects();
- x += 180; add_tool(wheel_value = new PaletteWheelValue(this, x, y));
+ x += xS(180); add_tool(wheel_value = new PaletteWheelValue(this, x, y));
wheel_value->create_objects();
x = x0;
- y += 180; add_tool(output = new PaletteOutput(this, x, y));
+ y += yS(180); add_tool(output = new PaletteOutput(this, x, y));
output->create_objects();
- y += output->get_h() + 20;
+ y += output->get_h() + yS(20);
load_history(); int x1 = x;
add_tool(hex_btn = new PaletteHexButton(this, x1, y));
char hex[BCSTRLEN]; sprintf(hex,"%06x",thread->output);
- x1 += hex_btn->get_w() + 5;
+ x1 += hex_btn->get_w() + xs5;
add_tool(hex_box = new PaletteHex(this, x1, y, hex));
- x1 += hex_box->get_w() + 15;
+ x1 += hex_box->get_w() + xs15;
add_tool(grab_btn = new PaletteGrabButton(this, x1, y));
- y += hex_box->get_h() + 15;
- add_tool(history = new PaletteHistory(this, 10, y));
+ y += hex_box->get_h() + ys15;
+ add_tool(history = new PaletteHistory(this, xs10, y));
- x += 240;
+ x += xS(240);
add_tool(new BC_Title(x, y =y0, C_("H:"), SMALLFONT));
- add_tool(new BC_Title(x, y+=25, C_("S:"), SMALLFONT));
- add_tool(new BC_Title(x, y+=25, D_("colorpicker_value#V:"), SMALLFONT));
- add_tool(new BC_Title(x, y+=40, C_("R:"), SMALLFONT));
- add_tool(new BC_Title(x, y+=25, C_("G:"), SMALLFONT));
- add_tool(new BC_Title(x, y+=25, C_("B:"), SMALLFONT));
- add_tool(new BC_Title(x, y+=40, C_("Y:"), SMALLFONT));
- add_tool(new BC_Title(x, y+=25, C_("U:"), SMALLFONT));
- add_tool(new BC_Title(x, y+=25, D_("colorpicker_Cr#V:"), SMALLFONT));
+ add_tool(new BC_Title(x, y+=ys25, C_("S:"), SMALLFONT));
+ add_tool(new BC_Title(x, y+=ys25, D_("colorpicker_value#V:"), SMALLFONT));
+ add_tool(new BC_Title(x, y+=ys40, C_("R:"), SMALLFONT));
+ add_tool(new BC_Title(x, y+=ys25, C_("G:"), SMALLFONT));
+ add_tool(new BC_Title(x, y+=ys25, C_("B:"), SMALLFONT));
+ add_tool(new BC_Title(x, y+=ys40, C_("Y:"), SMALLFONT));
+ add_tool(new BC_Title(x, y+=ys25, C_("U:"), SMALLFONT));
+ add_tool(new BC_Title(x, y+=ys25, D_("colorpicker_Cr#V:"), SMALLFONT));
if( thread->do_alpha )
- add_tool(new BC_Title(x, y+=40, C_("A:"), SMALLFONT));
- x += 24;
+ add_tool(new BC_Title(x, y+=ys40, C_("A:"), SMALLFONT));
+ x += xS(24);
add_tool(hue = new PaletteHue(this, x, y= y0));
- add_tool(sat = new PaletteSat(this, x, y+=25));
- add_tool(val = new PaletteVal(this, x, y+=25));
- add_tool(red = new PaletteRed(this, x, y+=40));
- add_tool(grn = new PaletteGrn(this, x, y+=25));
- add_tool(blu = new PaletteBlu(this, x, y+=25));
- add_tool(lum = new PaletteLum(this, x, y+=40));
- add_tool(c_r = new PaletteCr (this, x, y+=25));
- add_tool(c_b = new PaletteCb (this, x, y+=25));
+ add_tool(sat = new PaletteSat(this, x, y+=ys25));
+ add_tool(val = new PaletteVal(this, x, y+=ys25));
+ add_tool(red = new PaletteRed(this, x, y+=ys40));
+ add_tool(grn = new PaletteGrn(this, x, y+=ys25));
+ add_tool(blu = new PaletteBlu(this, x, y+=ys25));
+ add_tool(lum = new PaletteLum(this, x, y+=ys40));
+ add_tool(c_r = new PaletteCr (this, x, y+=ys25));
+ add_tool(c_b = new PaletteCb (this, x, y+=ys25));
if( thread->do_alpha )
- add_tool(alpha = new PaletteAlpha(this, x, y+=40));
+ add_tool(alpha = new PaletteAlpha(this, x, y+=ys40));
- x += hue->get_w() + 10;
+ x += hue->get_w() + xs10;
hsv_h = new PaletteHSV(this, x,y= y0, hsv.h, 0, 360);
hsv_h->create_objects(); hsv_h->set_tooltip(_("Hue"));
- hsv_s = new PaletteHSV(this, x,y+=25, hsv.s, 0, 1);
+ hsv_s = new PaletteHSV(this, x,y+=ys25, hsv.s, 0, 1);
hsv_s->create_objects(); hsv_s->set_tooltip(_("Saturation"));
- hsv_v = new PaletteHSV(this, x,y+=25, hsv.v, 0, 1);
+ hsv_v = new PaletteHSV(this, x,y+=ys25, hsv.v, 0, 1);
hsv_v->create_objects(); hsv_v->set_tooltip(_("Value"));
- rgb_r = new PaletteRGB(this, x,y+=40, rgb.r, 0, 1);
+ rgb_r = new PaletteRGB(this, x,y+=ys40, rgb.r, 0, 1);
rgb_r->create_objects(); rgb_r->set_tooltip(_("Red"));
- rgb_g = new PaletteRGB(this, x,y+=25, rgb.g, 0, 1);
+ rgb_g = new PaletteRGB(this, x,y+=ys25, rgb.g, 0, 1);
rgb_g->create_objects(); rgb_g->set_tooltip(_("Green"));
- rgb_b = new PaletteRGB(this, x,y+=25, rgb.b, 0, 1);
+ rgb_b = new PaletteRGB(this, x,y+=ys25, rgb.b, 0, 1);
rgb_b->create_objects(); rgb_b->set_tooltip(_("Blue"));
- yuv_y = new PaletteYUV(this, x,y+=40, yuv.y, 0, 1);
+ yuv_y = new PaletteYUV(this, x,y+=ys40, yuv.y, 0, 1);
yuv_y->create_objects(); yuv_y->set_tooltip(_("Luminance"));
- yuv_u = new PaletteYUV(this, x,y+=25, yuv.u, 0, 1);
+ yuv_u = new PaletteYUV(this, x,y+=ys25, yuv.u, 0, 1);
yuv_u->create_objects(); yuv_u->set_tooltip(_("Blue Luminance Difference"));
- yuv_v = new PaletteYUV(this, x,y+=25, yuv.v, 0, 1);
+ yuv_v = new PaletteYUV(this, x,y+=ys25, yuv.v, 0, 1);
yuv_v->create_objects(); yuv_v->set_tooltip(_("Red Luminance Difference"));
if( thread->do_alpha ) {
- aph_a = new PaletteAPH(this, x,y+=40, aph, 0, 1);
+ aph_a = new PaletteAPH(this, x,y+=ys40, aph, 0, 1);
aph_a->create_objects(); aph_a->set_tooltip(_("Alpha"));
}
if( thread->ok_cancel ) {
PaletteWheel::PaletteWheel(ColorWindow *window, int x, int y)
- : BC_SubWindow(x, y, 170, 170)
+ : BC_SubWindow(x, y, xS(170), yS(170))
{
this->window = window;
oldhue = 0;
}
}
}
-//printf("PaletteWheel::create_objects 1\n");
draw_vframe(&frame,
- 0,
- 0,
- get_w(),
- get_h(),
- 0,
- 0,
- get_w(),
- get_h(),
- 0);
-//printf("PaletteWheel::create_objects 1\n");
+ 0, 0, get_w(), get_h(),
+ 0, 0, get_w(), get_h(), 0);
oldhue = window->hsv.h;
oldsaturation = window->hsv.s;
-//printf("PaletteWheel::create_objects 1\n");
draw(oldhue, oldsaturation);
-//printf("PaletteWheel::create_objects 1\n");
flash();
-//printf("PaletteWheel::create_objects 2\n");
}
float PaletteWheel::torads(float angle)
set_inverse();
set_color(WHITE);
- draw_circle(x - 5, y - 5, 10, 10);
+ draw_circle(x - xS(5), y - yS(5), xS(10), yS(10));
set_opaque();
return 0;
}
}
PaletteWheelValue::PaletteWheelValue(ColorWindow *window, int x, int y)
- : BC_SubWindow(x, y, 40, 170, BLACK)
+ : BC_SubWindow(x, y, xS(40), yS(170), BLACK)
{
this->window = window;
button_down = 0;
row[j * 3 + 2] = b;
}
}
-
draw_3d_border(0, 0, get_w(), get_h(), 1);
draw_vframe(frame, 2, 2, get_w() - 4, get_h() - 4,
2, 2, get_w() - 4, get_h() - 4, 0);
}
PaletteOutput::PaletteOutput(ColorWindow *window, int x, int y)
- : BC_SubWindow(x, y, 180, 30, BLACK)
+ : BC_SubWindow(x, y, xS(180), yS(30), BLACK)
{
this->window = window;
}
}
PaletteHue::PaletteHue(ColorWindow *window, int x, int y)
- : BC_ISlider(x, y, 0, 150, 200, 0, 359, (int)(window->hsv.h), 0)
+ : BC_ISlider(x, y, 0, xS(150), xS(200), 0, 359, (int)(window->hsv.h), 0)
{
this->window = window;
}
}
PaletteSat::PaletteSat(ColorWindow *window, int x, int y)
- : BC_FSlider(x, y, 0, 150, 200, 0, 1.0, window->hsv.s, 0)
+ : BC_FSlider(x, y, 0, xS(150), xS(200), 0, 1.0, window->hsv.s, 0)
{
this->window = window;
set_precision(0.01);
PaletteVal::PaletteVal(ColorWindow *window, int x, int y)
- : BC_FSlider(x, y, 0, 150, 200, 0, 1.0, window->hsv.v, 0)
+ : BC_FSlider(x, y, 0, xS(150), xS(200), 0, 1.0, window->hsv.v, 0)
{
this->window = window;
set_precision(0.01);
PaletteRed::PaletteRed(ColorWindow *window, int x, int y)
- : BC_FSlider(x, y, 0, 150, 200, 0, 1, window->rgb.r, 0)
+ : BC_FSlider(x, y, 0, xS(150), xS(200), 0, 1, window->rgb.r, 0)
{
this->window = window;
set_precision(0.01);
}
PaletteGrn::PaletteGrn(ColorWindow *window, int x, int y)
- : BC_FSlider(x, y, 0, 150, 200, 0, 1, window->rgb.g, 0)
+ : BC_FSlider(x, y, 0, xS(150), xS(200), 0, 1, window->rgb.g, 0)
{
this->window = window;
set_precision(0.01);
}
PaletteBlu::PaletteBlu(ColorWindow *window, int x, int y)
- : BC_FSlider(x, y, 0, 150, 200, 0, 1, window->rgb.b, 0)
+ : BC_FSlider(x, y, 0, xS(150), xS(200), 0, 1, window->rgb.b, 0)
{
this->window = window;
set_precision(0.01);
}
PaletteAlpha::PaletteAlpha(ColorWindow *window, int x, int y)
- : BC_FSlider(x, y, 0, 150, 200, 0, 1, window->aph, 0)
+ : BC_FSlider(x, y, 0, xS(150), xS(200), 0, 1, window->aph, 0)
{
this->window = window;
set_precision(0.01);
}
PaletteLum::PaletteLum(ColorWindow *window, int x, int y)
- : BC_FSlider(x, y, 0, 150, 200, 0, 1, window->yuv.y, 0)
+ : BC_FSlider(x, y, 0, xS(150), xS(200), 0, 1, window->yuv.y, 0)
{
this->window = window;
set_precision(0.01);
}
PaletteCr::PaletteCr(ColorWindow *window, int x, int y)
- : BC_FSlider(x, y, 0, 150, 200, 0, 1, window->yuv.u, 0)
+ : BC_FSlider(x, y, 0, xS(150), xS(200), 0, 1, window->yuv.u, 0)
{
this->window = window;
set_precision(0.01);
}
PaletteCb::PaletteCb(ColorWindow *window, int x, int y)
- : BC_FSlider(x, y, 0, 150, 200, 0, 1, window->yuv.v, 0)
+ : BC_FSlider(x, y, 0, xS(150), xS(200), 0, 1, window->yuv.v, 0)
{
this->window = window;
set_precision(0.01);
PaletteNum::PaletteNum(ColorWindow *window, int x, int y,
float &output, float min, float max)
- : BC_TumbleTextBox(window, output, min, max, x, y, 64)
+ : BC_TumbleTextBox(window, output, min, max, x, y, xS(64))
{
this->window = window;
this->output = &output;
}
PaletteHexButton::PaletteHexButton(ColorWindow *window, int x, int y)
- : BC_GenericButton(x, y, 50, "#")
+ : BC_GenericButton(x, y, xS(50), "#")
{
this->window = window;
set_tooltip(_("hex rgb color"));
}
PaletteHex::PaletteHex(ColorWindow *window, int x, int y, const char *hex)
- : BC_TextBox(x, y, 100, 1, hex)
+ : BC_TextBox(x, y, xS(100), 1, hex)
{
this->window = window;
}
}
PaletteHistory::PaletteHistory(ColorWindow *window, int x, int y)
- : BC_SubWindow(x,y, 200, 24)
+ : BC_SubWindow(x,y, xS(200), yS(24))
{
this->window = window;
button_down = 0;
clip_id = mdb->clip_id();
cancelled = 0;
- scan_status = new ScanStatus(this, 30, 30, 1, 1,
+ scan_status = new ScanStatus(this, xS(30), yS(30), 1, 1,
cancelled, _("Cutting Ads"));
scan_status->update_length(0, frames);
scan_status->update_position(0, 0);
scan_media()
{
cancelled = 0;
- scan_status = new ScanStatus(this, 30, 30, 2, 2,
+ scan_status = new ScanStatus(this, xS(30), yS(30), 2, 2,
cancelled, _("Cutting Ads"));
if( !openDb() ) {
scan_video();
ScanStatusGUI::
ScanStatusGUI(ScanStatus *sswindow, int x, int y, int nlines, int nbars)
- : BC_Window(_("Scanning"), x, y, 340,
- 40 + BC_CancelButton::calculate_h() +
+ : BC_Window(_("Scanning"), x, y, xS(340),
+ yS(40) + BC_CancelButton::calculate_h() +
(BC_Title::calculate_h((BC_WindowBase*) sswindow->
- commercials->mwindow->gui, _("My")) + 5) * nlines +
- (BC_ProgressBar::calculate_h() + 5) * nbars, 0, 0, 0)
+ commercials->mwindow->gui, _("My")) + yS(5)) * nlines +
+ (BC_ProgressBar::calculate_h() + yS(5)) * nbars, 0, 0, 0)
{
this->sswindow = sswindow;
&nb