Exemplo n.º 1
0
void PhotoScaleWindow::create_objects()
{
	int x = 10, y = 10;
	BC_Title *title;

	int x2 = x + BC_Title::calculate_w(this, _("Height:")) + plugin->get_theme()->widget_border;
	add_subwindow(title = new BC_Title(x, 
		y, 
		_("Output size:")));

	y += title->get_h() + plugin->get_theme()->widget_border;
	add_subwindow(title = new BC_Title(x, y, _("Width:")));
	add_subwindow(output_size[0] = new PhotoScaleSizeText(
		plugin,
		this,
		x2, 
		y, 
		100,
		&(plugin->config.width)));

	y += output_size[0]->get_h() + plugin->get_theme()->widget_border;
	add_subwindow(title = new BC_Title(x, y, _("Height:")));
	add_subwindow(output_size[1] = new PhotoScaleSizeText(
		plugin,
		this,
		x2, 
		y, 
		100,
		&(plugin->config.height)));

	FrameSizePulldown *pulldown;
	add_subwindow(pulldown = new FrameSizePulldown(plugin->get_theme(), 
		output_size[0], 
		output_size[1], 
		x + title->get_w() + output_size[1]->get_w() + plugin->get_theme()->widget_border, 
		y));

	add_subwindow(new PhotoScaleSwapExtents(
		plugin, 
		this, 
		x + title->get_w() + output_size[1]->get_w() + plugin->get_theme()->widget_border + pulldown->get_w(),
		y));

	y += pulldown->get_h() + plugin->get_theme()->widget_border;
	add_subwindow(file = new PhotoScaleFile(plugin, 
		this, 
		x, 
		y));

	y += file->get_h() + plugin->get_theme()->widget_border;
	add_subwindow(scan = new PhotoScaleScan(plugin, 
		this, 
		x, 
		y));

	show_window();
	flush();
}
Exemplo n.º 2
0
void ResizeTrackWindow::create_objects()
{
	int x = 10, y = 10;

	add_subwindow(new BC_Title(x, y, _("Size:")));
	x += 50;
	add_subwindow(w = new ResizeTrackWidth(this, 
		thread,
		x,
		y));
	x += w->get_w() + 10;
	add_subwindow(new BC_Title(x, y, _("x")));
	x += 15;
	add_subwindow(h = new ResizeTrackHeight(this, 
		thread,
		x,
		y));
	x += h->get_w() + 5;
	FrameSizePulldown *pulldown;
	add_subwindow(pulldown = new FrameSizePulldown(mwindow, 
		w, 
		h, 
		x, 
		y));
	x += pulldown->get_w() + 5;
	add_subwindow(new ResizeTrackSwap(this, thread, x, y));


	y += 30;
	x = 10;
	add_subwindow(new BC_Title(x, y, _("Scale:")));
	x += 50;
	add_subwindow(w_scale = new ResizeTrackScaleW(this, 
		thread,
		x,
		y));
	x += 100;
	add_subwindow(new BC_Title(x, y, _("x")));
	x += 15;
	add_subwindow(h_scale = new ResizeTrackScaleH(this, 
		thread,
		x,
		y));

	add_subwindow(new BC_OKButton(this));
	add_subwindow(new BC_CancelButton(this));

	show_window();
	flush();
}
Exemplo n.º 3
0
void NewWindow::create_objects()
{
	int x = 10, y = 10, x1, y1;
	BC_TextBox *textbox;

	lock_window("NewWindow::create_objects");
	mwindow->theme->draw_new_bg(this);

	add_subwindow(new BC_Title(x, y, _("Parameters for the new project:")));
	y += 20;

	format_presets = new NewPresets(mwindow,
		this, 
		x, 
		y);
	format_presets->create_objects();
	x = format_presets->x;
	y = format_presets->y;



	y += 40;
	y1 = y;
	add_subwindow(new BC_Title(x, y, _("Audio"), LARGEFONT));
	y += 30;

	x1 = x;
	add_subwindow(new BC_Title(x1, y, _("Tracks:")));
	x1 += 100;
	add_subwindow(atracks = new NewATracks(this, "", x1, y));
	x1 += atracks->get_w();
	add_subwindow(new NewATracksTumbler(this, x1, y));
	y += atracks->get_h() + 5;

	x1 = x;
	add_subwindow(new BC_Title(x1, y, _("Channels:")));
	x1 += 100;
	add_subwindow(achannels = new NewAChannels(this, "", x1, y));
	x1 += achannels->get_w();
	add_subwindow(new NewAChannelsTumbler(this, x1, y));
	y += achannels->get_h() + 5;

	x1 = x;
	add_subwindow(new BC_Title(x1, y, _("Samplerate:")));
	x1 += 100;
	add_subwindow(sample_rate = new NewSampleRate(this, "", x1, y));
	x1 += sample_rate->get_w();
	add_subwindow(new SampleRatePulldown(mwindow, sample_rate, x1, y));
	
	x += 250;
	y = y1;
	add_subwindow(new BC_Title(x, y, _("Video"), LARGEFONT));
	y += 30;
	x1 = x;
	add_subwindow(new BC_Title(x1, y, _("Tracks:")));
	x1 += 100;
	add_subwindow(vtracks = new NewVTracks(this, "", x1, y));
	x1 += vtracks->get_w();
	add_subwindow(new NewVTracksTumbler(this, x1, y));
	y += vtracks->get_h() + 5;

// 	x1 = x;
// 	add_subwindow(new BC_Title(x1, y, _("Channels:")));
// 	x1 += 100;
// 	add_subwindow(vchannels = new NewVChannels(this, "", x1, y));
// 	x1 += vchannels->get_w();
// 	add_subwindow(new NewVChannelsTumbler(this, x1, y));
// 	y += vchannels->get_h() + 5;
	x1 = x;
	add_subwindow(new BC_Title(x1, y, _("Framerate:")));
	x1 += 100;
	add_subwindow(frame_rate = new NewFrameRate(this, "", x1, y));
	x1 += frame_rate->get_w();
	add_subwindow(new FrameRatePulldown(mwindow, frame_rate, x1, y));
	y += frame_rate->get_h() + 5;

//	x1 = x;
//	add_subwindow(new BC_Title(x1, y, _("Canvas size:")));
// 	x1 += 100;
// 	add_subwindow(canvas_w_text = new NewTrackW(this, x1, y));
// 	x1 += canvas_w_text->get_w() + 2;
// 	add_subwindow(new BC_Title(x1, y, "x"));
// 	x1 += 10;
// 	add_subwindow(canvas_h_text = new NewTrackH(this, x1, y));
// 	x1 += canvas_h_text->get_w();
// 	add_subwindow(new FrameSizePulldown(mwindow, 
// 		canvas_w_text, 
// 		canvas_h_text, 
// 		x1, 
// 		y));
//	x1 += 100;
//	add_subwindow(new NewCloneToggle(mwindow, this, x1, y));
//	y += canvas_h_text->get_h() + 5;

	x1 = x;
	add_subwindow(new BC_Title(x1, y, _("Canvas size:")));
	x1 += 100;
	add_subwindow(output_w_text = new NewOutputW(this, x1, y));
	x1 += output_w_text->get_w() + 2;
	add_subwindow(new BC_Title(x1, y, "x"));
	x1 += 10;
	add_subwindow(output_h_text = new NewOutputH(this, x1, y));
	x1 += output_h_text->get_w();
	FrameSizePulldown *pulldown;
	add_subwindow(pulldown = new FrameSizePulldown(mwindow->theme, 
		output_w_text, 
		output_h_text, 
		x1, 
		y));
	x1 += pulldown->get_w() + 5;
	add_subwindow(new NewSwapExtents(mwindow, this, x1, y));
	y += output_h_text->get_h() + 5;

	x1 = x;
	add_subwindow(new BC_Title(x1, y, _("Aspect ratio:")));
	x1 += 100;
	add_subwindow(aspect_w_text = new NewAspectW(this, "", x1, y));
	x1 += aspect_w_text->get_w() + 2;
	add_subwindow(new BC_Title(x1, y, ":"));
	x1 += 10;
	add_subwindow(aspect_h_text = new NewAspectH(this, "", x1, y));
	x1 += aspect_h_text->get_w();
	add_subwindow(new AspectPulldown(mwindow, 
		aspect_w_text, 
		aspect_h_text, 
		x1, 
		y));

	x1 = aspect_w_text->get_x();
	y += aspect_w_text->get_h() + 5;
	add_subwindow(new NewAspectAuto(this, x1, y));
	y += 40;
	add_subwindow(new BC_Title(x, y, _("Color model:")));
	x += 100;
	add_subwindow(textbox = new BC_TextBox(x, y, 200, 1, ""));
	x += textbox->get_w();
	add_subwindow(new ColormodelPulldown(mwindow, 
		textbox, 
		&new_edl->session->color_model,
		x, 
		y));

	add_subwindow(new BC_OKButton(this, 
		mwindow->theme->get_image_set("new_ok_images")));
	add_subwindow(new BC_CancelButton(this, 
		mwindow->theme->get_image_set("new_cancel_images")));
	flash();
	update();
	show_window();
	unlock_window();
}