macos:Drag-and-drop-overview
出自UXGuide.net
请帮助我们修订和更新本文的中文部分
本文的中文部分虽然取自官方最新中文版本,但与英文原版相比已落后了一年多,可能无法反映英文版本中最近的修改,且文中笔误、前后译法矛盾、未翻译完全的片断较多,请您帮助一起修订完善。详情参见中文版修订完善计划。
拖拽概述
Drag-and-Drop Overview
Macintosh users are familiar with the elegant, easy-to-use, and pervasive drag-and-drop functionality in Mac OS X. Users often prefer to use drag and drop, so correctly incorporating this direct manipulation technology in your Mac OS X application will go a long way toward meeting user expectations.
Macintosh的用户对于Mac OS X中随处可见且易于使用的拖拽功能十分熟悉,也乐于使用这项功能,所以在您的Mac OS X程序中支持拖拽操作将在很大程度上满足了用户的预期。
Ideally, users should be able to drag any content from any window to any other window that accepts the content’s type. If the source and destination are not visible at the same time, the user can create a clipping by dragging data to a Finder window; the clipping can then be dragged into another application window at another time.
理想情况下,用户能够将任意窗口上的任意内容拖到任何能接受这种内容的窗口中。如果源窗口和目标窗口不能同时可见,用户可以将数据拖到 Finder窗口中,从而创建了一个数据片段; 这个数据片段能够被拖拽到其他程序的窗口中。
Drag and drop should be considered an ease-of-use technique. Except in cases where drag and drop is so intrinsic to an application that no suitable alternative methods exist—dragging icons in the Finder, for example—there should always be another method for accomplishing a drag-and-drop task.
拖拽应该易于使用。除了某种特定的情况下之外─如在Finder中拖拽图标─程序应该提供拖拽功能的替代方法。
The basic steps of the drag-and-drop interaction model parallel a copy-and-paste sequence in which you select an item, choose Copy from the Edit menu, specify a destination, and then choose Paste. However, drag and drop is a distinct technique in itself and does not use the Clipboard. Users can take advantage of both the Clipboard and drag and drop without side effects from each other.
拖拽的基本步骤可以模型化为拷贝并粘贴的顺序操作,也就是选择一个对象,从编辑菜单中选择拷贝,然后选定一个目的地,选择粘贴。然而, 拖拽本 质是不同的技术,它不使用剪贴板。用户可以同时使用剪贴板和 拖拽而无须担心相互影响。
A drag-and-drop operation should provide immediate feedback at the significant points: when the data is selected, during the drag, when an appropriate destination is reached, and when the data is dropped. The data that is pasted should be target-specific. For example, if a user drags an Address Book entry to the “To” text field in Mail, only the email address is pasted, not all of the person’s address information.
拖拽操作在几个关键点上需要立即提供反馈:当数据被选定时,拖拽过程中,到达合适的目标区域时,以及数据被放下时。拖拽所复制的数 据应该是和目标相关的。例如,如果用户将一个地址簿的条目拖拽到邮件程序中发件人的文本框时,只有所选条目的电子邮件地址被粘贴,而不是所有的个人地址信 息。
You should implement Undo for any drag-and-drop operation you enable in your application. If you implement a drag-and-drop operation that is not undoable, display a confirmation dialog before implementing the drop. A confirmation dialog appears, for example, when the user attempts to drop an icon into a write-only drop box on a shared volume, because the user does not have privileges to open the drop box and undo the action.
您应该为您程序中所有的拖拽操作提供撤销功能。如 果某个拖拽功能是不可撤销的,那么在实现放下操作前,您应该显示一个确认的对话框。例如, 如果用户试图将某个图标拖到一个只写的地方,一个确认的对话框将会弹出,因为用户没有打开的权限从而不能撤销该操作。