--- /dev/null
+#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;
+}
--- /dev/null
+#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);
+};
+
<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>
#include "workplace.h"
class WorkPlace;
-
+
class CItem:public Gtk::DrawingArea {
public:
CItem();
bool is_occupied_area(int _a, int _b);
void set_id(int _id);
int get_id();
- // habria que ocultarla..........................................
WorkPlace *workplace;
protected:
int ID;
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()
#include <gdkmm/gc.h>
#include <gtkmm.h>
#include <libglademm.h>
+#include "activezone.h"
#include "item.h"
typedef struct {
std::list<t_line> lista_lineas;
t_line temp;
std::list<CItem *> *listaItems;
+ ActiveZone *viewport;
};
#endif