From 3dd5d54eb2e182b7edea5eb507aef7743bbc8474 Mon Sep 17 00:00:00 2001 From: Ricardo Markiewicz Date: Mon, 17 Oct 2005 04:47:11 +0000 Subject: [PATCH] Mejora vista del arbol. --- nviewer/w_btree.cpp | 9 ++++++++- nviewer/w_btree.h | 7 ++++++- 2 files changed, 14 insertions(+), 2 deletions(-) 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 -- 2.43.0