RE: checking whether a buffer is hidden
From: Jean-Marc Lasgouttes [lasgout...@lyx.org] Sent: Sunday, July 15, 2012 4:54 PM >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 use this in LFUN_BUFFER_FORALL. >I am not sure that the notion of hidden buffer is correctly defined >(when are they "visible"?) ok. Sounds like it's best to leave things how they are. Thanks, Scott
Re: checking whether a buffer is hidden
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
RE: checking whether a buffer is hidden
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? Scott
Re: checking whether a buffer is hidden
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. JMarc