]> git.llucax.com Git - z.facultad/75.42/figuras.git/blobdiff - callbacks.cpp
Se termina la documentacion.
[z.facultad/75.42/figuras.git] / callbacks.cpp
index e07c57261b842da570a1cc11f1cbac630989d05e..1dedd963d8054434b7d3c7fa523663661c5047fa 100644 (file)
@@ -133,8 +133,6 @@ void on_button_agregar_clicked(GtkButton* button, gpointer user_data) {
     }
     // Agrego la figura nueva al dibujo.
     win->dibujo.agregar_figura(figura);
-    // Indico que se debe redibujar para que se vean los cambios.
-    gtk_widget_queue_draw(GTK_WIDGET(win->drawingarea));
 }
 
 gboolean on_window_delete_event(GtkWidget* widget, GdkEvent* event,
@@ -155,13 +153,13 @@ void on_radiobutton_linea_toggled(GtkToggleButton* togglebutton,
 #endif
     // Activo y desactivos los campos necesarios.
     TP5Window* win = static_cast<TP5Window*>(user_data);
-    gtk_widget_set_sensitive(win->spinbutton_inicio_x, true);
-    gtk_widget_set_sensitive(win->spinbutton_inicio_y, true);
-    gtk_widget_set_sensitive(win->spinbutton_fin_x, true);
-    gtk_widget_set_sensitive(win->spinbutton_fin_y, true);
-    gtk_widget_set_sensitive(win->spinbutton_alto, false);
-    gtk_widget_set_sensitive(win->spinbutton_ancho, false);
-    gtk_widget_set_sensitive(win->spinbutton_radio, false);
+    gtk_widget_set_sensitive(win->spinbutton_inicio_x, TRUE);
+    gtk_widget_set_sensitive(win->spinbutton_inicio_y, TRUE);
+    gtk_widget_set_sensitive(win->spinbutton_fin_x, TRUE);
+    gtk_widget_set_sensitive(win->spinbutton_fin_y, TRUE);
+    gtk_widget_set_sensitive(win->spinbutton_alto, FALSE);
+    gtk_widget_set_sensitive(win->spinbutton_ancho, FALSE);
+    gtk_widget_set_sensitive(win->spinbutton_radio, FALSE);
 }
 
 void on_radiobutton_cuadrado_toggled(GtkToggleButton* togglebutton,
@@ -171,13 +169,13 @@ void on_radiobutton_cuadrado_toggled(GtkToggleButton* togglebutton,
 #endif
     // Activo y desactivos los campos necesarios.
     TP5Window* win = static_cast<TP5Window*>(user_data);
-    gtk_widget_set_sensitive(win->spinbutton_inicio_x, false);
-    gtk_widget_set_sensitive(win->spinbutton_inicio_y, false);
-    gtk_widget_set_sensitive(win->spinbutton_fin_x, false);
-    gtk_widget_set_sensitive(win->spinbutton_fin_y, false);
-    gtk_widget_set_sensitive(win->spinbutton_alto, true);
-    gtk_widget_set_sensitive(win->spinbutton_ancho, false);
-    gtk_widget_set_sensitive(win->spinbutton_radio, false);
+    gtk_widget_set_sensitive(win->spinbutton_inicio_x, FALSE);
+    gtk_widget_set_sensitive(win->spinbutton_inicio_y, FALSE);
+    gtk_widget_set_sensitive(win->spinbutton_fin_x, FALSE);
+    gtk_widget_set_sensitive(win->spinbutton_fin_y, FALSE);
+    gtk_widget_set_sensitive(win->spinbutton_alto, TRUE);
+    gtk_widget_set_sensitive(win->spinbutton_ancho, FALSE);
+    gtk_widget_set_sensitive(win->spinbutton_radio, FALSE);
 }
 
 void on_radiobutton_rectangulo_toggled(GtkToggleButton* togglebutton,
@@ -187,13 +185,13 @@ void on_radiobutton_rectangulo_toggled(GtkToggleButton* togglebutton,
 #endif
     // Activo y desactivos los campos necesarios.
     TP5Window* win = static_cast<TP5Window*>(user_data);
-    gtk_widget_set_sensitive(win->spinbutton_inicio_x, false);
-    gtk_widget_set_sensitive(win->spinbutton_inicio_y, false);
-    gtk_widget_set_sensitive(win->spinbutton_fin_x, false);
-    gtk_widget_set_sensitive(win->spinbutton_fin_y, false);
-    gtk_widget_set_sensitive(win->spinbutton_alto, true);
-    gtk_widget_set_sensitive(win->spinbutton_ancho, true);
-    gtk_widget_set_sensitive(win->spinbutton_radio, false);
+    gtk_widget_set_sensitive(win->spinbutton_inicio_x, FALSE);
+    gtk_widget_set_sensitive(win->spinbutton_inicio_y, FALSE);
+    gtk_widget_set_sensitive(win->spinbutton_fin_x, FALSE);
+    gtk_widget_set_sensitive(win->spinbutton_fin_y, FALSE);
+    gtk_widget_set_sensitive(win->spinbutton_alto, TRUE);
+    gtk_widget_set_sensitive(win->spinbutton_ancho, TRUE);
+    gtk_widget_set_sensitive(win->spinbutton_radio, FALSE);
 }
 
 void on_radiobutton_circulo_toggled(GtkToggleButton* togglebutton,
@@ -203,12 +201,12 @@ void on_radiobutton_circulo_toggled(GtkToggleButton* togglebutton,
 #endif
     // Activo y desactivos los campos necesarios.
     TP5Window* win = static_cast<TP5Window*>(user_data);
-    gtk_widget_set_sensitive(win->spinbutton_inicio_x, false);
-    gtk_widget_set_sensitive(win->spinbutton_inicio_y, false);
-    gtk_widget_set_sensitive(win->spinbutton_fin_x, false);
-    gtk_widget_set_sensitive(win->spinbutton_fin_y, false);
-    gtk_widget_set_sensitive(win->spinbutton_alto, false);
-    gtk_widget_set_sensitive(win->spinbutton_ancho, false);
-    gtk_widget_set_sensitive(win->spinbutton_radio, true);
+    gtk_widget_set_sensitive(win->spinbutton_inicio_x, FALSE);
+    gtk_widget_set_sensitive(win->spinbutton_inicio_y, FALSE);
+    gtk_widget_set_sensitive(win->spinbutton_fin_x, FALSE);
+    gtk_widget_set_sensitive(win->spinbutton_fin_y, FALSE);
+    gtk_widget_set_sensitive(win->spinbutton_alto, FALSE);
+    gtk_widget_set_sensitive(win->spinbutton_ancho, FALSE);
+    gtk_widget_set_sensitive(win->spinbutton_radio, TRUE);
 }