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"
23 class Constructor : public Gtk::Window {
25 Constructor(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade);
26 virtual ~Constructor();
31 // / defino los elementos de la ventana.
32 Gtk::Button *btn_canio, *btn_codo, *btn_y, *btn_tanque, *btn_file_ok, *btn_file_cancel, *btn_check, *btn_dlg_close;
33 Gtk::ImageMenuItem *main_menu_quit, *edit_menu_del, *main_menu_save;
34 Gtk::CheckButton *chk_btn_logica;
35 Gtk::FileSelection *file_selection;
36 Gtk::Entry *combo_entry;
37 Gtk::Dialog *dlg_connect;
38 Gtk::Label *dlg_label;
39 Glib::RefPtr<Gdk::Pixbuf> ico_canio, ico_y, ico_codo, ico_tanque;
40 Glib::RefPtr<Gdk::Pixbuf> ico_last;
41 std::list<Gtk::TargetEntry> listTargets;
42 std::list<CItem *> listaItems;
45 bool can_drop(CItem *, int , int);
46 // /señales de control para los elementos de la ventana.
48 virtual void on_btn_canio_drag_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
49 virtual void on_btn_y_drag_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
50 virtual void on_btn_codo_drag_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
51 virtual void on_btn_tanque_drag_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
52 virtual void on_main_menu_quit();
53 virtual void on_main_menu_save();
54 virtual void on_edit_menu_del();
55 virtual void on_chk_btn_clicked();
56 virtual void on_btn_file_ok_clicked();
57 virtual void on_btn_file_cancel_clicked();
58 virtual void on_btn_check_clicked();
59 virtual void on_btn_dlg_connect_clicked();
61 // señales para cambiar el icono.
62 virtual void on_canio_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
63 virtual void on_y_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
64 virtual void on_codo_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
65 virtual void on_tanque_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
67 virtual void on_item_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context, CItem *);
68 virtual void on_item_drag_data_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
70 virtual void on_item_drop_drag_received(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, GtkSelectionData* selection_data, guint info, guint time);