2017-11-06 22:03:20 +04:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2018-01-03 13:23:14 +03:00
|
|
|
the official desktop application for the Telegram messaging service.
|
2017-11-06 22:03:20 +04:00
|
|
|
|
2018-01-03 13:23:14 +03:00
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
2017-11-06 22:03:20 +04:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2017-12-09 19:13:06 +04:00
|
|
|
namespace Ui {
|
|
|
|
class RpWidget;
|
|
|
|
} // namespace Ui
|
|
|
|
|
2018-01-05 18:57:18 +03:00
|
|
|
namespace Data {
|
2019-04-15 15:54:03 +04:00
|
|
|
class Folder;
|
2018-01-05 18:57:18 +03:00
|
|
|
} // namespace Data
|
|
|
|
|
2017-11-06 22:03:20 +04:00
|
|
|
namespace Window {
|
|
|
|
|
2017-11-07 15:53:05 +04:00
|
|
|
class Controller;
|
|
|
|
|
2017-11-07 19:12:54 +04:00
|
|
|
enum class PeerMenuSource {
|
|
|
|
ChatsList,
|
|
|
|
History,
|
|
|
|
Profile,
|
2017-11-06 22:03:20 +04:00
|
|
|
};
|
|
|
|
|
2018-06-04 18:35:11 +03:00
|
|
|
using PeerMenuCallback = Fn<QAction*(
|
2017-11-06 22:03:20 +04:00
|
|
|
const QString &text,
|
2018-06-04 18:35:11 +03:00
|
|
|
Fn<void()> handler)>;
|
2017-11-06 22:03:20 +04:00
|
|
|
|
|
|
|
void FillPeerMenu(
|
2017-11-07 15:53:05 +04:00
|
|
|
not_null<Controller*> controller,
|
2017-11-06 22:03:20 +04:00
|
|
|
not_null<PeerData*> peer,
|
2017-11-07 17:13:41 +04:00
|
|
|
const PeerMenuCallback &addAction,
|
2017-11-07 19:12:54 +04:00
|
|
|
PeerMenuSource source);
|
2019-04-15 15:54:03 +04:00
|
|
|
void FillFolderMenu(
|
2018-01-05 18:57:18 +03:00
|
|
|
not_null<Controller*> controller,
|
2019-04-15 15:54:03 +04:00
|
|
|
not_null<Data::Folder*> folder,
|
2018-01-05 18:57:18 +03:00
|
|
|
const PeerMenuCallback &addAction,
|
|
|
|
PeerMenuSource source);
|
2017-11-06 22:03:20 +04:00
|
|
|
|
2018-02-12 14:10:40 +03:00
|
|
|
void PeerMenuAddMuteAction(
|
|
|
|
not_null<PeerData*> peer,
|
|
|
|
const PeerMenuCallback &addAction);
|
|
|
|
|
2018-07-23 16:11:56 +03:00
|
|
|
void PeerMenuExportChat(not_null<PeerData*> peer);
|
2017-11-07 17:13:41 +04:00
|
|
|
void PeerMenuDeleteContact(not_null<UserData*> user);
|
|
|
|
void PeerMenuShareContactBox(not_null<UserData*> user);
|
|
|
|
void PeerMenuAddContact(not_null<UserData*> user);
|
2017-11-19 18:41:52 +04:00
|
|
|
void PeerMenuAddChannelMembers(not_null<ChannelData*> channel);
|
2018-03-06 20:07:42 +03:00
|
|
|
//void PeerMenuUngroupFeed(not_null<Data::Feed*> feed); // #feed
|
2018-12-20 20:02:44 +04:00
|
|
|
void PeerMenuCreatePoll(not_null<PeerData*> peer);
|
2017-11-07 17:13:41 +04:00
|
|
|
|
2019-04-18 12:28:43 +04:00
|
|
|
void ToggleHistoryArchived(not_null<History*> history, bool archived);
|
2018-06-04 18:35:11 +03:00
|
|
|
Fn<void()> ClearHistoryHandler(not_null<PeerData*> peer);
|
|
|
|
Fn<void()> DeleteAndLeaveHandler(not_null<PeerData*> peer);
|
2017-12-06 18:39:27 +04:00
|
|
|
|
2017-12-09 19:13:06 +04:00
|
|
|
QPointer<Ui::RpWidget> ShowForwardMessagesBox(
|
2017-12-06 14:13:38 +04:00
|
|
|
MessageIdsList &&items,
|
2018-06-04 18:35:11 +03:00
|
|
|
FnMut<void()> &&successCallback = nullptr);
|
2017-12-06 14:13:38 +04:00
|
|
|
|
2017-11-06 22:03:20 +04:00
|
|
|
} // namespace Window
|