Package: gtk

Accessor gtk:file-chooser-preview-widget

Lambda List

gtk:file-chooser-preview-widget (object)

Syntax

(gtk:file-chooser-preview-widget object) => widget
(setf (gtk:file-chooser-preview-widget object) widget)

Arguments

object -- a gtk:file-chooser widget
widget -- a gtk:widget for displaying preview

Details

Accessor of the preview-widget slot of the gtk:file-chooser interface. The gtk:file-chooser-preview-widget function gets the current preview widget. The (setf gtk:file-chooser-preview-widget) function sets an application supplied widget to use to display a custom preview of the currently selected file.

To implement a preview, after setting the preview widget, you connect to the "update-preview" signal, and call the gtk:file-chooser-preview-filename or gtk:file-chooser-preview-uri functions on each change. If you can display a preview of the new file, update your widget and set the preview active using the gtk:file-chooser-preview-widget-active function. Otherwise, set the preview inactive.

When there is no application supplied preview widget, or the application supplied preview widget is not active, the file chooser may display an internally generated preview of the current file or it may display no preview at all.
 

See also

#2023-3-14