X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/2d7fff39ec5ab67f13b5250a60082c4bc62c1739..33a5f978014e65a402a3d376c7e47bd8ee8ab8ab:/Client/include/item.h?ds=inline diff --git a/Client/include/item.h b/Client/include/item.h index 5a374dd..62f1b66 100644 --- a/Client/include/item.h +++ b/Client/include/item.h @@ -2,17 +2,27 @@ #define _ITEM_H_ #include +#include #include #include #include #include #include +/** Estructura para guardar las lineas de conexión */ +typedef struct { + std::string dst; ///< Destino de la línea + bool is_tank; ///< Define si es un tanque + bool is_tank_lower; ///< Define si esta conectado abajo +} t_Linea; + class ViewItem:public Gtk::EventBox { public: 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); @@ -27,11 +37,22 @@ public: virtual std::string get_cap_flow() { return "Flujo Actual :"; } virtual std::string get_cap_extra() { return ""; } virtual std::string get_extra() { return ""; } + + std::list out_lines; // lineas que salen de una compuerta + std::list 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 gc; + int m_or; float actual_flow, extra; bool open; };