Excluding particular children from component snapshot

Discussion and support for general JUCE issues

Excluding particular children from component snapshot

Postby Mike » Sun Jul 22, 2012 11:19 am

Hi,
I wish to make a Component snapshot, and using the Component::createComponentSnapshot makes perfect sense, except I need to exclude certain child windows from the snapshot.
Particularly, I must exclude any child window popups that actually include the functionality that creates the snapshot. (Yes, I HAVE to have a window ontop, that the user clicks on
to produce a snapshot.)

Is there any way other than making the unwanted child temporarily invisible? Surely Juce must have a traversion list somewhere to decide what to include and what to not include.
[Insert signature here]
User avatar
Mike
JUCE UberWeenie
 
Posts: 164
Joined: Thu Jan 27, 2011 11:34 pm

Re: Excluding particular children from component snapshot

Postby jules » Sun Jul 22, 2012 11:35 am

Well, it just uses the normal painting mechanism to draw the snapshot, so I think that making the unwanted comps invisible would be the only way to do it.
User avatar
jules
Fearless Leader
 
Posts: 17204
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK

Re: Excluding particular children from component snapshot

Postby Mike » Sun Jul 22, 2012 11:48 am

Thanks. That's the way I do it now, and it appear to work. Is there any chance the component will "blink out" if it is made invisible+visible within the same call? I suppose it takes a message processing step to make the setVisible(false) call actually makeit invisble on screen. (?)
[Insert signature here]
User avatar
Mike
JUCE UberWeenie
 
Posts: 164
Joined: Thu Jan 27, 2011 11:34 pm

Re: Excluding particular children from component snapshot

Postby jules » Sun Jul 22, 2012 1:10 pm

That's right - as long as you do all of your work within the same message callback, nothing will change on-screen.
User avatar
jules
Fearless Leader
 
Posts: 17204
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK


Return to General JUCE discussion

Who is online

Users browsing this forum: Google [Bot], Nikolai and 4 guests