www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/20/16:00:52

From: "Mars" <mars AT homemail DOT com>
Sender: "Mars" <marsj AT 195 DOT 158 DOT 64 DOT 19>
Reply-To: "Mars" <mars AT homemail DOT com>
Subject: Help => OOP: Programming a mouselistener
Newsgroups: comp.os.msdos.djgpp
NNTP-Posting-Host: proxy.orbit.net.mt
Message-ID: <36055909.0@news.orbit.net.mt>
Date: 20 Sep 1998 21:35:37 +0100
Lines: 16
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019