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 » howto best Ctrl Refresh handling w/ MT & very frequent refreshes
Re: howto best Ctrl Refresh handling w/ MT & very frequent refreshes [message #26985 is a reply to message #26984] Wed, 16 June 2010 18:47 Go to previous messageGo to previous message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
kohait00 wrote on Wed, 16 June 2010 17:26


do you have some hint concerning the repaint model in upp? how is it done, what is the idea behind it?


Not exactly, except what I said before about MVC and cached data.
We can see following words from documentation for Ctrl::RefreshFrame:
Quote:


Marks requested rectangle of frame area for repainting. Actual repainting is deferred for performance reasons.


When application window moves or some application window(s) moves along it repaints appeared areas.
Also Mirek said about input queue.

May be, following caller graph diagram created by Doxygen and Graphviz programs for Ctrl::RefreshFrame (from CtrlCore perspective only) can be useful:

index.php?t=getfile&id=2587&private=0


Actual painting (e.g. for Windows operating system) happens in virtual Ctrl::WindowProc function:
LRESULT Ctrl::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
//...
	HWND hwnd = GetHWND();
	switch(message) {
//...
	case WM_PAINT:
		ASSERT(hwnd);
		if(IsVisible() && hwnd) {
			PAINTSTRUCT ps;
			SyncScroll();
			HDC dc = BeginPaint(hwnd, &ps);
			fullrefresh = false;
			SystemDraw draw(dc);
//...
			UpdateArea(draw, Rect(ps.rcPaint));
//...
			EndPaint(hwnd, &ps);
		}
		return 0L;

[Updated on: Fri, 18 June 2010 08:58]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: GtkWidget inside U++
Next Topic: DONE: ColumnList with Ctrl's
Goto Forum:
  


Current Time: Tue May 07 08:02:22 CEST 2024

Total time taken to generate the page: 0.04622 seconds