Ejemplo n.º 1
0
Archivo: main.c Proyecto: tadeboro/hip
static void
create_gui (AppData *data)
{
  GtkWidget *window;
  GtkContainer *sources;
  GtkBuilder *builder;


  builder = gtk_builder_new ();
  gtk_builder_add_from_file (builder, "hip.glade", NULL);
  gtk_builder_connect_signals (builder, data);

  window = GTK_WIDGET (gtk_builder_get_object (builder, "window1"));
  sources = GTK_CONTAINER (gtk_builder_get_object (builder, "sources"));
  data->tw_regs = GTK_TREE_VIEW (gtk_builder_get_object (builder, "tw_regs"));
  data->tw_mcode = GTK_TREE_VIEW (gtk_builder_get_object (builder, "tw_mcode"));
  data->tw_data = GTK_TREE_VIEW (gtk_builder_get_object (builder, "tw_data"));
  data->tw_symtable = GTK_TREE_VIEW (gtk_builder_get_object (builder, "tw_symtable"));
  g_object_unref (builder);

  gtk_container_add (sources, setup_editor (data));
  setup_regs (data);
  setup_mcode (data);
  setup_data (data);
  setup_symtable (data);

  gtk_widget_show (window);
}
win_char_editor::win_char_editor(QWidget *parent, Qt::WFlags tipo)
        : QDialog(parent, tipo)
{
	// Se questo QDialog viene creato con tipo == Qt::Dialog allora sono costretto ad avere il ? in alto a destra
	// Ciò forse è un bene perchè mi costringerà ad avere un minimo di help
	// Veder Qt::WindowContextHelpButtonHint per avere maggiori informazioni

	///////////////////////////////////////////////
	//http://www.atm.ox.ac.uk/user/iwi/charmap.html
	///////////////////////////////////////////////

	setModal(true);	

	QGridLayout	*layout = new QGridLayout(this);
	
	layout->addWidget(setup_menuBar(),0,0);
	layout->addLayout(setup_editor(),1,0);
	layout->setSpacing(0);
    layout->setMargin(0);

	never_saved = TRUE;
	file = "New";
	setWindowTitle(QFileInfo(file).completeBaseName() + "[*] - Char Editor");

	actions_escapeAct = new QAction("", this);
	actions_escapeAct->setShortcut(Qt::Key_Escape);
    connect(actions_escapeAct, SIGNAL(triggered()), this, SLOT(actions_escape()));
	addAction(actions_escapeAct);	//Collego questa azione direttamente a win_main senza che essa abbia bottoni o menu associati
}
Ejemplo n.º 3
0
static void
egg_toolbar_editor_init (EggToolbarEditor *t)
{
  t->priv = EGG_TOOLBAR_EDITOR_GET_PRIVATE (t);

  t->priv->manager = NULL;
  t->priv->actions_list = NULL;

  setup_editor (t);
}