layout_selection.h 684 B

1234567891011121314151617181920212223242526
  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 "ui/text/text.h"
  9. constexpr auto FullSelection = TextSelection { 0xFFFF, 0xFFFF };
  10. [[nodiscard]] bool IsSubGroupSelection(TextSelection selection);
  11. [[nodiscard]] bool IsGroupItemSelection(
  12. TextSelection selection,
  13. int index);
  14. [[nodiscard]] TextSelection AddGroupItemSelection(
  15. TextSelection selection,
  16. int index);
  17. [[nodiscard]] TextSelection RemoveGroupItemSelection(
  18. TextSelection selection,
  19. int index);