xforms-development
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XForms] restoring contents of an unmapped/mapped canvas ??


From: Jens Thoms Toerring
Subject: Re: [XForms] restoring contents of an unmapped/mapped canvas ??
Date: Fri, 18 Dec 2015 01:51:33 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Hi Peter,

On Thu, Dec 17, 2015 at 03:55:10PM -0800, Peter Rowat wrote:
> My quick reply is that I’ve been trying to use the functions
> “fl_redraw_form" and "fl_redraw_object” functions but neither work..

No, they just draw the background of the canvas (if there's
one). They don't know anything about the contents of the can-
vas. How should they if you use a lower level function like
XDrawLine() or similar, which completely by-passes XForms?

> But perhaps I misunderstood what “redraw” means. I was thinking it meant
> re-draw everything previously drawn into the canvas window, whereas maybe it
> merely means redraw the border of the canvas/window with blank “contents”.

A canvas is just an X window (you're basically telling XForms
that you want some area that you will control by yourself in
all aspects) - all suppport you get that makes it a tiny bit
easier is getting at the XEvents directed at that window. But
whatever you do with the canvas becomes your responsibility.
You do that using Xlib functions and all the support you get
is what Xlib does. So a "redraw" of a canvas involves re-
questing the corresponding Xlib events to figure out when it
needs to be done and then to really redraw everything in there
(unless you have some off-screen pixmap you can copy the con-
tents from - but that also requires the Xlib XCopy function).

A canvas is definitely not an XForm-managed drawing area,
which the XForms library takes care of. Otherwise it could
only be used with XForms-specific drawing routines. It's
mostly just a raw X window you can ask Xforms to give you,
with a bit of help in circumventing the worst raw edges of
Xlib.

This is rather different to more "modern" toolkits like e.g.
Qt, that have much higher level "drawing areas". They have all
their own functions for drawing and zooming, maybe even having
sliders around them etc., making a lot of things easier and some
harder. None of that exists in this form in Forms.

                         Best regards, Jens
-- 
  \   Jens Thoms Toerring  ________      address@hidden
   \_______________________________      http://toerring.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]