2015-05-19 15:46:45 +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.
|
2015-05-19 15:46:45 +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
|
2015-05-19 15:46:45 +00:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2017-04-06 14:38:10 +00:00
|
|
|
#include "boxes/abstract_box.h"
|
2018-11-21 18:14:48 +00:00
|
|
|
#include "base/timer.h"
|
2020-06-08 17:24:36 +00:00
|
|
|
#include "data/stickers/data_stickers.h"
|
2015-05-19 15:46:45 +00:00
|
|
|
|
2016-07-15 15:58:52 +00:00
|
|
|
class ConfirmBox;
|
2016-10-20 16:32:15 +00:00
|
|
|
|
2019-06-24 15:09:37 +00:00
|
|
|
namespace Window {
|
|
|
|
class SessionController;
|
|
|
|
} // namespace Window
|
|
|
|
|
2016-10-12 19:34:25 +00:00
|
|
|
namespace Ui {
|
|
|
|
class PlainShadow;
|
|
|
|
} // namespace Ui
|
2016-07-15 15:58:52 +00:00
|
|
|
|
2020-06-11 16:09:46 +00:00
|
|
|
class StickerSetBox final : public Ui::BoxContent {
|
2015-05-19 15:46:45 +00:00
|
|
|
public:
|
2019-06-24 15:09:37 +00:00
|
|
|
StickerSetBox(
|
|
|
|
QWidget*,
|
|
|
|
not_null<Window::SessionController*> controller,
|
|
|
|
const MTPInputStickerSet &set);
|
2016-10-20 16:32:15 +00:00
|
|
|
|
2019-09-18 11:19:05 +00:00
|
|
|
static QPointer<Ui::BoxContent> Show(
|
2019-06-24 15:09:37 +00:00
|
|
|
not_null<Window::SessionController*> controller,
|
|
|
|
not_null<DocumentData*> document);
|
2018-11-26 11:55:02 +00:00
|
|
|
|
2016-12-13 17:07:56 +00:00
|
|
|
protected:
|
|
|
|
void prepare() override;
|
|
|
|
|
|
|
|
void resizeEvent(QResizeEvent *e) override;
|
|
|
|
|
2016-10-20 16:32:15 +00:00
|
|
|
private:
|
2018-11-21 18:14:48 +00:00
|
|
|
void updateTitleAndButtons();
|
2016-12-13 17:07:56 +00:00
|
|
|
void updateButtons();
|
2018-11-21 18:14:48 +00:00
|
|
|
void addStickers();
|
2020-08-31 13:55:47 +00:00
|
|
|
void copyStickersLink();
|
2016-12-13 17:07:56 +00:00
|
|
|
|
2020-06-11 16:09:46 +00:00
|
|
|
const not_null<Window::SessionController*> _controller;
|
2016-12-13 17:07:56 +00:00
|
|
|
MTPInputStickerSet _set;
|
2016-11-18 13:34:58 +00:00
|
|
|
|
2016-10-20 16:32:15 +00:00
|
|
|
class Inner;
|
2016-12-13 17:07:56 +00:00
|
|
|
QPointer<Inner> _inner;
|
|
|
|
|
2016-10-20 16:32:15 +00:00
|
|
|
};
|