]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blob - Constructor/activezone.cpp
Se agrega el body al handler del msg desde el servidor.
[z.facultad/75.42/plaqui.git] / Constructor / activezone.cpp
1 #include "activezone.h"
2 #include "workplace.h"
3
4 ActiveZone::ActiveZone(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml> &refGlade):Gtk::Viewport(cobject)
5 {
6         cant_click=1;
7 }
8
9 ActiveZone::~ActiveZone()
10 {
11 }
12
13 bool ActiveZone::on_button_press_event(GdkEventButton *event)
14 {
15         if ( (event->type == GDK_BUTTON_PRESS) && (event->button == 1) ) {
16                 if (cant_click ==2) {
17                         get_pointer(temp.w, temp.z);
18                         cant_click--;
19                         workplace->lista_lineas.push_back(temp);
20                         workplace->get_window()->draw_line (get_style()->get_black_gc(), temp.x,temp.y,temp.w,temp.z);
21                 }
22         }
23         
24         if ( (event->type == GDK_BUTTON_PRESS) && (event->button == 1) ) {
25                 if (cant_click == 1) {
26                         get_pointer(temp.x,temp.y);
27                         cant_click++;
28                 }
29         }
30         return true;
31 }