bump product version to 4.2.0.1
[LibreOffice.git] / include / sfx2 / infobar.hxx
blob9cd504d50b8f223de850e590ff1a9e0b58e27cca
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
9 #ifndef INCLUDED_SFX2_INFOBAR_HXX
10 #define INCLUDED_SFX2_INFOBAR_HXX
12 #include <vector>
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
24 private:
25 SfxBindings* m_pBindings;
27 public:
28 SfxInfoBarContainerChild( Window* pParent,
29 sal_uInt16 nId,
30 SfxBindings* pBindings,
31 SfxChildWinInfo* pInfo );
32 virtual ~SfxInfoBarContainerChild();
34 SFX_DECL_CHILDWINDOW_WITHID( SfxInfoBarContainerChild );
36 void Update( );
39 /** Class representing a single InfoBar to be added in a SfxInfoBarContainerWindow.
41 class SfxInfoBarWindow : public Window
43 private:
44 OUString m_sId;
45 FixedText* m_pMessage;
46 Button* m_pCloseBtn;
47 std::vector< PushButton* > m_aActionBtns;
49 public:
50 SfxInfoBarWindow( Window* parent, const OUString& sId,
51 const OUString& sMessage,
52 std::vector< PushButton* > aButtons );
53 ~SfxInfoBarWindow( );
55 virtual const OUString& getId() const { return m_sId; }
56 virtual void Paint( const Rectangle& );
57 virtual void Resize( );
59 private:
60 DECL_LINK( CloseHandler, void* );
63 class SfxInfoBarContainerWindow : public Window
65 private:
66 SfxInfoBarContainerChild* m_pChildWin;
67 std::vector< SfxInfoBarWindow* > m_pInfoBars;
69 public:
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( );
81 #endif
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */