/* 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 "base/weak_ptr.h" #include "base/timer.h" #include "base/object_ptr.h" #include "calls/calls_group_call.h" #include "ui/effects/animations.h" #include "ui/rp_widget.h" class Image; namespace Data { class PhotoMedia; class CloudImageView; } // namespace Data namespace Ui { class IconButton; class FlatLabel; template class FadeWrap; template class PaddingWrap; class Window; class ScrollArea; class LayerManager; namespace Platform { class TitleControls; } // namespace Platform } // namespace Ui namespace style { struct CallSignalBars; struct CallBodyLayout; } // namespace style namespace Calls { class Userpic; class SignalBars; class GroupMembers; class GroupPanel final { public: GroupPanel(not_null call); ~GroupPanel(); void showAndActivate(); void closeBeforeDestroy(); private: class Button; using State = GroupCall::State; [[nodiscard]] not_null widget() const; void paint(QRect clip); void initWindow(); void initWidget(); void initControls(); void initWithCall(GroupCall *call); void initLayout(); void initGeometry(); bool handleClose(); void updateControlsGeometry(); void stateChanged(State state); void showControls(); [[nodiscard]] int computeMembersListTop() const; [[nodiscard]] std::optional computeTitleRect() const; void refreshTitle(); GroupCall *_call = nullptr; not_null _channel; const std::unique_ptr _window; const std::unique_ptr _layerBg; #ifdef Q_OS_WIN std::unique_ptr _controls; #endif // Q_OS_WIN rpl::lifetime _callLifetime; object_ptr _title = { nullptr }; object_ptr _members; object_ptr