2017-09-13 17:01:23 +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.
|
2017-09-13 17:01:23 +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
|
2017-09-13 17:01:23 +00:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2017-09-30 18:26:45 +00:00
|
|
|
#include "window/layer_widget.h"
|
2017-09-13 17:01:23 +00:00
|
|
|
|
|
|
|
namespace Window {
|
|
|
|
class Controller;
|
|
|
|
} // namespace Window
|
|
|
|
|
|
|
|
namespace Info {
|
|
|
|
|
|
|
|
class Memento;
|
2017-09-15 17:34:41 +00:00
|
|
|
class MoveMemento;
|
2017-09-30 18:26:45 +00:00
|
|
|
class WrapWidget;
|
2017-09-13 17:01:23 +00:00
|
|
|
class TopBar;
|
|
|
|
|
2017-09-30 18:26:45 +00:00
|
|
|
class LayerWidget : public Window::LayerWidget {
|
2017-09-13 17:01:23 +00:00
|
|
|
public:
|
2017-09-30 18:26:45 +00:00
|
|
|
LayerWidget(
|
2017-09-13 17:01:23 +00:00
|
|
|
not_null<Window::Controller*> controller,
|
|
|
|
not_null<Memento*> memento);
|
2017-09-30 18:26:45 +00:00
|
|
|
LayerWidget(
|
2017-09-15 17:34:41 +00:00
|
|
|
not_null<Window::Controller*> controller,
|
|
|
|
not_null<MoveMemento*> memento);
|
2017-09-13 17:01:23 +00:00
|
|
|
|
|
|
|
void showFinished() override;
|
|
|
|
void parentResized() override;
|
|
|
|
|
2017-09-19 10:32:34 +00:00
|
|
|
bool takeToThirdSection() override;
|
2017-10-03 13:05:58 +00:00
|
|
|
bool showSectionInternal(
|
|
|
|
not_null<Window::SectionMemento*> memento,
|
|
|
|
const Window::SectionShow ¶ms) override;
|
2017-09-19 10:32:34 +00:00
|
|
|
|
2018-09-12 16:14:11 +00:00
|
|
|
bool closeByOutsideClick() const override;
|
|
|
|
|
2017-09-15 17:34:41 +00:00
|
|
|
static int MinimalSupportedWidth();
|
|
|
|
|
2017-09-13 17:01:23 +00:00
|
|
|
protected:
|
2017-09-15 17:34:41 +00:00
|
|
|
int resizeGetHeight(int newWidth) override;
|
2018-09-06 13:48:01 +00:00
|
|
|
void doSetInnerFocus() override;
|
2017-09-13 17:01:23 +00:00
|
|
|
|
2017-09-15 17:34:41 +00:00
|
|
|
void paintEvent(QPaintEvent *e) override;
|
2017-09-13 17:01:23 +00:00
|
|
|
|
|
|
|
private:
|
2017-09-15 17:34:41 +00:00
|
|
|
void setupHeightConsumers();
|
|
|
|
|
|
|
|
not_null<Window::Controller*> _controller;
|
2017-09-30 18:26:45 +00:00
|
|
|
object_ptr<WrapWidget> _content;
|
2017-09-13 17:01:23 +00:00
|
|
|
|
|
|
|
int _desiredHeight = 0;
|
2017-11-23 12:48:56 +00:00
|
|
|
bool _inResize = false;
|
|
|
|
bool _tillBottom = false;
|
2017-09-13 17:01:23 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Info
|