nanogui: GrUnmapWindow()
Subject:
Re: [nanogui] GrUnmapWindow()
From:
"Greg Haerr" ####@####.####
Date:
19 Jun 2006 03:10:21 +0100
Message-Id: <008c01c69344$008170a0$6401a8c0@winXP>
: GrMapWindow(wid); // to make the window visible
: gc = GrNewGC(); // create a new GC
: GrFillRect(wid,gc,100,30,60,50); // draw a rectangle on the main window
: getchar(); // wait for a key press
: GrUnmapWindow(wid); // unmap the window
: getchar(); // wait for a key press
: GrMapWindow(wid); // make the window visible again
: .......
:
: Although the "GrUnmapWindow(wid)" can hide the window, calling
: "GrMapWindow(wid)" can't make the window visible again.
Your code is entirely incorrect for writing nano-X graphics
applications. You must use an "event-driven" model for
getting keyboard, mouse, or expose events. You can't
use getchar() and similar functions inbetween graphics calls.
Look at the *.sh demo applications in src/demo/nanox for
details on how to write a nano-X application.
Regards,
Greg