Le 15/07/12 22:37, Scott Kostyshak a écrit :
From: Jean-Marc Lasgouttes [lasgout...@lyx.org]
Sent: Sunday, July 15, 2012 9:34 AM
Le 15/07/12 09:14, Scott Kostyshak a écrit :
What is the correct way to check whether a buffer is hidden?
I am currently doing the following
bool const hidden = !(guiApp->currentView() &&
guiApp->currentView()->workArea(*b));
which works fine but I'm not sure if it's the right way.
This is the usual way, as ugly as it may seem.
Could I add a buffer member function that does this or is it too uncommon?
The problem is that it needs to be a member function of GuiApplication.
The buffer itself has no reason to know that it is hidden.
In what part of code do you need to know this information?
I am not sure that the notion of hidden buffer is correctly defined
(when are they "visible"?)
JMarc