/* This file is part of Telegram Desktop, the official desktop version of Telegram messaging app, see https://telegram.org Telegram Desktop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #pragma once #include #include "window/section_widget.h" namespace Ui { class SettingsSlider; } // namespace Ui namespace Info { class Memento; class MoveMemento; class Controller; class WrapWidget; enum class Wrap; class SectionWidget final : public Window::SectionWidget { public: SectionWidget( QWidget *parent, not_null window, Wrap wrap, not_null memento); SectionWidget( QWidget *parent, not_null window, Wrap wrap, not_null memento); PeerData *activePeer() const override; bool hasTopBarShadow() const override; QPixmap grabForShowAnimation( const Window::SectionSlideParams ¶ms) override; bool showInternal( not_null memento, const Window::SectionShow ¶ms) override; std::unique_ptr createMemento() override; object_ptr moveContentToLayer( QRect bodyGeometry) override; // Float player interface. bool wheelEventFromFloatPlayer(QEvent *e) override; QRect rectForFloatPlayer() const override; protected: void doSetInnerFocus() override; void showFinishedHook() override; void showAnimatedHook( const Window::SectionSlideParams ¶ms) override; private: void init(); object_ptr _content; object_ptr _topBarSurrogate = { nullptr }; }; } // namespace Info