history_view_top_toast.h 737 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. This file is part of Telegram Desktop,
  3. the official desktop application for the Telegram messaging service.
  4. For license and copyright information please follow this link:
  5. https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. */
  7. #pragma once
  8. #include "base/weak_ptr.h"
  9. namespace Main {
  10. class Session;
  11. } // namespace Main
  12. namespace Ui::Toast {
  13. class Instance;
  14. } // namespace Ui::Toast
  15. namespace HistoryView {
  16. class InfoTooltip final {
  17. public:
  18. InfoTooltip();
  19. void show(
  20. not_null<QWidget*> parent,
  21. not_null<Main::Session*> session,
  22. const TextWithEntities &text,
  23. Fn<void()> hiddenCallback);
  24. void hide(anim::type animated);
  25. private:
  26. base::weak_ptr<Ui::Toast::Instance> _topToast;
  27. };
  28. } // namespace HistoryView