Xojo Conferences
XDCMay2019MiamiUSA

[MBS] Re: [ANN] OverlayWindow Plugin (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Next thread: [MBS] Is countMBS bugy ?


[MBS] Re: [ANN] OverlayWindow Plugin   -   Christian Schmitz

[MBS] Re: [ANN] OverlayWindow Plugin
Date: 30.04.03 23:46 (Thu, 1 May 2003 00:46:55 +0200)
From: Christian Schmitz
> A novel REALbasic Plugin for RB4.x-OSX and higher. OverlayWindow is the
> first release of the plugin and implements a single method that animates a
> "poof". You know "poof" when you remove an icon from the dock.

Cool idea!
But it's not the first plugin who does this...

The method which does the same in RB with the MBS plugin.
Plus you can adjust the speed and it uses the original picture from
Apple:

Sub poff(x as integer,y as integer)
#pragma disableautowaitcursor

dim f as FolderItem
dim png as PNGpictureMBS
dim o as OverlayWindowMBS
dim p,m as Picture
dim c as CGContextMBS
dim cp as CGImageMBS
dim r as CGRectMBS
dim t,i as integer

// 128 is full size

const targetwidth8
const targetheight8

fÀreServicesFolderMBS(-32766)

fðChild("Dock.app")

fðChild("Contents")

fðChild("Resources")

fðChild("poof.png")

pngðOpenAsPNGMBS

o=new OverlayWindowMBS

if o.Create(x,y,targetwidth,targetheight)then

o.Show

for ito 4
c=o.Context

p=NewPicture(targetwidth,targetheight,32)
p.Graphics.DrawPicture png.pict,0,(-128)*i

m=NewPicture(targetwidth,targetheight,32)
m.Graphics.DrawPicture png.mask,0,(-128)*i

cpÀeateCGImageMBS(p,m)

r=MakeCGRectMBS(0,0,targetwidth,targetheight)

c.ClearRect r
c.DrawPicture cp,r

c.Flush

t=ticks
while abs(t-ticks)<5
wend
next

end if

End Sub

PS: Of course there is currently no error checking in this method to
make it very simple to read.

Mfg
Christian

--
Four