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 _FRAMEWORK_UIELEMENT_PROGRESSBARWRAPPER_HXX_
21 #define _FRAMEWORK_UIELEMENT_PROGRESSBARWRAPPER_HXX_
23 #include <helper/uielementwrapperbase.hxx>
24 #include <threadhelp/threadhelpbase.hxx>
25 #include <macros/generic.hxx>
26 #include <macros/xinterface.hxx>
27 #include <macros/xtypeprovider.hxx>
28 #include <macros/debug.hxx>
30 #include <com/sun/star/task/XStatusIndicator.hpp>
31 #include <com/sun/star/awt/XWindow.hpp>
33 #include <cppuhelper/weak.hxx>
34 #include <cppuhelper/weakref.hxx>
38 class ProgressBarWrapper
: public UIElementWrapperBase
41 //---------------------------------------------------------------------------------------------------------
42 // constructor / destructor
43 //---------------------------------------------------------------------------------------------------------
45 virtual ~ProgressBarWrapper();
48 void setStatusBar( const ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XWindow
>& rStatusBar
, sal_Bool bOwnsInstance
= sal_False
);
49 ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XWindow
> getStatusBar() const;
51 // wrapped methods of ::com::sun::star::task::XStatusIndicator
52 void start( const OUString
& Text
, ::sal_Int32 Range
) throw (::com::sun::star::uno::RuntimeException
);
53 void end() throw (::com::sun::star::uno::RuntimeException
);
54 void setText( const OUString
& Text
) throw (::com::sun::star::uno::RuntimeException
);
55 void setValue( ::sal_Int32 Value
) throw (::com::sun::star::uno::RuntimeException
);
56 void reset() throw (::com::sun::star::uno::RuntimeException
);
60 virtual void SAL_CALL
dispose() throw (::com::sun::star::uno::RuntimeException
);
63 virtual void SAL_CALL
initialize( const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
>& aArguments
) throw (::com::sun::star::uno::Exception
, ::com::sun::star::uno::RuntimeException
);
66 virtual void SAL_CALL
update() throw (::com::sun::star::uno::RuntimeException
);
69 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
getRealInterface() throw (::com::sun::star::uno::RuntimeException
);
71 //-------------------------------------------------------------------------------------------------------------
73 // (should be private everyway!)
74 //-------------------------------------------------------------------------------------------------------------
76 ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XWindow
> m_xStatusBar
; // Reference to our status bar XWindow
77 ::com::sun::star::uno::WeakReference
< ::com::sun::star::uno::XInterface
> m_xProgressBarIfacWrapper
;
78 sal_Bool m_bOwnsInstance
; // Indicator that we are owner of the XWindow
82 }; // class ProgressBarWrapper
84 } // namespace framework
86 #endif // _FRAMEWORK_UIELEMENT_PROGRESSBARWRAPPER_HXX_
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */