5 wBTree::wBTree ():Window ("TreeMulator", 0, 0)
14 void wBTree::SetTree (BTree *b)
19 void wBTree::ShowNode (uint node_num)
22 std::list<BTreeData*> node_keys;
24 node = tree->ReadBlock (node_num);
25 tree->ReadNodoHeader (node, &node_header);
26 node_keys = tree->ReadKeys (node, node_header);
31 /* Dibujo el bloque de color rojo */
32 /*wattron (win, COLOR_PAIR (1));
33 for (uint i=0; i < tree->header.block_size + 2; i++)
34 mvwaddstr (win, y+1, i+x-1, ".");
35 for (uint i=0; i < tree->header.block_size + 2; i++)
36 mvwaddstr (win, y-1, i+x-1, ".");
37 mvwaddstr (win, y, x-1, ".");
38 mvwaddstr (win, y, tree->header.block_size + x, ".");
39 wattroff (win, COLOR_PAIR (1));*/
41 for (uint o=0; o<last_length; o++)
42 mvwaddstr (win, y, x+o, " ");
44 std::list<BTreeData*>::iterator it = node_keys.begin ();
46 while (it != node_keys.end ()) {
47 std::string s = *(*it);
50 wattron (win, COLOR_PAIR (2));
52 wattron (win, COLOR_PAIR (3));
53 mvwaddnstr (win, y, x, (const char *)(s.c_str ()), s.length ());
55 wattroff (win, COLOR_PAIR (2));
57 wattroff (win, COLOR_PAIR (3));
63 mvwaddstr (win, 20, 5, "Ir al nodo (-1 para salir) : ");