Platforms to show: All Mac Windows Linux Cross-Platform
QLPreviewControllerMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | QuickLook | MBS iOS Plugin | 23.3 | ❌ No | ❌ No | ❌ No | ✅ Yes | iOS only |
A QLPreviewController can display previews for many common file types, including the following:
- iWork documents
- Microsoft Office documents
- Rich text format, or RTF, documents
- PDF files
- Images
- Text files with a uniform type identifier that conforms to the public.text type. To learn more, see Uniform type identifiers.
- Comma-separated values, or CSV, files
- 3D models in the USDZ format with both standalone and AR views for viewing the model
The list of supported common file types may change between operating system releases. In addition, you can enable previews for your own file types by implementing your own preview extension.
With editing mode, you get the PDF markup editor right into your Xojo application.
See QLPreviewViewControlMBS for desktop macOS projects.
See WinPreviewControlMBS control for Windows targets.
- 6 events
- event DidDismiss
- event didSaveEditedCopyOfPreviewItem(Item as FolderItem, modifiedContentsFile as FolderItem)
- event didUpdateContentsOfPreviewItem(Item as FolderItem)
- event editingModeForPreviewItem(Item as FolderItem) as Integer
- event shouldOpenURL(URL as String, Item as FolderItem) as Boolean
- event WillDismiss
- 3 properties
- property currentPreviewItem as FolderItem
- property currentPreviewItemIndex as Integer
- property Handle as Integer
- 11 methods
- method AddItem(item as FolderItem)
- method AddItems(items() as FolderItem)
- method ClearItems
- method Constructor
- method Destructor
- method Dismiss
- method Items as FolderItem()
- method Present
- method refreshCurrentPreviewItem
- method reloadData
- method SetItems(items() as FolderItem)
- shared method canPreviewItem(file as FolderItem) as Boolean
- 3 constants
Editing Modes
Constant | Value | Description |
---|---|---|
EditingModeCreateCopy | 2 |
Represents the mode to create a copy of the file and perform the edits on the copy. |
EditingModeDisabled | 0 |
Represents the mode to disable edit mode for the file. |
EditingModeUpdateContents | 1 |
Represents the mode to update the file directly without creating a copy. |
This class has no sub classes.
Some examples using this class:
Blog Entries
- MBS Xojo Plugins, version 24.2pr1
- News from the MBS Xojo Plugins Version 23.3
- MonkeyBread Software Releases the MBS Xojo Plugins in version 23.3
- MBS Xojo Plugins, version 23.3pr2
- Adding QuickLook preview for iOS to Xojo
Release notes
- Version 24.2
- Added AllowRotation parameter for QLPreviewControllerMBS class constructor to allow more rotation than the parent view.
- Version 23.3
- Added QLPreviewControllerMBS class for iOS to preview documents and markup PDFs.
The items on this page are in the following plugins: MBS iOS Plugin.