Have a look at examples/capi/applications/balloons.lisp. OTOH, I would have expected capi:with-atomic-redisplay to work. Maybe you are not wrapping it around "everything"? Post a simple example. pt
recent596 recent596 wrote: > Hi Lisp-Hug, > > Let's say that I have an application such as > .../examples/capi/graphics/circled-graph-nodes.lisp > > The example specializes on capi:calculate-constraints to define the > minimum size of an object. > > Nonetheless, upon resize, the pinboard-layout flashes. To eliminate > flash, I have unsuccessfully tried: > > 1. capi:with-atomic-redisplay How have you tried with-atomic-redisplay? Did you define a resize-callback of your own and redraw all the pinboard objects within the with-atomic-redisplay? Mitch
recent596 recent596 wrote:How have you tried with-atomic-redisplay? Did you define a resize-callback of your own and redraw all the pinboard objects within the with-atomic-redisplay?
Hi Lisp-Hug,
Let's say that I have an application such as .../examples/capi/graphics/circled-graph-nodes.lisp
The example specializes on capi:calculate-constraints to define the minimum size of an object.
Nonetheless, upon resize, the pinboard-layout flashes. To eliminate flash, I have unsuccessfully tried:
1. capi:with-atomic-redisplay
Mitch
Have a look at examples/capi/applications/balloons.lisp.
OTOH, I would have expected capi:with-atomic-redisplay to work. Maybe you are
not wrapping it around "everything"? Post a simple example.
pt
Hi Paul,
Thank you for your response. I posted an example below. It flickers badly on Windows Vista. Not as much on Windows XP.
I'm not sure what I'm doing wrong.
I'm writing an inductive user interface. The application is targeted at novice users. I want to eliminate the flicker because the application must give the impression of solidity and reliability.
Thanks Paul; I would really appreciate any advice that you could offer.
R596
(in-package "CL-USER")
(defun make-contents ()
(loop for r from 1 to 10
collect (make-instance 'capi:rectangle
:x (random 800)
:y (random 600)
:width (* (random 8) 50)
:height (* (random 8) 50)
:filled t
:graph
ics-args `(:foreground
,(nth (random 5) '(:red :green :blue :yellow :black))))))
(capi:define-interface test ()
((contents :initform (make-contents)))
(:panes
(pb capi:pinboard-layout
:draw-pinboard-objects :buffer
:description contents
:horizontal-scroll t
:vertical-scroll t
:resize-callback #'(lambda (pinboard x y width height)
;;; Approach 1 (Uncomment this section only)
(capi:redraw-pinboard-layout pinboard x y width height nil)
;;; Approach 2 (Uncomment this section only)
;;; (capi
:with-atomic-redisplay (pinboard)
;;; (dolist (r contents)
;;; (when (capi:pinboard-object-overlap-p r
;;;  
; x y (+ x width)
;;; (+ y width))
;;; (capi:redraw-pinboard-object r nil))))))
&nbs
p; ))
)
(:default-initargs
:auto-menus nil
:best-height 400
:best-width 500))
(capi:display (make-instance 'test))
- Show quoted text -
On Thu, Aug 21, 2008 at 8:18 PM, Paul Tarvydas <tarvydas@visualframeworksinc.com> wrote:
Have a look at examples/capi/applications/balloons.lisp.
OTOH, I would have expected capi:with-atomic-redisplay to work. Maybe you are
not wrapping it around "everything"? Post a simple example.
pt
LWW 4.6.1, Windows XP.
> -----Original Message-----
> From: owner-lisp-hug@lispworks.com
> [mailto:owner-lisp-hug@lispworks.com] On Behalf Of Paul Tarvydas
> Sent: Monday, August 25, 2008 3:41 PM
> To: recent596 recent596
> Cc: lisp-hug@lispworks.com
> Subject: Re: Resizing pinboard-layout without flashing.
>
>
> On Saturday 23 August 2008 12:04:27 pm recent596 recent596 wrote:
> > Hi Paul,
> >
> > Thank you for your response. I posted an example below.
> It flickers
> > badly on Windows Vista. Not as much on Windows XP.
> >
> > I'm not sure what I'm doing wrong.
>
> I'm using LWW 5.1 on Win 2K. I see no flashing whatsoever.
> I grab the lower right corner of the interface with the mouse
> and pull - the pinboard remains the same size until the mouse
> is released. I can't try it on XP until later.
The example circled-graph-nodes.lisp flickers when the XP setting 'Show window contents while dragging' is on, but does not flicker when the setting is off. Same with the example of recent596 (in an earlier post).
Look in Control Panel, Display, tab Appearance, button Effects.
HTH,
Eivind