Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

Previous items Next items

NSAttributedStringMBS.NSBottomMarginDocumentAttribute as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the names for document wide attributes in a NSAttributedString.
Example:
// get some attributed text:
dim t as new NSAttributedStringMBS
call t.initWithString("Hello World")

// set document attributes
dim dic as new Dictionary
dic.Value(t.NSBottomMarginDocumentAttribute) = 20
dic.Value(t.NSLeftMarginDocumentAttribute) = 20
dic.Value(t.NSRightMarginDocumentAttribute) = 20
dic.Value(t.NSTopMarginDocumentAttribute) = 20
dic.Value(t.NSAuthorDocumentAttribute) = "Test User"

// get rtf
dim rtf as string = t.RTFFromRange(dic)

// write to file
dim f as FolderItem = SpecialFolder.Desktop.Child("test.rtf")
dim b as BinaryStream = BinaryStream.Create(f, true)
b.Write rtf
Notes:
Number, containing a float, in points.
Mac OS X v10.3 and earlier string constant is "BottomMargin".
Available in Mac OS X v10.4 and later.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSCategoryDocumentAttribute as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the names for document wide attributes in a NSAttributedString.
Notes:
string containing the document's category.
Available in Mac OS X v10.6 and later.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSCharacterEncodingDocumentAttribute as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the names for document wide attributes in a NSAttributedString.
Notes:
Number, containing an int specifying the stringEncoding for the file; for reading and writing plain text files and writing HTML; default for plain text is the default encoding; default for HTML is UTF-8.
Mac OS X v10.3 and earlier string constant is "CharacterEncoding".
Available in Mac OS X v10.4 and later.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSCharacterEncodingDocumentOption as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the attribute names for NSAttributedString.
Notes:
For plain text documents; Number containing the unsigned int stringEncoding to override any encoding specified in an HTML document. Previous string constant was @"CharacterEncoding".
Available in Mac OS X v10.4 and later.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSCharacterShapeAttributeName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the attribute names for NSAttributedString.
Notes:
An integer value. The value is interpreted as Apple Type Services kCharacterShapeType selector + 1.
The default value is 0 (disable). 1 is kTraditionalCharactersSelector, and so on. Refer to <ATS/SFNTLayoutTypes.h> and "Font Features" in ATSUI Programming Guide for additional information.
Available in Mac OS X v10.0 and later.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSCocoaVersionDocumentAttribute as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the names for document wide attributes in a NSAttributedString.
Notes:
Number, containing a float. For RTF files only, stores the version of Cocoa with which the file was created. Absence of this value indicates RTF file not created by Cocoa or its predecessors.
Values less than 100 are pre–Mac OS X; 100 is Mac OS X v10.0 or v10.1; 102 is Mac OS X v10.2 and 10.3; values greater than 102 correspond to values of NSAppKitVersionNumber on Mac OS X v10.4 and later.
Mac OS X v10.3 and earlier string constant is "CocoaRTFVersion".
Available in Mac OS X v10.4 and later.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSCommentDocumentAttribute as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the names for document wide attributes in a NSAttributedString.
Notes:
string containing document comments.
Available in Mac OS X v10.4 and later.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSCompanyDocumentAttribute as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the names for document wide attributes in a NSAttributedString.
Notes:
string containing company or organization name.
Available in Mac OS X v10.4 and later.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSConvertedDocumentAttribute as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the names for document wide attributes in a NSAttributedString.
Notes:
Number, containing an int. Indicates whether the file was converted by a filter service.
If missing or 0, the file was originally in the format specified by document type. If negative, the file was originally in the format specified by document type, but the conversion to NSAttributedString may have been lossy. If 1 or more, it was converted to this type by a filter service.
Mac OS X v10.3 and earlier string constant is @"Converted".
Available in Mac OS X v10.4 and later.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSCopyrightDocumentAttribute as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the names for document wide attributes in a NSAttributedString.
Notes:
string containing document copyright info.
Available in Mac OS X v10.4 and later.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSCreationTimeDocumentAttribute as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the names for document wide attributes in a NSAttributedString.
Notes:
NSDate containing the creation date of the document; note that this is not the file system creation date of the file, but of the document.
Available in Mac OS X v10.4 and later.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSCursorAttributeName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the attribute names for NSAttributedString.
Notes:
NSCursor
Default as returned by the NSCursor method IBeamCursor
Available in Mac OS X v10.3 and later.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSDefaultAttributesDocumentAttribute as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 16.0 Yes No No Yes, macOS only No
Function: One of the document attributes.
Notes:
NSDictionary containing attributes to be applied to plain files. Used by reader methods. This key in options can specify the default attributes applied to the entire document contents. The document attributes can contain this key indicating the actual attributes used.
Available on Mac OS X 10.11.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSDefaultAttributesDocumentOption as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the attribute names for NSAttributedString.
Notes:
For plain text documents; Dictionary containing attributes to be applied to plain files. Previous string constant was @"DefaultAttributes".
Available in Mac OS X v10.4 and later.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSDefaultTabIntervalDocumentAttribute as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the names for document wide attributes in a NSAttributedString.
Notes:
Number containing a float. Represents the document-wide default tab stop interval.
Mac OS X v10.3 and earlier string constant is "DefaultTabInterval".
Available in Mac OS X v10.4 and later.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSDocFormatTextDocumentType as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the values for the NSDocumentTypeDocumentAttribute key in the document attributes dictionary.
Notes: Microsoft Word document.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSDocumentTypeDocumentAttribute as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the names for document wide attributes in a NSAttributedString.
Notes:
How the document was interpreted; one of the values in "Document Types."
Mac OS X v10.3 and earlier string constant is "DocumentType".
Available in Mac OS X v10.4 and later.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSDocumentTypeDocumentOption as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the attribute names for NSAttributedString.
Notes:
One of the document types described in "Document Types," indicating a document type to be forced when loading the document. Previous string constant was @"DocumentType".
Available in Mac OS X v10.4 and later.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSEditorDocumentAttribute as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the names for document wide attributes in a NSAttributedString.
Notes:
string containing name of person who last edited the document.
Available in Mac OS X v10.4 and later.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSExcludedElementsDocumentAttribute as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the attribute names for NSAttributedString related to HTML generation.
Notes:
An Array object containing string objects, representing HTML elements not to be used in generated HTML.
Available in Mac OS X v10.4 and later.

NSExcludedElementsDocumentAttribute allows control over the tags used. The recognized values in the NSExcludedElementsDocumentAttribute array are (case-insensitive) HTML tags, plus DOCTYPE (representing a doctype declaration) and XML (representing an XML declaration). By default, if this attribute is not present, the excluded elements will be those deprecated in HTML 4 (APPLET, BASEFONT, CENTER, DIR, FONT, ISINDEX, MENU, S, STRIKE, and U) plus XML. If XML is on the list, HTML forms are used; if XML is not on the list, XHTML forms are used where there is a distinction.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSExpansionAttributeName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the attribute names for NSAttributedString.
Notes:
Number containing floating point value, as log of expansion factor to be applied to glyphs
Default 0.0, no expansion
Available in Mac OS X v10.3 and later.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSFileTypeDocumentAttribute as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the names for document wide attributes in a NSAttributedString.
Notes:
string indicating which document type was used to interpret the document, specified as a UTI; for reading, this is available along with NSDocumentTypeDocumentAttribute, but for writing the two are mutually exclusive.
Available in Mac OS X v10.6 and later.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSFileTypeDocumentOption as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the names for document wide attributes in a NSAttributedString.
Notes:
string indicating a document type to be forced when loading the document, specified as a UTI string; mutually exclusive with NSDocumentTypeDocumentOption.
Available in Mac OS X v10.6 and later.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSFontAttributeName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the attribute names for NSAttributedString.
Example:
MsgBox NSAttributedStringMBS.NSFontAttributeName

Dim NSGraphics as New NSGraphicsMBS()
Dim NSFont as NSFontMBS = NSFontMBS.fontWithName("Helvetica", 11.0)
Dim NSAttributes as New Dictionary

NSAttributes.value(NSAttributedStringMBS.NSFontAttributeName) = nsfont

Dim stringWidth as Double = NSGraphics.sizeWithAttributes("Hello World", NSAttributes).Width
MsgBox("StringWidth from NSGraphicsMBS: " + Str(stringWidth))
Notes:
NSFont
Default Helvetica 12-point

Feedback, Comments & Corrections

NSAttributedStringMBS.NSForegroundColorAttributeName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the attribute names for NSAttributedString.
Notes:
NSColor
Default blackColor
Available in Mac OS X v10.0 and later.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSGlyphInfoAttributeName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the attribute names for NSAttributedString.
Notes:
The name of an NSGlyphInfo object.
NSLayoutManager assigns the glyph specified by this glyph info to the entire attribute range, provided that its contents match the specified base string, and that the specified glyph is available in the font specified by NSFontAttributeName.
Available in Mac OS X v10.2 and later.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSHTMLTextDocumentType as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the values for the NSDocumentTypeDocumentAttribute key in the document attributes dictionary.
Notes: Hypertext Markup Language (HTML) document.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSHyphenationFactorDocumentAttribute as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the names for document wide attributes in a NSAttributedString.
Notes:
Number, containing a float; 0 = off, 1 = full hyphenation.
Mac OS X v10.3 and earlier string constant is "HyphenationFactor".
Available in Mac OS X v10.4 and later.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSKernAttributeName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the attribute names for NSAttributedString.
Notes:
Number containing floating point value, as points by which to modify default kerning
Default nil, use default kerning specified in font file; 0.0, kerning off; non-zero, points by which to modify default kerning
Available in Mac OS X v10.0 and later.

Feedback, Comments & Corrections

NSAttributedStringMBS.NSKeywordsDocumentAttribute as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa MBS MacBase Plugin 11.3 Yes No No Yes, macOS only No
Function: One of the names for document wide attributes in a NSAttributedString.
Notes:
Array of string, containing keywords.
Available in Mac OS X v10.4 and later.

Feedback, Comments & Corrections

Previous items Next items

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




Links
MBS Xojo blog