X-Git-Url: https://git.llucax.com/z.facultad/75.42/figuras.git/blobdiff_plain/43e773511104114803dd613392345345ef13deba..63ef0f452aeb53c1f9a3492c0c0e4a4f59ba1f1e:/interface.cpp diff --git a/interface.cpp b/interface.cpp index 6ed9f3f..bc3809c 100644 --- a/interface.cpp +++ b/interface.cpp @@ -1,15 +1,15 @@ /* vim: set et sts=4 sw=4 fdm=indent fdn=1 fo+=t tw=80 fileencoding=utf-8: * - * Taller de Programación (75.42). + * Taller de Programación (75.42). * - * Ejercicio Número 5: + * Ejercicio Número 5: * Graficador de figuras. * * Copyleft 2003 - Leandro Lucarella - * Puede copiar, modificar y distribuir este programa bajo los términos de + * Puede copiar, modificar y distribuir este programa bajo los términos de * la licencia GPL (http://www.gnu.org/). * - * Creado: mié oct 1 23:31:40 ART 2003 + * Creado: mié oct 1 23:31:40 ART 2003 * * $Id$ */ @@ -101,7 +101,7 @@ create_window (Dibujo* dibujo) window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_container_set_border_width (GTK_CONTAINER (window), 5); - gtk_window_set_title (GTK_WINDOW (window), "Trabajo Práctico V"); + gtk_window_set_title (GTK_WINDOW (window), "Trabajo Práctico V"); vbox = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox); @@ -158,7 +158,7 @@ create_window (Dibujo* dibujo) gtk_widget_show (vbox_figura); gtk_container_add (GTK_CONTAINER (frame_figura), vbox_figura); - radiobutton_linea = gtk_radio_button_new_with_mnemonic (NULL, "Línea"); + radiobutton_linea = gtk_radio_button_new_with_mnemonic (NULL, "Línea"); gtk_widget_show (radiobutton_linea); gtk_box_pack_start (GTK_BOX (vbox_figura), radiobutton_linea, FALSE, FALSE, 0); gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_linea), radiobutton_linea_group); @@ -171,13 +171,13 @@ create_window (Dibujo* dibujo) gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_cuadrado), radiobutton_linea_group); radiobutton_linea_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_cuadrado)); - radiobutton_rectangulo = gtk_radio_button_new_with_mnemonic (NULL, "_Rectángulo"); + radiobutton_rectangulo = gtk_radio_button_new_with_mnemonic (NULL, "_Rectángulo"); gtk_widget_show (radiobutton_rectangulo); gtk_box_pack_start (GTK_BOX (vbox_figura), radiobutton_rectangulo, FALSE, FALSE, 0); gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_rectangulo), radiobutton_linea_group); radiobutton_linea_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_rectangulo)); - radiobutton_circulo = gtk_radio_button_new_with_mnemonic (NULL, "Círc_ulo"); + radiobutton_circulo = gtk_radio_button_new_with_mnemonic (NULL, "Círc_ulo"); gtk_widget_show (radiobutton_circulo); gtk_box_pack_start (GTK_BOX (vbox_figura), radiobutton_circulo, FALSE, FALSE, 0); gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_circulo), radiobutton_linea_group); @@ -426,24 +426,36 @@ create_window (Dibujo* dibujo) (GtkAttachOptions) (0), 0, 0); gtk_widget_set_sensitive (spinbutton_radio, FALSE); - g_signal_connect ((gpointer) window, "delete_event", + g_signal_connect((gpointer) window, "delete_event", G_CALLBACK (on_window_delete_event), NULL); - g_signal_connect ((gpointer) drawingarea, "expose_event", + g_signal_connect((gpointer) drawingarea, "expose_event", G_CALLBACK (on_drawingarea_expose_event), dibujo); - g_signal_connect ((gpointer) button_limpiar, "clicked", + g_signal_connect((gpointer) button_limpiar, "clicked", G_CALLBACK (on_button_borrar_clicked), dibujo); - g_signal_connect ((gpointer) button_actualizar, "clicked", + g_signal_connect((gpointer) button_actualizar, "clicked", G_CALLBACK (on_button_graficar_clicked), drawingarea); - g_signal_connect ((gpointer) button_salir, "clicked", + g_signal_connect((gpointer) button_salir, "clicked", G_CALLBACK (on_button_salir_clicked), NULL); - g_signal_connect ((gpointer) button_agregar, "clicked", + g_signal_connect((gpointer) button_agregar, "clicked", G_CALLBACK (on_button_agregar_clicked), dibujo); + g_signal_connect((gpointer) radiobutton_linea, "toggled", + G_CALLBACK (on_radiobutton_linea_toggled), + NULL); + g_signal_connect((gpointer) radiobutton_cuadrado, "toggled", + G_CALLBACK (on_radiobutton_cuadrado_toggled), + NULL); + g_signal_connect((gpointer) radiobutton_rectangulo, "toggled", + G_CALLBACK (on_radiobutton_rectangulo_toggled), + NULL); + g_signal_connect((gpointer) radiobutton_circulo, "toggled", + G_CALLBACK (on_radiobutton_circulo_toggled), + NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (window, window, "window");