/* 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 #include "ui/layers/generic_box.h" #include "ui/text/text_variant.h" namespace Ui { struct ConfirmBoxArgs { using Callback = std::variant< v::null_t, Fn, Fn)>>; v::text::data text = v::null; Callback confirmed = v::null; Callback cancelled = v::null; v::text::data confirmText; v::text::data cancelText; const style::RoundButton *confirmStyle = nullptr; const style::RoundButton *cancelStyle = nullptr; const style::FlatLabel *labelStyle = nullptr; Fn labelFilter; bool inform = false; // If strict cancel is set the cancel.callback() is only called // if the cancel button was pressed. bool strictCancel = false; }; void ConfirmBox(not_null box, ConfirmBoxArgs &&args); [[nodiscard]] object_ptr MakeConfirmBox( ConfirmBoxArgs &&args); [[nodiscard]] object_ptr MakeInformBox(v::text::data text); } // namespace Ui