Re: [gnomemm] Canvas/Item event handling



On Wed, 25 Sep 2002, gao chaowei wrote:

> I am use gnome-- to do a project. I want the Canvas to capture the button 
> click event. Because the Canvas is in a scrolled window and the canvas can 
> zoon in or zoom out. In button_release_event_impl method of my Canvas, the 
> X and Y coordinates is relative to the main window. But i want the value 
> relative to the canvas. Is there any way ?

Yes, there are various coordinate system conversion methods in
Gnome::Canvas. The one you want to use here is
Gnome::Canvas::window_to_world

-- 
   .--= ULLA! =---------------------.   `We are not here to give users what
   \     http://cactus.rulez.org     \   they want'  -- RMS, at GUADEC 2001
    `---= cactus cactus rulez org =---'
Friends help you move; Real friends help you move bodies.




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