1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: prgsbar.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
34 #include "svtools/svtdllapi.h"
35 #include <vcl/window.hxx>
37 /*************************************************************************
44 Diese Klasse dient zur Anzeige einer Progress-Anzeige.
46 --------------------------------------------------------------------------
50 WB_BORDER Border um das Fenster
51 WB_3DLOOK 3D-Darstellung
53 --------------------------------------------------------------------------
57 Mit SetValue() setzt man einen Prozent-Wert zwischen 0 und 100. Wenn Werte
58 groesser 100 gesetzt werden, faengt das letzte Rechteck an zu blinken.
60 *************************************************************************/
66 #define WB_STDPROGRESSBAR WB_BORDER
72 class SVT_DLLPUBLIC ProgressBar
: public Window
79 USHORT mnPercentCount
;
82 #ifdef _SV_PRGSBAR_CXX
83 using Window::ImplInit
;
84 SVT_DLLPRIVATE
void ImplInit();
85 SVT_DLLPRIVATE
void ImplInitSettings( BOOL bFont
, BOOL bForeground
, BOOL bBackground
);
86 SVT_DLLPRIVATE
void ImplDrawProgress( USHORT nOldPerc
, USHORT nNewPerc
);
90 ProgressBar( Window
* pParent
, WinBits nWinBits
= WB_STDPROGRESSBAR
);
91 ProgressBar( Window
* pParent
, const ResId
& rResId
);
94 virtual void Paint( const Rectangle
& rRect
);
95 virtual void Resize();
96 virtual void StateChanged( StateChangedType nStateChange
);
97 virtual void DataChanged( const DataChangedEvent
& rDCEvt
);
99 void SetValue( USHORT nNewPercent
);
100 USHORT
GetValue() const { return mnPercent
; }
103 #endif // _PRGSBAR_HXX