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 * 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>
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>
38 class VCLStatusIndicator
: public ::cppu::WeakImplHelper1
< css::task::XStatusIndicator
>
45 /** points to the parent window of this progress and
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. */
60 /** knows the current range of the progress. */
63 /** knows the current value of the progress. */
71 VCLStatusIndicator(const css::uno::Reference
< css::awt::XWindow
>& xParentWindow
);
74 virtual ~VCLStatusIndicator();
77 virtual void SAL_CALL
start(const OUString
& sText
,
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
;
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: */