Exemplo n.º 1
0
int GainWindow::create_objects()
{
	int x = 10, y = 10;
	add_tool(new BC_Title(5, y, _("Level:")));
	y += 20;
	add_tool(level = new GainLevel(gain, x, y));
	show_window();
	flush();
	return 0;
}
Exemplo n.º 2
0
void DeInterlaceWindow::create_objects()
{
	int x = 10, y = 10;
	add_tool(new BC_Title(x, y, _("Select lines to keep")));
	y += 25;
	add_tool(none = new DeInterlaceOption(client, this, DEINTERLACE_NONE, x, y, _("Do nothing")));
	y += 25;
	add_tool(odd_fields = new DeInterlaceOption(client, this, DEINTERLACE_EVEN, x, y, _("Odd lines")));
	y += 25;
	add_tool(even_fields = new DeInterlaceOption(client, this, DEINTERLACE_ODD, x, y, _("Even lines")));
	y += 25;
	add_tool(average_fields = new DeInterlaceOption(client, this, DEINTERLACE_AVG, x, y, _("Average lines")));
	y += 25;
	add_tool(swap_odd_fields = new DeInterlaceOption(client, this, DEINTERLACE_SWAP_ODD, x, y, _("Swap odd fields")));
	y += 25;
	add_tool(swap_even_fields = new DeInterlaceOption(client, this, DEINTERLACE_SWAP_EVEN, x, y, _("Swap even fields")));
	y += 25;
	add_tool(avg_even = new DeInterlaceOption(client, this, DEINTERLACE_AVG_EVEN, x, y, _("Average even lines")));

// 	draw_line(170, y + 5, 190, y + 5);
// 	draw_line(190, y + 5, 190, y + 70);
// 	draw_line(150, y + 70, 190, y + 70);
 	y += 25;
 	add_tool(avg_odd = new DeInterlaceOption(client, this, DEINTERLACE_AVG_ODD, x, y, _("Average odd lines")));
// 	draw_line(170, y + 5, 190, y + 5);
// 	y += 30;
//	add_tool(adaptive = new DeInterlaceAdaptive(client, x, y));
//	add_tool(threshold = new DeInterlaceThreshold(client, x + 100, y));
//	y += 50;
//	char string[BCTEXTLEN];
//	get_status_string(string, 0);
//	add_tool(status = new BC_Title(x, y, string));
	show_window();
}
Exemplo n.º 3
0
void _1080to540Window::create_objects()
{
	int x = 10, y = 10;

	add_tool(odd_first = new _1080to540Option(client, this, 1, x, y, _("Odd field first")));
	y += 25;
	add_tool(even_first = new _1080to540Option(client, this, 0, x, y, _("Even field first")));

	show_window();
	flush();
}
Exemplo n.º 4
0
int VorbisConfigAudio::create_objects()
{
	int x = 10, y = 10;
	int x1 = 150;
	char string[BCTEXTLEN];

	add_tool(fixed_bitrate = new VorbisFixedBitrate(x, y, this));
	add_tool(variable_bitrate = new VorbisVariableBitrate(x1, y, this));

	y += 30;
	sprintf(string, "%d", asset->vorbis_min_bitrate);
	add_tool(new BC_Title(x, y, _("Min bitrate:")));
	add_tool(new VorbisMinBitrate(x1, y, this, string));

	y += 30;
	add_tool(new BC_Title(x, y, _("Avg bitrate:")));
	sprintf(string, "%d", asset->vorbis_bitrate);
	add_tool(new VorbisAvgBitrate(x1, y, this, string));

	y += 30;
	add_tool(new BC_Title(x, y, _("Max bitrate:")));
	sprintf(string, "%d", asset->vorbis_max_bitrate);
	add_tool(new VorbisMaxBitrate(x1, y, this, string));


	add_subwindow(new BC_OKButton(this));
	show_window();
	flush();
	return 0;
}
Exemplo n.º 5
0
void EditPopupTitleWindow::create_objects()
{
	int x = 5;
	int y = 10;

	add_subwindow (new BC_Title (x, y, _("User title")));
	add_subwindow (title_text = new EditPopupTitleText (this,
		mwindow, x, y + 20));
	add_tool(new BC_OKButton(this));
	add_tool(new BC_CancelButton(this));


	show_window();
	flush();
}
Exemplo n.º 6
0
void FlipWindow::create_objects()
{
	int x = 10, y = 10;
	add_tool(flip_vertical = new FlipToggle(client, 
		&(client->config.flip_vertical), 
		_("Vertical"),
		x, 
		y));
	y += 30;
	add_tool(flip_horizontal = new FlipToggle(client, 
		&(client->config.flip_horizontal), 
		_("Horizontal"),
		x, 
		y));
	show_window();
	flush();
}
Exemplo n.º 7
0
int UIVR::add_tool_with_USL(const char *type, int argc, const char **USL) {
  int num = add_tool(type);
  if(num==-1) return FALSE;
  Tool *tool = tools[num];
  for (int i=0; i<argc; i++) 
    add_device_to_tool(USL[i], tool);
  return TRUE;
}
Exemplo n.º 8
0
void AC3ConfigAudio::create_objects()
{
	int x = 10, y = 10;
	int x1 = 150;
	lock_window("AC3ConfigAudio::create_objects");
	add_tool(new BC_Title(x, y, "Bitrate (kbps):"));
	AC3ConfigAudioBitrate *bitrate;
	add_tool(bitrate =
		new AC3ConfigAudioBitrate(this,
			x1,
			y));
	bitrate->create_objects();

	add_subwindow(new BC_OKButton(this));
	show_window(1);
	unlock_window();
}
Exemplo n.º 9
0
int ScanStatusGUI::
create_objects(const char *text)
{
	lock_window("ScanStatusGUI::create_objects");
	int x = 10, y = 10;
	int dy = BC_Title::calculate_h((BC_WindowBase*) sswindow->
		commercials->mwindow->gui, "My") + 5;
	for( int i=0; i<nlines; ++i, y+=dy, text="" )
		add_tool(texts[i] = new BC_Title(x, y, text));
	y += 10;
	dy = BC_ProgressBar::calculate_h() + 5;
	for( int i=0; i<nbars; ++i, y+=dy )
		add_tool(bars[i] = new ScanStatusBar(x, y, get_w() - 20, 100));

	add_tool(new BC_CancelButton(this));
	unlock_window();
	return 0;
}
Exemplo n.º 10
0
void DeInterlaceWindow::create_objects()
{
	int x = 10, y = 10;
	add_tool(new BC_Title(x, y, _("Select deinterlacing mode")));
	y += 25;
	add_tool(mode = new DeInterlaceMode(client, this, x, y));
	mode->create_objects();
	y += 25;
	optional_controls_x=x;
	optional_controls_y=y;
	y += 125;
	char string[BCTEXTLEN];
	get_status_string(string, 0);
	add_tool(status = new BC_Title(x, y, string));
	flash();
	show_window();
	set_mode(client->config.mode,0);
}
Exemplo n.º 11
0
void _720to480Window::create_objects()
{
	int x = 10, y = 10;

	add_tool(odd_first = new _720to480Order(client, this, 1, x, y, _("Odd field first")));
	y += 25;
	add_tool(even_first = new _720to480Order(client, this, 0, x, y, _("Even field first")));

// 	y += 25;
// 	add_tool(forward = new _720to480Direction(client, this, FORWARD, x, y, _("Downsample")));
// 	y += 25;
// 	add_tool(reverse = new _720to480Direction(client, this, REVERSE, x, y, _("Upsample")));
// 
	add_subwindow(new BC_OKButton(this));
	add_subwindow(new BC_CancelButton(this));

	show_window();
	flush();
}
Exemplo n.º 12
0
void BC_NewFolder::create_objects()
{
	int x = 10, y = 10;
	add_tool(new BC_Title(x, y, _("Enter the name of the folder:")));
	y += 20;
	add_subwindow(textbox = new BC_TextBox(x, y, 300, 1, _("Untitled")));
	y += 30;
	add_subwindow(new BC_OKButton(this));
	x = get_w() - 100;
	add_subwindow(new BC_CancelButton(this));
	show_window();
}
Exemplo n.º 13
0
int BrightnessWindow::create_objects()
{
	int x = 10, y = 10;
	add_tool(new BC_Title(x, y, _("Brightness/Contrast")));
	y += 25;
	add_tool(new BC_Title(x, y,_("Brightness:")));
	add_tool(brightness = new BrightnessSlider(client, 
		&(client->config.brightness), 
		x + 80, 
		y,
		1));
	y += 25;
	add_tool(new BC_Title(x, y, _("Contrast:")));
	add_tool(contrast = new BrightnessSlider(client, 
		&(client->config.contrast), 
		x + 80, 
		y,
		0));
	y += 30;
	add_tool(luma = new BrightnessLuma(client, 
		x, 
		y));
	show_window();
	flush();
	return 0;
}
Exemplo n.º 14
0
int YUVWindow::create_objects()
{
    int x = 10, y = 10;
    add_tool(new BC_Title(x, y, _("Y:")));
    add_tool(automation[0] = new AutomatedFn(client, this, x + 80, y, 0));
    y += 20;
    add_tool(y_slider = new YSlider(client, x, y));
    y += 35;
    add_tool(new BC_Title(x, y, _("U:")));
    add_tool(automation[1] = new AutomatedFn(client, this, x + 80, y, 1));
    y += 20;
    add_tool(u_slider = new USlider(client, x, y));
    y += 35;
    add_tool(new BC_Title(x, y, _("V:")));
    add_tool(automation[2] = new AutomatedFn(client, this, x + 80, y, 2));
    y += 20;
    add_tool(v_slider = new VSlider(client, x, y));
}
Exemplo n.º 15
0
int IVTCWindow::create_objects()
{
	int x = 10, y = 10;
	
	add_tool(new BC_Title(x, y, _("Pattern offset:")));
	y += 20;
	add_tool(frame_offset = new IVTCOffset(client, x, y));
	y += 30;
	add_tool(first_field = new IVTCFieldOrder(client, x, y));
//	y += 30;
//	add_tool(automatic = new IVTCAuto(client, x, y));
	y += 40;
	add_subwindow(new BC_Title(x, y, _("Pattern:")));
	y += 20;
	for(int i = 0; i < TOTAL_PATTERNS; i++)
	{
		add_subwindow(pattern[i] = new IVTCPattern(client, 
			this, 
			i, 
			_(pattern_text[i]), 
			x, 
			y));
		y += 20;
	}
	
	if(client->config.pattern == IVTCConfig::AUTOMATIC)
	{
		frame_offset->disable();
		first_field->disable();
	}
//	y += 30;
//	add_tool(new BC_Title(x, y, _("Field threshold:")));
//	y += 20;
//	add_tool(threshold = new IVTCAutoThreshold(client, x, y));
	show_window();
	flush();
	return 0;
}
Exemplo n.º 16
0
void GWindowGUI::create_objects()
{
	int x = 10, y = 10;


	for(int i = 0; i < NONAUTOTOGGLES_COUNT + AUTOMATION_TOTAL; i++)
	{
		add_tool(toggles[i] = new GWindowToggle(mwindow, 
			this, 
			x, 
			y, 
			toggle_order[i]));
		y += toggles[i]->get_h() + 5;
	}
}
Exemplo n.º 17
0
void FreezeFrameWindow::create_objects()
{
	int x = 10, y = 10;
	add_tool(enabled = new FreezeFrameToggle(client, 
		&client->config.enabled,
		x, 
		y,
		_("Enabled")));
// Try using extra effect for the line double since it doesn't
// change the overhead.
// 	y += 30;
// 	add_tool(line_double = new FreezeFrameToggle(client, 
// 		&client->config.line_double,
// 		x, 
// 		y,
// 		_("Line double")));
	show_window();
	flush();
}
Exemplo n.º 18
0
void CKXDialog::device_init(char *str)
{
	if(card_name.m_hWnd) card_name.DestroyWindow();

	char tmp_str[256];

        // re-instantiate device
        dword p[]=
        {
          0xb0b000,0xffff00,0xb0b000,0xffffff,
          0xb0b000,0xffff00,0xb0b000,0x660000
        };

        if(!mf.get_profile(str,"card_name",tmp_str,sizeof(tmp_str)))
        {
         kRect r; r.left=r.top=r.bottom=r.right=0;

         sscanf(tmp_str,"%d %d %d %d %x %x %x %x %x %x %x %x",&r.left,&r.top,&r.right,&r.bottom,
          &p[0],&p[1],&p[2],&p[3],&p[4],&p[5],&p[6],&p[7]);

         kRect r_w;
         get_rect(r_w);

         if(r.left<0)
          r.left=r_w.width()+r.left;

         if(r.top<0)
          r.top=r_w.height()+r.top;

         r.right+=r.left;
         r.bottom+=r.top;

         card_name.create(ikx_t->get_device_name(),r,this,IDg_CARDNAME,
          p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7]);

         add_tool((char *)(LPCTSTR)mf.get_profile("locals","select_card"),&card_name,IDg_CARDNAME);

         card_name.show();
        }
}
Exemplo n.º 19
0
int TimeAvgWindow::create_objects()
{
	int x = 10, y = 10;
	add_tool(new BC_Title(x, y, _("Frames to average")));
	y += 20;
	add_tool(total_frames = new TimeAvgSlider(client, x, y));
	y += 30;
	add_tool(accum = new TimeAvgAccum(client, this, x, y));
	y += 30;
	add_tool(avg = new TimeAvgAvg(client, this, x, y));
	y += 30;
	add_tool(inclusive_or = new TimeAvgOr(client, this, x, y));
	y += 30;
	add_tool(paranoid = new TimeAvgParanoid(client, x, y));
	y += 30;
	add_tool(no_subtract = new TimeAvgNoSubtract(client, x, y));
	show_window();
	flush();
	return 0;
}
Exemplo n.º 20
0
void ColorWindow::create_objects()
{
	int x = 10, init_x = 10, y = 10, init_y = 10;
	
	lock_window("ColorWindow::create_objects");
	change_values();
	
	
	
//printf("ColorWindow::create_objects 1 %p\n", this);
	add_tool(wheel = new PaletteWheel(this, x, y));
//printf("ColorWindow::create_objects 1\n");
	wheel->create_objects();
//printf("ColorWindow::create_objects 1\n");

	x += 180;
	add_tool(wheel_value = new PaletteWheelValue(this, x, y));
//printf("ColorWindow::create_objects 1\n");
	wheel_value->create_objects();


	y += 180;
	x = init_x; 
//printf("ColorWindow::create_objects 1\n");
	add_tool(output = new PaletteOutput(this, x, y));
//printf("ColorWindow::create_objects 1\n");
	output->create_objects();
//printf("ColorWindow::create_objects 1\n");
	
	x += 240; y = init_y;
	add_tool(new BC_Title(x, y, _("Hue"), SMALLFONT));
	y += 15;
//printf("ColorWindow::create_objects 1 %p\n", this);
	add_tool(hue = new PaletteHue(this, x, y));
	y += 30;
//printf("ColorWindow::create_objects 1\n");
	add_tool(new BC_Title(x, y, _("Saturation"), SMALLFONT));
	y += 15;
//printf("ColorWindow::create_objects 1\n");
	add_tool(saturation = new PaletteSaturation(this, x, y));
	y += 30;
//printf("ColorWindow::create_objects 1\n");
	add_tool(new BC_Title(x, y, _("Value"), SMALLFONT));
	y += 15;
//printf("ColorWindow::create_objects 1\n");
	add_tool(value = new PaletteValue(this, x, y));
	y += 30;
//printf("ColorWindow::create_objects 1\n");
	add_tool(new BC_Title(x, y, _("Red"), SMALLFONT));
	y += 15;
//printf("ColorWindow::create_objects 1\n");
	add_tool(red = new PaletteRed(this, x, y));
	y += 30;
//printf("ColorWindow::create_objects 1\n");
	add_tool(new BC_Title(x, y, _("Green"), SMALLFONT));
	y += 15;
//printf("ColorWindow::create_objects 1\n");
	add_tool(green = new PaletteGreen(this, x, y));
	y += 30;
//printf("ColorWindow::create_objects 1\n");
	add_tool(new BC_Title(x, y, _("Blue"), SMALLFONT));
	y += 15;
//printf("ColorWindow::create_objects 1\n");
	add_tool(blue = new PaletteBlue(this, x, y));

	if(thread->do_alpha)
	{
		y += 30;
		add_tool(new BC_Title(x, y, _("Alpha"), SMALLFONT));
		y += 15;
		add_tool(alpha = new PaletteAlpha(this, x, y));
	}

	update_display();
	show_window();
	flush();
	unlock_window();
	return;
}
Exemplo n.º 21
0
void TitleWindow::create_objects()
{
	int x = 10, y = 10;
	int margin = client->get_theme()->widget_border;
	char string[BCTEXTLEN];
#define COLOR_W 50
#define COLOR_H 30
	client->build_fonts();
	client->build_previews(this);

	encodings.append(new BC_ListBoxItem("ISO8859-1"));
	encodings.append(new BC_ListBoxItem("ISO8859-2"));
	encodings.append(new BC_ListBoxItem("ISO8859-3"));
	encodings.append(new BC_ListBoxItem("ISO8859-4"));
	encodings.append(new BC_ListBoxItem("ISO8859-5"));
	encodings.append(new BC_ListBoxItem("ISO8859-6"));
	encodings.append(new BC_ListBoxItem("ISO8859-7"));
	encodings.append(new BC_ListBoxItem("ISO8859-8"));
	encodings.append(new BC_ListBoxItem("ISO8859-9"));
	encodings.append(new BC_ListBoxItem("ISO8859-10"));
	encodings.append(new BC_ListBoxItem("ISO8859-11"));
	encodings.append(new BC_ListBoxItem("ISO8859-12"));
	encodings.append(new BC_ListBoxItem("ISO8859-13"));
	encodings.append(new BC_ListBoxItem("ISO8859-14"));
	encodings.append(new BC_ListBoxItem("ISO8859-15"));
	encodings.append(new BC_ListBoxItem("KOI8"));
	encodings.append(new BC_ListBoxItem("UTF-8"));



	sizes.append(new BC_ListBoxItem("8"));
	sizes.append(new BC_ListBoxItem("9"));
	sizes.append(new BC_ListBoxItem("10"));
	sizes.append(new BC_ListBoxItem("11"));
	sizes.append(new BC_ListBoxItem("12"));
	sizes.append(new BC_ListBoxItem("13"));
	sizes.append(new BC_ListBoxItem("14"));
	sizes.append(new BC_ListBoxItem("16"));
	sizes.append(new BC_ListBoxItem("18"));
	sizes.append(new BC_ListBoxItem("20"));
	sizes.append(new BC_ListBoxItem("22"));
	sizes.append(new BC_ListBoxItem("24"));
	sizes.append(new BC_ListBoxItem("26"));
	sizes.append(new BC_ListBoxItem("28"));
	sizes.append(new BC_ListBoxItem("32"));
	sizes.append(new BC_ListBoxItem("36"));
	sizes.append(new BC_ListBoxItem("40"));
	sizes.append(new BC_ListBoxItem("48"));
	sizes.append(new BC_ListBoxItem("56"));
	sizes.append(new BC_ListBoxItem("64"));
	sizes.append(new BC_ListBoxItem("72"));
	sizes.append(new BC_ListBoxItem("100"));
	sizes.append(new BC_ListBoxItem("128"));
	sizes.append(new BC_ListBoxItem("256"));
	sizes.append(new BC_ListBoxItem("512"));
	sizes.append(new BC_ListBoxItem("1024"));

	paths.append(new BC_ListBoxItem(TitleMain::motion_to_text(NO_MOTION)));
	paths.append(new BC_ListBoxItem(TitleMain::motion_to_text(BOTTOM_TO_TOP)));
	paths.append(new BC_ListBoxItem(TitleMain::motion_to_text(TOP_TO_BOTTOM)));
	paths.append(new BC_ListBoxItem(TitleMain::motion_to_text(RIGHT_TO_LEFT)));
	paths.append(new BC_ListBoxItem(TitleMain::motion_to_text(LEFT_TO_RIGHT)));



// Construct font list
	for(int i = 0; i < client->fonts->size(); i++)
	{
		int exists = 0;
		for(int j = 0; j < fonts.size(); j++)
		{
			if(!strcasecmp(fonts.get(j)->get_text(), 
				client->fonts->get(i)->fixed_title)) 
			{
				exists = 1;
				break;
			}
		}

		BC_ListBoxItem *item = 0;
		if(!exists)
		{
			fonts.append(item = new 
				BC_ListBoxItem(client->fonts->get(i)->fixed_title));
			if(!strcmp(client->config.font, item->get_text()))
				item->set_selected(1);
			if(client->fonts->values[i]->image)
			{
				VFrame *vframe = client->fonts->get(i)->image;
				BC_Pixmap *icon = new BC_Pixmap(this, 
					vframe, 
					PIXMAP_ALPHA);
				item->set_icon(icon);
				item->set_icon_vframe(vframe);
			}
		}
	}

// Sort font list
	int done = 0;
	while(!done)
	{
		done = 1;
		for(int i = 0; i < fonts.size() - 1; i++)
		{
			if(strcmp(fonts.values[i]->get_text(), fonts.values[i + 1]->get_text()) > 0)
			{
				BC_ListBoxItem *temp = fonts.values[i + 1];
				fonts.values[i + 1] = fonts.values[i];
				fonts.values[i] = temp;
				done = 0;
			}
		}
	}	












	add_tool(font_title = new BC_Title(x, y, _("Font:")));
	font = new TitleFont(client, this, x, y + font_title->get_h());
	font->create_objects();
	x += font->get_w() + margin;
	add_subwindow(font_tumbler = new TitleFontTumble(client, this, x, y + 20));
	x += font_tumbler->get_w() + margin;
	add_tool(size_title = new BC_Title(x, y, _("Size:")));
	sprintf(string, "%d", client->config.size);
	size = new TitleSize(client, this, x, y + 20, string);
	size->create_objects();
	x += size->get_w() + margin;
	add_subwindow(size_tumbler = new TitleSizeTumble(client, this, x, y + 20));
	x += size_tumbler->get_w() + margin;

	add_tool(style_title = new BC_Title(x, y, _("Style:")));
	add_tool(italic = new TitleItalic(client, this, x, y + 20));
	add_tool(bold = new TitleBold(client, this, x, y + 50));
#ifdef USE_OUTLINE
	add_tool(stroke = new TitleStroke(client, this, x, y + 80));
#endif
	x += 90;
	add_tool(justify_title = new BC_Title(x, y, _("Justify:")));
	add_tool(left = new TitleLeft(client, this, x, y + 20));
	add_tool(center = new TitleCenter(client, this, x, y + 50));
	add_tool(right = new TitleRight(client, this, x, y + 80));

	x += 80;
	add_tool(top = new TitleTop(client, this, x, y + 20));
	add_tool(mid = new TitleMid(client, this, x, y + 50));
	add_tool(bottom= new TitleBottom(client, this, x, y + 80));
	


	y += 50;
	x = 10;

	add_tool(x_title = new BC_Title(x, y, _("X:")));
	title_x = new TitleX(client, this, x, y + 20);
	title_x->create_objects();
	x += 90;

	add_tool(y_title = new BC_Title(x, y, _("Y:")));
	title_y = new TitleY(client, this, x, y + 20);
	title_y->create_objects();
	x += 90;

	add_tool(motion_title = new BC_Title(x, y, _("Motion type:")));

	motion = new TitleMotion(client, this, x, y + 20);
	motion->create_objects();
	x += 150;
	
	add_tool(loop = new TitleLoop(client, x, y + 20));
	x += 100;
	
	x = 10;
	y += 50;

	add_tool(dropshadow_title = new BC_Title(x, y, _("Drop shadow:")));
	dropshadow = new TitleDropShadow(client, this, x, y + 20);
	dropshadow->create_objects();
	x += 100;

	add_tool(fadein_title = new BC_Title(x, y, _("Fade in (sec):")));
	add_tool(fade_in = new TitleFade(client, this, &client->config.fade_in, x, y + 20));
	x += 100;

	add_tool(fadeout_title = new BC_Title(x, y, _("Fade out (sec):")));
	add_tool(fade_out = new TitleFade(client, this, &client->config.fade_out, x, y + 20));
	x += 110;

	add_tool(speed_title = new BC_Title(x, y, _("Speed:")));
	speed = new TitleSpeed(client, this, x, y + 20);
	speed->create_objects();
	x += 110;

	color_x = x;
	color_y = y + 20;
	x += COLOR_W + 5;
	add_tool(color_button = new TitleColorButton(client, this, x, y + 20, 0));
	x += color_button->get_w();
	color_thread = new TitleColorThread(client, this, 0);

	x = color_x;
	y += 50;

	outline_color_x = x;
	outline_color_y = y + 20;
	x += COLOR_W + 5;
	add_tool(outline_color_button = new TitleColorButton(client, this, x, y + 20, 1));
	x += outline_color_button->get_w();
	outline_color_thread = new TitleColorThread(client, this, 1);

	x = 10;
//	y += 50;
	
	
	add_tool(outline_title = new BC_Title(x, y, _("Outline:")));
	outline = new TitleOutline(client, this, x, y + outline_title->get_h() + margin);
	outline->create_objects();
	x += outline->get_w() + margin;

#ifndef X_HAVE_UTF8_STRING
	add_tool(encoding_title = new BC_Title(x, y + 3, _("Encoding:")));
	encoding = new TitleEncoding(client, this, x, y + encoding_title->get_h() + margin);
	encoding->create_objects();
	x += 100;
#endif

	y += outline_title->get_h() + margin;
	add_tool(timecode = new TitleTimecode(client, x, y));
	x += timecode->get_w() + margin;
	add_tool(timecode_format = new TitleTimecodeFormat(
		client, 
		x, 
		y,
		Units::print_time_format(client->config.timecode_format, string)));
	for(int i = 0; i < sizeof(timecode_formats) / sizeof(int); i++)
	{
		timecode_format->add_item(new BC_MenuItem(
			Units::print_time_format(timecode_formats[i], string)));
	}

	x = 10;
	y += timecode_format->get_h() + margin;

	add_tool(text_title = new BC_Title(x, y + 3, _("Text:")));

	x = 10;
	y += text_title->get_h() + margin;

	text = new TitleText(client, 
		this, 
		x, 
		y, 
		get_w() - x - 10, 
		get_h() - y - 10);
	text->create_objects();

	update_color();

	show_window(1);
}
Exemplo n.º 22
0
void ReverbWindow::create_objects()
{
    int x = 170, y = 10;
    add_tool(new BC_Title(5, y + 10, _("Initial signal level:")));
    add_tool(level_init = new ReverbLevelInit(reverb, x, y));
    y += 25;
    add_tool(new BC_Title(5, y + 10, _("ms before reflections:")));
    add_tool(delay_init = new ReverbDelayInit(reverb, x + 35, y));
    y += 25;
    add_tool(new BC_Title(5, y + 10, _("First reflection level:")));
    add_tool(ref_level1 = new ReverbRefLevel1(reverb, x, y));
    y += 25;
    add_tool(new BC_Title(5, y + 10, _("Last reflection level:")));
    add_tool(ref_level2 = new ReverbRefLevel2(reverb, x + 35, y));
    y += 25;
    add_tool(new BC_Title(5, y + 10, _("Number of reflections:")));
    add_tool(ref_total = new ReverbRefTotal(reverb, x, y));
    y += 25;
    add_tool(new BC_Title(5, y + 10, _("ms of reflections:")));
    add_tool(ref_length = new ReverbRefLength(reverb, x + 35, y));
    y += 25;
    add_tool(new BC_Title(5, y + 10, _("Start band for lowpass:"******"End band for lowpass:")));
    add_tool(lowpass2 = new ReverbLowPass2(reverb, x + 35, y));
    y += 40;
    show_window();
    flush();
}
Exemplo n.º 23
0
 virtual void init()
 {
  kDialog::init();

  ::set_font(this,font,"setup_buffers");

  set_tool_font(font);

  //SetClassLong(m_hWnd,GCL_STYLE,GetClassLong(m_hWnd,GCL_STYLE)|0x00020000); // CS_DROPSHADOW

  char tmp_str[256];

  unsigned int transp_color=0x0;
  unsigned int alpha=90;
  unsigned int cc_method=0;

  if(mf.get_profile("setup_buffers","background",tmp_str,sizeof(tmp_str)))
  {
   tmp_str[0]=0;
  }
  gui_set_background(this,&mf,tmp_str,transp_color,alpha,cc_method,_T("mixer/settings_dlg.jpg"));

  set_dragging(gui_get_show_content());

  SetWindowText(mf.get_profile("lang","setup_buffers.name"));
  
  if(!mf.get_profile("setup_buffers","cancel",tmp_str,sizeof(tmp_str)))
  {
   gui_create_button(this,&b_cancel,IDCANCEL,tmp_str,mf);
   b_cancel.show();
  }

  kRect r; r.left=r.top=r.bottom=r.right=0;

  // label
  if(!mf.get_profile("setup_buffers","label",tmp_str,sizeof(tmp_str)))
  {
   dword fg=0,bk=0;
   sscanf(tmp_str,"%d %d %d %d %x %x",&r.left,&r.top,&r.right,&r.bottom,&fg,&bk);
   label.create((char *)(LPCTSTR)mf.get_profile("setup_buffers","label.text"),r.left,r.top,r.right,r.bottom,this,fg,bk);
   label.show();
  }

  int value=-1;

  r.left=10; r.top=10; r.right=200; r.bottom=80;
  if(!mf.get_profile("setup_buffers","tank",tmp_str,sizeof(tmp_str)))
  {
   sscanf(tmp_str,"%d %d %d %d",&r.left,&r.top,&r.right,&r.bottom);
  }
  b_list[0].create(r,CBS_DROPDOWNLIST/* | CBS_AUTOHSCROLL | WS_VSCROLL*/,1000,this);
  add_tool((char *)(LPCTSTR)mf.get_profile("lang","setup_buffers.tanksize"),&b_list[0],1000);
  if(font.get_font())
   b_list[0].set_font(font);

  ikx_t->get_buffers(KX_TANKMEM_BUFFER,&value);
  b_list[0].add_string("2048 KB");
  b_list[0].add_string("1024 KB");
  b_list[0].add_string("512 KB");
  b_list[0].add_string("256 KB");
  b_list[0].add_string("128 KB");
  b_list[0].add_string("64 KB");
  b_list[0].add_string("32 KB");
  b_list[0].add_string("16 KB");
  b_list[0].add_string(mf.get_profile("lang","setup_buffers.none"));
  switch(value)
  {
    case 2048*1024: b_list[0].set_selection(0); break;
        case 1024*1024: b_list[0].set_selection(1); break;
        case 512*1024: b_list[0].set_selection(2); break;
        case 256*1024: b_list[0].set_selection(3); break;
        case 128*1024: b_list[0].set_selection(4); break;
        case 64*1024: b_list[0].set_selection(5); break;
        case 32*1024: b_list[0].set_selection(6); break;
        case 16*1024: b_list[0].set_selection(7); break;
        case 0: b_list[0].set_selection(8); break;
        default: b_list[0].set_selection(-1); break;
  }
  b_list[0].set_dropped_width(140);
  b_list[0].show();

  r.left=10; r.top=35; r.right=200; r.bottom=110;
  if(!mf.get_profile("setup_buffers","pb",tmp_str,sizeof(tmp_str)))
  {
   sscanf(tmp_str,"%d %d %d %d",&r.left,&r.top,&r.right,&r.bottom);
  }

  b_list[1].create(r, CBS_DROPDOWNLIST /*| CBS_AUTOHSCROLL | WS_VSCROLL*/,1001,this);
  add_tool((char *)(LPCTSTR)mf.get_profile("lang","setup_buffers.pb_size"),&b_list[1],1001);
  if(font.get_font())
   b_list[1].set_font(font);

  ikx_t->get_buffers(KX_PLAYBACK_BUFFER,&value);
  b_list[1].add_string("240 bytes (~0.25 ms)");
  b_list[1].add_string("504 bytes (~0.53 ms)");
  b_list[1].add_string("1008 bytes (~1.05 ms)");
  b_list[1].add_string("2040 bytes (~2.12 ms)");
  b_list[1].add_string("4080 bytes (~4.25 ms)");
  b_list[1].add_string("8184 bytes (~8.53 ms)");
  b_list[1].add_string("8352 bytes (~8.70 ms)");
  b_list[1].add_string("9600 bytes (~10.00 ms)");
  b_list[1].add_string("16368 bytes (~17.05 ms)");

  switch(value)
  {
    case 240: b_list[1].set_selection(0); break;
    case 504: b_list[1].set_selection(1); break;
        case 1008: b_list[1].set_selection(2); break;
        case 2040: b_list[1].set_selection(3); break;
        case 4080: b_list[1].set_selection(4); break;
        case 8184: b_list[1].set_selection(5); break;
        case 8352: b_list[1].set_selection(6); break;
        case 9600: b_list[1].set_selection(7); break;
        case 16368: b_list[1].set_selection(8); break;
        default: b_list[1].set_selection(-1); break;
  }
  b_list[1].set_dropped_width(140);
  b_list[1].show();

  r.left=10; r.top=60; r.right=200; r.bottom=130;
  if(!mf.get_profile("setup_buffers","rec",tmp_str,sizeof(tmp_str)))
  {
   sscanf(tmp_str,"%d %d %d %d",&r.left,&r.top,&r.right,&r.bottom);
  }

  b_list[2].create(r,CBS_DROPDOWNLIST /*| CBS_AUTOHSCROLL | WS_VSCROLL*/,1002,this);
  add_tool((char *)(LPCTSTR)mf.get_profile("lang","setup_buffers.rec_size"),&b_list[2],1002);
  if(font.get_font())
   b_list[2].set_font(font);

  ikx_t->get_buffers(KX_RECORD_BUFFER,&value);

  b_list[2].add_string("384 bytes");
  b_list[2].add_string("448 bytes");
  b_list[2].add_string("512 bytes");
  b_list[2].add_string("640 bytes");
  b_list[2].add_string("768 bytes");
  b_list[2].add_string("896 bytes");
  b_list[2].add_string("1024 bytes");
  b_list[2].add_string("1280 bytes");
  b_list[2].add_string("1536 bytes");
  b_list[2].add_string("1792 bytes");
  b_list[2].add_string("2048 bytes");
  b_list[2].add_string("2560 bytes");
  b_list[2].add_string("3072 bytes");
  b_list[2].add_string("3584 bytes");
  b_list[2].add_string("4096 bytes");
  b_list[2].add_string("5120 bytes");
  b_list[2].add_string("6144 bytes");
  b_list[2].add_string("7168 bytes");
  b_list[2].add_string("8192 bytes");
  b_list[2].add_string("10240 bytes");
  b_list[2].add_string("12288 bytes");
  b_list[2].add_string("14366 bytes");
  b_list[2].add_string("16384 bytes");
  b_list[2].add_string("20480 bytes");
  b_list[2].add_string("24576 bytes");
  b_list[2].add_string("28672 bytes");
  b_list[2].add_string("32768 bytes");
  b_list[2].add_string("40960 bytes");
  b_list[2].add_string("49152 bytes");
  b_list[2].add_string("57344 bytes");
  b_list[2].add_string("65536 bytes");

  switch(value)
  {
        case 384: b_list[2].set_selection(0); break;
        case 448: b_list[2].set_selection(1); break;
        case 512: b_list[2].set_selection(2); break;
        case 640: b_list[2].set_selection(3); break;
        case 768: b_list[2].set_selection(4); break;
        case 896: b_list[2].set_selection(5); break;
        case 1024: b_list[2].set_selection(6); break;
        case 1280: b_list[2].set_selection(7); break;
        case 1536: b_list[2].set_selection(8); break;
        case 1792: b_list[2].set_selection(9); break;
        case 2048: b_list[2].set_selection(10); break;
        case 2560: b_list[2].set_selection(11); break;
        case 3072: b_list[2].set_selection(12); break;
        case 3584: b_list[2].set_selection(13); break;
        case 4096: b_list[2].set_selection(14); break;
        case 5120: b_list[2].set_selection(15); break;
        case 6144: b_list[2].set_selection(16); break;
        case 7168: b_list[2].set_selection(17); break;
        case 8192: b_list[2].set_selection(18); break;
        case 10240: b_list[2].set_selection(19); break;
        case 12288: b_list[2].set_selection(20); break;
        case 14366: b_list[2].set_selection(21); break;
        case 16384: b_list[2].set_selection(22); break;
        case 20480: b_list[2].set_selection(23); break;
        case 24576: b_list[2].set_selection(24); break;
        case 28672: b_list[2].set_selection(25); break;
        case 32768: b_list[2].set_selection(26); break;
        case 40960: b_list[2].set_selection(27); break;
        case 49152: b_list[2].set_selection(28); break;
        case 57344: b_list[2].set_selection(29); break;
        case 65536: b_list[2].set_selection(30); break;
        default: b_list[2].set_selection(-1); break;
  }
  b_list[2].set_dropped_width(140);
  b_list[2].show();

  r.left=10; r.top=85; r.right=200; r.bottom=155;
  if(!mf.get_profile("setup_buffers","ac3",tmp_str,sizeof(tmp_str)))
  {
   sscanf(tmp_str,"%d %d %d %d",&r.left,&r.top,&r.right,&r.bottom);
  }

  b_list[3].create(r, CBS_DROPDOWNLIST /*| CBS_AUTOHSCROLL | WS_VSCROLL*/, 1003, this);
  add_tool((char *)(LPCTSTR)mf.get_profile("lang","setup_buffers.num_ac3"),&b_list[3],1003);
  if(font.get_font())
   b_list[3].set_font(font);

  b_list[3].set_dropped_width(140);
  b_list[3].add_string("2 buffers");
  b_list[3].add_string("4 buffers");
  b_list[3].add_string("6 buffers");
  b_list[3].add_string("8 buffers");
  b_list[3].add_string("16 buffers");

  ikx_t->get_buffers(KX_AC3_BUFFERS,&value);
  switch(value)
  {
   case 2: b_list[3].set_selection(0); break;
   case 4: b_list[3].set_selection(1); break;
   case 6: b_list[3].set_selection(2); break;
   case 8: b_list[3].set_selection(3); break;
   case 16:  b_list[3].set_selection(4); break;
   default:  b_list[3].set_selection(-1); break;
  }
  b_list[3].ShowWindow(SW_SHOW);


  r.left=10; r.top=110; r.right=200; r.bottom=180;
  if(!mf.get_profile("setup_buffers","gsif",tmp_str,sizeof(tmp_str)))
  {
   sscanf(tmp_str,"%d %d %d %d",&r.left,&r.top,&r.right,&r.bottom);
  }

  b_list[4].create(r, CBS_DROPDOWNLIST /*| CBS_AUTOHSCROLL | WS_VSCROLL*/,1004, this);
  add_tool((char *)(LPCTSTR)mf.get_profile("lang","setup_buffers.gsif"),&b_list[4],1004);
  if(font.get_font())
   b_list[4].set_font(font);

  b_list[4].set_dropped_width(140);
  b_list[4].add_string("16 samples");
  b_list[4].add_string("32 samples");
  b_list[4].add_string("64 samples");
  b_list[4].add_string("128 samples");
  b_list[4].add_string("256 samples");
  b_list[4].add_string("512 samples");
  b_list[4].add_string("1024 samples");
  b_list[4].add_string("2048 samples");
  b_list[4].add_string("4096 samples");

  value=-1;
  ikx_t->get_buffers(KX_GSIF_BUFFER,&value);
  switch(value)
  {
   case 16:  b_list[4].set_selection(0); break;
   case 32:  b_list[4].set_selection(1); break;
   case 64:  b_list[4].set_selection(2); break;
   case 128:  b_list[4].set_selection(3); break;
   case 256:  b_list[4].set_selection(4); break;
   case 512:  b_list[4].set_selection(5); break;
   case 1024:  b_list[4].set_selection(6); break;
   case 2048:  b_list[4].set_selection(7); break;
   case 4096:  b_list[4].set_selection(8); break;
   default:  b_list[4].set_selection(-1); break;
  }
  b_list[4].ShowWindow(SW_SHOW);

  CenterWindow();
 };
