fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / framework / inc / helper / vclstatusindicator.hxx
blobc5e115567a5ea76f7fa35e936ff30b093ffcc5a5
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 .
20 #ifndef INCLUDED_FRAMEWORK_INC_HELPER_VCLSTATUSINDICATOR_HXX
21 #define INCLUDED_FRAMEWORK_INC_HELPER_VCLSTATUSINDICATOR_HXX
23 #include <macros/generic.hxx>
24 #include <macros/xinterface.hxx>
25 #include <general.h>
27 #include <com/sun/star/task/XStatusIndicator.hpp>
28 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
29 #include <com/sun/star/awt/XWindow.hpp>
31 #include <cppuhelper/implbase1.hxx>
32 #include <vcl/status.hxx>
34 namespace framework {
36 // declaration
38 class VCLStatusIndicator : public ::cppu::WeakImplHelper1< css::task::XStatusIndicator >
41 // member
43 private:
45 /** points to the parent window of this progress and
46 hold it alive. */
47 css::uno::Reference< css::awt::XWindow > m_xParentWindow;
49 /** shows the progress.
51 @attention This member is not synchronized using our own mutex!
52 Its guarded by the solarmutex only. Otherwise
53 we have to lock two of them, which can force a deadlock ...
55 VclPtr<StatusBar> m_pStatusBar;
57 /** knows the current info text of the progress. */
58 OUString m_sText;
60 /** knows the current range of the progress. */
61 sal_Int32 m_nRange;
63 /** knows the current value of the progress. */
64 sal_Int32 m_nValue;
66 // interface
68 public:
70 /// ctor
71 VCLStatusIndicator(const css::uno::Reference< css::awt::XWindow >& xParentWindow);
73 /// dtor
74 virtual ~VCLStatusIndicator();
76 /// XStatusIndicator
77 virtual void SAL_CALL start(const OUString& sText ,
78 sal_Int32 nRange)
79 throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
81 virtual void SAL_CALL reset()
82 throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
84 virtual void SAL_CALL end()
85 throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
87 virtual void SAL_CALL setText(const OUString& sText)
88 throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
90 virtual void SAL_CALL setValue(sal_Int32 nValue)
91 throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
93 // helper
95 private:
97 static void impl_recalcLayout(vcl::Window* pStatusBar ,
98 vcl::Window* pParentWindow);
101 } // namespace framework
103 #endif // INCLUDED_FRAMEWORK_INC_HELPER_VCLSTATUSINDICATOR_HXX
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */