5 wBTree::wBTree (Window *p):Window (p, "", p->Width()-2, p->Height ()-2, 1, 1, true)
8 wnode = new wNodeHeader (this, p->Width () - 30, 2);
15 void wBTree::SetTree (BTree *b)
20 void wBTree::ShowNode (uint node_num)
23 std::list<BTreeData*> node_keys;
25 node = tree->ReadBlock (node_num);
26 tree->ReadNodoHeader (node, &node_header);
27 node_keys = tree->ReadKeys (node, node_header);
32 /* Dibujo el bloque de color rojo */
33 /*wattron (win, COLOR_PAIR (1));
34 for (uint i=0; i < tree->header.block_size + 2; i++)
35 mvwaddstr (win, y+1, i+x-1, ".");
36 for (uint i=0; i < tree->header.block_size + 2; i++)
37 mvwaddstr (win, y-1, i+x-1, ".");
38 mvwaddstr (win, y, x-1, ".");
39 mvwaddstr (win, y, tree->header.block_size + x, ".");
40 wattroff (win, COLOR_PAIR (1));*/
42 for (uint o=0; o<last_length; o++)
43 mvwaddstr (win, y, x+o, " ");
45 std::list<BTreeData*>::iterator it = node_keys.begin ();
47 while (it != node_keys.end ()) {
48 std::string s = *(*it);
51 wattron (win, COLOR_PAIR (2));
53 wattron (win, COLOR_PAIR (3));
54 mvwaddnstr (win, y, x, (const char *)(s.c_str ()), s.length ());
56 wattroff (win, COLOR_PAIR (2));
58 wattroff (win, COLOR_PAIR (3));
64 mvwaddstr (win, 20, 5, "Ir al nodo (-1 para salir) : ");