X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/467f3bcabe798b584e470038c3169c374874b18b..07e17cb8fc67f308e7bd4e4c004487a456c49139:/nviewer/main.cpp 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; }