X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/7353f36b6d2eca998f2cb2ca561219b3979ff167..0269c999eb78b8687b9aa9962385a178b077b753:/Client/src/item.cpp?ds=sidebyside diff --git a/Client/src/item.cpp b/Client/src/item.cpp index 18c2fee..8fab941 100644 --- a/Client/src/item.cpp +++ b/Client/src/item.cpp @@ -1,37 +1,38 @@ -#include "item.h" +#include "item.h" +#include +#include -Item::Item(Glib::ustring _name):Gtk::DrawingArea() +ViewItem::ViewItem(Glib::ustring _name):Gtk::EventBox(),image() { - //image = Gdk::Pixbuf::create_from_file(filename); name = _name; - //set_size_request(image->get_width(), image->get_height()); -} - -Item::~Item() -{ + set_events(Gdk::BUTTON_PRESS_MASK); + actual_flow = -1; + add(image); } -bool Item::on_expose_event(GdkEventExpose* event) +ViewItem::~ViewItem() { - image->render_to_drawable ( get_window(), get_style()->get_black_gc(), 0, 0, 0, 0, image->get_width() ,image->get_height() , - Gdk::RGB_DITHER_NONE, 0, 0); - return true; } -void Item::set_position(int _x, int _y) +void ViewItem::set_position(int _x, int _y) { x = _x; y = _y; } -void Item::set_name(Glib::ustring _name) +void ViewItem::set_name(Glib::ustring _name) { name = _name; } -Glib::ustring Item::get_name() +std::string ViewItem::get_actual_flow() { - return name; + std::stringstream ss; + std::string s; + + ss << actual_flow; + ss >> s; + return s; }