This repository has been archived on 2021-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
tdesktop-new-cmake/src/Telegram/chat_helpers/send_context_menu.h

54 lines
1021 B
C++

/*
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/rp_widget.h"
namespace Api {
struct SendOptions;
} // namespace Api
namespace Ui {
class PopupMenu;
} // namespace Ui
namespace SendMenu {
enum class Type {
Disabled,
SilentOnly,
Scheduled,
ScheduledToUser, // For "Send when online".
Reminder,
};
enum class FillMenuResult {
Success,
None,
};
Fn<void()> DefaultSilentCallback(Fn<void(Api::SendOptions)> send);
Fn<void()> DefaultScheduleCallback(
not_null<Ui::RpWidget*> parent,
Type type,
Fn<void(Api::SendOptions)> send);
FillMenuResult FillSendMenu(
not_null<Ui::PopupMenu*> menu,
Type type,
Fn<void()> silent,
Fn<void()> schedule);
void SetupMenuAndShortcuts(
not_null<Ui::RpWidget*> button,
Fn<Type()> type,
Fn<void()> silent,
Fn<void()> schedule);
} // namespace SendMenu