Exemplo n.º 24
0
int CDRipWindow::create_objects()
{
	int y = 10, x = 10;
	add_tool(new BC_Title(x, y, _("Select the range to transfer:"))); y += 25;
	add_tool(new BC_Title(x, y, _("Track"))); x += 70;
	add_tool(new BC_Title(x, y, _("Min"))); x += 70;
	add_tool(new BC_Title(x, y, _("Sec"))); x += 100;

	add_tool(new BC_Title(x, y, _("Track"))); x += 70;
	add_tool(new BC_Title(x, y, _("Min"))); x += 70;
	add_tool(new BC_Title(x, y, _("Sec"))); x += 100;
	
	x = 10;  y += 25;
	add_tool(track1 = new CDRipTextValue(this, &(cdripper->track1), x, y, 50));
	x += 70;
	add_tool(min1 = new CDRipTextValue(this, &(cdripper->min1), x, y, 50));
	x += 70;
	add_tool(sec1 = new CDRipTextValue(this, &(cdripper->sec1), x, y, 50));
	x += 100;
	
	add_tool(track2 = new CDRipTextValue(this, &(cdripper->track2), x, y, 50));
	x += 70;
	add_tool(min2 = new CDRipTextValue(this, &(cdripper->min2), x, y, 50));
	x += 70;
	add_tool(sec2 = new CDRipTextValue(this, &(cdripper->sec2), x, y, 50));

	x = 10;   y += 30;
	add_tool(new BC_Title(x, y, _("From"), LARGEFONT, RED));
	x += 240;
	add_tool(new BC_Title(x, y, _("To"), LARGEFONT, RED));

	x = 10;   y += 35;
	add_tool(new BC_Title(x, y, _("CD Device:")));
	x += 100;
	add_tool(device = new CDRipWindowDevice(this, cdripper->device, x, y, 200));

	x = 10;   y += 35;
	add_tool(new BC_OKButton(this));
	x += 300;
	add_tool(new BC_CancelButton(this));
	show_window();
	flush();
	return 0;
}
void SelTempAvgWindow::create_objects()
{
	int x1 = 10, x2 = 40, x3 = 80, x4 = 175, x5 = 260, y = 10;

	add_tool(new BC_Title(x1, y, _("Frames to average")));
	y += 20;
	add_tool(total_frames = new SelTempAvgSlider(client, x1, y));
	y += 20;

	add_tool(new BC_Title(x1, y, _("Use Method:")));
	y += 20;

	add_tool(method_none = new SelTempAvgMethodRadial(client, this, x1, y, SelTempAvgConfig::METHOD_NONE, _("None ")));
	y += 20;

	add_tool(method_seltempavg = new SelTempAvgMethodRadial(client, this, x1, y, SelTempAvgConfig::METHOD_SELTEMPAVG, _("Selective Temporal Averaging: ")));
	y += 25;

	add_tool(new BC_Title(x3, y, _("Av. Thres.")));
	add_tool(new BC_Title(x4, y, _("S.D. Thres.")));
	add_tool(new BC_Title(x5, y, _("Mask")));
	y += 25;

	add_tool(new BC_Title(x2, y, _("R / Y")));
        add_tool(avg_threshold_RY = new SelTempAvgThreshSlider(client, x3, y, AVG_RY,client->config.avg_threshold_RY));
        add_tool(std_threshold_RY = new SelTempAvgThreshSlider(client, x4, y, STD_RY,client->config.std_threshold_RY));
        add_tool(mask_RY = new SelTempAvgMask(client, x5, y, MASK_RY, client->config.mask_RY));

	y += 25;
	add_tool(new BC_Title(x2, y, _("G / U")));
        add_tool(avg_threshold_GU = new SelTempAvgThreshSlider(client, x3, y, AVG_GU,client->config.avg_threshold_GU));
        add_tool(std_threshold_GU = new SelTempAvgThreshSlider(client, x4, y, STD_GU,client->config.std_threshold_GU));
        add_tool(mask_GU = new SelTempAvgMask(client, x5, y, MASK_GU,client->config.mask_GU));

	y += 25;
	add_tool(new BC_Title(x2, y, _("B / V")));
        add_tool(avg_threshold_BV = new SelTempAvgThreshSlider(client, x3, y, AVG_BV,client->config.avg_threshold_BV));
        add_tool(std_threshold_BV = new SelTempAvgThreshSlider(client, x4, y, STD_BV,client->config.std_threshold_BV));
        add_tool(mask_BV = new SelTempAvgMask(client, x5, y, MASK_BV,client->config.mask_BV));

	y += 30;
	add_tool(method_average = new SelTempAvgMethodRadial(client, this, x1, y, SelTempAvgConfig::METHOD_AVERAGE, _("Average")));
	y += 20;
	add_tool(method_stddev = new SelTempAvgMethodRadial(client, this, x1, y, SelTempAvgConfig::METHOD_STDDEV, _("Standard Deviation")));

	y += 35;
	add_tool(new BC_Title(x1, y, _("First frame in average:")));
	y += 20;
	add_tool(offset_fixed = new SelTempAvgOffsetRadial(client, this, x1, y, SelTempAvgConfig::OFFSETMODE_FIXED, _("Fixed offset: ")));
        add_tool(offset_fixed_value = new SelTempAvgOffsetValue(client, x4, y));
	y += 25;

	add_tool(offset_restartmarker = new SelTempAvgOffsetRadial(client, this, x1, y, SelTempAvgConfig::OFFSETMODE_RESTARTMARKERSYS, _("Restart marker system:")));
	add_tool(offset_restartmarker_pos = new BC_TextBox(x4+20, y, 100, 1, ""));
	offset_restartmarker_pos->disable();
	y += 20;
	add_tool(offset_restartmarker_keyframe = new SelTempAvgStartKeyframe(client, x2 + 10, y));

	y += 35;

	add_tool(new BC_Title(x1, y, _("Other Options:")));
	y += 20;
	add_tool(paranoid = new SelTempAvgParanoid(client, x1, y));
	y += 25;
	add_tool(no_subtract = new SelTempAvgNoSubtract(client, x1, y));
	y += 30;
	add_tool(new BC_Title(x2, y, _("Gain:")));
        add_tool(gain = new SelTempAvgGainValue(client, x3, y));

	show_window();
	flush();
}
Exemplo n.º 26
0
void TimeAvgWindow::create_objects()
{
	int x = 10, y = 10;
	BC_Bar *bar;
	BC_Title *title;
	
	add_tool(title = new BC_Title(x, y, _("Frame count:")));
	y += title->get_h() + 5;
	add_tool(total_frames = new TimeAvgSlider(client, x, y));
	y += 30;
	add_tool(paranoid = new TimeAvgParanoid(client, x, y));
	y += 30;
	add_tool(no_subtract = new TimeAvgNoSubtract(client, x, y));
	y += 30;
	add_tool(bar = new BC_Bar(x, y, get_w() - x * 2));
	y += bar->get_h() + 5;


	
	add_tool(avg = new TimeAvgAvg(client, this, x, y));
	y += 30;
	add_tool(accum = new TimeAvgAccum(client, this, x, y));
	y += 30;
	add_tool(bar = new BC_Bar(x, y, get_w() - x * 2));
	y += bar->get_h() + 5;



	add_tool(replace = new TimeAvgReplace(client, this, x, y));
	y += 30;
	add_tool(new BC_Title(x, y, _("Threshold:")));
	y += title->get_h() + 5;
	add_tool(threshold = new TimeThresholdSlider(client, x, y));
	y += 30;
	add_tool(new BC_Title(x, y, _("Border:")));
	y += title->get_h() + 5;
	add_tool(border = new TimeBorderSlider(client, x, y));
	y += 30;



	add_tool(bar = new BC_Bar(x, y, get_w() - x * 2));
	y += bar->get_h() + 5;


	add_tool(greater = new TimeAvgGreater(client, this, x, y));
	y += 30;
	add_tool(less = new TimeAvgLess(client, this, x, y));
	y += 30;

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

//	add_tool(new BC_Title(x, y, _("In X:")));
	y += 20;
//	in_x = new SvgCoord(this, client, x, y, &client->config.in_x);
//	in_x->create_objects();
	y += 30;

//	add_tool(new BC_Title(x, y, _("In Y:")));
	y += 20;
//	in_y = new SvgCoord(this, client, x, y, &client->config.in_y);
//	in_y->create_objects();
	y += 30;

//	add_tool(new BC_Title(x, y, _("In W:")));
	y += 20;
//	in_w = new SvgCoord(this, client, x, y, &client->config.in_w);
//	in_w->create_objects();
	y += 30;

//	add_tool(new BC_Title(x, y, _("In H:")));
	y += 20;
//	in_h = new SvgCoord(this, client, x, y, &client->config.in_h);
//	in_h->create_objects();
	y += 30;


	x += 150;
	y = 10;
	add_tool(new BC_Title(x, y, _("Out X:")));
	y += 20;
	out_x = new SvgCoord(this, client, x, y, &client->config.out_x);
	out_x->create_objects();
	y += 30;

	add_tool(new BC_Title(x, y, _("Out Y:")));
	y += 20;
	out_y = new SvgCoord(this, client, x, y, &client->config.out_y);
	out_y->create_objects();
	y += 30;

/*	add_tool(new BC_Title(x, y, _("Out W:")));
	y += 20;
	out_w = new SvgCoord(this, client, x, y, &client->config.out_w);
	out_w->create_objects();
	y += 30;

	add_tool(new BC_Title(x, y, _("Out H:")));
	y += 20;
	out_h = new SvgCoord(this, client, x, y, &client->config.out_h);
	out_h->create_objects();
	y += 30;
*/
	x -= 150;
	add_tool(new_svg_button = new NewSvgButton(client, this, x, y));
	add_tool(edit_svg_button = new EditSvgButton(client, this, x+190, y));
	add_tool(svg_file_title = new BC_Title(x, y+26, client->config.svg_file));

	x +=150;

	show_window();
	flush();
}
Exemplo n.º 28
0
void LensGUI::create_objects()
{
	int x = 10;
	int y = 10;
	int x1;
	BC_Title *title;
	LensToggle *toggle;
	
	for(int i = 0; i < FOV_CHANNELS; i++)
	{
		switch(i)
		{
			case 0: add_tool(title = new BC_Title(x, y, _("R Field of View:"))); break;
			case 1: add_tool(title = new BC_Title(x, y, _("G Field of View:"))); break;
			case 2: add_tool(title = new BC_Title(x, y, _("B Field of View:"))); break;
			case 3: add_tool(title = new BC_Title(x, y, _("A Field of View:"))); break;
		}

		y += title->get_h() + 5;
		add_tool(fov_slider[i] = new LensSlider(client, 
			this,
			0,
			&client->config.fov[i], 
			x, 
			y, 
			0.0001,
			1.0));
		x1 = x + fov_slider[i]->get_w() + 5;
		add_tool(fov_text[i] = new LensText(client, 
			this,
			fov_slider[i],
			&client->config.fov[i], 
			x1, 
			y));
		fov_slider[i]->text = fov_text[i];
		y += fov_text[i]->get_h() + 5;
	}

	add_tool(toggle = new LensToggle(client, 
		&client->lock, 
		x, 
		y,
		"Lock"));
	y += toggle->get_h() + 10;
	
	BC_Bar *bar;
	add_tool(bar = new BC_Bar(x, y, get_w() - x * 2));
	y += bar->get_h() + 5;

	add_tool(title = new BC_Title(x, y, _("Aspect Ratio:")));
	y += title->get_h() + 5;
	add_tool(aspect_slider = new LensSlider(client, 
		this,
		0,
		&client->config.aspect, 
		x, 
		y, 
		0.333,
		3.0));
	x1 = x + aspect_slider->get_w() + 5;
	add_tool(aspect_text = new LensText(client, 
		this,
		aspect_slider,
		&client->config.aspect, 
		x1, 
		y));
	aspect_slider->text = aspect_text;
	y += aspect_text->get_h() + 5;


	add_tool(title = new BC_Title(x, y, _("Radius:")));
	y += title->get_h() + 5;
	add_tool(radius_slider = new LensSlider(client, 
		this,
		0,
		&client->config.radius, 
		x, 
		y, 
		0.333,
		3.0));
	x1 = x + radius_slider->get_w() + 5;
	add_tool(radius_text = new LensText(client, 
		this,
		radius_slider,
		&client->config.radius, 
		x1, 
		y));
	radius_slider->text = radius_text;
	y += radius_text->get_h() + 5;


	add_tool(title = new BC_Title(x, y, _("Center X:")));
	y += title->get_h() + 5;
	add_tool(centerx_slider = new LensSlider(client, 
		this,
		0,
		&client->config.center_x, 
		x, 
		y, 
		0.0,
		99.0));
	x1 = x + centerx_slider->get_w() + 5;
	add_tool(centerx_text = new LensText(client, 
		this,
		centerx_slider,
		&client->config.center_x, 
		x1, 
		y));
	centerx_slider->text = centerx_text;
	centerx_slider->set_precision(1.0);
	y += centerx_text->get_h() + 5;


	add_tool(title = new BC_Title(x, y, _("Center Y:")));
	y += title->get_h() + 5;
	add_tool(centery_slider = new LensSlider(client, 
		this,
		0,
		&client->config.center_y, 
		x, 
		y, 
		0.0,
		99.0));
	x1 = x + centery_slider->get_w() + 5;
	add_tool(centery_text = new LensText(client, 
		this,
		centery_slider,
		&client->config.center_y, 
		x1, 
		y));
	centery_slider->text = centery_text;
	centery_slider->set_precision(1.0);
	y += centery_text->get_h() + 10;

	add_tool(bar = new BC_Bar(x, y, get_w() - x * 2));
	y += bar->get_h() + 5;


// 	add_tool(reverse = new LensToggle(client, 
// 		&client->config.reverse, 
// 		x, 
// 		y,
// 		_("Reverse")));
// 	y += reverse->get_h() + 5;

	add_tool(draw_guides = new LensToggle(client, 
		&client->config.draw_guides, 
		x, 
		y,
		_("Draw center")));
	y += draw_guides->get_h() + 5;

	
	add_tool(title = new BC_Title(x, y, _("Mode:")));
	add_tool(mode = new LensMode(client, 
		this, 
		x + title->get_w() + 5, 
		y));
	mode->create_objects();
	y += mode->get_h() + 5;


// 	add_tool(title = new BC_Title(x, y, _("Preset:")));
// 	add_tool(presets = new LensPresets(client, 
// 		this, 
// 		x + title->get_w() + 5, 
// 		y,
// 		get_w() - x - title->get_w() - 50));
// 	presets->create_objects();
// 	y += presets->get_h() + 5;
// 
// 	add_tool(save_preset = new LensSavePreset(client,
// 		this,
// 		x, 
// 		y));
// 	add_tool(preset_text = new LensPresetText(client,
// 		this,
// 		x + save_preset->get_w() + 5,
// 		y,
// 		get_w() - x - save_preset->get_w() - 10));
// 	y += preset_text->get_h() + 5;
// 	add_tool(delete_preset = new LensDeletePreset(client,
// 		this,
// 		x,
// 		y));

	show_window();
	flush();
}