/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef INCLUDED_SFX2_INFOBAR_HXX #define INCLUDED_SFX2_INFOBAR_HXX #include #include #include #include #include #include enum class InfoBarType { Info, Success, Warning, Danger }; /** SfxChildWindow for positioning the InfoBar in the view. */ class SFX2_DLLPUBLIC SfxInfoBarContainerChild : public SfxChildWindow { private: SfxBindings* m_pBindings; public: SfxInfoBarContainerChild( vcl::Window* pParent, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ); virtual ~SfxInfoBarContainerChild() override; SFX_DECL_CHILDWINDOW_WITHID( SfxInfoBarContainerChild ); void Update( ); }; /** Class representing a single InfoBar to be added in a SfxInfoBarContainerWindow. */ class SfxInfoBarWindow : public vcl::Window { private: OUString m_sId; InfoBarType m_eType; VclPtr m_pImage; VclPtr m_pMessage; VclPtr