/* 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 namespace Window { class Adaptive { public: enum class WindowLayout { OneColumn, Normal, ThreeColumn, }; enum class ChatLayout { Normal, Wide, }; Adaptive(); void setWindowLayout(WindowLayout value); void setChatLayout(ChatLayout value); [[nodiscard]] rpl::producer<> value() const; [[nodiscard]] rpl::producer<> changes() const; [[nodiscard]] rpl::producer oneColumnValue() const; [[nodiscard]] rpl::producer chatLayoutValue() const; [[nodiscard]] bool isOneColumn() const; [[nodiscard]] bool isNormal() const; [[nodiscard]] bool isThreeColumn() const; [[nodiscard]] rpl::producer chatWideValue() const; [[nodiscard]] bool isChatWide() const; private: rpl::variable _chatLayout; rpl::variable _layout; }; } // namespace Window