2021-02-23 10:31:48 +00:00
|
|
|
/*
|
|
|
|
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 "base/unique_qptr.h"
|
|
|
|
|
|
|
|
namespace ChatHelpers {
|
|
|
|
class TabbedPanel;
|
2023-05-18 13:46:24 +00:00
|
|
|
class Show;
|
2021-02-23 10:31:48 +00:00
|
|
|
} // namespace ChatHelpers
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class RpWidget;
|
|
|
|
} // namespace Ui
|
|
|
|
|
|
|
|
namespace Editor {
|
|
|
|
|
|
|
|
class StickersPanelController final {
|
|
|
|
public:
|
2021-05-04 17:57:52 +00:00
|
|
|
enum class ShowRequest {
|
|
|
|
ToggleAnimated,
|
|
|
|
ShowAnimated,
|
|
|
|
HideAnimated,
|
|
|
|
HideFast,
|
|
|
|
};
|
|
|
|
|
2021-02-23 10:31:48 +00:00
|
|
|
StickersPanelController(
|
|
|
|
not_null<Ui::RpWidget*> panelContainer,
|
2023-05-18 13:46:24 +00:00
|
|
|
std::shared_ptr<ChatHelpers::Show> show);
|
2021-02-23 10:31:48 +00:00
|
|
|
|
|
|
|
[[nodiscard]] auto stickerChosen() const
|
|
|
|
-> rpl::producer<not_null<DocumentData*>>;
|
|
|
|
[[nodiscard]] rpl::producer<bool> panelShown() const;
|
|
|
|
|
2021-05-04 17:57:52 +00:00
|
|
|
void setShowRequestChanges(rpl::producer<ShowRequest> &&showRequest);
|
2021-02-23 10:31:48 +00:00
|
|
|
// Middle x and plain y position.
|
|
|
|
void setMoveRequestChanges(rpl::producer<QPoint> &&moveRequest);
|
|
|
|
|
|
|
|
private:
|
|
|
|
const base::unique_qptr<ChatHelpers::TabbedPanel> _stickersPanel;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Editor
|