From: Ricardo Markiewicz Date: Mon, 17 Oct 2005 04:47:11 +0000 (+0000) Subject: Mejora vista del arbol. X-Git-Tag: 1_0-pre1~50 X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/commitdiff_plain/3dd5d54eb2e182b7edea5eb507aef7743bbc8474?ds=inline Mejora vista del arbol. --- diff --git a/nviewer/w_btree.cpp b/nviewer/w_btree.cpp index ae14245..892db6c 100644 --- a/nviewer/w_btree.cpp +++ b/nviewer/w_btree.cpp @@ -2,9 +2,10 @@ #include #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 () @@ -63,3 +64,9 @@ void wBTree::ShowNode (uint node_num) mvwaddstr (win, 20, 5, "Ir al nodo (-1 para salir) : "); } +void wBTree::Show () +{ + wnode->Show (); + Window::Show (); +} + diff --git a/nviewer/w_btree.h b/nviewer/w_btree.h index 5de908b..9a8dcc9 100644 --- a/nviewer/w_btree.h +++ b/nviewer/w_btree.h @@ -5,19 +5,24 @@ #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