Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / sfx2 / inc / progind.hxx
blobe06665e41779a784a6b84515470b09029700ced4
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef _SFX_PROGIND_HXX
29 #define _SFX_PROGIND_HXX
31 #include <com/sun/star/task/XStatusIndicatorFactory.hpp>
32 #include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
33 #include <com/sun/star/task/XStatusIndicator.hpp>
34 #include <vcl/window.hxx>
35 #include <vcl/fixed.hxx>
36 #include <svtools/prgsbar.hxx>
37 #include <cppuhelper/weak.hxx>
38 #include <cppuhelper/implbase1.hxx>
40 #include <sfx2/sfxuno.hxx>
42 class SfxStatusInd_Impl : public cppu::WeakImplHelper1< ::com::sun::star::task::XStatusIndicator >
44 long nValue;
45 long nRange;
46 sal_uInt16 nProgressCount;
48 friend class SfxPopupStatusIndicator;
49 SfxPopupStatusIndicator* pWindow;
51 public:
53 SfxStatusInd_Impl();
55 // XStatusIndicator
56 virtual void SAL_CALL start(const ::rtl::OUString& aText, sal_Int32 nRange) throw ( ::com::sun::star::uno::RuntimeException );
57 virtual void SAL_CALL end(void) throw ( ::com::sun::star::uno::RuntimeException );
58 virtual void SAL_CALL setText(const ::rtl::OUString& aText) throw ( ::com::sun::star::uno::RuntimeException );
59 virtual void SAL_CALL setValue(sal_Int32 nValue) throw ( ::com::sun::star::uno::RuntimeException );
60 virtual void SAL_CALL reset() throw ( ::com::sun::star::uno::RuntimeException );
63 class SfxPopupStatusIndicator : public Window
65 friend class SfxStatusInd_Impl;
66 FixedText aTextBar;
67 ProgressBar aProgressBar;
68 SfxStatusInd_Impl* pInterface;
70 public:
71 SfxPopupStatusIndicator( Window* pParent );
72 ~SfxPopupStatusIndicator();
74 virtual void MakeVisible( sal_Bool bVisible );
75 virtual void Resize();
76 virtual void Paint( const Rectangle& rRect );
77 Size CalcWindowSizePixel();
78 ::com::sun::star::task::XStatusIndicator* GetInterface()
79 { return pInterface; }
83 #endif
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */