Platforms to show: All Mac Windows Linux Cross-Platform

NSVisualEffectViewMBS class

Super class: NSViewMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Cocoa MBS MacFrameworks Plugin 14.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Function: The class to use visual effect view.
Notes:
The NSVisualEffectView is the basis for all visual effects, including "vibrant" appearances. You can optionally set the appearance to NSAppearanceMBS.appearanceNamed(NSAppearanceNameVibrantDark) (or Light) to get the desired light or dark appearance. Combine this with an appropriate light or dark material to get the desired vibrant look. Combining NSAppearanceNameVibrantDark with a light material will look bad, and should not be done.

Requires Mac OS X 10.10 or newer.

Please review Apple's documentation on this for details.
Subclass of the NSViewMBS class.

Feedback, Comments & Corrections

Background Styles

Constant Value Description
NSBackgroundStyleDark 1 Dark
NSBackgroundStyleLight 0 Light

Blending Modes

Constant Value Description
NSVisualEffectBlendingModeBehindWindow 0 Blends and blurs with the contents behind the window (such as the desktop or other windows). These can overlap, and the view lower in the hierarchy will "win".
NSVisualEffectBlendingModeWithinWindow 1 Blends and blurs with contents behind the view in the current window only. For now, these cannot overlap each other. This mode REQUIRES layer-backing with view.wantsLayer = true.

Materials

Constant Value Description
NSVisualEffectMaterialAppearanceBased 0 When NSVisualEffectMaterialAppearanceBased is set, the material color is determined by the current effectiveAppearance that is on the view.
NSVisualEffectMaterialContentBackground 18 The material for the background of opaque content.
You might use this material as the background for content in a scroll view, table view, or collection view.
This material supports Desktop Tinting in Dark Mode. With Desktop Tinting, the system modifies the material's color dynamically by incorporating some of the color from the underlying desktop image.
NSVisualEffectMaterialDark 2 Dark
NSVisualEffectMaterialFullScreenUI 15 The material for the background of a full-screen modal interface.
NSVisualEffectMaterialHeaderView 10 The material for in-line header or footer views.
NSVisualEffectMaterialHUDWindow 13 The material for the background of heads-up display (HUD) windows.
NSVisualEffectMaterialLight 1 Light
NSVisualEffectMaterialMenu 5 The material for menus.
NSVisualEffectMaterialPopover 6 The material for the background of popover windows.
NSVisualEffectMaterialSelection 4 The material used to indicate a selection.
NSVisualEffectMaterialSheet 11 The material for the background of sheet windows.
NSVisualEffectMaterialSidebar 7 The material for the background of window sidebars.
NSVisualEffectMaterialTitlebar 3 The material for a window’s titlebar.
NSVisualEffectMaterialToolTip 17 The material for the background of a tool tip.
NSVisualEffectMaterialUnderPageBackground 22 The material for the area behind the pages of a document.
This material supports Desktop Tinting in Dark Mode. With Desktop Tinting, the system modifies the material's color dynamically by incorporating some of the color from the underlying desktop image.
NSVisualEffectMaterialUnderWindowBackground 21 The material to show under a window's background.
Use this material on a visual effect view with a blendingMode of NSVisualEffectBlendingModeBehindWindow to create a sense of peeking through the back of the window. This effect creates an illusion that the background of the window has peeled away to reveal what’s under it.
NSVisualEffectMaterialWindowBackground 12 The material for the background of opaque windows.
This material supports Desktop Tinting in Dark Mode. With Desktop Tinting, the system modifies the material's color dynamically by incorporating some of the color from the underlying desktop image.

States

Constant Value Description
NSVisualEffectStateActive 1 The backdrop is explicitly active, always.
NSVisualEffectStateFollowsWindowActiveState 0 The backdrop automatically appears active when the window is active, and inactive when it is not active.
NSVisualEffectStateInactive 2 The backdrop is explicitly inactive.

Super class NSViewMBS

Window Order Constants

Constant Value Description
NSWindowAbove 1 Moves the window above the indicated window.
NSWindowBelow -1 Moves the window below the indicated window.
NSWindowOut 0 Moves the window off the screen.

Super class NSResponderMBS

This class has no sub classes.

Some examples using this class:

Blog Entries


The items on this page are in the following plugins: MBS MacBase Plugin, MBS MacFrameworks Plugin.


NSViewTooltipMBS   -   NSVoiceMBS

The biggest plugin in space...




Links
MBS Xojo Chart Plugins

Start Chat