2021-04-20 18:39:39 -05:00
|
|
|
using System;
|
2021-07-20 10:29:09 +02:00
|
|
|
using System.Collections.Generic;
|
2021-06-09 22:19:39 +02:00
|
|
|
using Content.Client.Chat.UI;
|
2021-07-20 10:29:09 +02:00
|
|
|
using Content.Shared.Chat;
|
2019-07-30 23:13:05 +02:00
|
|
|
using Robust.Shared.GameObjects;
|
2019-08-04 01:08:55 +02:00
|
|
|
using Robust.Shared.Timing;
|
2019-04-13 09:45:09 +02:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Client.Chat.Managers
|
2019-04-13 09:45:09 +02:00
|
|
|
{
|
|
|
|
|
public interface IChatManager
|
|
|
|
|
{
|
2021-07-20 10:29:09 +02:00
|
|
|
ChatChannel ChannelFilters { get; }
|
|
|
|
|
ChatSelectChannel SelectableChannels { get; }
|
|
|
|
|
ChatChannel FilterableChannels { get; }
|
|
|
|
|
|
2019-04-13 09:45:09 +02:00
|
|
|
void Initialize();
|
|
|
|
|
|
2019-08-04 01:08:55 +02:00
|
|
|
void FrameUpdate(FrameEventArgs delta);
|
2019-07-30 23:13:05 +02:00
|
|
|
|
2019-04-13 09:45:09 +02:00
|
|
|
void SetChatBox(ChatBox chatBox);
|
2019-07-30 23:13:05 +02:00
|
|
|
|
|
|
|
|
void RemoveSpeechBubble(EntityUid entityUid, SpeechBubble bubble);
|
2021-01-04 05:25:33 -03:00
|
|
|
|
2021-04-20 18:39:39 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// Current chat box control. This can be modified, so do not depend on saving a reference to this.
|
|
|
|
|
/// </summary>
|
|
|
|
|
ChatBox? CurrentChatBox { get; }
|
|
|
|
|
|
2021-07-20 10:29:09 +02:00
|
|
|
IReadOnlyDictionary<ChatChannel, int> UnreadMessages { get; }
|
|
|
|
|
IReadOnlyList<StoredChatMessage> History { get; }
|
|
|
|
|
int MaxMessageLength { get; }
|
|
|
|
|
bool IsGhost { get; }
|
|
|
|
|
|
2021-04-20 18:39:39 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// Invoked when CurrentChatBox is resized (including after setting initial default size)
|
|
|
|
|
/// </summary>
|
|
|
|
|
event Action<ChatResizedEventArgs>? OnChatBoxResized;
|
2021-07-20 10:29:09 +02:00
|
|
|
|
|
|
|
|
event Action<ChatPermissionsUpdatedEventArgs>? ChatPermissionsUpdated;
|
|
|
|
|
event Action? UnreadMessageCountsUpdated;
|
|
|
|
|
event Action<StoredChatMessage>? MessageAdded;
|
|
|
|
|
event Action? FiltersUpdated;
|
|
|
|
|
|
|
|
|
|
void ClearUnfilteredUnreads();
|
|
|
|
|
void ChatBoxOnResized(ChatResizedEventArgs chatResizedEventArgs);
|
|
|
|
|
void OnChatBoxTextSubmitted(ChatBox chatBox, ReadOnlyMemory<char> text, ChatSelectChannel channel);
|
|
|
|
|
void OnFilterButtonToggled(ChatChannel channel, bool enabled);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public struct ChatPermissionsUpdatedEventArgs
|
|
|
|
|
{
|
|
|
|
|
public ChatSelectChannel OldSelectableChannels;
|
2019-04-13 09:45:09 +02:00
|
|
|
}
|
|
|
|
|
}
|