MBS Plugin Documentation
Statistics - FAQ - Plugin Parts (All, Dependencies) - Class hierarchie
New in Version 7.0 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 8.0 8.1 8.2 8.3 8.4 8.5 8.6 8.7 9.0
The list of the themes, classes, controls, modules, global methods by category, global methods by name, screenshots, licenses and examples.
Platforms to show: All Mac Windows Linux Cross-Platform
class IconMBS
class, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: A class for an icon on Mac OS.
Example:
class, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: A class for an icon on Mac OS.
Example:
// A function which will try to return an icon for the given type/creator including the Mask.
Function GetIconPicture(macCreator as string, macType as string, size as integer) As picture
dim icn as IconMBS
dim icf as IconFamilyMBS
dim pic, tmp as Picture
icn = new IconMBS(macType, macCreator)
if icn<>nil and icn.valid then
icf = icn.IconFamily
end if
if icf<>nil and icf.Valid then
pic = NewPicture(size, size, 32)
// Try Thumbnail
if size>32 then
tmp = icf.Thumbnail32BitData
if tmp<>nil then
pic.Graphics.DrawPicture tmp, 0, 0, size, size, 0, 0, tmp.width,tmp.Height
tmp = icf.Thumbnail8BitMask
if tmp<>nil then
pic.Mask.Graphics.DrawPicture tmp, 0, 0, size, size, 0, 0, tmp.width, tmp.Height
end if
Return pic
end if
end if
// Try Large Icon in 32 bit
tmp = icf.Large32BitData
if tmp<>nil then
pic.Graphics.DrawPicture tmp, 0, 0, size, size, 0, 0, tmp.width,tmp.Height
tmp = icf.Large8BitMask
if tmp<>nil then
pic.Mask.Graphics.DrawPicture tmp, 0, 0, size, size, 0, 0, tmp.width, tmp.Height
end if
Return pic
end if
// Try Large Icon in 8 bit
tmp = icf.Large8BitData
if tmp<>nil then
pic.Graphics.DrawPicture tmp, 0, 0, size, size, 0, 0, tmp.width,tmp.Height
tmp = icf.Large1BitMask
if tmp<>nil then
pic.Mask.Graphics.DrawPicture tmp, 0, 0, size, size, 0, 0, tmp.width, tmp.Height
end if
return pic
end if
// You may add more like e.g. Small or Huge Icons
end if
Exception // on any error, just return nil
// Call like:
// Backdrop=GetIconPicture("R*ch","TEXT",128)
End Function
IconMBS.close
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 4.1, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
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.)
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 4.1, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
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.)
IconMBS.Constructor
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 5.4, Mac OS X: Does nothing, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: A dummy constructor used only for automatic plugin testing.
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 5.4, Mac OS X: Does nothing, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: A dummy constructor used only for automatic plugin testing.
IconMBS.Constructor(f as folderitem)
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Loads the icon for this file/folder/volume.
Notes:
The example "GetIcon.rb" shows how to get the file icons.
A custom icon is preferred (ID -16455).
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Loads the icon for this file/folder/volume.
Notes:
The example "GetIcon.rb" shows how to get the file icons.
A custom icon is preferred (ID -16455).
IconMBS.Constructor(type as string, creator as string)
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Loads the icon for this type and creator code combination.
Notes: The example "GetIcon.rb" shows how to get the predefined icons from the system.
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Loads the icon for this type and creator code combination.
Notes: The example "GetIcon.rb" shows how to get the predefined icons from the system.
IconMBS.DrawIcon(g as graphics,x as integer,y as integer,width as integer,height as integer)
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Draws the icon.
Notes: DrawIcon with align and transform set to none.
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Draws the icon.
Notes: DrawIcon with align and transform set to none.
IconMBS.DrawIcon(g as graphics,x as integer,y as integer,width as integer,height as integer,align as integer)
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Draws the icon.
Notes: DrawIcon with transform set to none.
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Draws the icon.
Notes: DrawIcon with transform set to none.
IconMBS.DrawIcon(g as graphics,x as integer,y as integer,width as integer,height as integer,align as integer,transform as integer)
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Draws the icon.
Notes:
Align and Transform are optional parameters.
The coordinates inside the graphics objects are absolute to the picture or window where the graphics object came from.
Align constants:
Transform constants:
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Draws the icon.
Notes:
Align and Transform are optional parameters.
The coordinates inside the graphics objects are absolute to the picture or window where the graphics object came from.
Align constants:
| None | 0 |
| VerticalCenter | 1 |
| Top | 2 |
| Bottom | 3 |
| HorizontalCenter | 4 |
| AbsoluteCenter | 5 |
| CenterTop | 6 |
| CenterBottom | 7 |
| Left | 8 |
| CenterLeft | 9 |
| TopLeft | 10 |
| BottomLeft | 11 |
| Right | 12 |
| CenterRight | 13 |
| TopRight | 14 |
| BottomRight | 15 |
Transform constants:
| None | 0 |
| Disabled | 1 |
| Offline | 2 |
| Open | 3 |
| Label1 | &h0100 |
| Label2 | &h0200 |
| Label3 | &h0300 |
| Label4 | &h0400 |
| Label5 | &h0500 |
| Label6 | &h0600 |
| Label7 | &h0700 |
| Selected | &h4000 |
| SelectedDisabled | &h4001 |
| SelectedOffline | &h4002 |
| SelectedOpen | &h4003 |
IconMBS.DrawIconCGContext(CGContextHandle as integer,x as integer,y as integer,width as integer,height as integer, align as integer, transform as integer, flags as integer, labelColor as color)
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 8.1, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Draws the icon in a CoreGraphics Context.
Example:
You must make sure that the CGContext handle you pass in is valid.
Flags:
Align constants:
Transform constants:
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 8.1, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Draws the icon in a CoreGraphics Context.
Example:
Function GetIconImage(i as IconMBS, w as integer, h as integer) As picture
dim c as new CGPictureContextMBS(w,h)
const DrawNormal=0
const DrawNoImage=2
const DrawNoMask=4
const DrawSelected=&h8000
i.DrawIconCGContext(c.Handle, 0,0,w,h,0,0,DrawNoMask,&c000000)
c.Flush
Return c.CopyPicture
End Function
Notes: You must make sure that the CGContext handle you pass in is valid.
Flags:
| DrawNormal | 0 |
| DrawNoImage | 2 |
| DrawNoMask | 4 |
| DrawSelected | 32768 |
Align constants:
| None | 0 |
| VerticalCenter | 1 |
| Top | 2 |
| Bottom | 3 |
| HorizontalCenter | 4 |
| AbsoluteCenter | 5 |
| CenterTop | 6 |
| CenterBottom | 7 |
| Left | 8 |
| CenterLeft | 9 |
| TopLeft | 10 |
| BottomLeft | 11 |
| Right | 12 |
| CenterRight | 13 |
| TopRight | 14 |
| BottomRight | 15 |
Transform constants:
| None | 0 |
| Disabled | 1 |
| Offline | 2 |
| Open | 3 |
| Label1 | &h0100 |
| Label2 | &h0200 |
| Label3 | &h0300 |
| Label4 | &h0400 |
| Label5 | &h0500 |
| Label6 | &h0600 |
| Label7 | &h0700 |
| Selected | &h4000 |
| SelectedDisabled | &h4001 |
| SelectedOffline | &h4002 |
| SelectedOpen | &h4003 |
IconMBS.GetBackground as IconMBS
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: If the icon is a composited one, this function returns the icon used for the background.
Notes:
Returns nil on any error.
Lasterror ist set.
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: If the icon is a composited one, this function returns the icon used for the background.
Notes:
Returns nil on any error.
Lasterror ist set.
IconMBS.GetForeground as IconMBS
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: If the icon is a composited one, this function returns the icon used for the foreground.
Notes:
Returns nil on any error.
Lasterror ist set.
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: If the icon is a composited one, this function returns the icon used for the foreground.
Notes:
Returns nil on any error.
Lasterror ist set.
IconMBS.handle as integer
property, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: The handle of this icon in memory.
Notes: (Read and Write property)
property, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: The handle of this icon in memory.
Notes: (Read and Write property)
IconMBS.IconFamily as IconFamilyMBS
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Returns the icon converted to an Iconfamily.
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Returns the icon converted to an Iconfamily.
IconMBS.IsIconRefMaskEmpty as boolean
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Returns true if the mask of the icon is empty.
Notes: Lasterror is set.
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Returns true if the mask of the icon is empty.
Notes: Lasterror is set.
IconMBS.LastError as integer
property, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.7, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: The last error code.
Notes:
The last function was successfull if lasterror is 0.
If the last function was not available on this machine, the value is set to -1.
Other values are Mac OS error codes.
(Read and Write property)
property, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.7, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: The last error code.
Notes:
The last function was successfull if lasterror is 0.
If the last function was not available on this machine, the value is set to -1.
Other values are Mac OS error codes.
(Read and Write property)
IconMBS.PointInIcon(pointx as integer,pointy as integer,x as integer,y as integer,width as integer,height as integer,align as integer) as boolean
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Tests whether a point is inside the icon's picture.
Notes:
The coordinates for pointx/pointy and x/y must be in the same system.
Align constants:
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Tests whether a point is inside the icon's picture.
Notes:
The coordinates for pointx/pointy and x/y must be in the same system.
Align constants:
| None | 0 |
| VerticalCenter | 1 |
| Top | 2 |
| Bottom | 3 |
| HorizontalCenter | 4 |
| AbsoluteCenter | 5 |
| CenterTop | 6 |
| CenterBottom | 7 |
| Left | 8 |
| CenterLeft | 9 |
| TopLeft | 10 |
| BottomLeft | 11 |
| Right | 12 |
| CenterRight | 13 |
| TopRight | 14 |
| BottomRight | 15 |
IconMBS.RectInIcon(rectx as integer,recty as integer,rectwidth as integer,rectheight as integer,x as integer,y as integer,width as integer,height as integer,align as integer) as boolean
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Tests whether a rectangle is inside the icon's picture.
Notes:
The coordinates for both rectangles must be in the same coordinate system.
Align constants:
This call may fail in some RB versions because of the count of parameters.
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Tests whether a rectangle is inside the icon's picture.
Notes:
The coordinates for both rectangles must be in the same coordinate system.
Align constants:
| None | 0 |
| VerticalCenter | 1 |
| Top | 2 |
| Bottom | 3 |
| HorizontalCenter | 4 |
| AbsoluteCenter | 5 |
| CenterTop | 6 |
| CenterBottom | 7 |
| Left | 8 |
| CenterLeft | 9 |
| TopLeft | 10 |
| BottomLeft | 11 |
| Right | 12 |
| CenterRight | 13 |
| TopRight | 14 |
| BottomRight | 15 |
This call may fail in some RB versions because of the count of parameters.
IconMBS.Release as boolean
property, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: whether the destructor will release the handle.
Notes: (Read and Write property)
property, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: whether the destructor will release the handle.
Notes: (Read and Write property)
IconMBS.RetainCount as integer
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: How many references to this icon are hold on this Mac.
method, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: How many references to this icon are hold on this Mac.
IconMBS.valid as boolean
property, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Were the constructors successfull?
Notes: (Read and Write property)
property, Icon Service, MBS Picture Plugin (Icon), class IconMBS, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Were the constructors successfull?
Notes: (Read and Write property)
The items on this page are in the following plugins: MBS Picture Plugin.
Monkeybread Software Realbasic Plugins - Förderverein St. Arnulf aus Nickenich