tdf#120787: fine-tune window flags w/ focus on floating toolbars
[LibreOffice.git] / framework / inc / uielement / statusbaritem.hxx
blob961f39b7bba04a6ae26ad38c557dc63699b01177
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_FRAMEWORK_INC_UIELEMENT_STATUSBARITEM_HXX
20 #define INCLUDED_FRAMEWORK_INC_UIELEMENT_STATUSBARITEM_HXX
22 #include <com/sun/star/ui/XStatusbarItem.hpp>
23 #include <cppuhelper/compbase.hxx>
24 #include <cppuhelper/basemutex.hxx>
25 #include <vcl/vclptr.hxx>
27 class StatusBar;
29 namespace framework
32 struct AddonStatusbarItemData;
34 typedef cppu::WeakComponentImplHelper< css::ui::XStatusbarItem > StatusbarItem_Base;
36 class StatusbarItem : protected cppu::BaseMutex,
37 public StatusbarItem_Base
39 public:
40 explicit StatusbarItem(
41 StatusBar *pStatusBar,
42 sal_uInt16 nId,
43 const OUString& aCommand );
44 virtual ~StatusbarItem() override;
46 void SAL_CALL disposing() override;
48 // css::ui::XStatusbarItem Attributes
49 virtual OUString SAL_CALL getCommand() override;
50 virtual ::sal_uInt16 SAL_CALL getItemId() override;
51 virtual ::sal_uInt32 SAL_CALL getWidth() override;
52 virtual ::sal_uInt16 SAL_CALL getStyle() override;
53 virtual ::sal_Int32 SAL_CALL getOffset() override;
54 virtual css::awt::Rectangle SAL_CALL getItemRect() override;
55 virtual OUString SAL_CALL getText() override;
56 virtual void SAL_CALL setText( const OUString& rText ) override;
57 virtual OUString SAL_CALL getHelpText() override;
58 virtual void SAL_CALL setHelpText( const OUString& rHelpText ) override;
59 virtual OUString SAL_CALL getQuickHelpText() override;
60 virtual void SAL_CALL setQuickHelpText( const OUString& rQuickHelpText ) override;
61 virtual OUString SAL_CALL getAccessibleName() override;
62 virtual void SAL_CALL setAccessibleName( const OUString& rAccessibleName ) override;
63 virtual sal_Bool SAL_CALL getVisible() override;
64 virtual void SAL_CALL setVisible( sal_Bool bVisible ) override;
66 // css::ui::XStatusbarItem Methods
67 virtual void SAL_CALL repaint( ) override;
69 private:
70 VclPtr<StatusBar> m_pStatusBar;
71 sal_uInt16 m_nId;
72 sal_uInt16 m_nStyle;
73 OUString m_aCommand;
79 #endif
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */