Main Page | Modules | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

CrescatAppDelegate.h File Reference


Detailed Description

Application-delegate class This header declares the application-delegate class, which concentrates most of the singleton methods of the application.

Preference-access methods are found in this class, as are AppleScript property accessors for the application.

Definition in file CrescatAppDelegate.h.

#import <Cocoa/Cocoa.h>

Include dependency graph for CrescatAppDelegate.h:

Go to the source code of this file.

Data Structures

class  CrescatAppDelegate
 Crescat application delegate. More...

Functions

NSColor * EnsureColor (id aColor)
 Interpret an NSColor, NSData, or NSArray as NSColor.


Function Documentation

NSColor* EnsureColor id  aColor  ) 
 

Interpret an NSColor, NSData, or NSArray as NSColor.

NSColors can be found as themselves, or archived in NSDatas, or in triplets of unsigned shorts. This function takes any of these and returns the corresponding NSColor.

Parameters:
aColor id, an NSColor, NSData, or NSArray encapsulating a color. If NSData, assumed to be encoded with NSArchiver. If NSArray, assumed to be three NSNumbers in the range 0..65535.
Return values:
The input NSColor if it was an NSColor, an autoreleased NSColor if the input was NSArray or NSData, or +[NSColor whiteColor] if the incoming type wasn't recognized.

Definition at line 11 of file CrescatAppDelegate.m.

Referenced by CrescatApplication::ColorAsArray, MyDocument::setBackColor:, MyDocument::setCursorColor:, and MyDocument::setForeColor:.


Generated on Fri Sep 30 12:01:11 2005 for Crescat by  doxygen 1.4.4