[pygtk] Detecting clicks on a Drawing Area

2002-10-23 Thread LDC - Pablo Endres Lozada


Hi, I drew some pixmaps on a Drawing Area and now I 
need to detect a click on them.  Any ideas?

-- 
Muchas personas creen que piensan,
cuando en realidad sólo están reordenando sus
prejuicios.
- William James

Pablo Endres
Centro de Datos

GSM:  +584127347610


___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/



Re: [pygtk] Detecting clicks on a Drawing Area

2002-10-23 Thread Christian Reis
On Wed, Oct 23, 2002 at 08:30:46AM -0400, LDC - Pablo Endres Lozada wrote:
   Hi, I drew some pixmaps on a Drawing Area and now I 
   need to detect a click on them.  Any ideas?

Use the button_press_event signal, I guess, if nothing higher-level is
offered by the drawingarea.

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/



Re: [pygtk] Detecting clicks on a Drawing Area

2002-10-23 Thread LDC - Pablo Endres Lozada
On Wed, 23 Oct 2002, Christian Reis wrote:

 On Wed, Oct 23, 2002 at 08:30:46AM -0400, LDC - Pablo Endres Lozada wrote:
  Hi, I drew some pixmaps on a Drawing Area and now I 
  need to detect a click on them.  Any ideas?
 On Wed, Oct 23, 2002 at 08:30:46AM -0400, LDC - Pablo Endres Lozada wrote:
  Hi, I drew some pixmaps on a Drawing Area and now I 
  need to detect a click on them.  Any ideas?
 
 Use the button_press_event signal, I guess, if nothing higher-level is
 offered by the drawingarea.

Ok here is how I'm doing the painting:

self.pixmacOK, mask = 
gtk.create_pixmap_from_xpm(self.Main, self.style.bg[gtk.STATE_NORMAL], 
self.macOK)

area.draw_pixmap(self.gc, self.pixmacOK, 0, 0, x1, y,
 self.pixmacOK.width, self.pixmacOK.height)

How do I setup the event handler to a simple pixmap or even
easyer how to a draw a gtk.Pixmap on the Drawing area?

 
 Take care,
 --
 Christian Reis, Senior Engineer, Async Open Source, Brazil.
 http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL
 

-- 
Muchas personas creen que piensan,
cuando en realidad sólo están reordenando sus
prejuicios.
- William James
 
   .-.
  /  .-.   Pablo Endres Lozada.-.  \
 |  /   \   Laboratorio Docente de Computacion  /   \  |
 | |\_.  |USB - Venezuela  |/| |
 |\|  | /| |\  | |/|
 | `---' |   [EMAIL PROTECTED] | `---' |
 |   | |   | 
 |   |-|   |
 \   | |   /
  \ /   \ /
   `---' `---'

___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/



Re: [pygtk] Detecting clicks on a Drawing Area

2002-10-23 Thread John Finlay
The example Scribble program in the PyGTK tutorial shows how to get and 
handle events for a drawingarea as well as how to setup a backing pixmap 
for handling the expose events:

http://www.moeraki.com/pygtktutorial/ch-scribble.html

John

LDC - Pablo Endres Lozada wrote:


	Ok here is how I'm doing the painting:

	self.pixmacOK, mask = 
gtk.create_pixmap_from_xpm(self.Main, self.style.bg[gtk.STATE_NORMAL], 
self.macOK)

	area.draw_pixmap(self.gc, self.pixmacOK, 0, 0, x1, y,
 self.pixmacOK.width, self.pixmacOK.height)

	How do I setup the event handler to a simple pixmap or even
	easyer how to a draw a gtk.Pixmap on the Drawing area?



___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/



[pygtk] Detecting clicks on a Drawing Area

2002-10-22 Thread Pablo Endres

Hi, I drew some pixmaps on a Drawing Area and now I 
need to detect a click on them.  Any ideas?

-- 
Muchas personas creen que piensan,
cuando en realidad sólo están reordenando sus
prejuicios.
- William James

Pablo Endres
Centro de Datos

GSM:  +584127347610

___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/