]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blob - Constructor/workplace.cpp
Se corrigen algunos errores. Tengo un problema con la sobrecarga del operator>> ...
[z.facultad/75.42/plaqui.git] / Constructor / workplace.cpp
1 #include "workplace.h"
2
3 WorkPlace::WorkPlace( BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml> &refGlade):Gtk::Fixed(cobject)
4 {
5 }
6 bool WorkPlace::on_expose_event(GdkEventExpose *e)
7 {
8         int x, y;
9         for(x=0; x<get_width(); x+=32) 
10                 for (y=0; y<get_height();y+=32){
11                         get_window()->draw_point (get_style()->get_black_gc(), x,y);
12                         get_window()->draw_point (get_style()->get_black_gc(), x,y+1);
13                         get_window()->draw_point (get_style()->get_black_gc(), x,y-1);
14                         get_window()->draw_point (get_style()->get_black_gc(), x+1,y);
15                         get_window()->draw_point (get_style()->get_black_gc(), x-1,y);
16                 }
17         return true;
18 }
19
20
21 bool WorkPlace::on_button_pressed(GdkEventButton *e)
22 {
23         return true;
24 }
25
26 void WorkPlace::delete_item(int id)
27 {
28         std::list<CItem*>::iterator i = listaItems->begin();
29         while ( i != listaItems->end() ){
30         CItem *temp = *i;
31                 if ( temp->get_id() == id ){
32                         listaItems->erase(i);
33                         delete temp;
34                         break;
35                 }
36                 i++;
37         }
38 }