Re: emitting a signal for refeshing entries



Hi,

Thank you all for the replies, but what I am looking for is a way to send an "EXPOSE" signal to the main window and wiil this signal propagate to all the widgets in this main window ?

I have the callback for "expose events" ready and I have used the GtkAdjustment.

As it looks now I will have to send an "expose_event" signal to each widget individually as this signal cannot be emitted/sent to all the widgets at once ? There si no way to send a signal to all widgets at once ?

Best regards,

Peter Van Osta

Union Biometrica N.V./S.A.
European Scientific Operations (ESO)
Cipalstraat 3
B-2440 Geel
Belgium
Tel.: +32 (0)14 570 620
Fax.: +32 (0)14 570 621

http://www.unionbio-eu.com/

http://ourworld.compuserve.com/homepages/pvosta/cvwww.htm

===============================================================================================

Paul Davis wrote:
A parameter can vary form 1 to 100 and I want the spinbutton to show this value from this parameter when it changes in the program not only by interaction. I now how to set it from within the software, but I would like to ahve all callback function that react on "expose" events to be activated at once.


reading this more carefully, this is a perfect candidate for using a
GtkAdjustment. Just create it with the relevant parameters:

	       initial value
	       lower bound
	       upper bound
	       small step size
	       page step size

then when you create the spinbutton attach it to this adjustment.

in your code, when you want to change the value, set the value of the
adjustment and the spin button will change. connect to the
adjustment's "value_changed" signal if you want to know when the
spinbutton or your code has changed the value.

be careful to avoid feedback loops. write things like:

   gfloat adjuster_value = gtk_adjustment_get_value (GTK_ADJUSTMENT(adjuster));

   if (adjuster_value != parameter_value) {
        gtk_adjustment_set_value (GTK_ADJUSTMENT(adjuster),
        parameter_value);
   }

this assumes that you have the parameter stored elsewhere in the
program (i.e. it can't actually be a GtkAdjustment itself).

--p






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