Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

Next items

IconFamilyMBS.close
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Icon Service MBS Picture Plugin 4.1 Yes No No Yes, macOS only No
Function: The destructor.
Notes:
There is no need to call this method except you want to free all resources of this object now without waiting for Realbasic to do it for you.
(e.g. some Realbasic versions crash on Windows if there are plugin objects not closed.)

Feedback, Comments & Corrections

IconFamilyMBS.Data as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Icon Service MBS Picture Plugin 5.3 Yes No No Yes, macOS only No
Function: The data of this icon in the ICNS format.
Example:
dim g as FolderItem
dim i as IconMBS
dim f as IconFamilyMBS
dim s as string
dim b as BinaryStream

g=SpecialFolder.Desktop
i=new IconMBS(g) // get icon from desktop folder on Mac OS X
f=i.IconFamily
Backdrop=f.Thumbnail32BitData

s=f.Data

MsgBox str(lenb(s))+" bytes"

g=SpecialFolder.Desktop.Child("Desktop folder icon.icns")
b=g.CreateBinaryFile("Icon") // you need to define this type!
b.write s
b.close

g.launch // shows in preview the icns file
Notes:
Returns "" on low memory or any error.
(Read and Write computed property)

Feedback, Comments & Corrections

IconFamilyMBS.DataMemory as Memoryblock
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Icon Service MBS Picture Plugin 13.0 Yes No No Yes, macOS only No
Function: The data of this icon in the ICNS format.
Example:
// get icon from desktop folder on Mac OS X
dim i as new IconMBS(SpecialFolder.Desktop)
dim f as IconFamilyMBS = i.IconFamily
dim m as memoryblock = f.DataMemory

MsgBox str(m.size)+" bytes"
Notes:
Returns nil on low memory or any error.
(Read and Write computed property)

Feedback, Comments & Corrections

IconFamilyMBS.GetIconImage(size as Integer, byref pic as picture, byref mask as picture) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Icon Service MBS Picture Plugin 7.7 Yes No No Yes, macOS only No
Function: Returns an icon with the given size.
Example:
dim p,m as Picture
dim s as IconFamilyMBS // your icon

if s.GetIconImage(512,p,m) then
window1.Backdrop=p
window2.Backdrop=m
end if
Notes:
Size may be 16, 32, 48, 128, 256 or 512.
Returns true on success and false on failure.
Works only on Mac OS X 10.5 or newer.

Lasterror is -50 if the given size is not available.
Added 1024 pixel support in 12.3 plugins.

Feedback, Comments & Corrections

IconFamilyMBS.Huge1BitData as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Icon Service MBS Picture Plugin 2.7 Yes No No Yes, macOS only No
Function: If such an icon is included in this icon family, this function returns it.
Example:
dim i as new IconMBS("FNDR", "MACS")
Backdrop = i.IconFamily.Huge1BitData
Notes:
Lasterror is set.
(Read and Write computed property)

Feedback, Comments & Corrections

IconFamilyMBS.Huge1BitMask as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Icon Service MBS Picture Plugin 2.7 Yes No No Yes, macOS only No
Function: If such an icon is included in this icon family, this function returns it.
Example:
dim i as new IconMBS("FNDR", "MACS")
Backdrop = i.IconFamily.Huge1BitMask
Notes:
Lasterror is set.
(Read and Write computed property)

Feedback, Comments & Corrections

IconFamilyMBS.Huge32BitData as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Icon Service MBS Picture Plugin 2.7 Yes No No Yes, macOS only No
Function: If such an icon is included in this icon family, this function returns it.
Example:
dim i as new IconMBS("FNDR", "MACS")
Backdrop = i.IconFamily.Huge32BitData
Notes:
Lasterror is set.
(Read and Write computed property)

Feedback, Comments & Corrections

IconFamilyMBS.Huge4BitData as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Icon Service MBS Picture Plugin 2.7 Yes No No Yes, macOS only No
Function: If such an icon is included in this icon family, this function returns it.
Example:
dim i as new IconMBS("FNDR", "MACS")
Backdrop = i.IconFamily.Huge4BitData
Notes:
Lasterror is set.
(Read and Write computed property)

Feedback, Comments & Corrections

IconFamilyMBS.Huge8BitData as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Icon Service MBS Picture Plugin 2.7 Yes No No Yes, macOS only No
Function: If such an icon is included in this icon family, this function returns it.
Example:
dim i as new IconMBS("FNDR", "MACS")
Backdrop = i.IconFamily.Huge8BitData
Notes:
Lasterror is set.
(Read and Write computed property)

Feedback, Comments & Corrections

