source: trunk/Cocoa/AntiRSI/CTBadge/CTBadge.h@ 447

Last change on this file since 447 was 332, checked in by Nicholas Riley, 17 years ago

version.plist: Not needed.

Info.plist: Updated for 1.4njr2.

AUTHORS: Updated Onne Gorter's email address and added mine.

AntiRSI.[hm]: Added dock badge session timer display and auto-reset options. Updated URLs to point to my Web site; should probably just switch to Sparkle.

CTBadge: Added customized version.

English.lproj/InfoPlist.strings: Updated for 1.4njr2; credit myself and Chad; remove Onne Gorter's URL.

English.lproj/MainMenu.nib: Preference changes; add cmd-R for manual reset.

File size: 2.1 KB
Line 
1//
2// CTBadge.h
3// CTWidgets
4//
5// Created by Chad Weider on 2/14/07.
6// Copyright (c) 2007 Chad Weider.
7// Some rights reserved: <http://creativecommons.org/licenses/by/2.5/>
8//
9// Version: 1.5
10
11#import <Cocoa/Cocoa.h>
12#import "CTGradient.h"
13
14extern const float CTLargeBadgeSize;
15extern const float CTSmallBadgeSize;
16extern const float CTLargeLabelSize;
17extern const float CTSmallLabelSize;
18
19@interface CTBadge : NSObject
20 {
21 NSColor *badgeColor;
22 NSColor *labelColor;
23 }
24
25+ (CTBadge *)systemBadge; //Classic white on red badge
26+ (CTBadge *)badgeWithColor:(NSColor *)badgeColor labelColor:(NSColor *)labelColor; //Badge of any color scheme
27
28- (NSImage *)smallBadgeForValue:(unsigned)value; //Image to use during drag operations
29- (NSImage *)smallBadgeForString:(NSString *)string;
30- (NSImage *)largeBadgeForValue:(unsigned)value; //For dock icons, etc
31- (NSImage *)largeBadgeForString:(NSString *)string;
32- (NSImage *)badgeOfSize:(float)size forValue:(unsigned)value; //A badge of arbitrary size,
33- (NSImage *)badgeOfSize:(float)size forString:(NSString *)string; // <size> is the size in pixels of the badge
34 // not counting the shadow effect
35 // (image returned will be larger than <size>)
36
37- (NSImage *)badgeOverlayImageForValue:(unsigned)value insetX:(float)dx y:(float)dy; //Returns a transparent 128x128 image
38- (NSImage *)badgeOverlayImageForString:(NSString *)string insetX:(float)dx y:(float)dy; // with Large badge inset dx/dy from the upper right
39- (void)badgeApplicationDockIconWithValue:(unsigned)value insetX:(float)dx y:(float)dy; //Badges the Application's icon with <value>
40- (void)badgeApplicationDockIconWithString:(NSString *)string insetX:(float)dx y:(float)dy; // and puts it on the dock
41
42- (void)setBadgeColor:(NSColor *)theColor; //Sets the color used on badge
43- (void)setLabelColor:(NSColor *)theColor; //Sets the color of the label
44
45- (NSColor *)badgeColor; //Color currently being used on the badge
46- (NSColor *)labelColor; //Color currently being used on the label
47
48@end
Note: See TracBrowser for help on using the repository browser.