Files
ghostgram/submodules/TelegramUI/Components/Chat/ChatMessageBubbleContentNode/Sources/ChatMessageQuoteSourceContentNode.swift
T
ichmagmaus111andClaude Opus 5.5 534cabe35b bug fixes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 16:55:08 +01:00

20 lines
1.0 KiB
Swift

import Foundation
import UIKit
import Display
import TelegramCore
/// A bubble content node showing quotable message text: it can select a quote, build it, and
/// highlight one. The text bubble implements it for plain messages, the rich-data bubble for rich
/// ones, so reply options, the context-menu Quote action and quote highlighting need not know which.
public protocol ChatMessageQuoteSourceContentNode: AnyObject {
func getQuoteRect(quote: String, offset: Int?) -> CGRect?
func updateQuoteTextHighlightState(text: String?, offset: Int?, color: UIColor, animated: Bool)
func animateQuoteTextHighlightIn(sourceFrame: CGRect, transition: ContainedViewLayoutTransition) -> CGRect?
func beginTextSelection(range: NSRange?, displayMenu: Bool)
func cancelTextSelection()
/// Whether a non-empty text selection exists, quotable or not.
var hasTextSelection: Bool { get }
/// The reply quote for the current text selection, or nil when nothing quotable is selected.
func currentReplyQuote(maxLength: Int) -> EngineMessageReplyQuote?
}