Classes: XFldObject, XWPTrashCan, XWPTrashObject
Starting with V0.9.0, &xwp; introduces a trash can too.

Most people are probably familiar with this feature, because the MacOS, Windows 95 and KDE (on Linux) offer this feature as well. Basically, the trash can temporarily stores all the objects that have been deleted on the system, so you can get them back in case you have accidentally deleted something by opening the trash can (which behaves like any folder) and restoring an object.

With &xwp;, the trash can will intercept all WPS "delete" operations. (It will not intercept command line operations or the &os2; DELDIR setting.)

Note: The trash can is not automatically created during installation, and trash can "delete" support is initially disabled to avoid confusion. For the trash can to work, enable it on the "Features" page in the "&xwp; Setup" object.

Deleting an object into the trash can be done in two ways:

  1. Drag and drop the object(s) onto the trash can icon or into an open trash can view.

  2. &xwp; can also intercept the WPS "Delete" commands. This applies to the menu item in each object's context menu as well as the "Delete" key when it's pressed in a folder window. Both actions will then move the selected objects into the trash can first instead of really deleting them.

    You can still perform a "true" delete (that is, really delete the object, instead of moving it into the trash can) by holding down the "Shift" key while clicking on the "Delete" menu item in an object's context menu

Once the objects are in the trash can, you can either have them destroyed (which will really delete the object) or restored (which will put the object back to the location where it was deleted from).

Also, when any objects are in the trash can, the trash can object itself has an additional menu item called "Empty trash can", which will delete all the objects in the trash can for good.

The trash can has a new settings page in its settings notebook, with additional features. Press "Help" on that page for more information.

If you're interested in details about how the trash can works internally, please see the respective page in the "&xwp; Internals" section.