tdesktop/Telegram/SourceFiles/info/info_section_widget.h

76 lines
1.8 KiB
C
Raw Normal View History

/*
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 <rpl/event_stream.h>
#include "window/section_widget.h"
2018-05-07 17:44:33 +00:00
namespace Window {
2019-02-10 16:29:55 +00:00
class ConnectionState;
2018-05-07 17:44:33 +00:00
} // namespace Window
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::SessionController*> window,
Wrap wrap,
not_null<Memento*> memento);
SectionWidget(
QWidget *parent,
not_null<Window::SessionController*> window,
Wrap wrap,
not_null<MoveMemento*> memento);
Dialogs::RowDescriptor activeChat() const override;
bool hasTopBarShadow() const override;
QPixmap grabForShowAnimation(
const Window::SectionSlideParams &params) override;
bool showInternal(
not_null<Window::SectionMemento*> memento,
const Window::SectionShow &params) override;
2020-12-14 14:48:10 +00:00
std::shared_ptr<Window::SectionMemento> createMemento() override;
2019-09-18 11:19:05 +00:00
object_ptr<Ui::LayerWidget> moveContentToLayer(
QRect bodyGeometry) override;
rpl::producer<> removeRequests() const override;
// Float player interface.
bool floatPlayerHandleWheelEvent(QEvent *e) override;
QRect floatPlayerAvailableRect() override;
protected:
void doSetInnerFocus() override;
void showFinishedHook() override;
void showAnimatedHook(
const Window::SectionSlideParams &params) override;
void paintEvent(QPaintEvent *e) override;
private:
void init();
object_ptr<WrapWidget> _content;
object_ptr<Ui::RpWidget> _topBarSurrogate = { nullptr };
2019-02-10 16:29:55 +00:00
std::unique_ptr<Window::ConnectionState> _connecting;
};
} // namespace Info