Exemple #1
0
ScreenArea::ScreenArea(int _iWidth, int _iHeight, int _iScale) :
  m_iFilterScale(1),
  m_vFilter2x(NULL),
  m_vFilterIB(NULL),
  m_puiPixels(NULL),
  m_puiDelta(NULL),
  m_iScaledWidth(_iWidth),
  m_iScaledHeight(_iHeight),
  m_bEnableRender(true),
  m_bShowCursor(true)
{
  g_assert(_iWidth >= 1 && _iHeight >= 1 && _iScale >= 1);

  m_iWidth  = _iWidth;
  m_iHeight = _iHeight;
  m_iScale  = _iScale;

  set_events(Gdk::EXPOSURE_MASK
             | Gdk::POINTER_MOTION_MASK
             | Gdk::ENTER_NOTIFY_MASK
             | Gdk::LEAVE_NOTIFY_MASK);

  char aiEmptyData[8];
  memset(aiEmptyData, 0, sizeof(aiEmptyData));
  Glib::RefPtr<Gdk::Bitmap> poSource = Gdk::Bitmap::create(aiEmptyData, 8, 8);
  Glib::RefPtr<Gdk::Bitmap> poMask = Gdk::Bitmap::create(aiEmptyData, 8, 8);
  Gdk::Color oFg;
  Gdk::Color oBg;
  oFg.set_rgb(0, 0, 0);
  oBg.set_rgb(0, 0, 0);

  m_poEmptyCursor = new Gdk::Cursor(poSource, poMask, oFg, oBg, 0, 0);
}
Exemple #2
0
/**
 Borra todos los datos de un formulario al cambiar de pagina.
 @param bloc, GtkNotebookPage.
 @param guint, pag contiene el numero de pagina.
 */
