]> git.llucax.com Git - z.facultad/75.42/figuras.git/blobdiff - callbacks.cpp
Se completan comentarios en el codigo.
[z.facultad/75.42/figuras.git] / callbacks.cpp
index e07c57261b842da570a1cc11f1cbac630989d05e..5f51614efe7a0b39b2b90c5ae6ea1fe36c5c8e54 100644 (file)
@@ -155,13 +155,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 +171,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 +187,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 +203,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);
 }