/* 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 "editor/photo_editor_common.h" namespace Ui { class IconButton; } // namespace Ui namespace Editor { class EdgeButton; class HorizontalContainer; struct Controllers; class PhotoEditorControls final : public Ui::RpWidget { public: PhotoEditorControls( not_null parent, std::shared_ptr controllers, const PhotoModifications modifications, bool doneControls = true); [[nodiscard]] rpl::producer rotateRequests() const; [[nodiscard]] rpl::producer<> flipRequests() const; [[nodiscard]] rpl::producer<> paintModeRequests() const; [[nodiscard]] rpl::producer<> doneRequests() const; [[nodiscard]] rpl::producer<> cancelRequests() const; void applyMode(const PhotoEditorMode &mode); private: const style::color &_bg; const base::unique_qptr _transformButtons; const base::unique_qptr _paintButtons; const base::unique_qptr _rotateButton; const base::unique_qptr _flipButton; const base::unique_qptr _paintModeButton; const base::unique_qptr _undoButton; const base::unique_qptr _redoButton; const base::unique_qptr _paintModeButtonActive; const base::unique_qptr _stickersButton; const base::unique_qptr _cancel; const base::unique_qptr _done; bool _flipped = false; rpl::variable _mode; }; } // namespace Editor