Re: A question on signals
- From: John Cupitt ng-london org uk
- To: andrej prsa guest arnes si
- Cc: gtk-list gnome org
- Subject: Re: A question on signals
- Date: Tue, 18 Dec 2001 13:46:50 -0000
Andrej Prsa wrote:
> I have a bunch of widgets locally declared. One of them is a spin button,
which I use to set/unset the sensitivity of 100 other widgets. Thus I use
"changed" signal to invoke my sensitivity set/unset routine. How do I pass
names of those 100 widgets to that routine? I really want to keep their
declaration local.
Hi Andrej,
The usual technique is to have a struct for every window in your
program. The struct keeps a pointer to each of your widgets, plus any
other data you need to manage the display.
Make a new struct with g_new() when you build a window, free the struct
on a "destroy" signal, and pass a pointer to the struct with every
signal connect for widgets in that window.
John
==========================================================
Renaissance Autumn at the National Gallery
A season of exhibitions, displays and events with a Renaissance theme.
Pisanello: Painter to the Renaissance Court (24 October - 13 January 2002)
For information and tickets:
http://www.nationalgallery.org.uk/what/news/ren_autumn.htm
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]