1 /*
2 This file is part of Telegram Desktop,
3 the official desktop application for the Telegram messaging service.
4 
5 For license and copyright information please follow this link:
6 https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
7 */
8 #pragma once
9 
10 namespace Ui {
11 class LayerWidget;
12 } // namespace Ui
13 
14 namespace Window {
15 
16 class SessionController;
17 class SectionWidget;
18 enum class Column;
19 
20 class SectionMemento {
21 public:
22 	virtual object_ptr<SectionWidget> createWidget(
23 		QWidget *parent,
24 		not_null<SessionController*> controller,
25 		Column column,
26 		const QRect &geometry) = 0;
27 
createLayer(not_null<SessionController * > controller,const QRect & geometry)28 	virtual object_ptr<Ui::LayerWidget> createLayer(
29 			not_null<SessionController*> controller,
30 			const QRect &geometry) {
31 		return nullptr;
32 	}
instant()33 	virtual bool instant() const {
34 		return false;
35 	}
36 
37 	virtual ~SectionMemento() = default;
38 
39 };
40 
41 } // namespace Window
42