IconFamilyMBS.Huge8BitMask as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Icon Service MBS Picture Plugin 2.7 Yes No No Yes, macOS only No
Function: If such an icon is included in this icon family, this function returns it.
Example:
dim i as new IconMBS("FNDR", "MACS")
Backdrop = i.IconFamily.Huge8BitMask
Notes:
Lasterror is set.
(Read and Write computed property)

Feedback, Comments & Corrections

IconFamilyMBS.Icon(width as Integer) as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Icon Service MBS Picture Plugin 12.5 Yes No No Yes, macOS only No
Function: Returns an picture with the icon of the icon family for the given iconsize.
Example:
dim i as new IconMBS(SpecialFolder.Desktop)
dim f as IconFamilyMBS = i.IconFamily
Backdrop = f.Icon(200)
Notes: The icon is adjusted to have the requested size if needed.

Feedback, Comments & Corrections

IconFamilyMBS.IconImage(width as Integer) as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Icon Service MBS Picture Plugin 12.5 Yes No No Yes, macOS only No
Function: Returns an picture with the icon image of the icon family.
Example:
dim i as new IconMBS(SpecialFolder.Desktop)
dim f as IconFamilyMBS = i.IconFamily
// gives 256 pixel icon
Backdrop = f.IconImage(200)
Notes: The icon may be bigger or smaller if no such icon size exists.

Feedback, Comments & Corrections

IconFamilyMBS.IconMask(width as Integer) as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Icon Service MBS Picture Plugin 12.5 Yes No No Yes, macOS only No
Function: Returns an picture with the icon mask of the icon family.
Example:
dim i as new IconMBS(SpecialFolder.Desktop)
dim f as IconFamilyMBS = i.IconFamily
// gives 256 pixel icon
Backdrop = f.IconMask(200)
Notes: The icon may be bigger or smaller if no such icon size exists.

Feedback, Comments & Corrections

IconFamilyMBS.Large1BitData as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Icon Service MBS Picture Plugin 2.7 Yes No No Yes, macOS only No
Function: If such an icon is included in this icon family, this function returns it.
Example:
dim i as new IconMBS("FNDR", "MACS")
Backdrop = i.IconFamily.Large1BitData
Notes:
Lasterror is set.
(Read and Write computed property)

Feedback, Comments & Corrections

IconFamilyMBS.Large1BitMask as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Icon Service MBS Picture Plugin 2.7 Yes No No Yes, macOS only No
Function: If such an icon is included in this icon family, this function returns it.
Example:
dim i as new IconMBS("FNDR", "MACS")
Backdrop = i.IconFamily.Large1BitMask
Notes:
Lasterror is set.
(Read and Write computed property)

Feedback, Comments & Corrections

IconFamilyMBS.Large32BitData as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Icon Service MBS Picture Plugin 2.7 Yes No No Yes, macOS only No
Function: If such an icon is included in this icon family, this function returns it.
Example:
dim i as new IconMBS("FNDR", "MACS")
Backdrop = i.IconFamily.Large32BitData
Notes:
Lasterror is set.
(Read and Write computed property)

Feedback, Comments & Corrections

IconFamilyMBS.Large4BitData as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Icon Service MBS Picture Plugin 2.7 Yes No No Yes, macOS only No
Function: If such an icon is included in this icon family, this function returns it.
Example:
dim i as new IconMBS("FNDR", "MACS")
Backdrop = i.IconFamily.Large4BitData
Notes:
Lasterror is set.
(Read and Write computed property)

Feedback, Comments & Corrections

IconFamilyMBS.Large8BitData as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Icon Service MBS Picture Plugin 2.7 Yes No No Yes, macOS only No
Function: If such an icon is included in this icon family, this function returns it.
Example:
dim i as new IconMBS("FNDR", "MACS")
Backdrop = i.IconFamily.Large8BitData
Notes:
Lasterror is set.
(Read and Write computed property)

Feedback, Comments & Corrections

IconFamilyMBS.Large8BitMask as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Icon Service MBS Picture Plugin 2.7 Yes No No Yes, macOS only No
Function: If such an icon is included in this icon family, this function returns it.
Example:
dim i as new IconMBS("FNDR", "MACS")
Backdrop = i.IconFamily.Large8BitMask
Notes:
Lasterror is set.
(Read and Write computed property)

Feedback, Comments & Corrections

NewIconFamilyMBS as IconFamilyMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
global method Icon Service MBS Picture Plugin 2.7 Yes No No Yes, macOS only No
Function: Creates a new empty IconFamily object.
Example:
dim i as IconFamilyMBS = NewIconFamilyMBS
Notes: Returns nil on any error.

Some examples using this method:

Feedback, Comments & Corrections

