Platforms to show: All Mac Windows Linux Cross-Platform

/MacCocoa/NSWindowDelegateMBS test


Required plugins for this example: MBS MacBase Plugin, MBS MacCocoa Plugin, MBS Main Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacCocoa/NSWindowDelegateMBS test

This example is the version from Sun, 17th Mar 2012.

Project "NSWindowDelegateMBS test.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
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 Listbox1 Inherits Listbox
ControlInstance Listbox1 Inherits Listbox
End Control
EventHandler Sub Close() w = nil End EventHandler
EventHandler Sub Open() w = new MyNSWindowDelegateMBS(self) w.list = listbox1 End EventHandler
Property w As MyNSWindowDelegateMBS
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
Class MyNSWindowDelegateMBS Inherits NSWindowDelegateMBS
EventHandler Sub windowDidBecomeKey(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowDidBecomeMain(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowDidChangeScreen(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowDidChangeScreenProfile(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowDidDeminiaturize(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowDidEndLiveResize(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowDidEndSheet(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowDidEnterFullScreen(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowDidEnterVersionBrowser(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowDidExitFullScreen(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowDidExitVersionBrowser(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowDidExpose(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowDidFailToEnterFullScreen(win as NSWindowMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowDidFailToExitFullScreen(win as NSWindowMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowDidMiniaturize(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowDidMove(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowDidResignKey(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowDidResignMain(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowDidResize(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowDidUpdate(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowWillBeginSheet(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowWillClose(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowWillEnterFullScreen(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowWillEnterVersionBrowser(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowWillExitFullScreen(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowWillExitVersionBrowser(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowWillMiniaturize(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Sub windowWillMove(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Function windowWillResize(win as NSWindowMBS, newFrameSize as NSSizeMBS, newSize as NSSizeMBS) As NSSizeMBS Add CurrentMethodName, newFrameSize.String End EventHandler
EventHandler Sub windowWillStartLiveResize(notification as NSNotificationMBS) Add CurrentMethodName End EventHandler
EventHandler Function windowWillUseStandardFrame(win as NSWindowMBS, newFrame as NSRectMBS) As NSRectMBS Add CurrentMethodName, newFrame.String End EventHandler
Sub Add(name as string, data as string="") dim c as integer = List.ListCount-1 for i as integer = 0 to c if List.Cell(i,0) = name then list.Cell(i,1) = str(ticks) List.Cell(i,2) = data Return end if next List.AddRow name List.Cell(list.LastIndex,1) = str(ticks) List.Cell(list.LastIndex,2) = data End Sub
Property list As Listbox
End Class
End Project

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


The biggest plugin in space...