From: Ricardo Markiewicz Date: Mon, 17 Oct 2005 04:47:32 +0000 (+0000) Subject: Mejora del programa. X-Git-Tag: 1_0-pre1~49 X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/commitdiff_plain/07e17cb8fc67f308e7bd4e4c004487a456c49139?ds=inline Mejora del programa. --- 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; }