Ejemplo n.º 1
0
	void set_axis(Axis a)
	{
		if(a==AXIS_X)
			radiobutton_axis_x.set_active(true);
		else
			radiobutton_axis_y.set_active(true);

		duck_dragger_->axis=get_axis();
	}
void
ChipCapacitiesDialog::set_current_capacity(const Scanner::State& state)
{
	Gtk::RadioButton* button = buttons_map_[state.capacity()];
	if (button)
		button->set_active(true);
}
void AsistenteJerarquia::inicializarAsistente() {
	if (this->vjerarquia->getEntidadPadre() != NULL){
		Gtk::Entry *entryNombre = 0;
		Gtk::RadioButton* radio =NULL;
		if (this->vjerarquia->getJerarquia()->getCobertura() == TIPO_COBERTURA_PARCIAL){
			this->m_builder->get_widget("radioParcial", radio);
			radio->set_active(true);
		}else{
			this->m_builder->get_widget("radioTotal", radio);
			radio->set_active(true);
		}
		if (this->vjerarquia->getJerarquia()->getInterseccion() == TIPO_INTERSECCION_EXCLUSIVA){
			this->m_builder->get_widget("radioExclusiva", radio);
			radio->set_active(true);
		}else{
			this->m_builder->get_widget("radioSuperpuesta", radio);
			radio->set_active(true);
		}

		this->m_builder->get_widget("entryNombre", entryNombre);
		entryNombre->set_text(this->vjerarquia->getNombre());
		this->inicializarListaEntidades();
	}
}
Ejemplo n.º 4
0
void setRadioButton(string cb, bool b) {
    Gtk::RadioButton* cbut;
    VRGuiBuilder()->get_widget(cb, cbut);
    cbut->set_active(b);
}
Ejemplo n.º 5
0
Example_markers::Example_markers()
{
  Gtk::VBox *vbox, *vbox2;
  Gtk::HBox *hbox;
  Gtk::RadioButton *rbutton;
  
  set_title("Line Markers Example");
  set_border_width(10);

  m_Viewport.canvas()->set_size( 500, 400 );

  vbox = Gtk::manage(new Gtk::VBox());
  vbox->pack_start( m_Viewport );
  m_line = Papyrus::Polyline::create();
  m_line->add_vertex(-100, 0);
  m_line->add_vertex(100, 0);
  m_line->set_stroke( Cairo::SolidPattern::create_rgb(0.0, 0.0, 1.0) );
  m_line->stroke()->set_width(3);

  m_line->set_marker(Papyrus::START_MARKER, Papyrus::Marker::create());
  m_line->marker(Papyrus::START_MARKER)->set_facing(Papyrus::Marker::LEFT);
  m_line->marker(Papyrus::START_MARKER)->stroke()->set_width(3);
  
  m_line->set_marker(Papyrus::END_MARKER, Papyrus::Marker::create());
  m_line->marker(Papyrus::END_MARKER)->set_facing(Papyrus::Marker::RIGHT);
  m_line->marker(Papyrus::END_MARKER)->stroke()->set_width(3);
  
  m_Viewport.canvas()->add( m_line );

  vbox->pack_start( *Gtk::manage( new Gtk::HSeparator() ) );

  hbox = Gtk::manage(new Gtk::HBox());
  vbox->pack_start( *hbox );

  vbox2 = Gtk::manage(new Gtk::VBox());
  vbox2->pack_start( *Gtk::manage(new Gtk::Label("Start Marker")) );
  vbox2->pack_start( m_start_combobox );
  Gtk::RadioButtonGroup start_facing_group;
  rbutton = Gtk::manage(new Gtk::RadioButton(start_facing_group, "Left"));
  rbutton->set_active();
  rbutton->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &Example_markers::on_marker_facing_changed), Papyrus::START_MARKER, Papyrus::Marker::LEFT));
  vbox2->pack_start(*rbutton);
  rbutton = Gtk::manage(new Gtk::RadioButton(start_facing_group, "Right"));
  rbutton->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &Example_markers::on_marker_facing_changed), Papyrus::START_MARKER, Papyrus::Marker::RIGHT));
  vbox2->pack_start(*rbutton);
  hbox->pack_start(*vbox2);

  vbox2 = Gtk::manage(new Gtk::VBox());
  vbox2->pack_start( *Gtk::manage(new Gtk::Label("End Marker")) );
  vbox2->pack_start( m_end_combobox );
  Gtk::RadioButtonGroup end_facing_group;
  rbutton = Gtk::manage(new Gtk::RadioButton(end_facing_group, "Left"));
  rbutton->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &Example_markers::on_marker_facing_changed), Papyrus::END_MARKER, Papyrus::Marker::LEFT));
  vbox2->pack_start(*rbutton);
  rbutton = Gtk::manage(new Gtk::RadioButton(end_facing_group, "Right"));
  rbutton->set_active();
  rbutton->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &Example_markers::on_marker_facing_changed), Papyrus::END_MARKER, Papyrus::Marker::RIGHT));
  vbox2->pack_start(*rbutton);
  hbox->pack_start(*vbox2);

  for (unsigned i=Papyrus::Marker::FIRST_STYLE; i < Papyrus::Marker::LAST_STYLE; i++)
  {
    m_start_combobox.append_text( Papyrus::Marker::style_strings[i] );
    m_end_combobox.append_text( Papyrus::Marker::style_strings[i] );
  }

  m_start_combobox.signal_changed().connect( sigc::bind(sigc::mem_fun(*this, &Example_markers::on_marker_style_changed), Papyrus::START_MARKER));

  m_start_combobox.set_active(Papyrus::Marker::NONE);

  m_end_combobox.signal_changed().connect( sigc::bind(sigc::mem_fun(*this, &Example_markers::on_marker_style_changed), Papyrus::END_MARKER));

  m_end_combobox.set_active(Papyrus::Marker::NONE);

  this->add( *vbox );

  show_all();
}