home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / YellowBox / Kits / MiscTableScroll-138.1 / Examples / ScrollDir / Defaults.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-31  |  2.5 KB  |  65 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.2 97/03/23 01:40:38 sunshine Exp $
  25. // $Log:    Defaults.h,v $
  26. // Revision 1.2  97/03/23  01:40:38  sunshine
  27. // v29.2: Brought into syncrhonization with LazyScrollDir v13.1 for OPENSTSEP.
  28. // 
  29. // Revision 1.1  97/03/21  18:30:26  sunshine
  30. // v28: Defaults manager.
  31. //-----------------------------------------------------------------------------
  32. #import <Foundation/NSObject.h>
  33. #import <Foundation/NSGeometry.h>
  34. @class NSColor, NSFont;
  35.  
  36. @interface Defaults : NSObject
  37.  
  38. + (void)set:(NSString*)def str:(NSString*)s;
  39. + (void)set:(NSString*)def int:(int)i;
  40. + (void)set:(NSString*)def float:(float)f;
  41. + (void)set:(NSString*)def color:(NSColor*)c;
  42. + (void)set:(NSString*)def bool:(BOOL)b;
  43. + (void)set:(NSString*)def font:(NSFont*)f;
  44. + (void)set:(NSString*)def size:(NSSize)s;
  45. + (void)set:(NSString*)def point:(NSPoint)p;
  46. + (void)set:(NSString*)def rect:(NSRect)r;
  47.  
  48. + (NSString*)    getStr:  (NSString*)def fallback:(NSString*)s;
  49. + (int)        getInt:  (NSString*)def fallback:(int)i;
  50. + (int)        getInt:  (NSString*)def fallback:(int)i min:(int)n;
  51. + (int)        getInt:  (NSString*)def fallback:(int)i min:(int)n max:(int)x;
  52. + (float)    getFloat:(NSString*)def fallback:(float)f;
  53. + (NSColor*)    getColor:(NSString*)def fallback:(NSColor*)c;
  54. + (BOOL)    getBool: (NSString*)def fallback:(BOOL)b;
  55. + (NSFont*)    getFont: (NSString*)def fallback:(NSFont*)f;
  56. + (NSSize)    getSize: (NSString*)def fallback:(NSSize)s;
  57. + (NSPoint)    getPoint:(NSString*)def fallback:(NSPoint)p;
  58. + (NSRect)    getRect: (NSString*)def fallback:(NSRect)r;
  59.  
  60. + (void)commit;
  61.  
  62. @end
  63.  
  64. #endif // __Defaults_h
  65.