Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

OverlayMBS class

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class Window MBS Overlay Plugin 8.6 Yes Yes No No No
Function: This class gives you a window overlaying all other windows with an alpha channel.
Example:
dim o as OverlayMBS
dim p as Picture

o=new OverlayMBS(100,100,300,300)

p=NewPicture(300,300,32)
p.Graphics.ForeColor=&c000000
p.Graphics.FillRect 0,0,300,300

o.Pict=p

p=NewPicture(300,300,32)
p.Graphics.ForeColor=&c000000
p.Graphics.FillOval 0,0,300,300
p.Graphics.ForeColor=&cFFFFFF
p.Graphics.FillOval 100,100,100,100

o.Mask=p

o.UpdateShow

// wait 5 seconds to see the window
DelayMBS 5
Notes:
Requires Mac OS X 10.3.9 or Windows 2000 or newer.

Cocoa implementation added with Mac OS X 10.4 class.
To support high resolution mode on Mac OS X high resolution displays, please make the picture+mask exact the double width and height of the window.

Feedback, Comments & Corrections

  • 17 events
    • event Draw(CGContext as Variant, NSGraphicsContext as Variant)
    • event GotFocus
    • event KeyDown(key as String, keyCode as Integer, modifiers as integer) as Boolean
    • event KeyUp(key as String, keyCode as Integer, modifiers as integer) as Boolean
    • event LostFocus
    • event menuForEvent(NSEvent as variant) as Variant
    • event MouseDown(x as Integer, y as Integer, modifiers as Integer) as boolean
    • event MouseDragged(x as Integer, y as Integer, modifiers as Integer) as boolean
    • event MouseEnter(x as Integer, y as Integer, modifiers as Integer)
    • event MouseExit(x as Integer, y as Integer, modifiers as Integer)
    • event MouseMoved(x as Integer, y as Integer, modifiers as Integer) as boolean
    • event MouseUp(x as Integer, y as Integer, modifiers as Integer) as boolean
    • event MouseWheel(x as Integer, y as Integer, dx as Double, dy as Double, modifiers as Integer)
    • event WindowBoundsChanged
    • event WindowClosed
    • event WindowHidden
    • event WindowShown
  • 20 properties
  • 20 methods
    • method Close
    • method Constructor(left as Integer, top as Integer, width as Integer, height as Integer, MacAttributes as Integer, WinExStyle as Integer, WinStyle as Integer)
    • method Constructor(left as Integer, top as Integer, width as Integer, height as Integer, WindowsNoActivate as boolean = false, WindowsTopMost as boolean=true)
    • method Hide
    • method InvalidateShadow
    • method MacTransitionWindow(parent as window, effect as Integer, action as Integer) as Integer
    • method MacTransitionWindow(parent as window, effect as Integer, action as Integer, Async_ as boolean, duration as Double) as Integer
    • method MacTransitionWindow(parent as window, effect as Integer, action as Integer, left as Integer, top as Integer, width as Integer, height as Integer) as Integer
    • method MacTransitionWindow(parent as window, effect as Integer, action as Integer, left as Integer, top as Integer, width as Integer, height as Integer, Async_ as boolean, duration as Double) as Integer
    • method MacTransitionWindow(parentWindowHandle as Integer, effect as Integer, action as Integer) as Integer
    • method MacTransitionWindow(parentWindowHandle as Integer, effect as Integer, action as Integer, Async_ as boolean, duration as Double) as Integer
    • method MacTransitionWindow(parentWindowHandle as Integer, effect as Integer, action as Integer, left as Integer, top as Integer, width as Integer, height as Integer) as Integer
    • method MacTransitionWindow(parentWindowHandle as Integer, effect as Integer, action as Integer, left as Integer, top as Integer, width as Integer, height as Integer, Async_ as boolean, duration as Double) as Integer
    • method Move(left as Integer, top as Integer)
    • method Resize(width as Integer, height as Integer)
    • method SetFocus
    • method Show(WindowsShowMode as Integer = 0)
    • method Update
    • method Update(NSImage as Variant)
    • method UpdateShow
  • 4 constants

Modifiers

Constant Value Description
kModifierFlagCommand 1048576 The command key is pressed.
Use with BitwiseAnd(Modifiers, kModifierFlagCommand) <> 0 to check if the flag is set in key events.
kModifierFlagControl 262144 The control key is pressed.
Use with BitwiseAnd(Modifiers, kModifierFlagControl) <> 0 to check if the flag is set in key events.
kModifierFlagOption 524288 The option (alt) key is pressed.
Use with BitwiseAnd(Modifiers, kModifierFlagOption) <> 0 to check if the flag is set in key events.
kModifierFlagShift 131072 The shift key is pressed.
Use with BitwiseAnd(Modifiers, kModifierFlagShift) <> 0 to check if the flag is set in key events.

This class has no sub classes.

Some examples which use this class:

Blog Entries


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


OSAScriptViewMBS   -   PacketSocketMBS




Links
MBS FileMaker Plugins