Mail Archives: djgpp/1998/09/20/16:00:52
Having used Java this summer, I wish to write a MouseListener for C++. The
buttons are objects derived from a basic class. I have written another class
which contains these buttons, and given an x and y coordinate it checks to
see if any button registered with it falls onto these coordinates. If it
does, appropriate action is taken.
My problem is that I need to call this class whenever the user clicks the
mouse. Using Allegro, you have to rewrite the mouse_callback function, which
is called during a mouse interrupt, This entails the locking of all buttons
and classes which is not feasable. Therefore, can anyone point for me some
information on how I can overcome this problem? I would appreciate if someone
can give me a site where the algorithms of such programs are explained.
Thanks
Mars
- Raw text -