TUITextMessageCell.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // Created by Tencent on 2023/06/09.
  2. // Copyright © 2023 Tencent. All rights reserved.
  3. #import <TIMCommon/TUIBubbleMessageCell.h>
  4. #import <TIMCommon/TUITextView.h>
  5. #import "TUIChatDefine.h"
  6. #import "TUITextMessageCellData.h"
  7. @class TUITextView;
  8. typedef void (^TUIChatSelectAllContentCallback)(BOOL);
  9. @interface TUITextMessageCell : TUIBubbleMessageCell <UITextViewDelegate>
  10. /**
  11. *
  12. * TextView for display text message content
  13. */
  14. @property(nonatomic, strong) TUITextView *textView;
  15. /**
  16. *
  17. * Selected text content
  18. */
  19. @property(nonatomic, strong) NSString *selectContent;
  20. /**
  21. *
  22. * Callback for selected all text
  23. */
  24. @property(nonatomic, strong) TUIChatSelectAllContentCallback selectAllContentContent;
  25. /// Data for text message cell.
  26. @property(nonatomic, strong) TUITextMessageCellData *textData;
  27. @property(nonatomic, strong) UIImageView *voiceReadPoint;
  28. - (void)fillWithData:(TUITextMessageCellData *)data;
  29. @end
  30. @interface TUITextMessageCell (TUILayoutConfiguration)
  31. /**
  32. *
  33. * The color of label which displays the text message content.
  34. * Used when the message direction is send.
  35. */
  36. @property(nonatomic, class) UIColor *outgoingTextColor;
  37. /**
  38. *
  39. * The font of label which displays the text message content.
  40. * Used when the message direction is send.
  41. */
  42. @property(nonatomic, class) UIFont *outgoingTextFont;
  43. /**
  44. *
  45. * The color of label which displays the text message content.
  46. * Used when the message direction is received.
  47. */
  48. @property(nonatomic, class) UIColor *incommingTextColor;
  49. /**
  50. *
  51. * The font of label which displays the text message content.
  52. * Used when the message direction is received.
  53. */
  54. @property(nonatomic, class) UIFont *incommingTextFont;
  55. + (void)setMaxTextSize:(CGSize)maxTextSz;
  56. @end