LibreOffice Module framework (master) 1
vclstatusindicator.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <com/sun/star/task/XStatusIndicator.hpp>
23#include <com/sun/star/awt/XWindow.hpp>
24
26#include <vcl/status.hxx>
27
28namespace framework {
29
30// declaration
31
32class VCLStatusIndicator final : public ::cppu::WeakImplHelper< css::task::XStatusIndicator >
33{
34
35 // member
36
37 private:
38
41 css::uno::Reference< css::awt::XWindow > m_xParentWindow;
42
50
52 sal_Int32 m_nRange;
53
55 sal_Int32 m_nValue;
56
57 // interface
58
59 public:
60
62 VCLStatusIndicator(css::uno::Reference< css::awt::XWindow > xParentWindow);
63
65 virtual ~VCLStatusIndicator() override;
66
68 virtual void SAL_CALL start(const OUString& sText ,
69 sal_Int32 nRange) override;
70
71 virtual void SAL_CALL reset() override;
72
73 virtual void SAL_CALL end() override;
74
75 virtual void SAL_CALL setText(const OUString& sText) override;
76
77 virtual void SAL_CALL setValue(sal_Int32 nValue) override;
78
79 // helper
80
81 private:
82
83 static void impl_recalcLayout(vcl::Window* pStatusBar ,
84 vcl::Window const * pParentWindow);
85};
86
87} // namespace framework
88
89/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL start(const OUString &sText, sal_Int32 nRange) override
XStatusIndicator.
static void impl_recalcLayout(vcl::Window *pStatusBar, vcl::Window const *pParentWindow)
virtual void SAL_CALL end() override
virtual void SAL_CALL setText(const OUString &sText) override
virtual void SAL_CALL setValue(sal_Int32 nValue) override
VclPtr< StatusBar > m_pStatusBar
shows the progress.
css::uno::Reference< css::awt::XWindow > m_xParentWindow
points to the parent window of this progress and hold it alive.
VCLStatusIndicator(css::uno::Reference< css::awt::XWindow > xParentWindow)
ctor
virtual ~VCLStatusIndicator() override
dtor
sal_Int32 m_nValue
knows the current value of the progress.
virtual void SAL_CALL reset() override
sal_Int32 m_nRange
knows the current range of the progress.