Redraw policy on overlapping views

A user interface toolkit mainly for audio plug-ins (VST, AudioUnit, etc).
f.berti
Posts: 15
Joined: Thu Nov 02, 2017 5:50 pm

Redraw policy on overlapping views

Postby f.berti » Sun Mar 11, 2018 9:58 pm

Hello,

I've just noticed something a bit strange, but I don't know if it's a design choice.

I have a CTextLabel and a CTextButton inside of it (and above it, considering the Z axis), so the 2 views are overlapping.
When the button is clicked, this causes the label text to change (simply calling the "setText(...)" method), but the change is not reflected on the GUI. In fact, the label text remains the same.
Moving the button completely outside the text label rect solves the issue.

Is this by design?
Rearranging the views to solve the problem is not a big deal, but I'd like to know if I'm missing something here.

Thanks in advance,
Federico

Arne Scheffler
Posts: 201
Joined: Mon Jun 20, 2016 7:53 am

Re: Redraw policy on overlapping views

Postby Arne Scheffler » Tue Mar 13, 2018 11:20 am

Hi Federico,
the redraw policy depends on how you use VSTGUI. If you only use the main thread to call into all VSTGUI objects, then you can set CView::kDirtyCallAlwaysOnMainThread to true and your issue should be solved. But if you are calling setDirty() from a secondary thread (which is popular in the VST2.x world) then this is not possible and you should not overlap views.

I hope this helps.
Cheers
Arne

ClaudBe
Posts: 1
Joined: Tue Mar 27, 2018 10:10 am

Re: Redraw policy on overlapping views

Postby ClaudBe » Sat Apr 07, 2018 10:51 am

Hi Arne, I take it that overlaping views when calling setDirty() from a secondary thread will never be an option?


Return to “VSTGUI”

Who is online

Users browsing this forum: No registered users and 1 guest