#include <curses.h>
#include "w_btree.h"
-wBTree::wBTree ():Window ("TreeMulator", 0, 0)
+wBTree::wBTree (Window *p):Window (p, "", p->Width()-2, p->Height ()-2, 1, 1, true)
{
last_length = 0;
+ wnode = new wNodeHeader (this, p->Width () - 30, 2);
}
wBTree::~wBTree ()
wattron (win, COLOR_PAIR (2));
else
wattron (win, COLOR_PAIR (3));
+ mvwaddnstr (win, y, x, " ", 1);
+ x++;
mvwaddnstr (win, y, x, (const char *)(s.c_str ()), s.length ());
if (n%2)
wattroff (win, COLOR_PAIR (2));
it++;
}
last_length = x;
- mvwaddstr (win, 20, 5, "Ir al nodo (-1 para salir) : ");
+ wnode->ShowHeader (node_num, node_header);
+}
+
+void wBTree::Show ()
+{
+ wnode->Show ();
+ Window::Show ();
}