2 #ifndef _CONSTRUCTOR_H_
3 #define _CONSTRUCTOR_H_
6 #include <libglademm.h>
8 #include <gtkmm/window.h>
10 #include <gtkmm/button.h>
11 #include <gtkmm/fixed.h>
12 #include <gtkmm/scrolledwindow.h>
13 #include <gtkmm/checkbutton.h>
14 #include <gtkmm/fileselection.h>
15 #include <gtkmm/entry.h>
16 #include "workplace.h"
25 class Constructor : public Gtk::Window {
27 Constructor(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade);
28 virtual ~Constructor();
33 // / defino los elementos de la ventana.
34 Gtk::Button *btn_canio, *btn_codo, *btn_y, *btn_tanque, *btn_bomba, *btn_exclusa, *btn_file_ok, *btn_file_cancel, *btn_check, *btn_dlg_close;
35 Gtk::ImageMenuItem *main_menu_quit, *edit_menu_del, *main_menu_save;
36 Gtk::CheckButton *chk_btn_logica;
37 Gtk::FileSelection *file_selection;
38 Gtk::Entry *combo_entry;
39 Gtk::Dialog *dlg_connect;
40 Gtk::Label *dlg_label;
41 Glib::RefPtr<Gdk::Pixbuf> ico_canio, ico_y, ico_codo, ico_tanque, ico_bomba, ico_exclusa;
42 Glib::RefPtr<Gdk::Pixbuf> ico_last;
43 std::list<Gtk::TargetEntry> listTargets;
44 std::list<CItem *> listaItems;
47 bool can_drop(CItem *, int , int);
48 // /señales de control para los elementos de la ventana.
50 virtual void on_btn_canio_drag_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
51 virtual void on_btn_y_drag_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
52 virtual void on_btn_codo_drag_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
53 virtual void on_btn_tanque_drag_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
54 virtual void on_btn_bomba_drag_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
55 virtual void on_btn_exclusa_drag_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
56 virtual void on_main_menu_quit();
57 virtual void on_main_menu_save();
58 virtual void on_edit_menu_del();
59 virtual void on_chk_btn_clicked();
60 virtual void on_btn_file_ok_clicked();
61 virtual void on_btn_file_cancel_clicked();
62 virtual void on_btn_check_clicked();
63 virtual void on_btn_dlg_connect_clicked();
65 // señales para cambiar el icono.
66 virtual void on_canio_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
67 virtual void on_y_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
68 virtual void on_codo_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
69 virtual void on_tanque_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
70 virtual void on_bomba_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
71 virtual void on_exclusa_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
73 virtual void on_item_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context, CItem *);
74 virtual void on_item_drag_data_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
76 virtual void on_item_drop_drag_received(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, GtkSelectionData* selection_data, guint info, guint time);