X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/70084b679b2a4a3be3f7cc6ef80cef7c7ccf8bed..44c4c40e48cc4a72e81e0af80842738c45d6116f:/viewer/view_properties.cpp diff --git a/viewer/view_properties.cpp b/viewer/view_properties.cpp index cd48676..dff6db4 100644 --- a/viewer/view_properties.cpp +++ b/viewer/view_properties.cpp @@ -18,7 +18,7 @@ ViewProperties::ViewProperties ():Frame () set_shadow_type(Gtk::SHADOW_NONE); } -void ViewProperties::ShowItem (BTreeData *, BTreeNodeHeader &header) +void ViewProperties::ShowItem (BTreeData *data, BTreeNodeHeader &header) { std::string s1, s2, s3; std::stringstream ss1, ss2, ss3; @@ -34,5 +34,33 @@ void ViewProperties::ShowItem (BTreeData *, BTreeNodeHeader &header) ss3 << header.free_space; ss3 >> s3; node_freespace.set_label ("Libre : " + s3); + + if (dynamic_cast(data)) { + data_type.set_label ("Tipo : BTreeChildData"); + data_key.set_label (""); + + std::string s4; + std::stringstream ss4; + ss4 << data->getChild (); + ss4 >> s4; + data_child.set_label ("Hijo Izquierdo : " + s4); + } else if (dynamic_cast(data)) { + data_type.set_label ("Tipo : BTreeLeafData"); + data_child.set_label (""); + + std::string s4 = *(data->getClave ()); + data_child.set_label ("Clave : " + s4); + } else { + data_type.set_label ("Tipo : BTreeData"); + + std::string s4; + std::stringstream ss4; + ss4 << data->getChild (); + ss4 >> s4; + data_child.set_label ("Hijo Derecho : " + s4); + + std::string s5 = *(data->getClave ()); + data_key.set_label ("Clave : " + s5); + } }