2016-05-12 16:05:20 +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.
|
2016-05-12 16:05:20 +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
|
2016-05-12 16:05:20 +00:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2019-09-18 11:19:05 +00:00
|
|
|
namespace Ui {
|
|
|
|
class LayerWidget;
|
|
|
|
} // namespace Ui
|
|
|
|
|
2023-01-21 05:42:57 +00:00
|
|
|
namespace Data {
|
|
|
|
class ForumTopic;
|
|
|
|
} // namespace Data
|
|
|
|
|
2016-05-19 12:03:51 +00:00
|
|
|
namespace Window {
|
2016-05-12 16:05:20 +00:00
|
|
|
|
2019-06-06 10:21:40 +00:00
|
|
|
class SessionController;
|
2016-05-19 12:03:51 +00:00
|
|
|
class SectionWidget;
|
2017-09-16 16:53:41 +00:00
|
|
|
enum class Column;
|
2016-05-12 16:05:20 +00:00
|
|
|
|
2016-05-19 12:03:51 +00:00
|
|
|
class SectionMemento {
|
|
|
|
public:
|
2022-10-12 12:57:17 +00:00
|
|
|
[[nodiscard]] virtual object_ptr<SectionWidget> createWidget(
|
2017-09-13 17:01:23 +00:00
|
|
|
QWidget *parent,
|
2019-06-06 10:21:40 +00:00
|
|
|
not_null<SessionController*> controller,
|
2017-09-16 16:53:41 +00:00
|
|
|
Column column,
|
2017-09-13 17:01:23 +00:00
|
|
|
const QRect &geometry) = 0;
|
|
|
|
|
2022-10-12 12:57:17 +00:00
|
|
|
[[nodiscard]] virtual object_ptr<Ui::LayerWidget> createLayer(
|
2019-06-06 10:21:40 +00:00
|
|
|
not_null<SessionController*> controller,
|
2017-09-30 18:26:45 +00:00
|
|
|
const QRect &geometry) {
|
2017-09-13 17:01:23 +00:00
|
|
|
return nullptr;
|
2016-06-06 11:35:49 +00:00
|
|
|
}
|
2022-10-12 12:57:17 +00:00
|
|
|
[[nodiscard]] virtual bool instant() const {
|
2017-09-15 17:34:41 +00:00
|
|
|
return false;
|
|
|
|
}
|
2016-05-12 16:05:20 +00:00
|
|
|
|
2023-01-21 05:42:57 +00:00
|
|
|
[[nodiscard]] virtual Data::ForumTopic *topicForRemoveRequests() const {
|
|
|
|
return nullptr;
|
|
|
|
}
|
2022-10-12 12:57:17 +00:00
|
|
|
[[nodiscard]] virtual rpl::producer<> removeRequests() const {
|
|
|
|
return rpl::never<>();
|
|
|
|
}
|
|
|
|
|
2017-09-13 17:01:23 +00:00
|
|
|
virtual ~SectionMemento() = default;
|
|
|
|
|
2016-05-12 16:05:20 +00:00
|
|
|
};
|
2016-05-19 12:03:51 +00:00
|
|
|
|
|
|
|
} // namespace Window
|