]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Client/src/item.cpp
Mas detalles y se agrega el logo faltante en el constructor
[z.facultad/75.42/plaqui.git] / Client / src / item.cpp
index 8fab941621dc4bdb251e67ef44cfc8c3c599a269..be4e47db9eb525de4ba55b8579317be4b9e3059c 100644 (file)
@@ -9,6 +9,18 @@ ViewItem::ViewItem(Glib::ustring _name):Gtk::EventBox(),image()
        set_events(Gdk::BUTTON_PRESS_MASK);
        actual_flow = -1;
        add(image);
        set_events(Gdk::BUTTON_PRESS_MASK);
        actual_flow = -1;
        add(image);
+
+       open = false;
+       actual_flow = extra = 0;
+
+       image.signal_expose_event().connect( SigC::slot(*this, &ViewItem::on_image_expose_event) );
+}
+
+void ViewItem::on_realize()
+{
+       Gtk::EventBox::on_realize();
+       Glib::RefPtr<Gdk::Window> window = get_window();
+       gc = Gdk::GC::create(window);
 }
 
 ViewItem::~ViewItem()
 }
 
 ViewItem::~ViewItem()
@@ -36,3 +48,12 @@ std::string ViewItem::get_actual_flow()
        return s;
 }
 
        return s;
 }
 
+bool ViewItem::on_image_expose_event(GdkEventExpose *e)
+{
+       Glib::RefPtr<Gdk::Colormap> colormap = image.get_colormap();
+       colormap->alloc_color(color);
+       gc->set_foreground(color);
+       gc->set_background(color);
+       image.get_window()->draw_rectangle(gc, 1, 0, 0, 10, 10);
+}
+