NewIconFamilyMBSFromScrap as IconFamilyMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
global method Icon Service MBS Picture Plugin 2.7 Yes No No Yes, macOS only No
Function: Creates a new IconFamily object with the data of a "icns" resource from the clipboard.
Example:
// put the Finder Icon on the clipboard

dim i as new IconMBS("FNDR", "MACS")
i.IconFamily.PutOnScrap

// and get it back

dim n as IconFamilyMBS = NewIconFamilyMBSFromScrap
Backdrop = n.Thumbnail32BitData
Notes: Returns nil on any error.

Feedback, Comments & Corrections

IconFamilyMBS.PutOnScrap
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Icon Service MBS Picture Plugin 2.7 Yes No No Yes, macOS only No
Function: Puts the Icon as an "icns" resource on the clipboard.
Example:
dim i as new IconMBS("FNDR", "MACS")
i.IconFamily.PutOnScrap
Notes: LastError is set.

Feedback, Comments & Corrections

IconFamilyMBS.Register(creator as string, type as string) as IconMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Icon Service MBS Picture Plugin 4.3 Yes No No Yes, macOS only No
Function: Registers an icon.
Notes:
The current icon stored in the iconfamily is saved in the global icon list with the given type and creator combination.
On success the new IconMBS object is returned. In case the IconMBS object is destroyed, the icon will automatically be removed from the icon list.
Lasterror is set.

Feedback, Comments & Corrections

IconFamilyMBS.SetIconImage(pic as picture, mask as picture) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Icon Service MBS Picture Plugin 7.7 Yes No No Yes, macOS only No
Function: Sets the icon data.
Example:
dim p as Picture // your picture
dim m as Picture // the mask for the picture
dim i as IconFamilyMBS // your icon family

// 512, 256, 128 Pixel images for Leopard
dim ps,ms as Picture
ps=p.ScaleMBS(512,512)
ms=m.ScaleMBS(512,512)
call i.SetIconImage(ps,ms)
ps=p.ScaleMBS(512,256)
ms=m.ScaleMBS(512,256)
call i.SetIconImage(ps,ms)
ps=p.ScaleMBS(512,128)
ms=m.ScaleMBS(512,128)
call i.SetIconImage(ps,ms)
Notes:
Size of the pictures may be 16, 32, 48, 128, 256 or 512.
pic and mask must not be nil.
pic.width, mask.width, pic.height and mask.height must all be same.
Returns true on success and false on failure.
Works only on Mac OS X 10.5 or newer.
Added 1024 pixel support in 12.3 plugins.

Feedback, Comments & Corrections

IconFamilyMBS.Small1BitData as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Icon Service MBS Picture Plugin 2.7 Yes No No Yes, macOS only No
Function: If such an icon is included in this icon family, this function returns it.
Example:
dim i as new IconMBS("FNDR", "MACS")
Backdrop = i.IconFamily.Small1BitData
Notes:
Lasterror is set.
(Read and Write computed property)

Feedback, Comments & Corrections

IconFamilyMBS.Small1BitMask as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Icon Service MBS Picture Plugin 2.7 Yes No No Yes, macOS only No
Function: If such an icon is included in this icon family, this function returns it.
Example:
dim i as new IconMBS("FNDR", "MACS")
Backdrop = i.IconFamily.Small1BitMask
Notes:
Lasterror is set.
(Read and Write computed property)

Feedback, Comments & Corrections

IconFamilyMBS.Small32BitData as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Icon Service MBS Picture Plugin 2.7 Yes No No Yes, macOS only No
Function: If such an icon is included in this icon family, this function returns it.
Example:
dim i as new IconMBS("FNDR", "MACS")

Backdrop = i.IconFamily.Small32BitData
Notes:
Lasterror is set.
(Read and Write computed property)

Feedback, Comments & Corrections

IconFamilyMBS.Small4BitData as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Icon Service MBS Picture Plugin 2.7 Yes No No Yes, macOS only No
Function: If such an icon is included in this icon family, this function returns it.
Example:
dim i as new IconMBS("FNDR", "MACS")
Backdrop = i.IconFamily.Small4BitData
Notes:
Lasterror is set.
(Read and Write computed property)

Feedback, Comments & Corrections

IconFamilyMBS.Small8BitData as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Icon Service MBS Picture Plugin 2.7 Yes No No Yes, macOS only No
Function: If such an icon is included in this icon family, this function returns it.
Example:
dim i as new IconMBS("FNDR", "MACS")

Backdrop = i.IconFamily.Small8BitData
Notes:
Lasterror is set.
(Read and Write computed property)

Feedback, Comments & Corrections

Next items

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




Links
MBS Xojo Plugins