X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/e87ccf6dd21c4739331f33891111c0a006bec002..cc77948bedbd851e009ad3b8a421dea93c3ceeff:/Client/include/principal.h diff --git a/Client/include/principal.h b/Client/include/principal.h index 5c8e368..5f78d99 100644 --- a/Client/include/principal.h +++ b/Client/include/principal.h @@ -17,6 +17,7 @@ public: Principal(BaseObjectType *co, const Glib::RefPtr &rg); virtual ~Principal(); + virtual void on_realize(); protected: PlaQui::Server::ControlClient *conexion; // Utilizo un map para no tener que buscar un item @@ -40,7 +41,10 @@ protected: void loadTank(xmlNodePtr nodo); void loadUnion(xmlNodePtr nodo); void loadDrain(xmlNodePtr nodo); - + void loadOr(xmlNodePtr nodo); + void loadNot(xmlNodePtr nodo); + void loadAnd(xmlNodePtr nodo); + Glib::Dispatcher load_xml_dispatch, update_ui; std::string xml_body; @@ -59,10 +63,12 @@ protected: Gtk::Image *ico_conected; Gtk::Button *btn_activar, *btn_simulate, *btn_pause; Gtk::DrawingArea *color_preview; + Glib::RefPtr gc; // Actualiza las propiedades en la ventana del item actual void update_items_prop(); - + ViewItem *find_item(std::string &_name); + // Callbacks del menu y la barra virtual void on_mnu_file_exit(); virtual void on_mnu_file_connect(); @@ -76,11 +82,14 @@ protected: virtual void on_btn_simulate_clicked(); virtual void on_btn_pause_clicked(); virtual bool on_item_clicked(GdkEventButton *, ViewItem *); + virtual bool on_workplace_expose_event(GdkEventExpose *); + virtual bool on_delete_event(GdkEventAny *); // Callbacks para las conexiones void on_conexion_finished(); void on_conexion_ok(const std::string &body); - void on_conexion_error(unsigned code); + void on_conexion_fatal_error(const PlaQui::Server::ControlClient::Error& code, const std::string& desc); + void on_conexion_error(unsigned code, const std::string& desc); void on_conexion_frame(const std::string &frame); };