Stream Chat Unreal SDK
Loading...
Searching...
No Matches
ChannelStatusWidget.h
1// Copyright 2022 Stream.IO, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "Channel/ChatChannel.h"
6#include "Components/Button.h"
7#include "Components/Image.h"
8#include "CoreMinimal.h"
9#include "Message/TimestampWidget.h"
10#include "StreamWidget.h"
11
12#include "ChannelStatusWidget.generated.h"
13
17UCLASS(Abstract)
18class STREAMCHATUI_API UChannelStatusWidget : public UStreamWidget
19{
20 GENERATED_BODY()
21
22public:
23 UChannelStatusWidget();
24 UFUNCTION(BlueprintCallable, Category = "Stream Chat")
25 void Setup(UChatChannel* InChannel);
26
27 virtual bool IsForChannel(const UChatChannel*) const;
28
29 DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FChannelStatusButtonClicked, UChatChannel*, InChannel);
30 UPROPERTY(BlueprintAssignable)
31 FChannelStatusButtonClicked OnChannelStatusButtonClicked;
32
33 DECLARE_MULTICAST_DELEGATE_OneParam(FChannelStatusButtonClickedNative, const UChatChannel*);
34 FChannelStatusButtonClickedNative OnChannelStatusButtonClickedNative;
35
36protected:
37 virtual void NativePreConstruct() override;
38 virtual void NativeConstruct() override;
39 virtual void NativeDestruct() override;
40
41 UFUNCTION()
42 void UpdateSelection(UChatChannel* SelectedChannel);
43
44 UPROPERTY(meta = (BindWidget))
45 UButton* Button;
46
47 UPROPERTY(meta = (BindWidget))
48 UTextBlock* TitleTextBlock;
49
50 UPROPERTY(meta = (BindWidget))
51 UImage* Divider;
52
53 UPROPERTY(Transient)
54 UChatChannel* StatusChannel;
55
56private:
57 virtual FLinearColor GetTitleColor();
58
59 UFUNCTION()
60 void OnButtonClicked();
61
62 FButtonStyle NormalStyle;
63 FButtonStyle SelectedStyle;
64};
The client-side representation of a Stream Chat channel.
Definition: ChatChannel.h:74