void Preferencias::borraDatosForm(GtkNotebookPage* bloc,guint pag)
{
	Gdk::Color col;
	Glib::RefPtr<Gtk::TextBuffer> buf;
	Gtk::TreeModel::iterator it;
	
	col.set_rgb(0,0,0);
	
	clasesG->set_text("");
	nomClasesG->set_text("");
	buf = descripClasesG->get_buffer();
	buf->set_text("");
	//claseLinea.set_active_text("");

	estadosG->set_text("");
	nomEstadosG->set_text("");
	buf = descripEstadosG->get_buffer();
	buf->set_text("");
	colorEstadosG->set_color(col);

	separPuntosGPD->set_value(0);
	numColumnsG->set_value(0);
	numFilasG->set_value(0);

	colorEstadosG->set_sensitive(false);
	claseLinea->set_sensitive(false);
	
	iter = it;
}
AnalogMemoryGUI::AnalogMemoryGUI(const std::string& URI)
{
	EventBox *p_background = manage (new EventBox());
	Gdk::Color* color = new  Gdk::Color();
	color->set_rgb(7710, 8738, 9252);
	p_background->modify_bg(Gtk::STATE_NORMAL, *color);

	VBox *p_mainWidget = manage(new VBox(false));

	MyBox *p_writeAddressingModeBox = manage (new MyBox("Write Addressing Mode", Gtk::Orientation::ORIENTATION_VERTICAL));

	m_comboWriteAddressForm = manage (new ComboBoxText());
	m_comboWriteAddressForm->append_text("Direct (no fill)");
	m_comboWriteAddressForm->append_text("Linear up only, no fill");
	m_comboWriteAddressForm->append_text("Linear up only, fill");
	m_comboWriteAddressForm->append_text("Linear down only, no fill");
	m_comboWriteAddressForm->append_text("Linear down only, fill");
	m_comboWriteAddressForm->append_text("Reflected");
	m_comboWriteAddressForm->signal_changed().connect(compose(bind<0> (mem_fun(*this, &AnalogMemoryGUI::write_control), p_write_addressing_mode), mem_fun(*m_comboWriteAddressForm, &ComboBoxText::get_active_row_number)));

	p_writeAddressingModeBox->pack_start(*m_comboWriteAddressForm);
	p_mainWidget->pack_start(*p_writeAddressingModeBox);

	p_mainWidget->pack_start(*(m_dialN				= CreateDial("N (for 2^N memory cells)",	p_n,			NORMAL, 1)));
	p_mainWidget->pack_start(*(m_dialWriteThresh	= CreateDial("Write Threshold",				p_write_tresh,	NORMAL, 0.01)));

	p_background->add(*p_mainWidget);

	add(*p_background);

	Gtk::manage(p_background);
}
VCAExpAudioGUI::VCAExpAudioGUI(const std::string& URI)
{
	EventBox *p_background = manage(new EventBox());
	Gdk::Color* color = new  Gdk::Color();
	color->set_rgb(7710, 8738, 9252);
	p_background->modify_bg(Gtk::STATE_NORMAL, *color);



	VBox *p_mainWidget = manage(new VBox(false, 5));



	Frame *p_gainFrame = manage(new Frame("Gain"));
	//p_gainFrame->set_shadow_type(Gtk::SHADOW_NONE);
	HBox *p_gainBox = manage(new HBox(true));

	slot<void> p_slotGain1 = compose(bind<0>(mem_fun(*this, &VCAExpAudioGUI::write_control), p_gain1), mem_fun(*this,  &VCAExpAudioGUI::get_gain1));
	m_dialGain1 = new LabeledDial("Gain Offset", p_slotGain1, p_gain1, 0, 1, NORMAL, 0.01, 2);
	p_gainBox->pack_start(*m_dialGain1);

	slot<void> p_slotGain2 = compose(bind<0>(mem_fun(*this, &VCAExpAudioGUI::write_control), p_gain2), mem_fun(*this,  &VCAExpAudioGUI::get_gain2));
	m_dialGain2 = new LabeledDial("2nd Gain Boost", p_slotGain2, p_gain2, 0, 1, NORMAL, 0.01, 2);
	p_gainBox->pack_start(*m_dialGain2);

	p_gainFrame->add(*p_gainBox);
	p_mainWidget->pack_start(*p_gainFrame);



	Frame *p_inFrame = manage(new Frame("In"));
	//p_gainFrame->set_shadow_type(Gtk::SHADOW_NONE);
	HBox *p_volumeBox = manage(new HBox(true));

	slot<void> p_slotIn1 = compose(bind<0>(mem_fun(*this, &VCAExpAudioGUI::write_control), p_in1), mem_fun(*this,  &VCAExpAudioGUI::get_in1));
	m_dialIn1 = new LabeledDial("In 1", p_slotIn1, p_in1, 0, 2, NORMAL, 0.01, 2);
	p_volumeBox->pack_start(*m_dialIn1);

	slot<void> p_slotIn2 = compose(bind<0>(mem_fun(*this, &VCAExpAudioGUI::write_control), p_in2), mem_fun(*this,  &VCAExpAudioGUI::get_in2));
	m_dialIn2 = new LabeledDial("In 2", p_slotIn2, p_in2, 0, 2, NORMAL, 0.01, 2);
	p_volumeBox->pack_start(*m_dialIn2);

	p_inFrame->add(*p_volumeBox);
	p_mainWidget->pack_start(*p_inFrame);



	slot<void> p_slotOutputLevel = compose(bind<0>(mem_fun(*this, &VCAExpAudioGUI::write_control), p_outputLevel), mem_fun(*this,  &VCAExpAudioGUI::get_outputLevel));
	m_dialOutputLevel = new LabeledDial("Output Level", p_slotOutputLevel, p_outputLevel, 0, 2, NORMAL, 0.01, 2);
	p_mainWidget->pack_start(*m_dialOutputLevel);



	p_mainWidget->set_size_request(150, 300);

	p_background->add(*p_mainWidget);
	add(*p_background);

	Gtk::manage(p_mainWidget);
}
Gdk::Color WidgetExpanderBase::getARandColor()
{
  Gdk::Color RandColor;

  RandColor.set_rgb(Glib::Rand().get_int_range(0, 65535),
      Glib::Rand().get_int_range(0, 65535),
      Glib::Rand().get_int_range(0, 65535));

  return RandColor;
}
BeatRepeaterMonoGUI::BeatRepeaterMonoGUI(const std::string& URI)
{
    EventBox *p_background = manage (new EventBox());
    Gdk::Color* color = new  Gdk::Color();
    color->set_rgb(7710, 8738, 9252);
    p_background->modify_bg(Gtk::STATE_NORMAL, *color);


    VBox *p_mainWidget = manage (new VBox(false));


    MyBox *p_beatBox = manage (new MyBox("Beat", Gtk::Orientation::ORIENTATION_VERTICAL));
    HBox *p_beatDials = manage(new HBox(false));

    m_dialTempo = new LabeledDial("Tempo", p_tempo, 40, 320, NORMAL, 1, 0);
    m_dialTempo->signal_value_changed().connect(compose(bind<0>(mem_fun(*this, &BeatRepeaterMonoGUI::write_control), p_tempo), mem_fun(*m_dialTempo,  &LabeledDial::get_value)));
    p_beatDials->pack_start(*m_dialTempo, Gtk::PACK_EXPAND_PADDING, 0);

    m_dialBeatSize = new LabeledDial("Beat Size", p_beatSize, 0.0078125, 128, MULTIPLIER, 0.0078125, 7);
    m_dialBeatSize->signal_value_changed().connect(compose(bind<0>(mem_fun(*this, &BeatRepeaterMonoGUI::write_control), p_beatSize), mem_fun(*m_dialBeatSize,  &LabeledDial::get_value)));
    p_beatDials->pack_start(*m_dialBeatSize, Gtk::PACK_EXPAND_PADDING, 0);

    p_beatBox->pack_start(*p_beatDials);

    Alignment* p_align = new Alignment(0.5, 0.5, 0, 0);
    m_checkReverse = manage(new CheckButton("Reverse"));
    m_checkReverse->signal_toggled().connect(compose(bind<0>(mem_fun(*this, &BeatRepeaterMonoGUI::write_control), p_reverse), mem_fun(*m_checkReverse, &CheckButton::get_active)));
    p_align->add(*m_checkReverse);
    p_beatBox->pack_start(*p_align);

    p_mainWidget->pack_start(*p_beatBox);


    MyBox *p_envelopeFrame = manage(new MyBox("Envelope", Gtk::Orientation::ORIENTATION_HORIZONTAL));

    m_dialAttack = new LabeledDial("Attack", p_attack, 3, 25, NORMAL, 1, 0);
    m_dialAttack->signal_value_changed().connect(compose(bind<0>(mem_fun(*this, &BeatRepeaterMonoGUI::write_control), p_attack), mem_fun(*m_dialAttack,  &LabeledDial::get_value)));
    p_envelopeFrame->pack_start(*m_dialAttack);

    m_dialRelease = new LabeledDial("Release", p_release, 3, 25, NORMAL, 1, 0);
    m_dialRelease->signal_value_changed().connect(compose(bind<0>(mem_fun(*this, &BeatRepeaterMonoGUI::write_control), p_release), mem_fun(*m_dialRelease,  &LabeledDial::get_value)));
    p_envelopeFrame->pack_start(*m_dialRelease);

    p_mainWidget->pack_start(*p_envelopeFrame);


    p_background->add(*p_mainWidget);
    add(*p_background);

    Gtk::manage(p_mainWidget);
}
Exemple #7
0
bool
RedBlueLevelSelector::redraw(GdkEventExpose */*bleh*/)
{
	//!Check if the window we want draw is ready
	Glib::RefPtr<Gdk::Window> window = get_window();
	if(!window) return true;

	const int w(get_width()),h(get_height());

	Gdk::Color color;

	Glib::RefPtr<Gdk::GC> gc(Gdk::GC::create(window));

	int i;

	// Draw the gradient
	for(i=0;i<w;i++)
	{
		float red_blue(((float(i)/float(w)+0.5f)-1.0f)/2.0f+1.0f);
		float blue_red(2.0f-(red_blue));
		if(red_blue>1.0f)red_blue=1.0f;
		if(blue_red>1.0f)blue_red=1.0f;

		color.set_rgb(
			round_to_int(min(red_blue,1.0f)*65535),
			round_to_int(sqrt(min(red_blue,blue_red))*65535),
			round_to_int(min(blue_red,1.0f)*65535)
		);

		gc->set_rgb_fg_color(color);
		window->draw_rectangle(gc, true, i, 0, 1, h);
	}

	// Draw a frame
	gc->set_rgb_fg_color(Gdk::Color("#000000"));
	window->draw_rectangle(gc, false, 0, 0, w-1, h-1);

	// Draw the position of the current value
	i=(int)(((level-1.0f)*2.0f+1.0f-0.5f)*w+0.5);
	gc->set_rgb_fg_color(Gdk::Color("#00ff00"));
	window->draw_rectangle(gc, true, i, 1, 1, h-1);

	// Print out the value
	Glib::RefPtr<Pango::Layout> layout(Pango::Layout::create(get_pango_context()));
	layout->set_text(etl::strprintf("%0.02f",level));
	layout->set_alignment(Pango::ALIGN_CENTER);
	gc->set_rgb_fg_color(Gdk::Color("#a00000"));
	window->draw_layout(gc, w/2, 4, layout);

	return true;
}
LfoTempoGUI::LfoTempoGUI(const std::string& URI)
{
	EventBox *p_background = manage (new EventBox());
	Gdk::Color* color = new  Gdk::Color();
	color->set_rgb(7710, 8738, 9252);
	p_background->modify_bg(Gtk::STATE_NORMAL, *color);

	VBox *p_mainWidget = manage (new VBox(false, 5));

	Label *p_labelWaveForm = manage (new Label("Wave Form"));
	p_mainWidget->pack_start(*p_labelWaveForm);

	m_comboWaveForm = manage (new ComboBoxText());
	m_comboWaveForm->append_text("Sine");
	m_comboWaveForm->append_text("Triangle");
	m_comboWaveForm->append_text("Sawtooth Up");
	m_comboWaveForm->append_text("Sawtooth Down");
	m_comboWaveForm->append_text("Rectangle");
	m_comboWaveForm->append_text("S & H");

	slot<void> p_slotWaveForm = compose(bind<0> (mem_fun(*this, &LfoTempoGUI::write_control), p_waveForm), mem_fun(*m_comboWaveForm, &ComboBoxText::get_active_row_number));
	m_comboWaveForm->signal_changed().connect(p_slotWaveForm);

	p_mainWidget->pack_start(*m_comboWaveForm);

	Frame *p_freqFrame = manage(new Frame("Tempo"));

	HBox *p_freqBox = manage(new HBox(true));

	slot<void> p_slotTempo = compose(bind<0>(mem_fun(*this, &LfoTempoGUI::write_control), p_tempo), mem_fun(*this, &LfoTempoGUI::get_tempo));
	m_dialTempo = new LabeledDial("Tempo", p_slotTempo, p_tempo, 1, 320, NORMAL, 1, 0);
	p_freqBox->pack_start(*m_dialTempo);

	slot<void> p_slotTempoMultiplier = compose(bind<0>(mem_fun(*this, &LfoTempoGUI::write_control), p_tempoMultiplier), mem_fun(*this, &LfoTempoGUI::get_tempoMultiplier));
	m_dialTempoMultiplier = new LabeledDial("Tempo Multiplier", p_slotTempoMultiplier, p_tempoMultiplier, 0.0078125, 32, DIVIDER, 1, 7);
	p_freqBox->pack_start(*m_dialTempoMultiplier);

	p_freqFrame->add(*p_freqBox);
	p_mainWidget->pack_start(*p_freqFrame);

	slot<void> p_slotPhi0 = compose(bind<0> (mem_fun(*this, &LfoTempoGUI::write_control), p_phi0), mem_fun(*this, &LfoTempoGUI::get_phi0));
	m_dialPhi0 = new LabeledDial("Phi0", p_slotPhi0, p_phi0, 0, 6.28, NORMAL, 0.01, 2);
	p_mainWidget->pack_start(*m_dialPhi0);

	p_mainWidget->set_size_request(160, 260);

	p_background->add(*p_mainWidget);
	add(*p_background);

	Gtk::manage(p_mainWidget);
}
RindModulatorCVGUI::RindModulatorCVGUI(const std::string& URI)
{
	EventBox *p_background = manage (new EventBox());
	Gdk::Color* color = new  Gdk::Color();
	color->set_rgb(7710, 8738, 9252);
	p_background->modify_bg(Gtk::STATE_NORMAL, *color);

	slot<void> p_slotGain = compose(bind<0>(mem_fun(*this, &RindModulatorCVGUI::write_control), p_gain), mem_fun(*this,  &RindModulatorCVGUI::get_gain));
	m_dialGain = new LabeledDial("Gain", p_slotGain, p_gain, -10, 10, NORMAL, 0.01, 2);
	p_background->add(*m_dialGain);

	p_background->set_size_request(100, 80);

	add(*p_background);

	Gtk::manage(p_background);
}
Exemple #10
0
HaasGUI::HaasGUI(const std::string& URI)
{
	EventBox *p_background = manage (new EventBox());
	Gdk::Color* color = new  Gdk::Color();
	color->set_rgb(7710, 8738, 9252);
	p_background->modify_bg(Gtk::STATE_NORMAL, *color);

	HBox *p_mainWidget = manage (new HBox(true));

	p_mainWidget->pack_start(*(m_dialDelay = CreateDial("Delay (ms)", p_delay, NORMAL, 1)));
	p_mainWidget->pack_start(*(m_dialMix = CreateDial("Dry/Wet (%)", p_dry_wet, NORMAL, 1)));

	p_background->add(*p_mainWidget);
	add(*p_background);

	Gtk::manage(p_background);
}
Exemple #11
0
/**
 Rellena los datos en el formulario correspondientes a la clase o el estado
 seleccionado por el usuario.
 */
