Platforms to show: All Mac Windows Linux Cross-Platform
Required plugins for this example: MBS MacBase Plugin, MBS MacFrameworks Plugin, MBS Main Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacExtras/Test Vibrancy
This example is the version from Sun, 1st Nov 2014.
Project "Test Vibrancy.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
End Control
Control TextField1 Inherits TextField
ControlInstance TextField1 Inherits TextField
End Control
Control TextArea1 Inherits TextArea
ControlInstance TextArea1 Inherits TextArea
End Control
EventHandler Sub Open()
// Sets up a NSVisualEffectView for the Window
#if targetmacos
dim win as NSWindowMBS = self.NSWindowMBS
// left light
dim view1 as new NSVisualEffectViewMBS(0, 0, width/2, height)
view1.autoresizesSubviews = true
view1.autoresizingMask = view1.NSViewMaxXMargin + view1.NSViewHeightSizable
win.contentView.addSubview(view1, -1, nil)
// right dark
dim view2 as new NSVisualEffectViewMBS(width/2, 0, width, height)
view2.material = view2.NSVisualEffectMaterialDark
view2.autoresizingMask = view2.NSViewWidthSizable + view2.NSViewHeightSizable
win.contentView.addSubview(view2, -1, nil)
#endif
End EventHandler
End Class
MenuBar MainMenuBar
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem EditSeparator1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem EditSeparator2 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar
End Project
The items on this page are in the following plugins: MBS MacExtras Plugin.