FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
tdesktop/Telegram/SourceFiles/mainwindow.h at dev · feiyunwill/tdesktop · GitHub
feiyunwill
/
tdesktop
Public
forked from
telegramdesktop/tdesktop
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
tdesktop
/
Telegram
/
SourceFiles
/
mainwindow.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
150 lines (117 loc) · 3.83 KB
Breadcrumbs
tdesktop
/
Telegram
/
SourceFiles
/
mainwindow.h
Copy path
File metadata and controls
150 lines (117 loc) · 3.83 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/*
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
"
platform/platform_main_window.h
"
#
include
"
ui/layers/layer_widget.h
"
#
include
<
QtCore/QStringList
>
class
MainWidget
;
namespace
Main
{
class
Account
;
}
//
namespace Main
namespace
Intro
{
class
Widget
;
enum
class
EnterPoint
: uchar;
}
//
namespace Intro
namespace
Window
{
class
MediaPreviewWidget
;
class
SectionMemento
;
struct
SectionShow
;
class
PasscodeLockWidget
;
class
SetupEmailLockWidget
;
namespace
Theme
{
struct
BackgroundUpdate
;
class
WarningWidget
;
}
//
namespace Theme
}
//
namespace Window
namespace
Ui
{
class
LinkButton
;
class
BoxContent
;
class
LayerStackWidget
;
}
//
namespace Ui
class
MediaPreviewWidget
;
extern
const
char
kOptionAutoScrollInactiveChat
[];
class
MainWindow
:
public
Platform
::MainWindow {
public:
explicit
MainWindow
(not_null<Window::Controller*> controller);
~MainWindow
();
void
finishFirstShow
();
void
preventOrInvoke
(Fn<
void
()> callback);
void
setupPasscodeLock
();
void
clearPasscodeLock
();
void
setupSetupEmailLock
();
void
clearSetupEmailLock
();
void
setupIntro
(
Intro::EnterPoint point,
Main::Account *accountBeforeIntro,
QPixmap oldContentCache);
void
setupMain
(MsgId singlePeerShowAtMsgId, QPixmap oldContentCache);
void
showSettings
();
void
setInnerFocus
()
override
;
MainWidget *
sessionContent
()
const
;
void
checkActivation
()
override
;
[[nodiscard]]
bool
markingAsRead
()
const
;
bool
takeThirdSectionFromLayer
();
void
handleStartFiles
(QStringList interprets, QStringList paths);
[[nodiscard]]
bool
contentOverlapped
(
const
QRect &globalRect);
[[nodiscard]]
bool
contentOverlapped
(QWidget *w, QPaintEvent *e) {
return
contentOverlapped
(
QRect
(w->
mapToGlobal
(e->
rect
().
topLeft
()), e->
rect
().
size
()));
}
[[nodiscard]]
bool
contentOverlapped
(QWidget *w,
const
QRegion &r) {
return
contentOverlapped
(
QRect
(
w->
mapToGlobal
(r.
boundingRect
().
topLeft
()),
r.
boundingRect
().
size
()));
}
void
showMainMenu
();
void
fixOrder
()
override
;
[[nodiscard]]
QPixmap
grabForSlideAnimation
();
void
showOrHideBoxOrLayer
(
std::variant<
v::
null_t
,
object_ptr<Ui::BoxContent>,
std::unique_ptr<Ui::LayerWidget>> &&layer,
Ui::LayerOptions options,
anim::type animated);
void
showSpecialLayer
(
object_ptr<Ui::LayerWidget> layer,
anim::type animated);
bool
showSectionInExistingLayer
(
not_null<Window::SectionMemento*> memento,
const
Window::SectionShow ¶ms);
void
ui_hideSettingsAndLayer
(anim::type animated);
void
ui_removeLayerBlackout
();
[[nodiscard]]
bool
ui_isLayerShown
()
const
;
[[nodiscard]]
rpl::producer<
bool
>
ui_boxShownValue
()
const
;
bool
closeLayerByBackButton
();
bool
showMediaPreview
(
Data::FileOrigin origin,
not_null<DocumentData*> document);
bool
showMediaPreview
(
Data::FileOrigin origin,
not_null<PhotoData*> photo);
void
hideMediaPreview
();
void
updateControlsGeometry
()
override
;
protected:
bool
eventFilter
(QObject *o, QEvent *e)
override
;
void
closeEvent
(QCloseEvent *e)
override
;
void
initHook
()
override
;
void
clearWidgetsHook
()
override
;
private:
void
applyInitialWorkMode
();
void
ensureLayerCreated
();
void
destroyLayer
();
void
themeUpdated
(
const
Window::Theme::BackgroundUpdate &data);
QPoint _lastMousePosition;
object_ptr<Window::PasscodeLockWidget> _passcodeLock = {
nullptr
};
object_ptr<Window::SetupEmailLockWidget> _setupEmailLock = {
nullptr
};
object_ptr<Intro::Widget> _intro = {
nullptr
};
object_ptr<MainWidget> _main = {
nullptr
};
base::unique_qptr<Ui::LayerStackWidget> _layer;
rpl::variable<
bool
> _boxShown =
false
;
object_ptr<Window::MediaPreviewWidget> _mediaPreview = {
nullptr
};
object_ptr<Window::Theme::WarningWidget> _testingThemeWarning = {
nullptr
};
};
Back
|
FazBrowse Home
|
New Git URL