/* 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 "ui/rp_widget.h" #include "base/object_ptr.h" namespace Main { class Session; } // namespace Main namespace Ui { class VerticalLayout; class FlatLabel; class SettingsButton; class AbstractButton; } // namespace Ui namespace Window { class SessionController; } // namespace Window namespace style { struct SettingsButton; } // namespace style namespace Settings { enum class Type { Main, Information, Notifications, PrivacySecurity, Sessions, Advanced, Chat, Folders, Calls, }; using Button = Ui::SettingsButton; class Section : public Ui::RpWidget { public: using RpWidget::RpWidget; virtual rpl::producer sectionShowOther() { return nullptr; } virtual rpl::producer sectionCanSaveChanges() { return rpl::single(false); } virtual void sectionSaveChanges(FnMut done) { done(); } }; object_ptr
CreateSection( Type type, not_null parent, not_null controller); void AddSkip(not_null container); void AddSkip(not_null container, int skip); void AddDivider(not_null container); void AddDividerText( not_null container, rpl::producer text); not_null AddButtonIcon( not_null button, const style::icon *leftIcon, int iconLeft, const style::color *leftIconOver); object_ptr