Page 1 of 1

How can I hide Anatomist main window

Posted: Tue Apr 27, 2004 3:06 pm
by Manik
Hello,

I would like to know if it is possible to hide the main window of Anatomist when using it in a C++ program.
I am programming a tool in C++, and I want it to display a 3D Anatomist window (containing a brain mesh) during the execution.

Using classes Anatomist and Processor, everything works, but the user can see the main Anatomist window (the one with the lists of objects and windows) which is useless for him.

I tried Anatomist::getWindows(), to get a pointer to the window and hide() it, but I cannot access the main window that way.

Is there any way to hide that window and show only a 3D window ?

Thanks a lot,

Posted: Tue Apr 27, 2004 3:28 pm
by riviere
Hi Manik,

The main window is called "control window" and was originally designed to be optional. But as we never tried not to use it, I don't know if it would actually run without it. Anyway there is always the solution to hide it, which is just what you're trying to do.
There is a pointer on it in the Anatomist class. The following code should work:

Code: Select all

#include <anatomist/application/Anatomist.h>
#include <anatomist/control/wControl.h>
...
ControlWindow *c = theAnatomist->getControlWindow();
if( c )
  c->hide();
Denis

Posted: Tue Apr 27, 2004 3:43 pm
by Manik
Ok thanks, that's exactly what I wanted to do !