/* -*- 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 class FixedImage; class FixedText; class Button; class PushButton; // These must match the values in offapi/com/sun/star/frame/InfobarType.idl enum class InfobarType { INFO = 0, SUCCESS = 1, WARNING = 2, DANGER = 3 }; class InfobarData { public: OUString msId; OUString msPrimaryMessage; OUString msSecondaryMessage; InfobarType maInfobarType; bool mbShowCloseButton; }; /** SfxChildWindow for positioning the InfoBar in the view. */ class SFX2_DLLPUBLIC SfxInfoBarContainerChild final : 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 SFX2_DLLPUBLIC SfxInfoBarWindow final : public vcl::Window { private: OUString m_sId; InfobarType m_eType; VclPtr m_pImage; VclPtr m_pPrimaryMessage; VclPtr m_pSecondaryMessage; VclPtr