public CTFramesetter(NSAttributedString value) { if (value == null) throw ConstructorError.ArgumentNull (this, "value"); handle = CTFramesetterCreateWithAttributedString (value.Handle); if (handle == IntPtr.Zero) throw ConstructorError.Unknown (this); }
public CTTypesetter(NSAttributedString value, CTTypesetterOptions options) { if (value == null) throw ConstructorError.ArgumentNull (this, "value"); handle = CTTypesetterCreateWithAttributedStringAndOptions (value.Handle, options == null ? IntPtr.Zero : options.Dictionary.Handle); if (handle == IntPtr.Zero) throw ConstructorError.Unknown (this); }
public void Append(NSAttributedString first, params object [] rest) { Append (first); foreach (var obj in rest){ if (obj is NSAttributedString) Append ((NSAttributedString) obj); else if (obj is string) Append (new NSAttributedString ((string) obj)); else Append (new NSAttributedString (obj.ToString ())); } }
public void Append(NSAttributedString first, params object [] rest) { Append(first); foreach (var obj in rest) { if (obj is NSAttributedString) { Append((NSAttributedString)obj); } else if (obj is string) { Append(new NSAttributedString((string)obj)); } else { Append(new NSAttributedString(obj.ToString())); } } }
public static SCNText Create(NSAttributedString attributedString, nfloat extrusionDepth) { return Create ((NSObject) attributedString, extrusionDepth); }
internal NSAttributedString(NSData data, NSAttributedStringDataType type, out NSDictionary resultDocumentAttributes) { switch (type) { case NSAttributedStringDataType.DocFormat: Handle = new NSAttributedString (data, out resultDocumentAttributes).Handle; break; case NSAttributedStringDataType.HTML: Handle = InitWithHTML (data, out resultDocumentAttributes); break; case NSAttributedStringDataType.RTF: Handle = InitWithRtf (data, out resultDocumentAttributes); break; case NSAttributedStringDataType.RTFD: Handle = InitWithRtfd (data, out resultDocumentAttributes); break; default: throw new ArgumentException("Error creating NSAttributedString."); } if (Handle == IntPtr.Zero) throw new ArgumentException("Error creating NSAttributedString."); }
public NSTextStorage(NSAttributedString other) : base(other) { }