]> git.llucax.com Git - z.facultad/75.42/plaqui.git/commitdiff
Descubri quien me estaba robando los clicks svn stsvn st! era el viewport que estaba...
authorNicolás Dimov <ndimov@gmail.com>
Fri, 7 Nov 2003 04:43:47 +0000 (04:43 +0000)
committerNicolás Dimov <ndimov@gmail.com>
Fri, 7 Nov 2003 04:43:47 +0000 (04:43 +0000)
Constructor/activezone.cpp [new file with mode: 0644]
Constructor/activezone.h [new file with mode: 0644]
Constructor/constructor.glade
Constructor/item.h
Constructor/workplace.cpp
Constructor/workplace.h

diff --git a/Constructor/activezone.cpp b/Constructor/activezone.cpp
new file mode 100644 (file)
index 0000000..014439e
--- /dev/null
@@ -0,0 +1,15 @@
+#include "activezone.h"
+
+ActiveZone::ActiveZone(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml> &refGlade):Gtk::Viewport(cobject)
+{
+}
+
+ActiveZone::~ActiveZone()
+{
+}
+
+bool ActiveZone::on_button_press_event(GdkEventButton *e)
+{
+       std::cout<< "hola vieja"<<std::endl;
+       return true;
+}
diff --git a/Constructor/activezone.h b/Constructor/activezone.h
new file mode 100644 (file)
index 0000000..56431bf
--- /dev/null
@@ -0,0 +1,12 @@
+#include <libglademm.h>
+#include <gtkmm.h>
+#include <gtkmm/viewport.h>
+#include <iostream>
+
+class ActiveZone:public Gtk::Viewport {
+       public:
+               ActiveZone(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml> &refGlade);
+               virtual ~ActiveZone();
+               virtual bool on_button_press_event(GdkEventButton *e);
+};
+
index d3ae137b5d1eeb52e3102cb401c3c4dd94aa2de9..94c1976e76d7cfad94af550687651f87f6305939 100644 (file)
                  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
 
                  <child>
-                   <widget class="GtkViewport" id="viewport1">
+                   <widget class="GtkViewport" id="viewport">
                      <property name="visible">True</property>
                      <property name="shadow_type">GTK_SHADOW_IN</property>
 
index 4bc193fb197a119ab365133ab4161d97ce68ebb4..87aaaed403ff24310b563d799c93d9734542ccd9 100644 (file)
@@ -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; 
index 7c82cfe565c3ae43a2a86611468d7bc4eb90e889..3baa40894635939479e6e18dc4e8efdea255b534 100644 (file)
@@ -2,6 +2,8 @@
 
 WorkPlace::WorkPlace( BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml> &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()
index 005eb8d35c37f33643fb2b1eeb4be69bc75ba14a..6d81e4f0ff9f091af1ca0ff7a55729c83afb35f7 100644 (file)
@@ -5,6 +5,7 @@
 #include <gdkmm/gc.h>
 #include <gtkmm.h>
 #include <libglademm.h>
+#include "activezone.h"
 #include "item.h"
 
 typedef struct {
@@ -24,6 +25,7 @@ class WorkPlace:public Gtk::Fixed {
                std::list<t_line> lista_lineas;
                t_line temp;
                std::list<CItem *> *listaItems;
+               ActiveZone *viewport;
 };
 
 #endif