#define _ITEM_H_
#include <iostream>
+#include <list>
#include <gtkmm/drawingarea.h>
#include <gtkmm.h>
#include <gdkmm.h>
ViewItem(Glib::ustring _name);
virtual ~ViewItem();
+ virtual bool on_image_expose_event(GdkEventExpose *e);
+ virtual void on_realize();
inline Glib::ustring get_name() { return name; }
void set_position(int _x, int _y);
void set_name(Glib::ustring _name);
+ inline bool get_open() { return open; }
inline void set_actual_flow(float f) { actual_flow = f; }
inline void set_open(bool b) { open = b; }
inline void set_extra(float f) { extra = f; }
virtual std::string get_cap_flow() { return "Flujo Actual :"; }
virtual std::string get_cap_extra() { return ""; }
virtual std::string get_extra() { return ""; }
+
+ std::list<std::string> out_lines; // lineas que salen de una compuerta
+ std::list<std::string> in_lines; // lineas que entran a una compuerta
+
+ // Coordenadas para los conectores
+ int x,y;
+ int in_x, in_y;
+ int out_x, out_y;
+ int offset_x, offset_y;
+ int item_offset_x, item_offset_y;
protected:
Glib::ustring name;
Gtk::Image image;
Gdk::Color color;
- int x, y;
+ Glib::RefPtr<Gdk::GC> gc;
+ int m_or;
float actual_flow, extra;
bool open;
};