#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 ()
mvwaddstr (win, 20, 5, "Ir al nodo (-1 para salir) : ");
}
+void wBTree::Show ()
+{
+ wnode->Show ();
+ Window::Show ();
+}
+
#include "btree.h"
#include "window.h"
+#include "w_node_header.h"
class wBTree : public Window {
public:
- wBTree ();
+ wBTree (Window *p);
~wBTree ();
void SetTree (BTree *b);
void ShowNode (uint node_num);
BTreeNodeHeader& GetHeader () { return node_header; }
+
+ virtual void Show ();
protected:
BTree *tree;
BTreeNodeHeader node_header;
uint last_length;
+
+ wNodeHeader *wnode;
};
#endif