X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/e5f9e15b59fc1ade287321c796ec7c4b9aa27600..b4454acb67d6f1c782c378d7ce734e93858e58ff:/Constructor/workplace.cpp diff --git a/Constructor/workplace.cpp b/Constructor/workplace.cpp index f3874e3..519dcd4 100644 --- a/Constructor/workplace.cpp +++ b/Constructor/workplace.cpp @@ -1,12 +1,8 @@ - - #include "workplace.h" -#include "item.h" + WorkPlace::WorkPlace( BaseObjectType* cobject, const Glib::RefPtr &refGlade):Gtk::Fixed(cobject) { - } - bool WorkPlace::on_expose_event(GdkEventExpose *e) { int x, y; @@ -20,3 +16,23 @@ bool WorkPlace::on_expose_event(GdkEventExpose *e) } return true; } + + +bool WorkPlace::on_button_pressed(GdkEventButton *e) +{ + return true; +} + +void WorkPlace::delete_item(int id) +{ + std::list::iterator i = listaItems->begin(); + while ( i != listaItems->end() ){ + CItem *temp = *i; + if ( temp->get_id() == id ){ + listaItems->erase(i); + delete temp; + break; + } + i++; + } +}