2003-07-31 23:52:10 +00:00
|
|
|
/*
|
|
|
|
NSProgressIndicator.h
|
|
|
|
|
|
|
|
Copyright (C) 1999 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
Author: Gerrit van Dyk <gerritvd@decimax.com>
|
|
|
|
Date: 1999
|
|
|
|
|
|
|
|
This file is part of the GNUstep GUI Library.
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
2007-10-29 21:16:17 +00:00
|
|
|
modify it under the terms of the GNU Lesser General Public
|
2003-07-31 23:52:10 +00:00
|
|
|
License as published by the Free Software Foundation; either
|
2007-10-29 21:16:17 +00:00
|
|
|
version 3 of the License, or (at your option) any later version.
|
2003-07-31 23:52:10 +00:00
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2007-10-29 21:16:17 +00:00
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Lesser General Public License for more details.
|
2003-07-31 23:52:10 +00:00
|
|
|
|
2007-10-29 21:16:17 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2003-07-31 23:52:10 +00:00
|
|
|
License along with this library; see the file COPYING.LIB.
|
2007-10-29 21:16:17 +00:00
|
|
|
If not, see <http://www.gnu.org/licenses/> or write to the
|
|
|
|
Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
2006-11-06 13:58:37 +00:00
|
|
|
Boston, MA 02110-1301, USA.
|
2003-07-31 23:52:10 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _GNUstep_H_NSProgressIndicator
|
|
|
|
#define _GNUstep_H_NSProgressIndicator
|
|
|
|
|
|
|
|
#include <AppKit/NSView.h>
|
|
|
|
|
|
|
|
@class NSTimer;
|
|
|
|
@class NSThread;
|
|
|
|
|
|
|
|
/* For NSControlTint */
|
|
|
|
#include <AppKit/NSColor.h>
|
|
|
|
|
|
|
|
/* For NSControlSize */
|
|
|
|
#include <AppKit/NSCell.h>
|
|
|
|
|
|
|
|
#define NSProgressIndicatorPreferredThickness 14
|
|
|
|
#define NSProgressIndicatorPreferredSmallThickness 10
|
|
|
|
#define NSProgressIndicatorPreferredLargeThickness 18
|
|
|
|
#define NSProgressIndicatorPreferredAquaThickness 12
|
|
|
|
|
|
|
|
@interface NSProgressIndicator : NSView
|
|
|
|
{
|
|
|
|
BOOL _isIndeterminate;
|
|
|
|
BOOL _isBezeled;
|
|
|
|
BOOL _usesThreadedAnimation;
|
|
|
|
NSTimeInterval _animationDelay;
|
|
|
|
double _doubleValue;
|
|
|
|
double _minValue;
|
|
|
|
double _maxValue;
|
|
|
|
BOOL _isVertical;
|
|
|
|
@private
|
|
|
|
BOOL _isRunning;
|
|
|
|
int _count;
|
|
|
|
NSTimer *_timer;
|
|
|
|
NSThread *_thread;
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// Animating the progress indicator
|
|
|
|
//
|
|
|
|
- (void)animate:(id)sender;
|
|
|
|
- (NSTimeInterval)animationDelay;
|
2005-06-16 12:34:13 +00:00
|
|
|
- (void)setAnimationDelay:(NSTimeInterval)delay;
|
2003-07-31 23:52:10 +00:00
|
|
|
- (void)startAnimation:(id)sender;
|
|
|
|
- (void)stopAnimation:(id)sender;
|
|
|
|
- (BOOL)usesThreadedAnimation;
|
|
|
|
- (void)setUsesThreadedAnimation:(BOOL)flag;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Advancing the progress bar
|
|
|
|
//
|
|
|
|
- (void)incrementBy:(double)delta;
|
|
|
|
- (double)doubleValue;
|
|
|
|
- (void)setDoubleValue:(double)aValue;
|
|
|
|
- (double)minValue;
|
|
|
|
- (void)setMinValue:(double)newMinimum;
|
|
|
|
- (double)maxValue;
|
|
|
|
- (void)setMaxValue:(double)newMaximum;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Setting the appearance
|
|
|
|
//
|
|
|
|
- (BOOL)isBezeled;
|
|
|
|
- (void)setBezeled:(BOOL)flag;
|
|
|
|
- (BOOL)isIndeterminate;
|
|
|
|
- (void)setIndeterminate:(BOOL)flag;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Standard control layout
|
|
|
|
//
|
|
|
|
- (NSControlSize)controlSize;
|
|
|
|
- (void)setControlSize:(NSControlSize)size;
|
|
|
|
- (NSControlTint)controlTint;
|
|
|
|
- (void)setControlTint:(NSControlTint)tint;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
2006-11-06 13:58:37 +00:00
|
|
|
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
2003-07-31 23:52:10 +00:00
|
|
|
@interface NSProgressIndicator (GNUstepExtensions)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Enables Vertical ProgressBar
|
|
|
|
*
|
|
|
|
* If isVertical = YES, Progress is from the bottom to the top
|
|
|
|
* If isVertical = NO, Progress is from the left to the right
|
|
|
|
*/
|
|
|
|
- (BOOL)isVertical;
|
|
|
|
- (void)setVertical:(BOOL)flag;
|
|
|
|
|
|
|
|
@end
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _GNUstep_H_NSProgressIndicator */
|