X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/c8b8148848e31e0e39a01ed45c19ccc0d0702a34..78fcf62243366bfd66e21b25c403c3a4b770bec2:/viewer/view_properties.cpp?ds=sidebyside 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); + } }