Author Topic: Flicker-Free IDE  (Read 7498 times)

shaka_zulu

  • Guest
Flicker-Free IDE
« on: October 18, 2005, 04:34:33 pm »
Hello There,
My Suggestion is for the next version of code::block. Let it be a Flicker-Free!
Thank you!
I want to report for a bug but i'm going to overview the forum so i can se where exactly to post it! I've just registrered :)!

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Flicker-Free IDE
« Reply #1 on: October 18, 2005, 05:11:36 pm »
Under what conditions exactly do you experience flickering?
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Flicker-Free IDE
« Reply #2 on: October 18, 2005, 05:23:54 pm »
If you're talking about flicker when resizing, this is a long-discussed issue among wxWidgets applications. I'm afraid we can't do anything about it :( Unless a new wxWidgets version solves this in an elegant and easy way.

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Flicker-Free IDE
« Reply #3 on: October 18, 2005, 05:59:52 pm »
Most of the flickering is caused by the toolbars and management docks, so it should, maybe, be solved at wxDockIt level using a double buffer solution.

shaka_zulu

  • Guest
Re: Flicker-Free IDE
« Reply #4 on: October 18, 2005, 06:32:42 pm »
That's right ,the "conditions" is resizing if you ask me that ,Thomas!!!
There is no simple sollution of the flickering yet,but it can be implemented very successfully using some GDI Thechniques that i'm going to explain you,i dont think that's necessary. After all, many people had discovered that a long time ago!


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dngdi/html/msdn_flicker.asp

http://www.catch22.net/tuts/flicker.asp


Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Flicker-Free IDE
« Reply #5 on: October 19, 2005, 09:58:16 am »
Well, I believe asking for the conditions was not entirely unjust. We seem to take personal offense quite a lot, don't we!

The reason why I asked is because it does not flicker for me at all (not even when resizing, because I don't have "Show window contents while dragging" enabled on this PC), and that (like Rick said) seems to be the one notable occasion where visible flickering occurs. And due to the way the controls are repainted, there is little one can do about it as such.

The GDI techniques that you pointed out have existed since the 1970s, long before GDI was even planned. The problem is that Code::Blocks is wxWindows based, and double-buffering the UI is not precisely easy (not without a nasty hack, anyway).
One could make a custom toolbar class (like Ceniza said) and draw all the bitmaps by hand, but for the other controls, there is no easy way of doing it really (who feels like designing a tree control from scratch?).
There seems to be heavy overdraw on the wxScintilla component, too. Possibly that could be slightly reduced by changing the container's background (the window background will still draw, so that approach is questionable). But everything that goes beyond that would be quite complicated.
One could remove duplicate redraw events from the message queue, at the cost of a slightly less responsive system, that too would reduce flickering, but again, it is no good and simple solution.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

RandomMan

  • Guest
Re: Flicker-Free IDE
« Reply #6 on: October 20, 2005, 05:13:49 pm »
Even using those techniques, creating a flicker-free application is not an easy task.  It is especially complicated by the fact that Windows Common Controls were not programmed using the techniques that are outlined on James's site, and they use their own message loops.

I have not seen any application that is truly flicker-free, except one I am developing.  You can see some of the stuff I had to do in an old write-up on the library I developed to do it with.  It is at http://www.codeproject.com/library/DWinLib.asp.  It won't help here, as DWinLib is not cross-platform.  wxWidgets would probably take a _considerable_ rewrite in order to give you what you are asking for.

David