Esempio n. 1
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();
}
Esempio n. 2
0
void SwapFramesWindow::create_objects()
{
	int x = 10, y = 10;
	add_subwindow(on = new SwapFramesOn(plugin, x, y));
	y += on->get_h() + 5;
	BC_Bar *bar;
	add_subwindow(bar = new BC_Bar(x, y, get_w() - x * 2));
	y += bar->get_h() + 5;
	add_subwindow(swap_even = new SwapFramesEven(plugin, 
		this, 
		x, 
		y));
	y += swap_even->get_h() + 5;
	add_subwindow(swap_odd = new SwapFramesOdd(plugin, 
		this, 
		x, 
		y));
	show_window();
}
Esempio n. 3
0
void
ChromaKeyWindow::create_objects ()
{
  int y = 10, y1, x1 = 0, x2 = 10;
  int x = 30;

  BC_Title *title;
  BC_Bar *bar;
  int ymargin = get_text_height(MEDIUMFONT) + 5;
  int ymargin2 = get_text_height(MEDIUMFONT) + 10;

  add_subwindow (title = new BC_Title (x2, y, _("Color:")));

  add_subwindow (color = new ChromaKeyColor (plugin, this, x, y + 25));

  add_subwindow (sample =
		 new BC_SubWindow (x + color->get_w () + 10, y, 100, 50));
  y += sample->get_h () + 10;

  add_subwindow (use_colorpicker =
		 new ChromaKeyUseColorPicker (plugin, this, x, y));
  y += use_colorpicker->get_h() + 10;
  add_subwindow (show_mask = new ChromaKeyShowMask (plugin, x2, y));
	y += show_mask->get_h() + 5;

	add_subwindow(bar = new BC_Bar(x2, y, get_w() - x2 * 2));
	y += bar->get_h() + 5;
	y1 = y;
  add_subwindow (new BC_Title (x2, y, _("Key parameters:")));
  y += ymargin;
  add_subwindow (title = new BC_Title (x, y, _("Hue Tolerance:")));
  if(title->get_w() > x1) x1 = title->get_w();
  y += ymargin;
  add_subwindow (title = new BC_Title (x, y, _("Min. Brightness:")));
  if(title->get_w() > x1) x1 = title->get_w();
  y += ymargin;
  add_subwindow (title = new BC_Title (x, y, _("Max. Brightness:")));
  if(title->get_w() > x1) x1 = title->get_w();
  y += ymargin;
  add_subwindow (title = new BC_Title (x, y, _("Saturation Offset:")));
  if(title->get_w() > x1) x1 = title->get_w();
  y += ymargin;
  add_subwindow (title = new BC_Title (x, y, _("Min Saturation:")));
  if(title->get_w() > x1) x1 = title->get_w();
  y += ymargin2;

	add_subwindow(bar = new BC_Bar(x2, y, get_w() - x2 * 2));
	y += bar->get_h() + 5;
  add_subwindow (title = new BC_Title (x2, y, _("Mask tweaking:")));
  y += ymargin;
  add_subwindow (title = new BC_Title (x, y, _("In Slope:")));
  if(title->get_w() > x1) x1 = title->get_w();
  y += ymargin;
  add_subwindow (title = new BC_Title (x, y, _("Out Slope:")));
  if(title->get_w() > x1) x1 = title->get_w();
  y += ymargin;
  add_subwindow (title = new BC_Title (x, y, _("Alpha Offset:")));
  if(title->get_w() > x1) x1 = title->get_w();
  y += ymargin2;



	add_subwindow(bar = new BC_Bar(x2, y, get_w() - x2 * 2));
	y += bar->get_h() + 5;
  add_subwindow (title = new BC_Title (x2, y, _("Spill light control:")));
  y += ymargin;
  add_subwindow (title = new BC_Title (x, y, _("Spill Threshold:")));
  if(title->get_w() > x1) x1 = title->get_w();
  y += ymargin;
  add_subwindow (title = new BC_Title (x, y, _("Spill Compensation:")));
  if(title->get_w() > x1) x1 = title->get_w();
  y += ymargin;


	y = y1;
  y += ymargin;
	x1 += x;



  add_subwindow (tolerance = new ChromaKeyTolerance (plugin, x1, y));
  y += ymargin;
  add_subwindow (min_brightness = new ChromaKeyMinBrightness (plugin, x1, y));
  y += ymargin;
  add_subwindow (max_brightness = new ChromaKeyMaxBrightness (plugin, x1, y));
  y += ymargin;
  add_subwindow (saturation = new ChromaKeySaturation (plugin, x1, y));
  y += ymargin;
  add_subwindow (min_saturation = new ChromaKeyMinSaturation (plugin, x1, y));
  y += ymargin;

	y += bar->get_h() + 5;
  y += ymargin2;
  add_subwindow (in_slope = new ChromaKeyInSlope (plugin, x1, y));
  y += ymargin;
  add_subwindow (out_slope = new ChromaKeyOutSlope (plugin, x1, y));
  y += ymargin;
  add_subwindow (alpha_offset = new ChromaKeyAlphaOffset (plugin, x1, y));
   y += ymargin;

	y += bar->get_h() + 5;
  y += ymargin2;
  add_subwindow (spill_threshold = new ChromaKeySpillThreshold (plugin, x1, y));
  y += ymargin;
  add_subwindow (spill_amount = new ChromaKeySpillAmount (plugin, x1, y));

  color_thread = new ChromaKeyColorThread (plugin, this);

  update_sample ();
  show_window ();
}
Esempio n. 4
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();
}