[XForms] New pre-release: xforms-1.0.92pre3

Jens Thoms Toerring jt at toerring.de
Sun May 17 22:31:56 CEST 2009


To subscribers of the xforms list

Hi everybody,

  here's another pre-relase, to be downloaded from

http://download.savannah.gnu.org/releases/xforms/xforms-1.0.92pre3.tar.gz

Please keep in mind that it may take some time before it be-
comes available from the mirror servers,

  While trying to write a new widget I came upon some problem I
hadn't realized to exist before. As we all know the default be-
haviour of the fl_do_forms() function is to return the address
of an object that had experienced some changes - unless there's
a callback function in\stalled for that object. That's a rather
basic rule of XForms. But now I realized that this doesn't hold
for some objects! The objects for which this isn't the case are
those that are made up from a combination of other objects. E.g
a scrollbar is made up from a slider and two (touch) buttons.
Changes to a scrollbar aren't reported by fl_do_forms() even if
you didn't install a callback for the scrollbar. Other examples
are the formbrowser and tabfolder objects. 

  This simply looks wrong to me. It doesn't seem to have been a
real problem for anybody yet (at least I can't remember anybody
complaining about it), but it's against what one expects when
using XForms. Thus I changed the event handling code to "rectify"
that. But in order not to break any programs that may depend on
the old behaviour I set a "dummy" callback functions for all
widgets that didn't report changes via fl_do_forms() before. So,
all older programs should continue to work without changes. But
you can now get notified by fl_do_forms() by simply switching
off the callback. And you can write widgets that use already
existing widgets and have them behave like "ordinary" widgets.

  Another thing I am rather unhappy with is the prototypes for
callback functions. Some callbacks take a 'long' as the second
argument, others a void pointer. There doesn't seem to be any
obvious reason why one of them is used. And in some situations
a 'long' value is quite useful, but in others a void pointer
is much better and when there's only a 'long' that can be passed
to the callback there's the temptation to use casts between
pointer and integer types (that work on a lot of architectures
but aren't correct C and may fail on some architectures). IMHO
it would be best if each callback would receive both a long and
a void pointer. But that would break a lot of existing code. If
anybody has a good idea on how to deal with that I would be de-
lighted to hear about it!

  I integrated the documentation into the make process. When
you run 'configure' there's now a new option, '--enable-docs'.
If that is set the documentation in info format is created.
To make the HTML or PDF documentation just go into the doc
subdirectory and do 'make html' and/or 'make pdf'. Of course,
you need texi2html for the HTML version of the documentation
and tesi2pdf for the PDF version. The HTML documentation (in-
cluding the images needed) ends up in a subdirecectory of
the doc subdirectory, called xforms.html.

  Finally, there's a new widget, a 'spinner'. It's similar to
a counter object in that it has two buttons that let you in-
or decrease a value, but you can also edit the value manually.
You create one by calling fl_create_spinner(). There are two
types, one for integer and one for double values, called
FL_INT_SPINNER and FL_FLOAT_SPINNER. fl_get_spinner_value()
returns the value (as a double, also for int spinneres) and
with fl_set_spinner_value() you can set a new value. With
fl_set_spinner_bounds() the minimum and maximum value can
be adjusted, fl_get_spinner_bounds() returns the current
settings. fl_set_spinner_step() and fl_get_spinner_step()
set and query the increment and decrement step size. And
fl_set_spinner_precision() and fl_get_spinner_precision()
set and query the number of digits after the decimal point
shown for float spinners (default is 1). Full documentation
will be added real soon;-)
                               Best regards, Jens
-- 
  \   Jens Thoms Toerring  ________      jt at toerring.de
   \_______________________________      http://toerring.de
_______________________________________________
To unsubscribe, send any message to
xforms-leave at bob.usuhs.mil or see: 
http://cweblog.usuhs.mil/mailman/listinfo/xforms
List Archive: http://bob.usuhs.mil/pipermail/xforms and
http://bob.usuhs.mil/mailserv/list-archives/
XForms Home: http://savannah.nongnu.org/projects/xforms



More information about the Xforms mailing list