]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Constructor/conduct.cpp
bueno, hice que el doble click abra una ventanita de propiedades, pero solo lo implem...
[z.facultad/75.42/plaqui.git] / Constructor / conduct.cpp
index 075f645e264060a3638f30fbb56b77455b8d263c..4b7fa17032c46822b554a42c12db99f3862dfba0 100644 (file)
@@ -8,6 +8,16 @@ Conduct::Conduct()
        imgActual = 0;
        image = imageN;
        set_size_request(image->get_width(), image->get_height());
+       
+       Glib::RefPtr<Gnome::Glade::Xml> ref;
+       try {
+               ref = Gnome::Glade::Xml::create("constructor.glade", "conduct_pty_wnd");
+       }
+       catch(const Gnome::Glade::XmlError &ex) {
+               std::cerr << ex.what() << std::endl;
+       }
+       //tengo que crear una clase para esta ventana..!!!
+       ref->get_widget_derived("conduct_pty_wnd",property_wnd);
 }
 
 Conduct::~Conduct()
@@ -37,6 +47,13 @@ bool Conduct::on_button_press_event(GdkEventButton *event)
                menu_popup.popup(event->button, event->time);
                 return true; //It has been handled.
        }
+       
+       if ((event->type == GDK_2BUTTON_PRESS) && (event->button ==1)){
+               if( property_wnd->is_open() == false ){
+                       property_wnd->show();
+                       property_wnd->set_open (true);
+               } 
+       }
        return true;
 }
 
@@ -47,3 +64,11 @@ void Conduct::on_menu_popup_rotar()
                event.button = 2;
        Conduct::on_button_press_event(&event);
 }
+
+void Conduct::on_menu_popup_propiedades()
+{
+       GdkEventButton event;
+       event.type = GDK_2BUTTON_PRESS;
+       event.button = 1;
+       Conduct::on_button_press_event(&event);
+}