1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 #ifndef INCLUDED_SFX2_INFOBAR_HXX
10 #define INCLUDED_SFX2_INFOBAR_HXX
14 #include <vcl/button.hxx>
15 #include <vcl/fixed.hxx>
17 #include <sfx2/dllapi.h>
18 #include <sfx2/childwin.hxx>
20 /** SfxChildWindow for positioning the InfoBar in the view.
22 class SFX2_DLLPUBLIC SfxInfoBarContainerChild
: public SfxChildWindow
25 SfxBindings
* m_pBindings
;
28 SfxInfoBarContainerChild( Window
* pParent
,
30 SfxBindings
* pBindings
,
31 SfxChildWinInfo
* pInfo
);
32 virtual ~SfxInfoBarContainerChild();
34 SFX_DECL_CHILDWINDOW_WITHID( SfxInfoBarContainerChild
);
39 /** Class representing a single InfoBar to be added in a SfxInfoBarContainerWindow.
41 class SfxInfoBarWindow
: public Window
45 FixedText
* m_pMessage
;
47 std::vector
< PushButton
* > m_aActionBtns
;
50 SfxInfoBarWindow( Window
* parent
, const OUString
& sId
,
51 const OUString
& sMessage
,
52 std::vector
< PushButton
* > aButtons
);
55 virtual const OUString
& getId() const { return m_sId
; }
56 virtual void Paint( const Rectangle
& );
57 virtual void Resize( );
60 DECL_LINK( CloseHandler
, void* );
63 class SfxInfoBarContainerWindow
: public Window
66 SfxInfoBarContainerChild
* m_pChildWin
;
67 std::vector
< SfxInfoBarWindow
* > m_pInfoBars
;
70 SfxInfoBarContainerWindow( SfxInfoBarContainerChild
* pChildWin
);
71 ~SfxInfoBarContainerWindow( );
73 void appendInfoBar( const OUString
& sId
, const OUString
& sMessage
, std::vector
< PushButton
* > aButtons
);
74 SfxInfoBarWindow
* getInfoBar( const OUString
& sId
);
75 void removeInfoBar( SfxInfoBarWindow
* pInfoBar
);
77 virtual void Resize( );
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */