Re: drawing a line



Hi,
   Mr Sven Neumann has given an excellent answer. Now
I understand the difference between two functions
(gtk_signal_connect and gtk_signal_connect_object).

I changed the parameters as suggested by Mr Neumann
and viola! I am drawing the lines without "expose"
event and only with pushing a button.

Thanks.

I Must also thank Jeff Trefftzs who gave similar views
though in too abbreviated a form.
Bye
Shiraz

--- Sven Neumann <sven gimp org> wrote:
> Hi,
> 
> Shiraz Baig <shiraz_baig yahoo com> writes:
> 
> > I want to draw a line when I push a button. I have
> > written the following code. It draws line thru two
> > alternative signal commands.
> > a. Thru the timer function.
> > b. Thru the push button.
> > 
> > It works with the timer function. But it does not
> work
> > with the push button. 
> 
> you will need a separate function for the button
> clicked
> callback since it is called with the GtkButton as
> first
> parameter. Alternatively you could use 
> gtk_signal_connect_object() which swaps the
> parameters.
> 
> 
> Salut, Sven


__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com



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