*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
SetFormatWindow::SetFormatWindow(MWindow *mwindow,
SetFormatThread *thread, int x, int y)
: BC_Window(_(PROGRAM_NAME ": Set Format"), x, y,
SetFormatWindow::SetFormatWindow(MWindow *mwindow,
SetFormatThread *thread, int x, int y)
: BC_Window(_(PROGRAM_NAME ": Set Format"), x, y,
_("Channels:")));
add_subwindow(channels = new SetChannelsTextBox(thread,
mwindow->theme->setformat_x2, y));
_("Channels:")));
add_subwindow(channels = new SetChannelsTextBox(thread,
mwindow->theme->setformat_x2, y));
- add_subwindow(new BC_ITumbler(channels, 1, MAXCHANNELS,
+ add_subwindow(new BC_ITumbler(channels, 0, MAXCHANNELS,
mwindow->theme->setformat_x2 + channels->get_w(), y));
y += mwindow->theme->setformat_margin;
add_subwindow(new BC_Title(mwindow->theme->setformat_x1, y,
_("Channel positions:")));
y += mwindow->theme->setformat_margin;
mwindow->theme->setformat_x2 + channels->get_w(), y));
y += mwindow->theme->setformat_margin;
add_subwindow(new BC_Title(mwindow->theme->setformat_x1, y,
_("Channel positions:")));
y += mwindow->theme->setformat_margin;
mwindow->theme->setformat_x1, y,
_("Reset")));
add_subwindow(canvas = new SetChannelsCanvas(mwindow,
mwindow->theme->setformat_x1, y,
_("Reset")));
add_subwindow(canvas = new SetChannelsCanvas(mwindow,
- add_subwindow(textbox = new BC_TextBox(x,
- y,
- 100,
- 1,
- ""));
+ add_subwindow(textbox = new BC_TextBox(x, y, xS(100), 1, ""));
- add_subwindow(color_model = new ColormodelPulldown(mwindow,
- textbox,
- &thread->new_settings->session->color_model,
- x,
- y));
+ add_subwindow(color_model = new ColormodelPulldown(mwindow, textbox,
+ &thread->new_settings->session->color_model, x, y));
y += mwindow->theme->setformat_margin;
add_subwindow(new BC_Title(mwindow->theme->setformat_x3,
y += mwindow->theme->setformat_margin;
add_subwindow(new BC_Title(mwindow->theme->setformat_x3,
add_subwindow(auto_aspect = new ScaleAspectAuto(x, y, thread));
y += mwindow->theme->setformat_margin;
add_subwindow(auto_aspect = new ScaleAspectAuto(x, y, thread));
y += mwindow->theme->setformat_margin;
BC_OKTextButton *ok;
BC_CancelTextButton *cancel;
add_subwindow(ok = new BC_OKTextButton(this));
add_subwindow(cancel = new BC_CancelTextButton(this));
add_subwindow(new SetFormatApply((ok->get_x() + cancel->get_x()) / 2,
BC_OKTextButton *ok;
BC_CancelTextButton *cancel;
add_subwindow(ok = new BC_OKTextButton(this));
add_subwindow(cancel = new BC_CancelTextButton(this));
add_subwindow(new SetFormatApply((ok->get_x() + cancel->get_x()) / 2,
- : BC_TextBox(x, y, 100, 1, (int64_t)thread->new_settings->session->sample_rate)
+ : BC_TextBox(x, y, xS(100), 1, (int64_t)thread->new_settings->session->sample_rate)
- : BC_TextBox(x, y, 100, 1, thread->new_settings->session->audio_channels)
+ : BC_TextBox(x, y, xS(100), 1, thread->new_settings->session->audio_channels)
memcpy(thread->new_settings->session->achannel_positions,
&thread->mwindow->preferences->channel_positions[new_channels - 1],
sizeof(thread->new_settings->session->achannel_positions));
}
memcpy(thread->new_settings->session->achannel_positions,
&thread->mwindow->preferences->channel_positions[new_channels - 1],
sizeof(thread->new_settings->session->achannel_positions));
}
for(int i = 0; i < thread->new_settings->session->audio_channels; i++)
{
get_dimensions(thread->new_settings->session->achannel_positions[i],
for(int i = 0; i < thread->new_settings->session->audio_channels; i++)
{
get_dimensions(thread->new_settings->session->achannel_positions[i],
double rotate_angle = thread->new_settings->session->achannel_positions[i];
rotate_angle = -rotate_angle;
while(rotate_angle < 0) rotate_angle += 360;
double rotate_angle = thread->new_settings->session->achannel_positions[i];
rotate_angle = -rotate_angle;
while(rotate_angle < 0) rotate_angle += 360;
- int &x,
- int &y,
- int &w,
- int &h)
-{
-#define MARGIN 10
- int real_w = this->get_w() - box_r * 2 - MARGIN;
- int real_h = this->get_h() - box_r * 2 - MARGIN;
+ int &x, int &y, int &w, int &h)
+{
+ int xs10 = xS(10), ys10 = yS(10);
+ int real_w = this->get_w() - box_r * 2 - xs10;
+ int real_h = this->get_h() - box_r * 2 - ys10;
float corrected_position = channel_position;
if(corrected_position < 0) corrected_position += 360;
Units::polar_to_xy((float)corrected_position, real_w / 2, x, y);
float corrected_position = channel_position;
if(corrected_position < 0) corrected_position += 360;
Units::polar_to_xy((float)corrected_position, real_w / 2, x, y);
- : BC_TextBox(x, y, 100, 1, (float)thread->new_settings->session->frame_rate)
+ : BC_TextBox(x, y, xS(100), 1, (float)thread->new_settings->session->frame_rate)
-// : BC_TextBox(x, y, 100, 1, thread->channels)
+// : BC_TextBox(x, y, xS(100), 1, thread->channels)
ScaleSizeText::ScaleSizeText(int x, int y, SetFormatThread *thread, int *output)
ScaleSizeText::ScaleSizeText(int x, int y, SetFormatThread *thread, int *output)
- : BC_TextBox(x, y, 100, 1, *output)
+ : BC_TextBox(x, y, xS(100), 1, *output)
- : BC_TextBox(x, y, 100, 1, *output)
+ : BC_TextBox(x, y, xS(100), 1, *output)
}
ScaleAspectText::ScaleAspectText(int x, int y, SetFormatThread *thread, float *output)
}
ScaleAspectText::ScaleAspectText(int x, int y, SetFormatThread *thread, float *output)
- : BC_TextBox(x, y, 70, 1, *output)
+ : BC_TextBox(x, y, xS(70), 1, *output)