choose_language_box.h 971 B

123456789101112131415161718192021222324252627282930313233343536
  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. struct LanguageId;
  9. namespace tr {
  10. struct now_t;
  11. } // namespace tr
  12. namespace Ui {
  13. class GenericBox;
  14. [[nodiscard]] QString LanguageNameTranslated(const QString &twoLetterCode);
  15. [[nodiscard]] QString LanguageNameLocal(LanguageId id);
  16. [[nodiscard]] QString LanguageName(LanguageId id);
  17. [[nodiscard]] QString LanguageNameNative(LanguageId id);
  18. [[nodiscard]] rpl::producer<QString> TranslateBarTo(LanguageId id);
  19. [[nodiscard]] QString TranslateMenuDont(tr::now_t, LanguageId id);
  20. void ChooseLanguageBox(
  21. not_null<GenericBox*> box,
  22. rpl::producer<QString> title,
  23. Fn<void(std::vector<LanguageId>)> callback,
  24. std::vector<LanguageId> selected,
  25. bool multiselect,
  26. Fn<bool(LanguageId)> toggleCheck);
  27. } // namespace Ui