TUIBubbleMessageCell_Minimalist.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. // Created by Tencent on 2023/06/09.
  2. // Copyright © 2023 Tencent. All rights reserved.
  3. /**
  4. *
  5. *
  6. * This document declares the TUIBubbleMessageCell_Minimalist class.
  7. * Bubble messages, the most common type of messages that contain strings and emoticons.
  8. * Both TUIFileMessageCell_Minimalist and TUIVoiceMessageCell_Minimalist inherit from this class and implement the userinterface of bubble messages.
  9. * If developers want to customize the bubble message, they can also refer to the implementation methods of the above two message units to implement their own
  10. * bubble message unit.
  11. */
  12. #import "TUIBubbleMessageCellData.h"
  13. #import "TUIMessageCell_Minimalist.h"
  14. NS_ASSUME_NONNULL_BEGIN
  15. @interface TUIBubbleMessageCell_Minimalist : TUIMessageCell_Minimalist
  16. /**
  17. * The bubble image view, the message's bubble icon, wraps the message's content on the UI as a background panel for the bubble.
  18. */
  19. @property(nonatomic, strong) UIImageView *bubbleView;
  20. @property(nonatomic, strong) TUIBubbleMessageCellData *bubbleData;
  21. - (void)fillWithData:(TUIBubbleMessageCellData *)data;
  22. + (CGFloat)getBubbleTop:(TUIBubbleMessageCellData *)data;
  23. @end
  24. #pragma mark - TUILayoutConfiguration
  25. @interface TUIBubbleMessageCell_Minimalist (TUILayoutConfiguration)
  26. /**
  27. * Send bubble icon (normal state)
  28. * - The send icon of the bubble, assigned to the @bubble when the bubble message was sent.
  29. */
  30. @property(nonatomic, class) UIImage *outgoingBubble;
  31. /**
  32. * Send bubble icon (normal state)
  33. * - The send icon of the bubble, assigned to the @bubble when the bubble message was sent.
  34. */
  35. @property(nonatomic, class) UIImage *outgoingSameBubble;
  36. /**
  37. * Send bubble icon (highlighted state)
  38. * - The send icon (highlighted state) of the bubble, assigned to @highlightedBubble when the bubble message was sent.
  39. */
  40. @property(nonatomic, class) UIImage *outgoingHighlightedBubble;
  41. /**
  42. * Send bubble icon (highlighted state)
  43. */
  44. @property(nonatomic, class) UIImage *outgoingAnimatedHighlightedAlpha20;
  45. @property(nonatomic, class) UIImage *outgoingAnimatedHighlightedAlpha50;
  46. /**
  47. *
  48. * Receive bubble icon (normal state)
  49. * - The receive icon of the bubble, assigned to the @bubble when the bubble message was received.
  50. */
  51. @property(nonatomic, class) UIImage *incommingBubble;
  52. /**
  53. *
  54. * Receive bubble icon (normal state)
  55. * - The receive icon of the bubble, assigned to the @bubble when the bubble message was received.
  56. */
  57. @property(nonatomic, class) UIImage *incommingSameBubble;
  58. /**
  59. *
  60. * Receive bubble icon (highlighted state)
  61. * - The receive icon of the bubble, assigned to @highlightedBubble when the bubble message was received.
  62. */
  63. @property(nonatomic, class) UIImage *incommingHighlightedBubble;
  64. /**
  65. *
  66. * Receive bubble icon (highlighted state)
  67. */
  68. @property(nonatomic, class) UIImage *incommingAnimatedHighlightedAlpha20;
  69. @property(nonatomic, class) UIImage *incommingAnimatedHighlightedAlpha50;
  70. /**
  71. * Spacing at the top of the send bubble
  72. * - It is used to locate the top of the sent bubble, and is assigned to @bubbleTop when the bubble message was sent.
  73. */
  74. @property(nonatomic, class) CGFloat outgoingBubbleTop;
  75. /**
  76. * Spacing at the top of the receiving bubble
  77. * - It is used to locate the top of the receive bubble, and is assigned to @bubbleTop when the bubble message was received.
  78. */
  79. @property(nonatomic, class) CGFloat incommingBubbleTop;
  80. @end
  81. NS_ASSUME_NONNULL_END