/* 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 namespace st { extern const style::margins &giveawayGiftCodeLabelMargin; extern const style::margins &giveawayGiftCodeValueMargin; } // namespace st namespace ChatHelpers { class Show; } // namespace ChatHelpers namespace Ui { class RpWidget; class TableLayout; class FlatLabel; class ImportantTooltip; void AddTableRow( not_null table, rpl::producer label, object_ptr value, style::margins valueMargins = st::giveawayGiftCodeValueMargin); not_null AddTableRow( not_null table, rpl::producer label, rpl::producer value, const Text::MarkedContext &context = {}); void AddTableRow( not_null table, rpl::producer label, std::shared_ptr show, PeerId id); [[nodiscard]] object_ptr MakeValueWithSmallButton( not_null table, not_null value, rpl::producer buttonText, Fn button)> handler = nullptr, int topSkip = 0); [[nodiscard]] object_ptr MakePeerTableValue( not_null table, std::shared_ptr show, PeerId id, rpl::producer button = nullptr, Fn handler = nullptr); [[nodiscard]] object_ptr MakePeerWithStatusValue( not_null table, std::shared_ptr show, PeerId id, Fn, EmojiStatusId)> pushStatusId); [[nodiscard]] object_ptr MakeHiddenPeerTableValue( not_null table); struct TableRowTooltipData { not_null parent; ImportantTooltip *raw = nullptr; }; void ShowTableRowTooltip( std::shared_ptr data, not_null target, rpl::producer text, int duration, const Text::MarkedContext &context = {}); [[nodiscard]] object_ptr MakeTableValueWithTooltip( not_null table, std::shared_ptr data, TextWithEntities price, TextWithEntities tooltip, const Text::MarkedContext &context = {}); } // namespace Ui