Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » ScrollView() invalidated area
ScrollView() invalidated area [message #8476] Tue, 13 March 2007 11:44 Go to next message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
Hi,

I need to use ScrollView(-1,0) to scroll the graphical contents of the view and I noticed that the invalidated rectangle at the right edge of the window seems to be two pixels wide instead of just one.

Where can I fix this? (Or do you have a solution available?)

-- Tom
Re: ScrollView() invalidated area [message #8477 is a reply to message #8476] Tue, 13 March 2007 13:18 Go to previous messageGo to next message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
Update to the above:

Did some further digging...

It appears to me that the Ctrl::ScrollView() invalidates the rectangle once and then when the WM_PAINT comes, the Ctrl::SyncScroll() causes the invalidated rectangle to be scrolled effectively doubling the invalidated area.

I think the ScrollView should not invalidate the area but wait for the SyncScroll to do it. Or are there side effects to this approach?

Any ideas...?

-- Tom
Re: ScrollView() invalidated area [message #8487 is a reply to message #8477] Tue, 13 March 2007 16:01 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Tom1 wrote on Tue, 13 March 2007 08:18

Update to the above:

Did some further digging...

It appears to me that the Ctrl::ScrollView() invalidates the rectangle once and then when the WM_PAINT comes, the Ctrl::SyncScroll() causes the invalidated rectangle to be scrolled effectively doubling the invalidated area.

I think the ScrollView should not invalidate the area but wait for the SyncScroll to do it. Or are there side effects to this approach?

Any ideas...?

-- Tom


Well, there is one important thing to understand here:

ScrollView is just a form of Refresh. There is no guarantee about what is the invalidated area.

ScrollView basically says that the area *CAN* be repainted while reusing existing content and moving it somehow. Implementation can but does not need to use this knowledge.

This all was decided to resolve problem with combined scrolls, scrolling child widgets and many other issues. Current implementation is maybe a little bit too conservative as it sometimes repaints bigger areas than needed (but in practice, this is little problem).

Mirek

[Updated on: Tue, 13 March 2007 16:01]

Report message to a moderator

Re: ScrollView() invalidated area [message #8489 is a reply to message #8487] Tue, 13 March 2007 16:48 Go to previous message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
First: I'm am very impressed by the work you have done with the Upp. It's really great.

And yes; I understand that ScrollView does not make any guarantees about the invalidated region or rectangle. I also agree with you that this is NOT a bug. However, I will need optimized scrolling for my application because of the high time requirement of rendering images (even though I already switched from DrawImage() to SetSurface()) and I guess this slight refinement would not hurt anybody, right?

If I come up with something that works, are you prepared to merge it into Upp?

-- Tom
Previous Topic: CtrlLib and making new iml objects
Next Topic: MenuBar theming bug in Ubuntu
Goto Forum:
  


Current Time: Fri Mar 29 16:25:10 CET 2024

Total time taken to generate the page: 0.01249 seconds