Platforms to show: All Mac Windows Linux Cross-Platform
NSPasteboardMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Clipboard | MBS MacBase Plugin | 10.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
NSPasteboard objects transfer data to and from the pasteboard server. The server is shared by all running applications. It contains data that the user has cut or copied, as well as other data that one application wants to transfer to another. NSPasteboard objects are an application's sole interface to the server and to all pasteboard operations.
An NSPasteboard object is also used to transfer data between applications and service providers listed in each application's Services menu. The drag pasteboard (NSDragPboard) is used to transfer data that is being dragged by the user.
The plugin class NSPasteboardMBS does not implement all features of the NSPasteboard. If you miss something, please email us.
- 4 properties
- property Handle as Integer
- property dataForType(type as string) as Memoryblock
- property propertyListForType(type as string) as Variant
- property stringForType(type as string) as string
- 16 methods
- method addType(type as string) as Integer
- method addTypes(types() as string) as Integer
- method changeCount as Integer
- method clearContents as Integer
- method Constructor
- method Constructor(name as string)
- method declareType(type as string) as Integer
- method declareTypes(types() as string) as Integer
- method name as string
- method pasteboardItems as NSPasteboardItemMBS()
- method releaseGlobally
- method SetPasteboardItems(items() as NSPasteboardItemMBS) as Boolean
- method SetPasteboardItems(items() as Variant) as boolean
- method types as string()
- method URLFromPasteboard as string
- method writeURLToPasteboard(URL as string)
- 40 shared methods
- shared method generalPasteboard as NSPasteboardMBS
- shared method NSColorPboardType as string
- shared method NSDragPboard as string
- shared method NSFilenamesPboardType as string
- shared method NSFilesPromisePboardType as string
- shared method NSFindPboard as string
- shared method NSFontPboard as string
- shared method NSFontPboardType as string
- shared method NSGeneralPboard as string
- shared method NSHTMLPboardType as string
- shared method NSInkTextPboardType as string
- shared method NSMultipleTextSelectionPboardType as string
- shared method NSPasteboardTypeColor as string
- shared method NSPasteboardTypeFindPanelSearchOptions as string
- shared method NSPasteboardTypeFont as string
- shared method NSPasteboardTypeHTML as string
- shared method NSPasteboardTypeMultipleTextSelection as string
- shared method NSPasteboardTypePDF as string
- shared method NSPasteboardTypePNG as string
- shared method NSPasteboardTypeRTF as string
- shared method NSPasteboardTypeRTFD as string
- shared method NSPasteboardTypeRuler as string
- shared method NSPasteboardTypeSound as string
- shared method NSPasteboardTypeString as string
- shared method NSPasteboardTypeTabularText as string
- shared method NSPasteboardTypeTIFF as string
- shared method NSPDFPboardType as string
- shared method NSPICTPboardType as string
- shared method NSPostScriptPboardType as string
- shared method NSRTFDPboardType as string
- shared method NSRTFPboardType as string
- shared method NSRulerPboard as string
- shared method NSRulerPboardType as string
- shared method NSStringPboardType as string
- shared method NSTabularTextPboardType as string
- shared method NSTIFFPboardType as string
- shared method NSURLPboardType as string
- shared method NSVCardPboardType as string
- shared method pasteboardWithName(name as string) as NSPasteboardMBS
- shared method pasteboardWithUniqueName as NSPasteboardMBS
This class has no sub classes.
Some methods using this class:
- NSDraggingSessionMBS.draggingPasteboard as NSPasteboardMBS
- NSViewMBS.dragImage(image as NSImageMBS, viewLocation as NSPointMBS, offset as NSSizeMBS, NSEvent as NSEventMBS, pboard as NSPasteboardMBS, source as NSViewMBS, slideFlag as boolean)
- NSWindowMBS.dragImage(image as NSImageMBS, viewLocation as NSPointMBS, offset as NSSizeMBS, NSEvent as NSEventMBS, pboard as NSPasteboardMBS, source as NSViewMBS, slideFlag as boolean)
Some events using this class:
- DesktopNSOutlineControlMBS.writeItems(items() as NSOutlineViewItemMBS, pasteboard as NSPasteboardMBS) as Boolean
- IKImageBrowserViewControlMBS.writeItemsAtIndexes(indexes as NSIndexSetMBS, pasteboard as NSPasteboardMBS) as Integer
- NSCollectionViewControlMBS.writeItems(indexPaths() as NSIndexPathMBS, Pasteboard as NSPasteboardMBS) as Boolean
- NSServiceProviderMBS.readSelectionFromPasteboard(pboard as NSPasteboardMBS) as Boolean
- NSServiceProviderMBS.ServiceInvoked(pboard as NSPasteboardMBS, userData as string, byref error as string)
- NSServiceProviderMBS.writeSelectionToPasteboard(pboard as NSPasteboardMBS, types() as String) as Boolean
- NSTableControlMBS.writeRowsWithIndexes(rowIndexes as NSIndexSetMBS, pboard as NSPasteboardMBS) as boolean
- NSTokenFieldControlMBS.readFromPasteboard(pboard as NSPasteboardMBS) as Variant()
- NSTokenFieldMBS.readFromPasteboard(pboard as NSPasteboardMBS) as Variant()
- NSTokenFieldMBS.writeRepresentedObjects(objects() as Variant, pboard as NSPasteboardMBS) as boolean
Some examples using this class:
- /MacCocoa/ClipboardSaver
- /MacCocoa/Custom NSViewControl Drag
- /MacCocoa/Service in Cocoa/TestService
- /MacControls/Custom NSView Drag
- /MacControls/Custom NSView Drop
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Flat Only/ListBoxTV Database with DataSource
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Flat Only/ListBoxTV Simple Demo with DataSource
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Flat Only/ListBoxTV TableView
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Hierarchical & Flat/ListBoxTV OutlineView
- /Win/Clipboard/ClipboardSaver
Blog Entries
- MBS Xojo Plugins, version 21.4pr2
- Windows, Xojo and the Clipboard
- MBS Xojo Plugins, version 17.1pr3
- New MBS REALbasic Plugin Version 10.4
- MBS REALbasic Plugins Version 10.4 release notes
- MBS REALbasic Plugins, version 10.4pr12
- Teaser: Clipboard classes
Release notes
- Version 21.4
- Added SetPasteboardItems method taking array of variants to NSPasteboardMBS class.
- Version 17.1
- Added NSPasteboardMBS.SetPasteboardItems.
The items on this page are in the following plugins: MBS MacBase Plugin.
NSPasteboardItemMBS - NSPathComponentCellMBS