Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/MacCocoa/NSWindow HUD with RB window
Function:
Required plugins for this example: MBS MacBase Plugin, MBS Main Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacCocoa/NSWindow HUD with RB window
This example is the version from Sun, 17th Mar 2012.
Project "NSWindow HUD with RB window.rbp"
Class App Inherits Application
Const kEditClear = "Effacer"
Const kFileQuit = "Quitter"
Const kFileQuitShortcut = ""
EventHandler Sub Open() if not TargetCocoa then MsgBox "Please use Cocoa target." end if End EventHandler
End Class
Class Window1 Inherits Window
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action() dim w As New HUDwindow w.Show End EventHandler
End Control
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Fichier"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "Edition"
MenuItem EditUndo = "Annuler"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Couper"
MenuItem EditCopy = "&Copier"
MenuItem EditPaste = "Coller"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "Tout Sélectionner"
End MenuBar
Class HUDwindow Inherits Window
Control Label1 Inherits Label
ControlInstance Label1 Inherits Label
EventHandler Sub Open() Me.TextColor=&cFFFFFF End EventHandler
End Control
Sub Constructor() // Calling the overridden superclass constructor. Super.Constructor dim styleMask as integer dim BackingStoreType as integer=2 styleMask = BitwiseOr(styleMask, NSWindowMBS.NSTitledWindowMask) // with title bar styleMask = BitwiseOr(styleMask, NSWindowMBS.NSClosableWindowMask) // with close button styleMask = BitwiseOr(styleMask, NSWindowMBS.NSMiniaturizableWindowMask) // with minimize button styleMask = BitwiseOr(styleMask, NSWindowMBS.NSResizableWindowMask) // with resize gadget styleMask = BitwiseOr(styleMask, NSPanelMBS.NSHUDWindowMask) // make it HUD styleMask = BitwiseOr(styleMask, NSPanelMBS.NSUtilityWindowMask) // and make it a palette Self.NSWindowMBS.styleMask=styleMask Self.NSWindowMBS.backingType=BackingStoreType Self.NSWindowMBS.setContentBorderThickness( 4.0, NSWindowMBS.NSMinYEdge ) End Sub
End Class
End Project

See also:

Feedback, Comments & Corrections

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




Links
MBS Xojo Plugins