From e752c10ce2c082a8654b2abd68b2cf442275cdcd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicol=C3=A1s=20Dimov?= Date: Fri, 7 Nov 2003 04:43:47 +0000 Subject: [PATCH] Descubri quien me estaba robando los clicks svn stsvn st! era el viewport que estaba arriba del workplace, yo lo sospechaba, y se confirmo mi sospecha... ahora se dio vuelta la tortilla --- Constructor/activezone.cpp | 15 +++++++++++++++ Constructor/activezone.h | 12 ++++++++++++ Constructor/constructor.glade | 2 +- Constructor/item.h | 3 +-- Constructor/workplace.cpp | 2 ++ Constructor/workplace.h | 2 ++ 6 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 Constructor/activezone.cpp create mode 100644 Constructor/activezone.h diff --git a/Constructor/activezone.cpp b/Constructor/activezone.cpp new file mode 100644 index 0000000..014439e --- /dev/null +++ b/Constructor/activezone.cpp @@ -0,0 +1,15 @@ +#include "activezone.h" + +ActiveZone::ActiveZone(BaseObjectType* cobject, const Glib::RefPtr &refGlade):Gtk::Viewport(cobject) +{ +} + +ActiveZone::~ActiveZone() +{ +} + +bool ActiveZone::on_button_press_event(GdkEventButton *e) +{ + std::cout<< "hola vieja"< +#include +#include +#include + +class ActiveZone:public Gtk::Viewport { + public: + ActiveZone(BaseObjectType* cobject, const Glib::RefPtr &refGlade); + virtual ~ActiveZone(); + virtual bool on_button_press_event(GdkEventButton *e); +}; + diff --git a/Constructor/constructor.glade b/Constructor/constructor.glade index d3ae137..94c1976 100644 --- a/Constructor/constructor.glade +++ b/Constructor/constructor.glade @@ -404,7 +404,7 @@ GTK_CORNER_TOP_LEFT - + True GTK_SHADOW_IN diff --git a/Constructor/item.h b/Constructor/item.h index 4bc193f..87aaaed 100644 --- a/Constructor/item.h +++ b/Constructor/item.h @@ -12,7 +12,7 @@ #include "workplace.h" class WorkPlace; - + class CItem:public Gtk::DrawingArea { public: CItem(); @@ -30,7 +30,6 @@ public: bool is_occupied_area(int _a, int _b); void set_id(int _id); int get_id(); - // habria que ocultarla.......................................... WorkPlace *workplace; protected: int ID; diff --git a/Constructor/workplace.cpp b/Constructor/workplace.cpp index 7c82cfe..3baa408 100644 --- a/Constructor/workplace.cpp +++ b/Constructor/workplace.cpp @@ -2,6 +2,8 @@ WorkPlace::WorkPlace( BaseObjectType* cobject, const Glib::RefPtr &refGlade):Gtk::Fixed(cobject) { + refGlade->get_widget_derived("viewport",viewport); + this->signal_button_press_event().connect(SigC::slot(*this,&WorkPlace::on_button_press_event)); } WorkPlace::~WorkPlace() diff --git a/Constructor/workplace.h b/Constructor/workplace.h index 005eb8d..6d81e4f 100644 --- a/Constructor/workplace.h +++ b/Constructor/workplace.h @@ -5,6 +5,7 @@ #include #include #include +#include "activezone.h" #include "item.h" typedef struct { @@ -24,6 +25,7 @@ class WorkPlace:public Gtk::Fixed { std::list lista_lineas; t_line temp; std::list *listaItems; + ActiveZone *viewport; }; #endif -- 2.43.0