CrossPlatform GUI Programming with wxWidgets [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

CrossPlatform GUI Programming with wxWidgets [Electronic resources] - نسخه متنی

Julian Smart; Kevin Hock; Stefan Csomor

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
توضیحات
افزودن یادداشت جدید











  • Reducing Flicker


    Flicker is a perennial annoyance in GUI programming. Often an application will need some tweaking to reduce it; here are some tips that might help.wxWindow::GetViewStart and wxWindow:: GetClientSize), and in your paint handler, you should also be able to eliminate the graphics that are not in the update region (wxWindow::GetUpdateRegion). You need data structures that can get you to the start of the view quickly before you start drawing. You may be able to calculate that position from your graphics (rather than search), for example if you have columns with constant width. A linked list or array should be fairly fast to search. If it's time-consuming to calculate the current position, then perhaps you can use a caching mechanism to store the current list position for the last set of data displayed, and then you can simply scan back or forward to find the data at the start of the current scroll position. You can keep a tally of the window position for each piece of data so that you don't have to recalculate the whole thing from the start to find where the data should be drawn.Chapter 5, "Drawing And, Printing," you may want to define your own erase background handler and leave it empty to stop the framework from clearing the background itself. Then you can draw the whole graphic (including as much of the background as necessary) on top of the old one without the flashing caused by clearing the entire background before drawing the content. Use wxWindow::SetBackgroundStyle with wxBG_STYLE_CUSTOM to tell wxWidgets not to automatically erase the background. Chapter 5 also discusses use of wxBufferedDC and wxBufferedPaintDC, which you can use in combination with the other techniques mentioned here.Chapter 12, "Advanced Window Classes," does this; see examples/chap12/thumbnail).


  • / 261