From 07e17cb8fc67f308e7bd4e4c004487a456c49139 Mon Sep 17 00:00:00 2001 From: Ricardo Markiewicz Date: Mon, 17 Oct 2005 04:47:32 +0000 Subject: [PATCH] Mejora del programa. --- nviewer/main.cpp | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/nviewer/main.cpp b/nviewer/main.cpp index 15580ba..fac9cf0 100644 --- a/nviewer/main.cpp +++ b/nviewer/main.cpp @@ -30,6 +30,8 @@ int main (int argc, char *argv[]) nonl(); cbreak(); noecho(); + curs_set (0); + /* Si se soporta color, los inicializo */ if (has_colors()) { start_color(); @@ -45,26 +47,16 @@ int main (int argc, char *argv[]) init_pair(COLOR_PAIR (1), COLOR_RED, COLOR_RED); } - wBTree *w = new wBTree (); - wNodeHeader *w1 = new wNodeHeader (10, 10); - - w->SetTree (&tree); - int n = 0; - do { - w->ShowNode (n); - w->Show (); - - w1->SetHeader (n, w->GetHeader ()); - w1->Show (); - - scanf ("%d", &n); - if (n == -1) break; + /* Creo la ventana principal */ + Window *screen = new Window ("TreeMulator", 0, 0, 0, 0, true); + wBTree *wb = new wBTree (screen); - } while (true); + screen->Show (); + wb->Show (); - delete w; - delete w1; + screen->GetChar (); + curs_set (1); endwin(); return 0; } -- 2.43.0