addToBuilder static method

void addToBuilder(
  1. ObjCProtocolBuilder builder, {
  2. NSTextParagraph? textContentStorage_textParagraphWithRange_(
    1. NSTextContentStorage,
    2. NSRange
    )?,
  3. NSTextElement? textContentManager_textElementAtLocation_(
    1. NSTextContentManager,
    2. NSTextLocation
    )?,
  4. bool textContentManager_shouldEnumerateTextElement_options_(
    1. NSTextContentManager,
    2. NSTextElement,
    3. NSTextContentManagerEnumerationOptions
    )?,
  5. bool $keepIsolateAlive = true,
})
override

Adds the implementation of the NSTextContentStorageDelegate protocol to an existing objc.ObjCProtocolBuilder.

Note: You cannot call this method after you have called builder.build.

Implementation

static void addToBuilder(
  objc.ObjCProtocolBuilder builder, {
  NSTextParagraph? Function(NSTextContentStorage, NSRange)?
  textContentStorage_textParagraphWithRange_,
  NSTextElement? Function(NSTextContentManager, NSTextLocation)?
  textContentManager_textElementAtLocation_,
  bool Function(
    NSTextContentManager,
    NSTextElement,
    NSTextContentManagerEnumerationOptions,
  )?
  textContentManager_shouldEnumerateTextElement_options_,
  bool $keepIsolateAlive = true,
}) {
  NSTextContentStorageDelegate.textContentStorage_textParagraphWithRange_
      .implement(builder, textContentStorage_textParagraphWithRange_);
  NSTextContentStorageDelegate.textContentManager_textElementAtLocation_
      .implement(builder, textContentManager_textElementAtLocation_);
  NSTextContentStorageDelegate
      .textContentManager_shouldEnumerateTextElement_options_
      .implement(
        builder,
        textContentManager_shouldEnumerateTextElement_options_,
      );
  builder.addProtocol($protocol);
}