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;
ss3 << header.free_space;
ss3 >> s3;
node_freespace.set_label ("Libre : " + s3);
+
+ if (dynamic_cast<BTreeChildData *>(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<BTreeLeafData *>(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);
+ }
}