dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor NSTextView NSTextView NSTextField จςΩετ දࣔ ೖྗ ΖΕΉ͍͞m NSTextView ラベルや表のセル、一行の入力欄など 文書や複数行のテキストなど Name: Clarus Clarus Name: field editor
3.2 Mac OS X 10.4 1998 macOS (Mac OS X) 2020 2007 iOS TextKitという名称が 初めて出てくる Mac OS 8.5 2001 2005 2013 2010 Apple Type Services for Unicode Imaging Mac OS Mac OS X 10.0 NSTextView, etc UITextView TextKit CoreText CoreText ATSUI iOS 7
Tips and Tricks” | WWDC2010 Session114 各クラスをModel-View-Controllerで分類して説明 Cocoa Text System The Cocoa Text System helper classes Vi ew Controller Model NSTextView NSLayoutManager NSTextStorage NSTextContainer NSTextAttachment NSGlyphGenerator NSTypesetter Appleによる
of text display in Text Layout Programming Guide Appleによる We the People of the United We the People of the United States, in Order to form a more perfect Union, establish Justice, insure domestic Tranquility, provide for the common defence, promote the general Welfare, and secure the Blessings of Liberty to ourselves and our Posterity, do ordain and establish this Constitution for the United States of America. Section 1. All legislative Powers herein granted shall be vested in a Congress of the United States, which shall consist of a Senate and House of We the People of the United Window Glyph generator provides glyphs for characters. Typesetter places glyphs in line fragment rectangles. Text container models area on page to lay out text. Text view displays text within content view and handles user interactions. Window content view
text layout process in Text Layout Programming Guide Appleによる anNSTypesetter anNSTextContainer anNSTextStorage anNSTextView r epl ac eChar ac t er s I nRange: wi t h s t r i ng: anNSLayoutManager l ayout Gl yphs I nLayout M anager : s t ar t i ngAt Gl yphI ndex: m axNum ber Of Li neFr agm ent s : next Gl yphI ndex: l i neFr agm ent Rec t For Pr opos edRec t : s weepDi r ec t i on: m ovem ent Di r ec t i on: r em ai ni ngRec t : t ext St or age: edi t ed: r ange: c hangeI nLengt h i nval i dat edRange: 2 3 8 9 s et Needs Di s pl ayI nRec t : avoi dAddi t i onal Layout : 4 6 7 5 1
The Cocoa Text System helper classes Vi ew Controller Model NSTextView NSLayoutManager NSTextStorage NSTextContainer NSTextAttachment NSGlyphGenerator NSTypesetter Appleによる We the People of the United We the People of the United States, in Order to form a more perfect Union, establish Justice, insure domestic Tranquility, provide for the common defence, promote the general Welfare, and secure the Blessings of Liberty to ourselves and our Posterity, do ordain and establish this Constitution for the United States of America. Section 1. All legislative Powers herein granted shall be vested in a Congress of the United States, which shall consist of a Senate and House of We the People of the United Window Glyph generator provides glyphs for characters. Typesetter places glyphs in line fragment rectangles. Text container models area on page to lay out text. Text view displays text within content view and handles user interactions. Window content view anNSTypesetter anNSTextContainer anNSTextStorage anNSTextView r epl ac eChar ac t er s I nRange: wi t h s t r i ng: anNSLayoutManager l ayout Gl yphs I nLayout M anager : s t ar t i ngAt Gl yphI ndex: m axNum ber Of Li neFr agm ent s : next Gl yphI ndex: l i neFr agm ent Rec t For Pr opos edRec t : s weepDi r ec t i on: m ovem ent Di r ec t i on: r em ai ni ngRec t : t ext St or age: edi t ed: r ange: c hangeI nLengt h i nval i dat edRange: 2 3 8 9 s et Needs Di s pl ayI nRec t : avoi dAddi t i onal Layout : 4 6 7 5 1
NSTextView NSTextStorage NSLayoutManager NSTextContainer NSTextView NSTextContainer NSTextView NSTextStorage NSLayoutManager NSTextContainer NSTextView NSLayoutManager NSTextContainer NSTextView Multiple layout managers allow you to have multiple presentations of the same text. The text within each view can have separate layout and selections. Multiple layout managers allow you to have multiple presentations of the same text. The text within each view can have separate layout and selections. With one text view, all of the text flows within a single, typically recutangular, area. As text is added, it fills the recion defined by the first text containers. The text is displayed in the text view that is paired with the text container. When there’s no ⾭ more room, another text container (and associated text view) is added, and the text flows onto the second page. CBTJD NVMUJDPOUBJOFST NVMUJMBZPVU.BOBHFST
AppKit reference (2019/macOS 10.14) Class NSText The most general programmatic interface for objects that manage text. var string: String var isEditable: Bool var isFieldEditor: Bool var baseWritingDirection: NSWritingDirection func replaceCharacters(in: NSRange, with: String) func paste(Any?) func scrollRangeToVisible(NSRange) NSTextͷAPI (ൈਮ) var textStorage var layoutManager var textContainer NSTextViewͷAPI (ൈਮ) NSTextʹͳ͍
set of methods that text views must implement to interact properly with the text input management system. Overview To create another text view class, you can either subclass NSTextView (and not NSText, for historical reasons), or subclass NSView and implement the NSTextInputClient protocol AppKit reference (2019/macOS 10.14) → NSTextInputContextとやり取りできない。 NSTextViewが準拠してるヤツ
: NSResponder : NSObject Conforms To: NSChangeSpelling, NSIgnoreMisspelledWords NSCoding (NSResponder) NSObject (NSObject) Declared In: AppKit/NSTextView.h Class Description The NSText class declares the programmatic interface to objects that manage text. NSText objects are used by the Application Kit wherever text appears in interface objects: An NSText object draws the title of a window, the commands in a menu, the title of a button, and the items in a browser. Your application inherits these uses of the NSText class when it incorporates any of these objects into its interface. Your application can also create NSText objects for its own purposes. The NSText class is unlike most other classes in the Application Kit in its complexity and range of features. One of its design goals is to provide a comprehensive set of text-handling features so that you’ll rarely need to create a subclass. An NSText object can (among other things): • Control the color of its text and background. • Control the font and layout characteristics of its text. /45FYUͱ OpenStep specification (1994)
class declares the programmatic interface to objects that manage text. Class NSText The most general programmatic interface for objects that manage text. /45FYUͱ AppKit reference (2019) OpenStep specification (1994)
: NSResponder : NSObject Conforms To: NSChangeSpelling, NSIgnoreMisspelledWords NSCoding (NSResponder) NSObject (NSObject) Declared In: AppKit/NSTextView.h Class Description The NSText class declares the programmatic interface to objects that manage text. NSText objects are used by the Application Kit wherever text appears in interface objects: An NSText object draws the title of a window, the commands in a menu, the title of a button, and the items in a browser. Your application inherits these uses of the NSText class when it incorporates any of these objects into its interface. Your application can also create NSText objects for its own purposes. The NSText class is unlike most other classes in the Application Kit in its complexity and range of features. One of its design goals is to provide a comprehensive set of text-handling features so that you’ll rarely need to create a subclass. An NSText object can (among other things): • Control the color of its text and background. • Control the font and layout characteristics of its text. OpenStep specification (1994) /45FYUͱ !? –NSTextサブクラスであるNSCStringTextのAPIはNSTextViewとあまり似ていない。 –OpenStepの仕様書にNSTextViewは存在しないが…
/45FYU7JFXొ r 0CKFDUJWF$ r ΦϒδΣΫτࢦ 新 NeXTSTEP 1.0-3.3 OPENSTEP 4.x macOS 10.0 – r 5FYUΫϥεطʹଘࡏ r 4DSPMM7JFXʹೖΕͯ5FYUΛར༻͢Δ r ϑΟʔϧυΤσΟλ (NS)Textこそが“Text”のクラス r /9QSFpY͕Ճ
3.2 Mac OS X 10.4 iOS 7 1998 macOS (Mac OS X) 2020 2007 iOS TextKitという名称が 初めて出てくる Mac OS 8.5 2001 2005 2013 2010 Apple Type Services for Unicode Imaging Mac OS Mac OS X 10.0 NSTextView, etc UITextView TextKit CoreText CoreText ATSUI ࠶ܝ
3.2 Mac OS X 10.4 iOS 7 1998 macOS (Mac OS X) 2007 iOS TextKitという名称が 初めて出てくる Mac OS 8.5 2001 2005 2013 2010 Apple Type Services for Unicode Imaging Mac OS Mac OS X 10.0 NSTextView, etc UITextView TextKit CoreText CoreText ATSUI NeXTSTEP OPENSTEP 4.0 NSTextView, etc 1996 NeXTSTEP 1.0 Text 1989 શ൛ 2020 NSTextの前身 かつfield editorの祖
OpenStep Specification (1994) http://www.gnustep.org/resources/OpenStepSpec.pdf.gz – AppKit Class in NeXTSTEP 1.0 (1989) http://lisp.hopto.org/Documentation/NEXTSTEP-1.0/NeXT/SysRefMan/22_ClassSpecs/AppKit/ – AppKit Classes in OPENSTEP (1996) http://lisp.hopto.org/Documentation/OPENSTEP/NextDev/Reference/AppKit/Classes/ Article – The OPENSTEP Text System (1997) http://lisp.hopto.org/Documentation/OPENSTEP/NextDev/TasksAndConcepts/ ProgrammingTopics/TextOverview.htmld/ Book – NeXtstep Programming: Step One: Object-Oriented Applications (1993) by Simson L. Garfinkel, Michael K. Mahoney Article – Porting NEXTSTEP3.2/3.3 Applications to OpenStep on Solaris (1997) http://www.nextcomputers.org/NeXTfiles/Docs/Software/OPENSTEP/802-2115.pdf NeXT SunSoft