send_credits_box.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. class HistoryItem;
  9. namespace style {
  10. struct FlatLabel;
  11. } // namespace style
  12. namespace Main {
  13. class Session;
  14. } // namespace Main
  15. namespace Payments {
  16. struct CreditsFormData;
  17. } // namespace Payments
  18. namespace Ui {
  19. class RpWidget;
  20. class GenericBox;
  21. class FlatLabel;
  22. void SendCreditsBox(
  23. not_null<Ui::GenericBox*> box,
  24. std::shared_ptr<Payments::CreditsFormData> data,
  25. Fn<void()> sent);
  26. [[nodiscard]] TextWithEntities CreditsEmoji(
  27. not_null<Main::Session*> session);
  28. [[nodiscard]] TextWithEntities CreditsEmojiSmall(
  29. not_null<Main::Session*> session);
  30. not_null<FlatLabel*> SetButtonMarkedLabel(
  31. not_null<RpWidget*> button,
  32. rpl::producer<TextWithEntities> text,
  33. Text::MarkedContext context,
  34. const style::FlatLabel &st,
  35. const style::color *textFg = nullptr);
  36. not_null<FlatLabel*> SetButtonMarkedLabel(
  37. not_null<RpWidget*> button,
  38. rpl::producer<TextWithEntities> text,
  39. not_null<Main::Session*> session,
  40. const style::FlatLabel &st,
  41. const style::color *textFg = nullptr);
  42. void SendStarsForm(
  43. not_null<Main::Session*> session,
  44. std::shared_ptr<Payments::CreditsFormData> data,
  45. Fn<void(std::optional<QString>)> done);
  46. } // namespace Ui