INNER CODE UNIT · Go

main

progrium/darwinkit · macos/_examples/menu/main.go:11

func main() {
	runtime.LockOSThread()

	app := appkit.Application_SharedApplication()

	delegate := &appkit.ApplicationDelegate{}
	delegate.SetApplicationDidFinishLaunching(func(foundation.Notification) {
		w := appkit.NewWindowWithSize(600, 400)
		objc.Retain(&w)
		w.SetTitle("Test")

		textView := appkit.TextView_ScrollableTextView()
		textView.SetTranslatesAutoresizingMaskIntoConstraints(false)
		tv := appkit.TextViewFrom(textView.DocumentView().Ptr())
		tv.SetAllowsUndo(true)
		tv.SetRichText(false)
		w.ContentView().AddSubview(textView)
		w.ContentView().LeadingAnchor().ConstraintEqualToAnchorConstant(textView.LeadingAnchor(), -10).SetActive(true)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…