/* 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/object_ptr.h" #include "dialogs/ui/top_peers_strip.h" #include "ui/rp_widget.h" namespace Main { class Session; } // namespace Main namespace Ui { class ElasticScroll; class VerticalLayout; template class SlideWrap; } // namespace Ui namespace Window { class SessionController; } // namespace Window namespace Dialogs { class Suggestions final : public Ui::RpWidget { public: Suggestions( not_null parent, not_null controller, rpl::producer topPeers); ~Suggestions(); void selectSkip(int delta); void selectSkipPage(int height, int direction); void selectLeft(); void selectRight(); void chooseRow(); [[nodiscard]] rpl::producer topPeerChosen() const { return _topPeerChosen.events(); } private: void paintEvent(QPaintEvent *e) override; void resizeEvent(QResizeEvent *e) override; [[nodiscard]] object_ptr setupDivider(); void updateControlsGeometry(); const std::unique_ptr _scroll; const not_null _content; const not_null*> _topPeersWrap; const not_null _topPeers; const not_null _divider; rpl::event_stream _topPeerChosen; }; [[nodiscard]] rpl::producer TopPeersContent( not_null session); } // namespace Dialogs