void Preferencias::seleccionaEstado()
{
	Glib::RefPtr<Gtk::TreeSelection> filaSeleccionada;
	Gtk::TreeModel::iterator it;
	string etiquetaClase;
	Glib::RefPtr<Gtk::TextBuffer> buf;
	Gdk::Color col;
	int i;

	iter = it;
	i = 0;
	
	filaSeleccionada = treeviewEstadosG->get_selection();
	
	iter = filaSeleccionada->get_selected();
	
	if(iter)
	{
		int numCopClaseEst = copiaEstadoCelula.size();
		
		Gtk::TreeModel::Row row = *iter;

		etiquetaClase = row[columModel.nomCol];

		while(i < numCopClaseEst && etiquetaClase != copiaEstadoCelula[i].getEtiquetaClasificacion())
		{
			i++;
		}	
			
		if(etiquetaClase == copiaEstadoCelula[i].getEtiquetaClasificacion())
		{
			col.set_rgb(copiaEstadoCelula[i].getColorEstadoR(),
									  copiaEstadoCelula[i].getColorEstadoG(),
									  copiaEstadoCelula[i].getColorEstadoB());
			indiceClassEstado = i;

			estadosG->set_text(copiaEstadoCelula[i].getEtiquetaClasificacion());
			nomEstadosG->set_text(copiaEstadoCelula[i].getNombreClasificacion());
			buf = descripEstadosG->get_buffer();
			buf->set_text(copiaEstadoCelula[i].getDescripcionClasificacion());
			colorEstadosG->set_sensitive(true);
			colorEstadosG->set_color(col);
		}
	}
}
Exemple #12
0
bool
BlackLevelSelector::redraw(GdkEventExpose */*bleh*/)
{
	//!Check if the window we want draw is ready
	Glib::RefPtr<Gdk::Window> window = get_window();
	if(!window) return true;

	const int w(get_width()),h(get_height());

	Gdk::Color color;

	Glib::RefPtr<Gdk::GC> gc(Gdk::GC::create(window));

	int i;

	// Draw the gradient
	for(i=0;i<w;i++)
	{
		color.set_rgb(i*65536/w,i*65536/w,i*65536/w);

		gc->set_rgb_fg_color(color);
		window->draw_rectangle(gc, true, i, 0, 1, h);
	}

	// Draw a frame
	gc->set_rgb_fg_color(Gdk::Color("#000000"));
	window->draw_rectangle(gc, false, 0, 0, w-1, h-1);

	// Draw the position of the current value
	i=(int)(level*w+0.5);
	gc->set_rgb_fg_color(Gdk::Color("#ff0000"));
	window->draw_rectangle(gc, true, i, 1, 1, h-1);

	// Print out the value
	Glib::RefPtr<Pango::Layout> layout(Pango::Layout::create(get_pango_context()));
	layout->set_text(etl::strprintf("%0.01f%%",level*100.0f));
	layout->set_alignment(Pango::ALIGN_CENTER);
	gc->set_rgb_fg_color(Gdk::Color("#a00000"));
	window->draw_layout(gc, w/2, 4, layout);

	return true;
}
Exemple #13
0
void
DoTextWidget()
{
    InitGtkmm();

    Gtk::Window win;
    TextWidget t_wdg;

    Gdk::Color white;
    white.set_rgb(0x0, 0x0, 0xffff);

    win.set_title("TextWidget");

    t_wdg.modify_bg(Gtk::STATE_NORMAL, white);

    win.set_default_size(300, 300);
    win.add(t_wdg);

    RunWindow(win);
}
Exemple #14
0
HysteresisGUI::HysteresisGUI(const std::string& URI)
{
	EventBox *p_background = manage (new EventBox());
	Gdk::Color* color = new  Gdk::Color();
	color->set_rgb(7710, 8738, 9252);
	p_background->modify_bg(Gtk::STATE_NORMAL, *color);

	VBox *p_mainWidget = manage (new VBox(false));

	p_mainWidget->pack_start(*(m_dialCenter		= CreateDial("Center",		p_center,		NORMAL, 0.01)));
	p_mainWidget->pack_start(*(m_dialOverlap	= CreateDial("Overlap",		p_overlap,		NORMAL, 0.01)));

	p_mainWidget->pack_start(*(m_dialLowSlope	= CreateDial("Low Slope",	p_lowSlope,		NORMAL, 0.01)));
	//p_mainWidget->pack_start(*(m_dialLowOffset	= CreateDial("Low Offset",	p_lowOffset,	NORMAL, 0.01)));

	p_mainWidget->pack_start(*(m_dialHighSlope	= CreateDial("High Slope",	p_highSlope,	NORMAL, 0.01)));
	//p_mainWidget->pack_start(*(m_dialHighOffset	= CreateDial("High Offset", p_highOffset,	NORMAL, 0.01)));

	p_background->add(*p_mainWidget);
	add(*p_background);

	Gtk::manage(p_mainWidget);
}
Exemple #15
0
Noise2CVGUI::Noise2CVGUI(const std::string& URI)
{
	EventBox *p_background = manage (new EventBox());
	Gdk::Color* color = new  Gdk::Color();
	color->set_rgb(7710, 8738, 9252);
	p_background->modify_bg(Gtk::STATE_NORMAL, *color);

	VBox *p_mainWidget = manage (new VBox(false, 5));

	Label *p_labelWaveForm = manage (new Label("Noise Type"));
	p_mainWidget->pack_start(*p_labelWaveForm);

	m_comboNoiseForm = manage (new ComboBoxText());
	m_comboNoiseForm->append_text("White");
	m_comboNoiseForm->append_text("Random");
	m_comboNoiseForm->append_text("Pink");

	slot<void> p_slotNoiseForm = compose(bind<0> (mem_fun(*this, &Noise2CVGUI::write_control), p_noiseType), mem_fun(*m_comboNoiseForm, &ComboBoxText::get_active_row_number));
	m_comboNoiseForm->signal_changed().connect(p_slotNoiseForm);

	p_mainWidget->pack_start(*m_comboNoiseForm);

	slot<void> p_slotRandomRate = compose(bind<0>(mem_fun(*this, &Noise2CVGUI::write_control), p_rate), mem_fun(*this,  &Noise2CVGUI::get_randomRate));
	m_dialRandomRate = new LabeledDial("Random Rate", p_slotRandomRate, p_rate, 0, 10, NORMAL, 0.01, 2);
	p_mainWidget->pack_start(*m_dialRandomRate);

	slot<void> p_slotRandomLevel = compose(bind<0>(mem_fun(*this, &Noise2CVGUI::write_control), p_level), mem_fun(*this, &Noise2CVGUI::get_randomLevel));
	m_dialRandomLevel = new LabeledDial("Random Level", p_slotRandomLevel, p_level, 0, 1, LOG, 0.0001, 4);
	p_mainWidget->pack_start(*m_dialRandomLevel);

	p_mainWidget->set_size_request(150, 200);

	p_background->add(*p_mainWidget);
	add(*p_background);

	Gtk::manage(p_mainWidget);
}
Exemple #16
0
EnvGUI::EnvGUI(const std::string& URI)
{
	EventBox *p_background = manage (new EventBox());
	Gdk::Color* color = new  Gdk::Color();
	color->set_rgb(7710, 8738, 9252);
	p_background->modify_bg(Gtk::STATE_NORMAL, *color);

	VBox *p_mainWidget = manage (new VBox(false, 5));

	m_envScope = new EnvGUIScope();
	p_mainWidget->pack_start(*m_envScope);



	Frame *p_adsrFrame = manage (new Frame("ADSR"));
	p_adsrFrame->set_shadow_type(Gtk::SHADOW_NONE);
	HBox *p_adsrWidget = manage (new HBox(false));

	slot<void> p_slotAttack = compose(bind<0>(mem_fun(*this, &EnvGUI::write_control), p_attack), mem_fun(*this, &EnvGUI::get_attack));
	m_scaleAttack = new LabeledDial("Attack", p_slotAttack, p_attack, 0, 1, NORMAL, 0.01, 2);
	p_adsrWidget->pack_start(*m_scaleAttack);

	slot<void> p_slotDecay = compose(bind<0> (mem_fun(*this, &EnvGUI::write_control), p_decay), mem_fun(*this, &EnvGUI::get_decay));
	m_scaleDecay = new LabeledDial("Decay", p_slotDecay, p_decay, 0, 1, NORMAL, 0.01, 2);
	p_adsrWidget->pack_start(*m_scaleDecay);

	slot<void> p_slotSustain = compose(bind<0> (mem_fun(*this, &EnvGUI::write_control), p_sustain), mem_fun(*this, &EnvGUI::get_sustain));
	m_scaleSustain = new LabeledDial("Sustain", p_slotSustain, p_delay, 0, 1, NORMAL, 0.01, 2);
	p_adsrWidget->pack_start(*m_scaleSustain);

	slot<void> p_slotRelease = compose(bind<0> (mem_fun(*this, &EnvGUI::write_control), p_release), mem_fun(*this, &EnvGUI::get_release));
	m_scaleRelease = new LabeledDial("Release", p_slotRelease, p_release, 0, 1, NORMAL, 0.01, 2);
	p_adsrWidget->pack_start(*m_scaleRelease);

	p_adsrFrame->add(*p_adsrWidget);
	p_mainWidget->pack_start(*p_adsrFrame);



	p_mainWidget->pack_start(*(new HSeparator()));



	Frame *p_dhtFrame = manage (new Frame("Delay / Hold / Time Scale"));
	p_dhtFrame->set_shadow_type(Gtk::SHADOW_NONE);
	HBox *p_dhtWidget = manage (new HBox(false));

	slot<void> p_slotDelay = compose(bind<0>(mem_fun(*this, &EnvGUI::write_control), p_delay), mem_fun(*this, &EnvGUI::get_delay));
	m_scaleDelay = new LabeledDial("Delay", p_slotDelay, p_delay, 0, 1, NORMAL, 0.01, 2);
	p_dhtWidget->pack_start(*m_scaleDelay);

	slot<void> p_slotHold = compose(bind<0> (mem_fun(*this, &EnvGUI::write_control), p_hold), mem_fun(*this, &EnvGUI::get_hold));
	m_scaleHold = new LabeledDial("Hold", p_slotHold, p_hold, 0, 1, NORMAL, 0.01, 2);
	p_dhtWidget->pack_start(*m_scaleHold);

	slot<void> p_slotTimescale = compose(bind<0> (mem_fun(*this, &EnvGUI::write_control), p_timeScale), mem_fun(*this, &EnvGUI::get_timescale));
	m_scaleTimeScale = new LabeledDial("Time Scale", p_slotTimescale, p_timeScale, 0, 10, NORMAL, 0.01, 2);
	p_dhtWidget->pack_start(*m_scaleTimeScale);

	p_dhtFrame->add(*p_dhtWidget);
	p_mainWidget->pack_start(*p_dhtFrame);



	m_envScope->m_attackValue = m_scaleAttack->get_value();
	m_envScope->m_decayValue = m_scaleDecay->get_value();
	m_envScope->m_sustainValue = m_scaleSustain->get_value();
	m_envScope->m_releaseValue = m_scaleRelease->get_value();
	m_envScope->m_delayValue = m_scaleDelay->get_value();
	m_envScope->m_holdValue = m_scaleHold->get_value();

	m_envScope->Redraw();



	p_mainWidget->set_size_request(200, 320);

	p_background->add(*p_mainWidget);
	add(*p_background);

	Gtk::manage(p_mainWidget);
}
Exemple #17
0
Vco2CVGUI::Vco2CVGUI(const char* plugin_uri)
{
	EventBox *p_background = manage(new EventBox());
	Gdk::Color* color = new  Gdk::Color();
	color->set_rgb(7710, 8738, 9252);
	p_background->modify_bg(Gtk::STATE_NORMAL, *color);



	VBox *p_mainWidget = manage(new VBox(false, 5));



	Label *p_labeWaveForm = manage (new Label("Wave Form"));
	p_mainWidget->pack_start(*p_labeWaveForm);

	m_comboWaveForm = manage (new ComboBoxText());
	m_comboWaveForm->append_text("Sine");
	m_comboWaveForm->append_text("Triangle");
	m_comboWaveForm->append_text("Sawtooth");
	m_comboWaveForm->append_text("Rectangle");
	m_comboWaveForm->append_text("Aux Saw 1");
	m_comboWaveForm->append_text("Aux Saw 2");
	m_comboWaveForm->append_text("Aux Saw 3");

	slot<void> p_slotWaveForm = compose(bind<0> (mem_fun(*this, &Vco2CVGUI::write_control), p_waveForm), mem_fun(*this, &Vco2CVGUI::get_waveform));
	m_comboWaveForm->signal_changed().connect(p_slotWaveForm);
	p_mainWidget->pack_start(*m_comboWaveForm);



	Frame *p_freqFrame = manage(new Frame("Frequency"));
	//p_gainFrame->set_shadow_type(Gtk::SHADOW_NONE);
	HBox *p_freqBox = manage(new HBox(true));

	slot<void> p_slotOctave = compose(bind<0>(mem_fun(*this, &Vco2CVGUI::write_control), p_octave), mem_fun(*this,  &Vco2CVGUI::get_octave));
	m_scaleOctave = new LabeledDial("Octave", p_slotOctave, p_octave, 0, 6, NORMAL, 1, 0);
	p_freqBox->pack_start(*m_scaleOctave);

	slot<void> p_slotTune = compose(bind<0>(mem_fun(*this, &Vco2CVGUI::write_control), p_tune), mem_fun(*this,  &Vco2CVGUI::get_tune));
	m_scaleTune = new LabeledDial("Tune", p_slotTune, p_tune, 0, 1, LOG, 0.0001, 4);
	p_freqBox->pack_start(*m_scaleTune);

	slot<void> p_slotSubharmonic = compose(bind<0>(mem_fun(*this, &Vco2CVGUI::write_control), p_semitone), mem_fun(*this,  &Vco2CVGUI::get_semitone));
	m_scaleSemitone = new LabeledDial("Semitone", p_slotSubharmonic, p_semitone, 0, 12, NORMAL, 1, 0);
	p_freqBox->pack_start(*m_scaleSemitone);

	p_freqFrame->add(*p_freqBox);
	p_mainWidget->pack_start(*p_freqFrame);



	Frame *p_pwpFrame = manage(new Frame("Pulse Width / Phase"));
	//p_gainFrame->set_shadow_type(Gtk::SHADOW_NONE);
	HBox *p_pwpBox = manage(new HBox(true));

	slot<void> p_slotPw0 = compose(bind<0>(mem_fun(*this, &Vco2CVGUI::write_control), p_pw0), mem_fun(*this,  &Vco2CVGUI::get_pw));
	m_scalePW = new LabeledDial("PW", p_slotPw0, p_pw0, 0.1, 0.9, NORMAL, 0.001, 3);
	p_pwpBox->pack_start(*m_scalePW);

	slot<void> p_slotPwGain = compose(bind<0>(mem_fun(*this, &Vco2CVGUI::write_control), p_pwGain), mem_fun(*this,  &Vco2CVGUI::get_pwGain));
	m_scalePWGain = new LabeledDial("PW Gain", p_slotPwGain, p_pwGain, 0, 1, LOG, 0.0001, 4);
	p_pwpBox->pack_start(*m_scalePWGain);

	slot<void> p_slotEdge = compose(bind<0>(mem_fun(*this, &Vco2CVGUI::write_control), p_edge), mem_fun(*this,  &Vco2CVGUI::get_edge));
	m_scaleEdge = new LabeledDial("Edge", p_slotEdge, p_edge, 1, 10, NORMAL, 0.05, 2);
	p_pwpBox->pack_start(*m_scaleEdge);

	slot<void> p_slotPhi0 = compose(bind<0>(mem_fun(*this, &Vco2CVGUI::write_control), p_phi0), mem_fun(*this,  &Vco2CVGUI::get_phi0));
	m_scalePhi0 = new LabeledDial("Phi0", p_slotPhi0, p_phi0, 0, 6.28, LOG, 0.0001, 4);
	p_pwpBox->pack_start(*m_scalePhi0);

	p_pwpFrame->add(*p_pwpBox);
	p_mainWidget->pack_start(*p_pwpFrame);



	Frame *p_modulationFrame = manage(new Frame("Modulation"));
	//p_gainFrame->set_shadow_type(Gtk::SHADOW_NONE);
	HBox *p_modulationBox = manage(new HBox(true));

	slot<void> p_slotExpFMGain = compose(bind<0>(mem_fun(*this, &Vco2CVGUI::write_control), p_expFMGain), mem_fun(*this,  &Vco2CVGUI::get_expFMGain));
	m_scaleExpFMGain = new LabeledDial("Exp FM Gain", p_slotExpFMGain, p_expFMGain, 0, 10, LOG, 0.001, 3);
	p_modulationBox->pack_start(*m_scaleExpFMGain);

	slot<void> p_slotLinFMGain = compose(bind<0>(mem_fun(*this, &Vco2CVGUI::write_control), p_linFMGain), mem_fun(*this,  &Vco2CVGUI::get_linFMGain));
	m_scaleLinFMGain = new LabeledDial("Lin FM Gain", p_slotLinFMGain, p_linFMGain, 0, 10, LOG, 0.001, 3);
	p_modulationBox->pack_start(*m_scaleLinFMGain);

	p_modulationFrame->add(*p_modulationBox);
	p_mainWidget->pack_start(*p_modulationFrame);



	p_mainWidget->set_size_request(260, 360);

	p_background->add(*p_mainWidget);
	add(*p_background);

	Gtk::manage(p_mainWidget);
}
CardActivatorEventBox::CardActivatorEventBox(int width)
{
	static ActivationConsolidationFunctionalityConfiguration config =
			SAESGUIConfigurationManager::Current()->GetActivationConsolidationFunctionalityConfiguration();

	static LabelConfiguration selectedLabelConfiguration =
			SAESGUIConfigurationManager::ConvertToLabelConfiguration(config.getLabelSelectedConfiguration());

	static LabelConfiguration unselectedLabelConfiguration =
			SAESGUIConfigurationManager::ConvertToLabelConfiguration(config.getLabelUnselectedConfiguration());

	static LabelConfiguration titleLabelConfiguration =
			SAESGUIConfigurationManager::ConvertToLabelConfiguration(config.getTitleFontConfiguration());

	Gdk::Color selectedBoxColor;
	selectedBoxColor.set_rgb(config.getSelectedBoxColor().getRed(),
			config.getSelectedBoxColor().getGreen(), config.getSelectedBoxColor().getBlue());

	Gdk::Color unselectedBoxColor;
	unselectedBoxColor.set_rgb(config.getUnselectedBoxColor().getRed(),
			config.getUnselectedBoxColor().getGreen(), config.getUnselectedBoxColor().getBlue());

	Gdk::Color selectedFontColor;
	selectedFontColor.set_rgb(config.getSelectedFontColor().getRed(),
			config.getSelectedFontColor().getGreen(), config.getSelectedFontColor().getBlue());

	Gdk::Color unselectedFontColor;
	unselectedFontColor.set_rgb(config.getUnselectedFontColor().getRed(),
			config.getUnselectedFontColor().getGreen(), config.getUnselectedFontColor().getBlue());

	std::map< string, std::map< string, string > > eventboxSelectionMap;

	if(MachineOperationManager::getInstance()->getElectoralConfiguration() != NULL)
	{
		try
		{
			listCAD = MachineOperationManager::getInstance()->getElectoralConfiguration()->getVotingDevice()->getCustomAttributeDefinitionList(
				MachineOperationManager::getInstance()->getElectoralConfiguration()->getVotingDevice()->getFirstVotingDevice(),
				Machine_type::VOTING_DEVICES_PM);
		}
		catch (...)
		{

		}

		for(list<Custom_attribute_definition>::iterator iter = listCAD.begin(); iter != listCAD.end(); iter++)
		{
			std::map< string, string > customAttrMap;

			for ( Custom_attribute_definition::ValueIterator cad = iter->getValue().begin(); cad != iter->getValue().end(); cad++)
			{
				customAttrMap[*cad] = ElectionStringResourcesManager::Current()->getResource(*cad);
			}

			string s = Glib::ustring::compose(_("Smartmatic.SAES.GUI.Widgets.CardActivactorEventBox.TitleCustomAttribute"), ElectionStringResourcesManager::Current()->getResource(iter->getName_key()));
			eventboxSelectionMap[s] = customAttrMap;
		}
	}

	eventboxSelectionWidget = manage(new EventboxSelectionWidget(eventboxSelectionMap));
	eventboxSelectionWidget->SetSelectedBoxColor(selectedBoxColor);
	eventboxSelectionWidget->SetUnselectedBoxColor(unselectedBoxColor);
	eventboxSelectionWidget->SetSelectedFontColor(selectedFontColor);
	eventboxSelectionWidget->SetUnselectedFontColor(unselectedFontColor);
	eventboxSelectionWidget->SetTitlesFontDescription(titleLabelConfiguration);
	eventboxSelectionWidget->SetSelectedFontDescription(selectedLabelConfiguration);
	eventboxSelectionWidget->SetUnselectedFontDescription(unselectedLabelConfiguration);
	eventboxSelectionWidget->set_size_request(width, -1);
	eventboxSelectionWidget->SetTitlesHeight(config.getTitleHeight());
	eventboxSelectionWidget->signal_box_clicked().connect(sigc::mem_fun(*this, &CardActivatorEventBox::on_EventboxClicked));
	eventboxSelectionWidget->SetFirstSelected();
	eventboxSelectionWidget->show();

	pack_start(*eventboxSelectionWidget);
}
Exemple #19
0
VcfGUI::VcfGUI(const std::string& URI)
{
	EventBox *p_background = manage(new EventBox());
	Gdk::Color* color = new  Gdk::Color();
	color->set_rgb(7710, 8738, 9252);
	p_background->modify_bg(Gtk::STATE_NORMAL, *color);



	VBox *p_mainWidget = manage(new VBox(false, 5));


	Label *p_labeFilterType = manage (new Label("Filter Type"));
	p_mainWidget->pack_start(*p_labeFilterType);

	m_comboVCFType = manage (new ComboBoxText());
	m_comboVCFType->append_text("Resonant Lowpass");
	m_comboVCFType->append_text("Lowpass");
	m_comboVCFType->append_text("Highpass");
	m_comboVCFType->append_text("Bandpass I");
	m_comboVCFType->append_text("Bandpass II");
	m_comboVCFType->append_text("Notch");
	m_comboVCFType->append_text("24dB Lowpass I");
	m_comboVCFType->append_text("24dB Lowpass II");

	slot<void> p_slotVCFType = compose(bind<0> (mem_fun(*this, &VcfGUI::write_control), p_vcfType), mem_fun(*m_comboVCFType, &ComboBoxText::get_active_row_number));
	m_comboVCFType->signal_changed().connect(p_slotVCFType);
	p_mainWidget->pack_start(*m_comboVCFType);



	slot<void> p_slotGain = compose(bind<0>(mem_fun(*this, &VcfGUI::write_control), p_inputGain), mem_fun(*this,  &VcfGUI::get_inputGain));
	m_scaleInputGain = new LabeledDial("Input Gain", p_slotGain, p_inputGain, 0, 10, LOG, 0.0001, 4);
	p_mainWidget->pack_start(*m_scaleInputGain);



	Frame *p_freqFrame = manage(new Frame("Frequency"));
	//p_gainFrame->set_shadow_type(Gtk::SHADOW_NONE);
	HBox *p_freqBox = manage(new HBox(true));

	slot<void> p_slotFrequency = compose(bind<0>(mem_fun(*this, &VcfGUI::write_control), p_freq), mem_fun(*this,  &VcfGUI::get_frequency));
	m_scaleFrequency = new LabeledDial("Frequency", p_slotFrequency, p_freq, 0, 10, LOG, 0.0001, 4);
	p_freqBox->pack_start(*m_scaleFrequency);

	slot<void> p_slotExpFMGain = compose(bind<0>(mem_fun(*this, &VcfGUI::write_control), p_expFMGain), mem_fun(*this,  &VcfGUI::get_expFMGain));
	m_scaleExpFMGain = new LabeledDial("Exp FM Gain", p_slotExpFMGain, p_expFMGain, 0, 10, LOG, 0.0001, 4);
	p_freqBox->pack_start(*m_scaleExpFMGain);

	slot<void> p_slotLinFMGain = compose(bind<0>(mem_fun(*this, &VcfGUI::write_control), p_linFMGain), mem_fun(*this,  &VcfGUI::get_linFMGain));
	m_scaleLinFMGain = new LabeledDial("Lin FM Gain", p_slotLinFMGain, p_linFMGain, 0, 10, LOG, 0.0001, 4);
	p_freqBox->pack_start(*m_scaleLinFMGain);

	p_freqFrame->add(*p_freqBox);
	p_mainWidget->pack_start(*p_freqFrame);



	Frame *p_resFrame = manage(new Frame("Resonance"));
	//p_gainFrame->set_shadow_type(Gtk::SHADOW_NONE);
	HBox *p_resBox = manage(new HBox(true));

	slot<void> p_slotResonance = compose(bind<0>(mem_fun(*this, &VcfGUI::write_control), p_resonance), mem_fun(*this,  &VcfGUI::get_resonance));
	m_scaleResonance = new LabeledDial("Resonance", p_slotResonance, p_resonance, 0.01, 1, LOG, 0.0001, 4);
	p_resBox->pack_start(*m_scaleResonance);

	slot<void> p_slotResonanceGain = compose(bind<0>(mem_fun(*this, &VcfGUI::write_control), p_resonanceGain), mem_fun(*this,  &VcfGUI::get_resonanceGain));
	m_scaleResonanceGain = new LabeledDial("Resonance Gain", p_slotResonanceGain, p_resonanceGain, 0, 1, LOG, 0.0001, 4);
	p_resBox->pack_start(*m_scaleResonanceGain);

	p_resFrame->add(*p_resBox);
	p_mainWidget->pack_start(*p_resFrame);



	p_mainWidget->set_size_request(180, 310);

	p_background->add(*p_mainWidget);
	add(*p_background);

	Gtk::manage(p_mainWidget);
}
GranulatorMonoGUI::GranulatorMonoGUI(const std::string& URI)
{
	EventBox *p_background = manage (new EventBox());
	Gdk::Color* color = new  Gdk::Color();
	color->set_rgb(7710, 8738, 9252);
	p_background->modify_bg(Gtk::STATE_NORMAL, *color);



	VBox *p_mainWidget = manage(new VBox(false, 5));



	Frame *p_gainFrame = manage(new Frame("Gain"));
	//p_gainFrame->set_shadow_type(Gtk::SHADOW_NONE);
	HBox *p_gainBox = manage(new HBox(true));

	slot<void> p_slotInputGain = compose(bind<0>(mem_fun(*this, &GranulatorMonoGUI::write_control), p_inputGain), mem_fun(*this,  &GranulatorMonoGUI::get_inputGain));
	m_dialInputGain = new LabeledDial("Input Gain", p_slotInputGain, p_inputGain, -10, 10, NORMAL, 0.01, 2);
	p_gainBox->pack_start(*m_dialInputGain);

	slot<void> p_slotOutputGain = compose(bind<0>(mem_fun(*this, &GranulatorMonoGUI::write_control), p_outputGain), mem_fun(*this,  &GranulatorMonoGUI::get_outputGain));
	m_dialOutputGain = new LabeledDial("Output Gain", p_slotOutputGain, p_outputGain, -10, 10, NORMAL, 0.01, 2);
	p_gainBox->pack_start(*m_dialOutputGain);

	p_gainFrame->add(*p_gainBox);
	p_mainWidget->pack_start(*p_gainFrame);



	Frame *p_grainFrame = manage(new Frame("Grain"));
	//p_gainFrame->set_shadow_type(Gtk::SHADOW_NONE);
	HBox *p_grainBox = manage(new HBox(true));

	slot<void> p_slotGrainSize = compose(bind<0>(mem_fun(*this, &GranulatorMonoGUI::write_control), p_grainSize), mem_fun(*this,  &GranulatorMonoGUI::get_grainSize));
	m_dialGrainSize = new LabeledDial("Grain Size (ms)", p_slotGrainSize, p_grainSize, 6, 10000, LOG, 1, 0);
	p_grainBox->pack_start(*m_dialGrainSize);

	slot<void> p_slotAttack = compose(bind<0>(mem_fun(*this, &GranulatorMonoGUI::write_control), p_attack), mem_fun(*this,  &GranulatorMonoGUI::get_attack));
	m_dialAttack = new LabeledDial("Attack (ms)", p_slotAttack, p_attack, 3, 100, NORMAL, 1, 0);
	p_grainBox->pack_start(*m_dialAttack);

	slot<void> p_slotRelease = compose(bind<0>(mem_fun(*this, &GranulatorMonoGUI::write_control), p_release), mem_fun(*this,  &GranulatorMonoGUI::get_release));
	m_dialRelease = new LabeledDial("Release (ms)", p_slotRelease, p_release, 3, 100, NORMAL, 1, 0);
	p_grainBox->pack_start(*m_dialRelease);

	p_grainFrame->add(*p_grainBox);
	p_mainWidget->pack_start(*p_grainFrame);



	Frame *p_textureFrame = manage(new Frame("Texture"));
	//p_gainFrame->set_shadow_type(Gtk::SHADOW_NONE);
	HBox *p_textureBox = manage(new HBox(true));

	slot<void> p_slotGrainDensity = compose(bind<0>(mem_fun(*this, &GranulatorMonoGUI::write_control), p_grainDensity), mem_fun(*this,  &GranulatorMonoGUI::get_grainDensity));
	m_dialGrainDensity = new LabeledDial("Grain Spacing (ms)", p_slotGrainDensity, p_grainDensity, 1, 10000, LOG, 1, 0);
	p_textureBox->pack_start(*m_dialGrainDensity);

	slot<void> p_slotGrainSpread = compose(bind<0>(mem_fun(*this, &GranulatorMonoGUI::write_control), p_grainSpread), mem_fun(*this,  &GranulatorMonoGUI::get_grainSpread));
	m_dialGrainSpread = new LabeledDial("Grain Spread", p_slotGrainSpread, p_grainSpread, 2, 10000, LOG, 1, 0);
	p_textureBox->pack_start(*m_dialGrainSpread);

	p_textureFrame->add(*p_textureBox);
	p_mainWidget->pack_start(*p_textureFrame);



	p_background->add(*p_mainWidget);

	p_background->set_size_request(200, 320);

	add(*p_background);

	Gtk::manage(p_background);
}
Exemple #21
0
  void
  RLight::initGTK()
  {
    _optList.reset(new Gtk::VBox);

    { //Intensity
      Gtk::HBox* box = manage(new Gtk::HBox);
      box->show();
      
      {
	Gtk::Label* label = manage(new Gtk::Label("Intensity and Color", 0.95, 0.5));
	box->pack_start(*label, true, true); 
	label->show();
      }

      _intensityEntry.reset(new Gtk::Entry);
      box->pack_start(*_intensityEntry, false, false);
      _intensityEntry->show(); _intensityEntry->set_width_chars(7);
      _intensityEntry->set_text(boost::lexical_cast<std::string>(_intensity));

      _intensityEntry->signal_changed()
	.connect(sigc::bind<Gtk::Entry&>(&magnet::gtk::forceNumericEntry, *_intensityEntry));
      _intensityEntry->signal_activate().connect(sigc::mem_fun(*this, &RLight::guiUpdate));

      {
	_lightColor.reset(new Gtk::ColorButton);
	_lightColor->set_use_alpha(false);
	Gdk::Color color;
	color.set_rgb(_color[0] * G_MAXUSHORT, _color[1] * G_MAXUSHORT, _color[2] * G_MAXUSHORT);
	_lightColor->set_color(color);
	box->pack_start(*_lightColor, false, false);
	_lightColor->show();

	_lightColor->signal_color_set().connect(sigc::mem_fun(*this, &RLight::guiUpdate));
      }

      {
	Gtk::Label* label = manage(new Gtk::Label("Attenuation", 0.95, 0.5));
	box->pack_start(*label, true, true);
	label->show();
      }

      _attenuationEntry.reset(new Gtk::Entry);
      box->pack_start(*_attenuationEntry, false, false);
      _attenuationEntry->show(); _attenuationEntry->set_width_chars(7);
      _attenuationEntry->set_text(boost::lexical_cast<std::string>(_attenuation));

      _attenuationEntry->signal_changed()
	.connect(sigc::bind<Gtk::Entry&>(&magnet::gtk::forceNumericEntry, *_attenuationEntry));
      _attenuationEntry->signal_activate().connect(sigc::mem_fun(*this, &RLight::guiUpdate));

      _optList->pack_start(*box, false, false); 
    }

    { //Specular
      Gtk::HBox* box = manage(new Gtk::HBox);
      box->show();

      {
	Gtk::Label* label = manage(new Gtk::Label("Specular Exponent", 0.95, 0.5));
	box->pack_start(*label, true, true); 
	label->show();
      }

      _specularExponentEntry.reset(new Gtk::Entry);
      box->pack_start(*_specularExponentEntry, false, false);
      _specularExponentEntry->show(); _specularExponentEntry->set_width_chars(7);
      _specularExponentEntry->set_text(boost::lexical_cast<std::string>(_specularExponent));

      _specularExponentEntry->signal_changed()
	.connect(sigc::bind<Gtk::Entry&>(&magnet::gtk::forceNumericEntry, *_specularExponentEntry));
      _specularExponentEntry->signal_activate().connect(sigc::mem_fun(*this, &RLight::guiUpdate));

      {
	Gtk::Label* label = manage(new Gtk::Label("Specular Strength", 0.95, 0.5));
	box->pack_start(*label, true, true); 
	label->show();
      }

      _specularFactorEntry.reset(new Gtk::Entry);
      box->pack_start(*_specularFactorEntry, false, false);
      _specularFactorEntry->show(); _specularFactorEntry->set_width_chars(7);
      _specularFactorEntry->set_text(boost::lexical_cast<std::string>(_specularFactor));

      _specularFactorEntry->signal_changed()
	.connect(sigc::bind<Gtk::Entry&>(&magnet::gtk::forceNumericEntry, *_specularFactorEntry));
      _specularFactorEntry->signal_activate().connect(sigc::mem_fun(*this, &RLight::guiUpdate));

      _optList->pack_start(*box, false, false);
    }

    { //Specular
      Gtk::HBox* box = manage(new Gtk::HBox);
      box->show();

      {
	Gtk::Label* label = manage(new Gtk::Label("Position", 0.95, 0.5));
	box->pack_start(*label, true, true); 
	label->show();
      }

      _positionXEntry.reset(new Gtk::Entry);
      box->pack_start(*_positionXEntry, false, false);
      _positionXEntry->show();
      _positionXEntry->set_width_chars(7);
      _positionXEntry->set_text(boost::lexical_cast<std::string>(getEyeLocationObjSpace()[0]));
      _positionXEntry->signal_changed().connect(sigc::bind<Gtk::Entry&>(&magnet::gtk::forceNumericEntry, *_specularFactorEntry));
      _positionXEntry->signal_activate().connect(sigc::mem_fun(*this, &RLight::guiUpdate));

      _positionYEntry.reset(new Gtk::Entry);
      box->pack_start(*_positionYEntry, false, false);
      _positionYEntry->show();
      _positionYEntry->set_width_chars(7);
      _positionYEntry->set_text(boost::lexical_cast<std::string>(getEyeLocationObjSpace()[1]));
      _positionYEntry->signal_changed().connect(sigc::bind<Gtk::Entry&>(&magnet::gtk::forceNumericEntry, *_specularFactorEntry));
      _positionYEntry->signal_activate().connect(sigc::mem_fun(*this, &RLight::guiUpdate));

      _positionZEntry.reset(new Gtk::Entry);
      box->pack_start(*_positionZEntry, false, false);
      _positionZEntry->show();
      _positionZEntry->set_width_chars(7);
      _positionZEntry->set_text(boost::lexical_cast<std::string>(getEyeLocationObjSpace()[2]));
      _positionZEntry->signal_changed().connect(sigc::bind<Gtk::Entry&>(&magnet::gtk::forceNumericEntry, *_specularFactorEntry));
      _positionZEntry->signal_activate().connect(sigc::mem_fun(*this, &RLight::guiUpdate));

      _optList->pack_start(*box, false, false);
    }

    _optList->show();

    guiUpdate();
  }