Article Preview
Buy Now
| Print: | |
| PDF: |
Review
DragLib 1.8
Issue: 2.2 (October/November 2003)
Author: Jim Rodovich
Article Description: No description available.
Article Length (in bytes): 3,778
Starting Page Number: 8
RBD Number: 2202
Resource File(s): None
Related Web Link(s):
http://www.einhugur.com
Known Limitations: None
Full text of article...
Apple introduced Drag and Drop in System 7 as a quick and flexible alternative to the clipboard. Instead of copying and pasting text or other objects, users could just drag them to the destination. Since then, many users have taken a liking to the feature, which remains a part of operating systems today.
Drag and Drop has remained largely unchanged over the years. In fact, the largest difference may be a mere aesthetic issue: whereas in the feature's early days, dragged items were represented by a gray rectangular outline, modern implementations typically display a translucent version of the text or object being dragged.
Unfortunately, REALbasic is stuck in the past and does not currently allow translucent dragging. Enter DragLib, which wraps Mac OS toolbox calls to give additional Drag and Drop support to REALbasic programmers.
Instead of using REALbasic's DragItem class, programmers would use DragLib's DragReference class. The DragReference class supports displaying an image during the drag. Programmers can select one of four levels of translucency for the image. (It appears that DragLib cannot display pictures with transparency masks, such as icons, during the drag.)
DragLib can also restrict the area over which an object can be dragged. One example project restricts all vertical movement of the dragged object, and only allows it to move as far left and right as the edges of the window. This feature has several potential uses ranging from interactive games to window splitter controls like those in REALbasic code editor windows.
You can add text or other data that can be read by the receiver of the drop. Dropping of text appears to work fine both within the application and when dropped onto other applications. However, DragLib does not appear to support dragging Picture objects. If it is possible to do this, the solution or workaround is not immediately obvious and is not covered in the sparse documentation.
Einhugur provides DragLib as "additional support to [its] users;" presumably the plugin is used by some of the company's other products. Because of this, little support and documentation is available for the plugin. Code in the example projects is not well-commented, either. Still, most of the code can be used verbatim and it isn't difficult to see which lines need to be changed for use in a different project.
Also, DragLib's "additional support" status means that the full version cannot be purchased alone, but rather it can be unlocked by registered owners of the Einhugur plugin pack ($69). This is unfortunate to those who would like to make use of DragLib but who are not interested in the company's other products.
In Brief Product DragLib 1.8 Manufacturer Einhugur Software Price Part of $69 Bundle System Requirements Einhugur's QuickDrawLib plug-in Contact Info http://www.einhugur.com Pros Dragging looks nicer than with REALbasic's DragItem class. It can restrict dragging area. Cons Little documentation. Cannot be purchased on its own. Rating (1.0-5.0): 3.1
End of article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.
|







