add backgrounds folder, not used yet
[exterlulz-kokogems.git] / src / TimerView.h
blobf08b47fb7b247c093b3643462d84d1e835b905e9
1 /* ----====----====----====----====----====----====----====----====----====----
2 MyTimerView.h (jeweltoy)
4 JewelToy is a simple game played against the clock.
5 Copyright (C) 2001 Giles Williams
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2
10 of the License, or (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 ----====----====----====----====----====----====----====----====----====---- */
22 #import <Cocoa/Cocoa.h>
24 @interface TimerView : NSView
26 float meter;
27 float decrement;
28 id target;
29 SEL runOutSelector;
30 SEL runOverSelector;
31 NSTimer *timer;
32 BOOL isRunning;
34 NSColor *color1;
35 NSColor *color2;
36 NSColor *colorOK;
37 NSColor *backColor;
39 // Standard view create/free methods
40 - (id)initWithFrame:(NSRect)frame;
41 - (void)dealloc;
43 // Drawing
44 - (void)drawRect:(NSRect)rect;
45 - (BOOL)isOpaque;
47 // Utility
48 - (void) setPaused:(BOOL) value;
49 - (void) incrementMeter:(float) value;
50 - (void) setDecrement:(float) value;
51 - (void) decrementMeter:(float) value;
52 - (void) setTimerRunningEvery:(NSTimeInterval) timeInterval
53 decrement:(float) value
54 withTarget:(id) targ
55 whenRunOut:(SEL) runOutSel
56 whenRunOver:(SEL) runOverSel;
57 - (void) runTimer;
58 - (void) setTimer:(float)value;
59 - (float) meter;
62 @end