update emoji autocorrect entries from po-files
[LibreOffice.git] / include / sfx2 / infobar.hxx
blob1d3adc6b44121f2341b2ca6132a1ce19eeeb89cc
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 #include <boost/ptr_container/ptr_vector.hpp>
22 /** SfxChildWindow for positioning the InfoBar in the view.
24 class SFX2_DLLPUBLIC SfxInfoBarContainerChild : public SfxChildWindow
26 private:
27 SfxBindings* m_pBindings;
29 public:
30 SfxInfoBarContainerChild( vcl::Window* pParent,
31 sal_uInt16 nId,
32 SfxBindings* pBindings,
33 SfxChildWinInfo* pInfo );
34 virtual ~SfxInfoBarContainerChild();
36 SFX_DECL_CHILDWINDOW_WITHID( SfxInfoBarContainerChild );
38 void Update( );
41 /** Class representing a single InfoBar to be added in a SfxInfoBarContainerWindow.
43 class SfxInfoBarWindow : public vcl::Window
45 private:
46 OUString m_sId;
47 VclPtr<FixedText> m_pMessage;
48 VclPtr<Button> m_pCloseBtn;
49 std::vector< VclPtr<PushButton> > m_aActionBtns;
51 public:
52 SfxInfoBarWindow( vcl::Window* parent, const OUString& sId,
53 const OUString& sMessage );
54 virtual ~SfxInfoBarWindow( );
55 virtual void dispose() SAL_OVERRIDE;
57 const OUString& getId() const { return m_sId; }
58 virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) SAL_OVERRIDE;
59 virtual void Resize( ) SAL_OVERRIDE;
61 /** Add button to Infobar.
62 * Infobar takes ownership of the button so the button is
63 * destroyed when the infobar gets destroyed.
65 void addButton(PushButton* pButton);
67 private:
68 DECL_LINK( CloseHandler, void* );
71 class SfxInfoBarContainerWindow : public vcl::Window
73 private:
74 SfxInfoBarContainerChild* m_pChildWin;
75 std::vector< VclPtr<SfxInfoBarWindow> > m_pInfoBars;
77 public:
78 SfxInfoBarContainerWindow(SfxInfoBarContainerChild* pChildWin);
79 virtual ~SfxInfoBarContainerWindow( );
80 virtual void dispose() SAL_OVERRIDE;
82 SfxInfoBarWindow* appendInfoBar(const OUString& sId, const OUString& sMessage);
83 SfxInfoBarWindow* getInfoBar(const OUString& sId);
84 void removeInfoBar(SfxInfoBarWindow* pInfoBar);
86 virtual void Resize() SAL_OVERRIDE;
90 #endif
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */