ZaStoGram_desktop/Telegram/SourceFiles/ui/controls/text_copied_toast.h
John Preston 49bc92d322 Show copied toasts and copy photo text with Cmd+Shift+C
Task: 2026/10/13/show-copied-toasts-for-message-selections-and-copy-photo-text-by-cmd-shift-c
2026-10-13 13:26:39 +04:00

41 lines
816 B
C++

/*
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/weak_ptr.h"
namespace Ui::Toast {
class Instance;
} // namespace Ui::Toast
namespace Ui {
class Show;
class RpWidget;
void ShowTextCopiedToast(const std::shared_ptr<Show> &show);
class TextCopiedToastPending final {
public:
explicit TextCopiedToastPending(std::shared_ptr<Show> show);
~TextCopiedToastPending();
void finished();
private:
struct State;
const std::shared_ptr<Show> _show;
base::weak_ptr<Toast::Instance> _toast;
QPointer<RpWidget> _slot;
base::weak_ptr<State> _state;
bool _finished = false;
};
} // namespace Ui