home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / YellowBox / Kits / MiscTableScroll-138.1 / Examples / LazyScrollDir / Defaults.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-31  |  2.4 KB  |  63 lines

  1. #ifndef __Defaults_h
  2. #define __Defaults_h
  3. //=============================================================================
  4. //
  5. //    Copyright (C) 1995-1997 by Paul S. McCarthy and Eric Sunshine.
  6. //        Written by Paul S. McCarthy and Eric Sunshine.
  7. //                All Rights Reserved.
  8. //
  9. //    This notice may not be removed from this source code.
  10. //
  11. //    This object is included in the MiscKit by permission from the authors
  12. //    and its use is governed by the MiscKit license, found in the file
  13. //    "License.rtf" in the MiscKit distribution.  Please refer to that file
  14. //    for a list of all applicable permissions and restrictions.
  15. //
  16. //=============================================================================
  17. //-----------------------------------------------------------------------------
  18. // Defaults.h
  19. //
  20. //    Simplified interface to NeXT defaults system.
  21. //
  22. //-----------------------------------------------------------------------------
  23. //-----------------------------------------------------------------------------
  24. // $Id: Defaults.h,v 1.1 97/03/23 01:58:34 sunshine Exp $
  25. // $Log:    Defaults.h,v $
  26. // Revision 1.1  97/03/23  01:58:34  sunshine
  27. // v13.1: Defaults manager.
  28. // 
  29. //-----------------------------------------------------------------------------
  30. #import <Foundation/NSObject.h>
  31. #import <Foundation/NSGeometry.h>
  32. @class NSColor, NSFont;
  33.  
  34. @interface Defaults : NSObject
  35.  
  36. + (void)set:(NSString*)def str:(NSString*)s;
  37. + (void)set:(NSString*)def int:(int)i;
  38. + (void)set:(NSString*)def float:(float)f;
  39. + (void)set:(NSString*)def color:(NSColor*)c;
  40. + (void)set:(NSString*)def bool:(BOOL)b;
  41. + (void)set:(NSString*)def font:(NSFont*)f;
  42. + (void)set:(NSString*)def size:(NSSize)s;
  43. + (void)set:(NSString*)def point:(NSPoint)p;
  44. + (void)set:(NSString*)def rect:(NSRect)r;
  45.  
  46. + (NSString*)    getStr:  (NSString*)def fallback:(NSString*)s;
  47. + (int)        getInt:  (NSString*)def fallback:(int)i;
  48. + (int)        getInt:  (NSString*)def fallback:(int)i min:(int)n;
  49. + (int)        getInt:  (NSString*)def fallback:(int)i min:(int)n max:(int)x;
  50. + (float)    getFloat:(NSString*)def fallback:(float)f;
  51. + (NSColor*)    getColor:(NSString*)def fallback:(NSColor*)c;
  52. + (BOOL)    getBool: (NSString*)def fallback:(BOOL)b;
  53. + (NSFont*)    getFont: (NSString*)def fallback:(NSFont*)f;
  54. + (NSSize)    getSize: (NSString*)def fallback:(NSSize)s;
  55. + (NSPoint)    getPoint:(NSString*)def fallback:(NSPoint)p;
  56. + (NSRect)    getRect: (NSString*)def fallback:(NSRect)r;
  57.  
  58. + (void)commit;
  59.  
  60. @end
  61.  
  62. #endif // __Defaults_h
  63.