Platforms to show: All Mac Windows Linux Cross-Platform

Back to ClipboardMBS class.

ClipboardMBS.AddData(FlavorType as string,data as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipboard MBS MacClassic Plugin 4.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Adds data to the scrap.

ClipboardMBS.AddText(Text as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipboard MBS MacClassic Plugin 4.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Adds text to the scrap.

ClipboardMBS.AddUnicodeText(Text as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipboard MBS MacClassic Plugin 4.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Adds unicode text to the clipboard.

UTF16 encoded strings only.

ClipboardMBS.clear

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipboard MBS MacClassic Plugin 4.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Clears the clipboard.

You must clear before you add something.

ClipboardMBS.close

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipboard MBS MacClassic Plugin 4.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The destructor.

There is no need to call this method except you want to free all resources of this object now without waiting for Xojo to do it for you.

ClipboardMBS.DataAvailable(FlavorType as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipboard MBS MacClassic Plugin 4.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Whether data is available.

ClipboardMBS.DataSize(FlavorType as string) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipboard MBS MacClassic Plugin 4.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the byte size of the selected data.

ClipboardMBS.GetData(FlavorType as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipboard MBS MacClassic Plugin 4.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the data of a given type.
Example
// Take PICT data from clipboard

dim c as ClipboardMBS
dim s as string

c=new ClipboardMBS

if c.DataAvailable("PICT") then

s=c.GetData("PICT")

if s<>"" then
Backdrop=BuildPictureWithPicHandleDataMBS(s)
end if
end if

ClipboardMBS.GetText as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipboard MBS MacClassic Plugin 4.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns text from the clipboard.

ClipboardMBS.GetUnicodeText as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipboard MBS MacClassic Plugin 4.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the unicode text from the scrap.

UTF16 encoded strings only.

ClipboardMBS.PictAvailable as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipboard MBS MacClassic Plugin 4.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Whether a pict handle picture is on the clipboard.

ClipboardMBS.ScrapFlavorCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipboard MBS MacClassic Plugin 4.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The number of flavor in the clipboard.
Example
dim clip as ClipboardMBS
dim i,c,c1,c2 as Integer
dim s as string

clip=new ClipboardMBS

c=clip.ScrapFlavorCount

s=str(c)+" types: "

c1=c-1
c2=c-2

for i=0 to c2
s=S+clip.ScrapFlavorType(i)+", "
next

if c>0 then
s=S+clip.ScrapFlavorType(c1)
end if

MsgBox s

Calling this function recreates the internal flavor list in the Xojo clipboard object.

ClipboardMBS.ScrapFlavorFlags(index as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipboard MBS MacClassic Plugin 4.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the flags of the given flavor.

Index goes from 0 to count-1.
Returns 0 on any error.

Flags are a combination of type values:
1 - private data (Sender only)
2 - translated data

ClipboardMBS.ScrapFlavorType(index as Integer) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipboard MBS MacClassic Plugin 4.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the type of the given flavor.

Index goes from 0 to count-1.
Returns "" on any error.

ClipboardMBS.TextAvailable as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipboard MBS MacClassic Plugin 4.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Whether text is available.

ClipboardMBS.TextSize as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipboard MBS MacClassic Plugin 4.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The length of the text available on the clipboard.

ClipboardMBS.UnicodeTextAvailable as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipboard MBS MacClassic Plugin 4.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Whether unicode text is available.

UTF16 encoded strings only.

ClipboardMBS.UnicodeTextSize as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipboard MBS MacClassic Plugin 4.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The length of the unicode text.

UTF16 encoded strings only.

The items on this page are in the following plugins: MBS MacClassic Plugin.


The biggest plugin in space...