2015-04-02 10:33:19 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2018-01-03 10:23:14 +00:00
|
|
|
the official desktop application for the Telegram messaging service.
|
2015-04-02 10:33:19 +00:00
|
|
|
|
2018-01-03 10:23:14 +00:00
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
2015-04-02 10:33:19 +00:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2019-09-18 11:19:05 +00:00
|
|
|
#include "ui/layers/box_layer_widget.h"
|
2017-09-30 18:26:45 +00:00
|
|
|
|
2019-09-16 11:14:06 +00:00
|
|
|
class Painter;
|
|
|
|
|
2017-09-30 18:26:45 +00:00
|
|
|
namespace style {
|
|
|
|
struct RoundButton;
|
2019-01-11 09:04:28 +00:00
|
|
|
struct IconButton;
|
2017-09-30 18:26:45 +00:00
|
|
|
struct ScrollArea;
|
|
|
|
} // namespace style
|
2015-04-02 10:33:19 +00:00
|
|
|
|
2016-10-31 12:29:26 +00:00
|
|
|
namespace Ui {
|
2016-12-13 17:07:56 +00:00
|
|
|
class RoundButton;
|
2016-11-08 14:43:10 +00:00
|
|
|
class IconButton;
|
2016-11-16 10:44:06 +00:00
|
|
|
class ScrollArea;
|
2017-05-17 14:32:36 +00:00
|
|
|
class FlatLabel;
|
2017-09-30 18:26:45 +00:00
|
|
|
class FadeShadow;
|
2016-10-31 12:29:26 +00:00
|
|
|
} // namespace Ui
|
|
|
|
|
2019-09-13 06:06:02 +00:00
|
|
|
// Legacy global method.
|
|
|
|
namespace Ui {
|
|
|
|
namespace internal {
|
|
|
|
|
|
|
|
void showBox(
|
|
|
|
object_ptr<BoxContent> content,
|
2019-09-18 11:19:05 +00:00
|
|
|
Ui::LayerOptions options,
|
2019-09-13 06:06:02 +00:00
|
|
|
anim::type animated);
|
|
|
|
|
|
|
|
} // namespace internal
|
|
|
|
|
|
|
|
template <typename BoxType>
|
|
|
|
QPointer<BoxType> show(
|
|
|
|
object_ptr<BoxType> content,
|
2019-09-18 11:19:05 +00:00
|
|
|
Ui::LayerOptions options = Ui::LayerOption::CloseOther,
|
2019-09-13 06:06:02 +00:00
|
|
|
anim::type animated = anim::type::normal) {
|
|
|
|
auto result = QPointer<BoxType>(content.data());
|
|
|
|
internal::showBox(std::move(content), options, animated);
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
void hideLayer(anim::type animated = anim::type::normal);
|
|
|
|
|
|
|
|
} // namespace Ui
|