Stream Chat Unreal SDK
Loading...
Searching...
No Matches
UMessageWidget Class Referencefinal

Encapsulates a text bubble, reactions and the mouse hover menu for a message. More...

#include <MessageWidget.h>

Public Member Functions

void Setup (const FMessage &InMessage, EMessageSide InSide, EMessagePosition InPosition)
 

Protected Attributes

UTextBubbleWidget * TextBubble
 
UVerticalBox * AlignPanel
 
UContentWidget * HoverMenuTargetPanel
 
UContentWidget * ReactionsTargetPanel
 
UContentWidget * TimestampTargetPanel
 
UContentWidget * AvatarTargetPanel
 
TSubclassOf< UMessageHoverMenuWidgetMouseHoverMenuWidgetClass = UMessageHoverMenuWidget::StaticClass()
 
TSubclassOf< UMessageReactionsWidget > ReactionsWidgetClass = UMessageReactionsWidget::StaticClass()
 
TSubclassOf< UAvatarWidget > AvatarWidgetClass = UAvatarWidget::StaticClass()
 
TSubclassOf< UTimestampWidget > TimestampWidgetClass = UTimestampWidget::StaticClass()
 
TSubclassOf< UAttachmentWidgetAttachmentWidgetClass = UAttachmentWidget::StaticClass()
 
int32 AvatarSize = 36
 
FMargin AttachmentPadding = FMargin{0.f, 0.f, 0.f, 2.f}
 Space around each attachment shown above the message.
 
FMargin ThreadFooterPadding = FMargin{2.f, 2.f, 2.f, 0.f}
 Space around the reply count shown below a message that has a thread.
 
int32 ThreadFooterFontSize = 12
 
float LongPressSeconds = 0.4f
 How long a press has to be held to bring up the message actions.
 
float LongPressMoveTolerance = 4.f
 How far the message may shift during a press before it stops counting as a long press.
 
FMargin ModerationWarningPadding = FMargin{2.f, 2.f, 2.f, 0.f}
 Space around the warning shown below a message moderation bounced.
 
int32 ModerationWarningFontSize = 12
 
FText BouncedMessageText = NSLOCTEXT("StreamChat", "BouncedMessage", "Not sent. Hold to edit, send anyway or delete.")
 Shown under the author's own message when moderation bounced it back to be rephrased.
 
FText OneReplyText = NSLOCTEXT("StreamChat", "OneReply", "1 reply")
 Shown under a message that has exactly one reply.
 
FText ManyRepliesFormat = NSLOCTEXT("StreamChat", "ManyReplies", "{0} replies")
 Shown under a message with several replies. {0} is the count.
 
FMessage Message
 
EMessagePosition Position
 
EMessageSide Side
 

Detailed Description

Encapsulates a text bubble, reactions and the mouse hover menu for a message.

Member Data Documentation

◆ LongPressMoveTolerance

float UMessageWidget::LongPressMoveTolerance = 4.f
protected

How far the message may shift during a press before it stops counting as a long press.

A press that drags the list is a scroll, and the message moves with it. Comparing the widget's own position catches that even when the list view has taken the pointer and no move events reach this widget at all.

◆ LongPressSeconds

float UMessageWidget::LongPressSeconds = 0.4f
protected

How long a press has to be held to bring up the message actions.

The hover menu is the only route to the actions and the reaction picker, and hover does not exist on a touch screen, so a long press opens them directly.


The documentation for this class was generated from the following files: