home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / pascal / 8547 < prev    next >
Encoding:
Internet Message Format  |  1993-01-26  |  1.7 KB

  1. Path: sparky!uunet!mcsun!sunic!aun.uninett.no!nuug!falcon!lfosdal
  2. From: lfosdal@falcon.no (Lars Fosdal)
  3. Newsgroups: comp.lang.pascal
  4. Subject: Re: Dragging an object in TPW: how?
  5. Message-ID: <4H1yXB3w165w@falcon.no>
  6. Date: Tue, 26 Jan 93 08:14:02 MET
  7. References: <1993Jan25.112041.16368@genes.icgeb.trieste.it>
  8. Organization: Falcon Information Services AS, Oslo, Norway
  9. Lines: 30
  10.  
  11. oberto@genes.icgeb.trieste.it (Jacques Oberto) writes:
  12.  
  13. > The question is: how to implement graphical object selection and
  14. > dragging (with the mouse) in TPW 1.5.  I went through every
  15. > Borland manual w/o success.  There must be some API functions to
  16. > do that but which ones.  
  17.  
  18. Unfortunatly there is no API for graphical object selection in
  19. Windows (or TPW/BPW).  There are mouse click, drag, release messages,
  20. but all "objects" you put on screen (lines, ellipes, boxes, etc.) are
  21. not really objects, just a bitmapped images of the objects.
  22.  
  23. To implement object selection/dragging, you must design your own
  24. proximity control (which object did the user click on, if any) and
  25. select draw / drag redraw.  I've done it, and it's a pain.
  26.  
  27. For proxmitity control, you might want to use PtInRect and PtInRegion
  28. together with a collection/linked list of your drawing objects.
  29.  
  30. If you'd like to examine third party libraries for TPW, you could look 
  31. at ObjectGraphics(tm) from Whitewater, which have implemented true object-
  32. based select/drag.  It's not fantastic, but it works, and comes with source
  33. (price is approx. US$ 250.- ).
  34.  
  35. Lars F.
  36. --
  37. | Mr.Lars Fosdal, Software Developer, Financial Analysis Systems  |
  38. | Falcon Information Services AS, Stranden 1, N-0250 Oslo, Norway |
  39. | -> E-mail:lfosdal@falcon.no  Tel:+47 22831310  Fax:+47 22831290 |
  40. +- All opinions are personal and does not reflect company policy -+
  41.