]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Constructor/ventana.cpp
Se borra el ejecutable :)
[z.facultad/75.42/plaqui.git] / Constructor / ventana.cpp
index 24dfe61f92578c6d56c65aa15baddcb3367a9134..bebf3a83960aaa2a01f8c8fa7f51716f0e5ff190 100644 (file)
@@ -4,7 +4,11 @@ Ventana::Ventana(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>&
 Gtk::Window(cobject) 
 {
        refGlade->get_widget("button9", btn_salir);
 Gtk::Window(cobject) 
 {
        refGlade->get_widget("button9", btn_salir);
+       refGlade->get_widget("fixed1", fixed);
+       refGlade->get_widget("button6",btn_dibujar);
        btn_salir->signal_released().connect(SigC::slot(*this,&Ventana::on_btn_salir_pressed ));
        btn_salir->signal_released().connect(SigC::slot(*this,&Ventana::on_btn_salir_pressed ));
+       btn_dibujar->signal_released().connect(SigC::slot(*this,&Ventana::on_btn_dibujar_released ));
+       //btn_dibujar->set_title("una N");
 }
 
 Ventana::~Ventana()
 }
 
 Ventana::~Ventana()
@@ -15,3 +19,25 @@ void Ventana::on_btn_salir_pressed()
 {
        Gtk::Main::quit();
 }
 {
        Gtk::Main::quit();
 }
+
+void Ventana::on_btn_dibujar_released()
+{
+       //quiero dibujar en el fixed 
+       // como lo obtengo??
+       Glib::RefPtr<Gdk::Window> win = get_window();
+       Glib::RefPtr<Gdk::GC> gc = get_style()->get_black_gc();
+       win->draw_line(gc,50,50, 50,100);
+       win->draw_line(gc,50,50, 80, 100);
+       win->draw_line (gc,80,100, 80,50);
+       
+       win->draw_line (gc,90,50, 90,100);
+       
+       win->draw_line (gc,100,50, 100,100);
+       win->draw_line (gc,100,50, 150,50);
+       win->draw_line (gc,100,100,150,100);
+       
+       win->draw_line (gc,160,50, 160,100);
+       win->draw_line (gc,160,50, 210,50);
+       win->draw_line (gc,160,100, 210,100);
+       win->draw_line (gc,210,50, 210,100);
+}