Does anyone know a way to determine if a component is on the Desktop?

Does anyone know a way to determine if a component is on the Desktop?

I’d like to determine if a child component is inside a component that is on the Desktop. I can use Component::getTopLevelComponent() to get the top level component, but how to determine if it is on the desktop?

Does this give you what you need: Component::isOnDesktop()

2 Likes

Oh jeez… how did I miss that? (hand smacks forehead). Thank you.

As an aside, I wish the JUCE documentation search feature had the ability to locate a keyword in the middle of a function name. I was looking for desktop related things, but of course entering “desktop” would not currently be able to identify isOnDesktop

I feel you. Avid put their aax docs in a single pdf document (besides the usual docs). I love to CMD F that so I think I will try to do the same with JUCE…

1 Like

Since the docs are just auto generated from the JUCE header files, you can just search the code and get the same thing, for example find all references to desktop, etc.

Yes I could, but I didn’t that time. :grin:
Actually, there’s no excuse for me missing something so obvious. :roll_eyes:

If you’re on Mac I would have suggested getting Dash and buying a license, but they’ve recently switched to a subscription model in order to “support more docsets”, yet the only thing I use it for (JUCE) is provided by @modosc, and even then the software itself doesn’t actually properly support the collapsible sections in the docs anyway, so I’ll be looking for an alternative in 2 years once my “grace” license is exhausted. :frowning: Fed up with rent seeking subscription models…

2 Likes