1 #ifndef _CONSTRUCTOR_H_
2 #define _CONSTRUCTOR_H_
5 #include <libglademm.h>
7 #include <gtkmm/window.h>
9 #include <gtkmm/button.h>
10 #include <gtkmm/fixed.h>
11 #include <gtkmm/scrolledwindow.h>
12 #include <gtkmm/checkbutton.h>
13 #include <gtkmm/fileselection.h>
14 #include <gtkmm/entry.h>
15 #include "workplace.h"
28 class Constructor : public Gtk::Window {
30 Constructor(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade);
31 virtual ~Constructor();
36 // / defino los elementos de la ventana.
37 Gtk::Button *btn_canio, *btn_codo, *btn_y, *btn_tanque, *btn_bomba, *btn_exclusa, *btn_drain, *btn_file_ok, *btn_file_cancel, *btn_check, *btn_dlg_close,
38 *btn_and, *btn_or, *btn_not;
39 Gtk::ImageMenuItem *main_menu_quit, *edit_menu_del, *main_menu_save;
40 Gtk::CheckButton *chk_btn_logica;
41 Gtk::FileSelection *file_selection;
42 Gtk::Entry *combo_entry;
43 Gtk::Dialog *dlg_connect;
44 Gtk::Label *dlg_label;
45 Glib::RefPtr<Gdk::Pixbuf> ico_canio, ico_y, ico_codo, ico_tanque, ico_bomba, ico_exclusa, ico_drain, ico_and, ico_or, ico_not;
46 Glib::RefPtr<Gdk::Pixbuf> ico_last;
47 std::list<Gtk::TargetEntry> listTargets;
48 std::list<CItem *> listaItems, lista_logic_Items;
51 bool can_drop(CItem *, int , int);
52 // /señales de control para los elementos de la ventana.
54 virtual void on_btn_canio_drag_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
55 virtual void on_btn_y_drag_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
56 virtual void on_btn_codo_drag_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
57 virtual void on_btn_tanque_drag_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
58 virtual void on_btn_bomba_drag_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
59 virtual void on_btn_exclusa_drag_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
60 virtual void on_btn_drain_drag_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
61 virtual void on_btn_and_drag_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
62 virtual void on_btn_or_drag_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
63 virtual void on_btn_not_drag_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
64 virtual void on_main_menu_quit();
65 virtual void on_main_menu_save();
66 virtual void on_edit_menu_del();
67 virtual void on_chk_btn_clicked();
68 virtual void on_btn_file_ok_clicked();
69 virtual void on_btn_file_cancel_clicked();
70 virtual void on_btn_check_clicked();
71 virtual void on_btn_dlg_connect_clicked();
73 // señales para cambiar el icono.
74 virtual void on_canio_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
75 virtual void on_y_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
76 virtual void on_codo_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
77 virtual void on_tanque_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
78 virtual void on_bomba_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
79 virtual void on_exclusa_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
80 virtual void on_drain_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
81 virtual void on_and_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
82 virtual void on_or_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
83 virtual void on_not_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
85 virtual void on_item_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context, CItem *);
86 virtual void on_item_drag_data_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
88 virtual void on_item_drop_drag_received(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, GtkSelectionData* selection_data, guint info, guint time);