2020-08-09 11:28:39 +00:00
|
|
|
/*
|
|
|
|
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"
|
|
|
|
|
2020-08-09 11:50:32 +00:00
|
|
|
namespace Api {
|
|
|
|
struct SendOptions;
|
|
|
|
} // namespace Api
|
|
|
|
|
2020-08-09 11:28:39 +00:00
|
|
|
namespace Ui {
|
|
|
|
class PopupMenu;
|
|
|
|
} // namespace Ui
|
|
|
|
|
2020-08-10 12:22:54 +00:00
|
|
|
namespace SendMenu {
|
|
|
|
|
|
|
|
enum class Type {
|
2020-08-09 11:28:39 +00:00
|
|
|
Disabled,
|
|
|
|
SilentOnly,
|
|
|
|
Scheduled,
|
|
|
|
ScheduledToUser, // For "Send when online".
|
|
|
|
Reminder,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class FillMenuResult {
|
|
|
|
Success,
|
|
|
|
None,
|
|
|
|
};
|
|
|
|
|
2020-08-09 11:50:32 +00:00
|
|
|
Fn<void()> DefaultSilentCallback(Fn<void(Api::SendOptions)> send);
|
|
|
|
Fn<void()> DefaultScheduleCallback(
|
|
|
|
not_null<Ui::RpWidget*> parent,
|
2020-08-10 12:22:54 +00:00
|
|
|
Type type,
|
2020-08-09 11:50:32 +00:00
|
|
|
Fn<void(Api::SendOptions)> send);
|
|
|
|
|
2020-08-09 11:28:39 +00:00
|
|
|
FillMenuResult FillSendMenu(
|
|
|
|
not_null<Ui::PopupMenu*> menu,
|
2020-11-19 03:18:45 +00:00
|
|
|
Type type,
|
2020-08-09 11:28:39 +00:00
|
|
|
Fn<void()> silent,
|
|
|
|
Fn<void()> schedule);
|
|
|
|
|
2020-08-10 12:22:54 +00:00
|
|
|
void SetupMenuAndShortcuts(
|
2020-08-09 11:28:39 +00:00
|
|
|
not_null<Ui::RpWidget*> button,
|
2020-08-10 12:22:54 +00:00
|
|
|
Fn<Type()> type,
|
2020-08-09 11:28:39 +00:00
|
|
|
Fn<void()> silent,
|
|
|
|
Fn<void()> schedule);
|
2020-08-10 12:22:54 +00:00
|
|
|
|
2021-08-12 07:06:16 +00:00
|
|
|
void SetupUnreadMentionsMenu(
|
|
|
|
not_null<Ui::RpWidget*> button,
|
|
|
|
Fn<PeerData*()> currentPeer);
|
|
|
|
|
2022-01-26 16:01:40 +00:00
|
|
|
void SetupUnreadReactionsMenu(
|
|
|
|
not_null<Ui::RpWidget*> button,
|
|
|
|
Fn<PeerData*()> currentPeer);
|
|
|
|
|
2020-08-10 12:22:54 +00:00
|
|
|
} // namespace SendMenu
|