xref: /aoo42x/main/sfx2/inc/progind.hxx (revision 353d8f4d)
1*353d8f4dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*353d8f4dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*353d8f4dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*353d8f4dSAndrew Rist  * distributed with this work for additional information
6*353d8f4dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*353d8f4dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*353d8f4dSAndrew Rist  * "License"); you may not use this file except in compliance
9*353d8f4dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*353d8f4dSAndrew Rist  *
11*353d8f4dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*353d8f4dSAndrew Rist  *
13*353d8f4dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*353d8f4dSAndrew Rist  * software distributed under the License is distributed on an
15*353d8f4dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*353d8f4dSAndrew Rist  * KIND, either express or implied.  See the License for the
17*353d8f4dSAndrew Rist  * specific language governing permissions and limitations
18*353d8f4dSAndrew Rist  * under the License.
19*353d8f4dSAndrew Rist  *
20*353d8f4dSAndrew Rist  *************************************************************/
21*353d8f4dSAndrew Rist 
22*353d8f4dSAndrew Rist 
23cdf0e10cSrcweir #ifndef _SFX_PROGIND_HXX
24cdf0e10cSrcweir #define _SFX_PROGIND_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <com/sun/star/task/XStatusIndicatorFactory.hpp>
27cdf0e10cSrcweir #include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
28cdf0e10cSrcweir #include <com/sun/star/task/XStatusIndicator.hpp>
29cdf0e10cSrcweir #include <vcl/window.hxx>
30cdf0e10cSrcweir #include <vcl/fixed.hxx>
31cdf0e10cSrcweir #include <svtools/prgsbar.hxx>
32cdf0e10cSrcweir #include <cppuhelper/weak.hxx>
33cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx>
34cdf0e10cSrcweir 
35cdf0e10cSrcweir #include <sfx2/sfxuno.hxx>
36cdf0e10cSrcweir 
37cdf0e10cSrcweir class SfxStatusInd_Impl : public cppu::WeakImplHelper1< ::com::sun::star::task::XStatusIndicator >
38cdf0e10cSrcweir {
39cdf0e10cSrcweir 	long						nValue;
40cdf0e10cSrcweir 	long 						nRange;
41cdf0e10cSrcweir 	sal_uInt16					nProgressCount;
42cdf0e10cSrcweir 
43cdf0e10cSrcweir friend class SfxPopupStatusIndicator;
44cdf0e10cSrcweir 	SfxPopupStatusIndicator*	pWindow;
45cdf0e10cSrcweir 
46cdf0e10cSrcweir public:
47cdf0e10cSrcweir 
48cdf0e10cSrcweir 	SfxStatusInd_Impl();
49cdf0e10cSrcweir 
50cdf0e10cSrcweir 	// XStatusIndicator
51cdf0e10cSrcweir 	virtual void SAL_CALL start(const ::rtl::OUString& aText, sal_Int32 nRange) throw ( ::com::sun::star::uno::RuntimeException );
52cdf0e10cSrcweir 	virtual void SAL_CALL end(void) throw ( ::com::sun::star::uno::RuntimeException );
53cdf0e10cSrcweir 	virtual void SAL_CALL setText(const ::rtl::OUString& aText) throw ( ::com::sun::star::uno::RuntimeException );
54cdf0e10cSrcweir 	virtual void SAL_CALL setValue(sal_Int32 nValue) throw ( ::com::sun::star::uno::RuntimeException );
55cdf0e10cSrcweir 	virtual void SAL_CALL reset() throw ( ::com::sun::star::uno::RuntimeException );
56cdf0e10cSrcweir };
57cdf0e10cSrcweir 
58cdf0e10cSrcweir class SfxPopupStatusIndicator : public Window
59cdf0e10cSrcweir {
60cdf0e10cSrcweir friend class SfxStatusInd_Impl;
61cdf0e10cSrcweir 	FixedText					aTextBar;
62cdf0e10cSrcweir 	ProgressBar					aProgressBar;
63cdf0e10cSrcweir 	SfxStatusInd_Impl*			pInterface;
64cdf0e10cSrcweir 
65cdf0e10cSrcweir public:
66cdf0e10cSrcweir 								SfxPopupStatusIndicator( Window* pParent );
67cdf0e10cSrcweir 								~SfxPopupStatusIndicator();
68cdf0e10cSrcweir 
69cdf0e10cSrcweir 	virtual void				MakeVisible( sal_Bool bVisible );
70cdf0e10cSrcweir 	virtual void				Resize();
71cdf0e10cSrcweir 	virtual void				Paint( const Rectangle& rRect );
72cdf0e10cSrcweir 	Size						CalcWindowSizePixel();
GetInterface()73cdf0e10cSrcweir 	::com::sun::star::task::XStatusIndicator*			GetInterface()
74cdf0e10cSrcweir 								{ return pInterface; }
75cdf0e10cSrcweir };
76cdf0e10cSrcweir 
77cdf0e10cSrcweir 
78cdf0e10cSrcweir #endif
79cdf0e10cSrcweir 
80