2017-09-13 17:01:23 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2018-01-03 10:23:14 +00:00
|
|
|
the official desktop application for the Telegram messaging service.
|
2017-09-13 17:01:23 +00:00
|
|
|
|
2018-01-03 10:23:14 +00:00
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
2017-09-13 17:01:23 +00:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <rpl/event_stream.h>
|
|
|
|
#include "window/section_widget.h"
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class SettingsSlider;
|
|
|
|
} // namespace Ui
|
|
|
|
|
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
|
|
|
|
|
2017-09-13 17:01:23 +00:00
|
|
|
namespace Info {
|
|
|
|
|
|
|
|
class Memento;
|
2017-09-15 17:34:41 +00:00
|
|
|
class MoveMemento;
|
2017-10-31 18:25:22 +00:00
|
|
|
class Controller;
|
2017-09-30 18:26:45 +00:00
|
|
|
class WrapWidget;
|
|
|
|
enum class Wrap;
|
2017-09-13 17:01:23 +00:00
|
|
|
|
2017-09-30 18:26:45 +00:00
|
|
|
class SectionWidget final : public Window::SectionWidget {
|
2017-09-13 17:01:23 +00:00
|
|
|
public:
|
2017-09-30 18:26:45 +00:00
|
|
|
SectionWidget(
|
2017-09-13 17:01:23 +00:00
|
|
|
QWidget *parent,
|
2019-06-06 10:21:40 +00:00
|
|
|
not_null<Window::SessionController*> window,
|
2017-09-30 18:26:45 +00:00
|
|
|
Wrap wrap,
|
2017-09-13 17:01:23 +00:00
|
|
|
not_null<Memento*> memento);
|
2017-09-30 18:26:45 +00:00
|
|
|
SectionWidget(
|
2017-09-15 17:34:41 +00:00
|
|
|
QWidget *parent,
|
2019-06-06 10:21:40 +00:00
|
|
|
not_null<Window::SessionController*> window,
|
2017-09-30 18:26:45 +00:00
|
|
|
Wrap wrap,
|
2017-09-15 17:34:41 +00:00
|
|
|
not_null<MoveMemento*> memento);
|
2017-09-13 17:01:23 +00:00
|
|
|
|
2018-01-22 16:42:25 +00:00
|
|
|
Dialogs::RowDescriptor activeChat() const override;
|
2017-09-13 17:01:23 +00:00
|
|
|
|
2017-09-20 18:40:23 +00:00
|
|
|
bool hasTopBarShadow() const override;
|
2017-09-13 17:01:23 +00:00
|
|
|
QPixmap grabForShowAnimation(
|
|
|
|
const Window::SectionSlideParams ¶ms) override;
|
|
|
|
|
|
|
|
bool showInternal(
|
2017-10-03 13:05:58 +00:00
|
|
|
not_null<Window::SectionMemento*> memento,
|
|
|
|
const Window::SectionShow ¶ms) override;
|
2020-12-14 14:48:10 +00:00
|
|
|
std::shared_ptr<Window::SectionMemento> createMemento() override;
|
2017-09-13 17:01:23 +00:00
|
|
|
|
2019-09-18 11:19:05 +00:00
|
|
|
object_ptr<Ui::LayerWidget> moveContentToLayer(
|
2017-09-30 18:26:45 +00:00
|
|
|
QRect bodyGeometry) override;
|
2017-09-13 17:01:23 +00:00
|
|
|
|
|
|
|
// Float player interface.
|
2020-06-25 14:17:37 +00:00
|
|
|
bool floatPlayerHandleWheelEvent(QEvent *e) override;
|
|
|
|
QRect floatPlayerAvailableRect() override;
|
2017-09-13 17:01:23 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void doSetInnerFocus() override;
|
2017-09-30 18:26:45 +00:00
|
|
|
void showFinishedHook() override;
|
2017-09-13 17:01:23 +00:00
|
|
|
|
2017-11-16 15:24:01 +00:00
|
|
|
void showAnimatedHook(
|
|
|
|
const Window::SectionSlideParams ¶ms) override;
|
|
|
|
|
2017-09-13 17:01:23 +00:00
|
|
|
private:
|
2017-09-30 18:26:45 +00:00
|
|
|
void init();
|
2017-09-13 17:01:23 +00:00
|
|
|
|
2017-09-30 18:26:45 +00:00
|
|
|
object_ptr<WrapWidget> _content;
|
2017-11-16 15:24:01 +00:00
|
|
|
object_ptr<Ui::RpWidget> _topBarSurrogate = { nullptr };
|
2019-02-10 16:29:55 +00:00
|
|
|
std::unique_ptr<Window::ConnectionState> _connecting;
|
2017-09-13 17:01:23 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Info
|