RosettaCodeData/Task/Unicode-strings/FutureBasic/unicode-strings.basic

49 lines
1.6 KiB
Text
Raw Permalink Normal View History

2026-04-30 12:34:36 -04:00
_window = 1
begin enum output 1
_scrollView
_textView
end enum
void local fn BuildWindow
CGRect r = fn CGRectMake( 0, 0, 550, 400 )
window _window, @"Unicode Characters in FutureBasic", r
scrollview _scrollView, r
ViewSetAutoresizingMask( _scrollView, NSViewWidthSizable + NSViewHeightSizable )
textview _textView,, _scrollView
CFMutableStringRef testStr = fn MutableStringWithCapacity( 0 )
MutableStringAppendString( testStr, @"\U0001F34C" )
MutableStringAppendString( testStr, @"\U0001F444" )
MutableStringAppendString( testStr, @"\U0001F41E" )
MutableStringAppendString( testStr, @"\U0001F37A" )
MutableStringAppendString( testStr, @"\U0001F41D" )
MutableStringAppendString( testStr, @"\U0001F48A" )
MutableStringAppendString( testStr, @"☎️" )
MutableStringAppendString( testStr, @"\U0001F4A1" )
MutableStringAppendString( testStr, @"🍎" )
MutableStringAppendString( testStr, @"⚽️" )
MutableStringAppendString( testStr, @"🚁" )
MutableStringAppendString( testStr, @"⏰" )
MutableStringAppendString( testStr, @"\u2699\uFE0F" )
MutableStringAppendString( testStr, @"\U0001F69C" )
MutableStringAppendString( testStr, @"\U0001F333" )
MutableStringAppendString( testStr, @"\U0001F413" )
MutableStringAppendString( testStr, @"\U0001F6A3" )
MutableStringAppendString( testStr, @"\U0001F6C1" )
TextSetString( _textView, testStr )
CFMutableAttributedStringRef storage = (CFMutableAttributedStringRef)fn TextViewTextStorage( _textView )
MutableAttributedStringSetFontWithName( storage, @"Menlo", 110 )
WindowMakeFirstResponder( _window, _textView )
end fn
editmenu 1
fn BuildWindow
HandleEvents