Introduced Ui::Show interface.

This commit is contained in:
23rd 2022-03-03 16:45:18 +03:00
parent 214c5e8e22
commit f0b800cdfb
2 changed files with 33 additions and 0 deletions

View file

@ -86,6 +86,7 @@ PRIVATE
ui/layers/layer_manager.h
ui/layers/layer_widget.cpp
ui/layers/layer_widget.h
ui/layers/show.h
ui/paint/arcs.cpp
ui/paint/arcs.h
ui/paint/blob.cpp

32
ui/layers/show.h Normal file
View file

@ -0,0 +1,32 @@
// This file is part of Desktop App Toolkit,
// a set of libraries for developing nice desktop applications.
//
// For license and copyright information please follow this link:
// https://github.com/desktop-app/legal/blob/master/LEGAL
//
#pragma once
#include "ui/layers/layer_widget.h"
namespace Ui {
class BoxContent;
class Show {
public:
virtual ~Show() = 0;
virtual void showBox(
object_ptr<BoxContent> content,
LayerOptions options = LayerOption::KeepOther) const = 0;
virtual void hideLayer() const = 0;
[[nodiscard]] virtual not_null<QWidget*> toastParent() const = 0;
[[nodiscard]] virtual bool valid() const = 0;
virtual operator bool() const = 0;
};
inline Show::~Show() = default;
using ShowPtr = std::shared_ptr<Show>;
} // namespace Ui