/* This file is part of Telegram Desktop, the official desktop application for the Telegram messaging service. For license and copyright information please follow this link: https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #pragma once #include "boxes/peer_list_box.h" namespace Ui { class ScrollArea; class SettingsButton; } // namespace Ui namespace Data { class GroupCall; } // namespace Data namespace Calls { class GroupCall; } // namespace Calls namespace Calls::Group { struct VolumeRequest; struct MuteRequest; class Members final : public Ui::RpWidget , private PeerListContentDelegate { public: Members( not_null parent, not_null call); [[nodiscard]] int desiredHeight() const; [[nodiscard]] rpl::producer desiredHeightValue() const override; [[nodiscard]] rpl::producer fullCountValue() const; [[nodiscard]] auto toggleMuteRequests() const -> rpl::producer; [[nodiscard]] auto changeVolumeRequests() const -> rpl::producer; [[nodiscard]] auto kickParticipantRequests() const -> rpl::producer>; [[nodiscard]] rpl::producer<> addMembersRequests() const { return _addMemberRequests.events(); } private: using ListWidget = PeerListContent; void resizeEvent(QResizeEvent *e) override; // PeerListContentDelegate interface. void peerListSetTitle(rpl::producer title) override; void peerListSetAdditionalTitle(rpl::producer title) override; void peerListSetHideEmpty(bool hide) override; bool peerListIsRowChecked(not_null row) override; int peerListSelectedRowsCount() override; void peerListScrollToTop() override; void peerListAddSelectedPeerInBunch( not_null peer) override; void peerListAddSelectedRowInBunch( not_null row) override; void peerListFinishSelectedRowsBunch() override; void peerListSetDescription( object_ptr description) override; void setupAddMember(not_null call); void resizeToList(); void setupList(); void setupFakeRoundCorners(); void updateControlsGeometry(); const base::weak_ptr _call; object_ptr _scroll; std::unique_ptr _listController; object_ptr _addMember = { nullptr }; rpl::variable _addMemberButton = nullptr; ListWidget *_list = { nullptr }; rpl::event_stream<> _addMemberRequests; rpl::variable _canAddMembers; }; } // namespace Calls