info-inventor
[Top] [All Lists]

renderArea.setEventCallback ?

To: info-inventor@xxxxxxxxxxx
Subject: renderArea.setEventCallback ?
From: lzha022@xxxxxxxxxxxxxxxxx
Date: Fri, 27 Jun 2003 14:14:17 +1200
Sender: info-inventor-bounce@xxxxxxxxxxx
User-agent: Internet Messaging Program (IMP) 3.2.1
Hi,

I am using the function setEventCallback(...) of SoXtRenderArea because i want
to find the mouse position relative to the root window(XAnyEvent).
Now i have two problems:
firstly, I can not catch ButtonRelease event, i can only catch ButtonPress
event.
It seems button release dose not generate any event. 

secondly, I can not remove the event callback after i find the mouse position.
If the event callback is there i can not spin the image. While i realy want to
spin the image.

here is part of my code:

SoXtRenderArea *area = (SoXtRenderArea *)renderArea;
  area->setEventCallback(mouseMoved, this);

SbBool ThreeDCanvas::mouseMoved(void *userData, XAnyEvent *anyEvent)
{
  if(anyEvent->type==ButtonRelease)
  {
        printf("Button Released");
  }
}

It never prints anything. While it i change ButtonRelease to ButtonPress, it
works.

Can you please help me(email me even if you can only solve one problem).

Regards

Alison


<Prev in Thread] Current Thread [Next in Thread>
  • renderArea.setEventCallback ?, lzha022 <=