#include <libglademm.h>
#include <gtkmm/entry.h>
-class Item:public Gtk::DrawingArea {
+class ViewItem:public Gtk::EventBox {
public:
- Item(Glib::ustring _name);
- virtual ~Item();
- virtual bool on_expose_event(GdkEventExpose* event);
- Glib::ustring get_name();
+ 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; }
+ inline void set_color(const Gdk::Color &c) { color = c; }
+ inline Gdk::Color get_color() { return color; }
+
+ std::string get_actual_flow();
+ virtual std::string get_cap_flow() { return "Flujo Actual :"; }
+ virtual std::string get_cap_extra() { return ""; }
+ virtual std::string get_extra() { return ""; }
protected:
Glib::ustring name;
- Glib::RefPtr<Gdk::Pixbuf> image;
- int x, y;
+ Gtk::Image image;
+ Gdk::Color color;
+ Glib::RefPtr<Gdk::GC> gc;
+ int x, y, m_or;
+ float actual_flow, extra;
+ bool open;
};
#endif
+