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 #include "base/unique_qptr.h"
11 
12 namespace ChatHelpers {
13 class TabbedPanel;
14 } // namespace ChatHelpers
15 
16 namespace Ui {
17 class RpWidget;
18 } // namespace Ui
19 
20 namespace Window {
21 class SessionController;
22 } // namespace Window
23 
24 namespace Editor {
25 
26 class StickersPanelController final {
27 public:
28 	enum class ShowRequest {
29 		ToggleAnimated,
30 		ShowAnimated,
31 		HideAnimated,
32 		HideFast,
33 	};
34 
35 	StickersPanelController(
36 		not_null<Ui::RpWidget*> panelContainer,
37 		not_null<Window::SessionController*> controller);
38 
39 	[[nodiscard]] auto stickerChosen() const
40 	-> rpl::producer<not_null<DocumentData*>>;
41 	[[nodiscard]] rpl::producer<bool> panelShown() const;
42 
43 	void setShowRequestChanges(rpl::producer<ShowRequest> &&showRequest);
44 	// Middle x and plain y position.
45 	void setMoveRequestChanges(rpl::producer<QPoint> &&moveRequest);
46 
47 private:
48 	const base::unique_qptr<ChatHelpers::TabbedPanel> _stickersPanel;
49 
50 };
51 
52 } // namespace Editor
53