home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.bin / SourceCode / MiscKit1.2.6 / Headers / misckit / MiscAppDefaults.h < prev    next >
Encoding:
Text File  |  1994-06-15  |  1.4 KB  |  38 lines

  1. //
  2. //    MiscAppDefaults.h -- easy access to preferences
  3. //        Written by Steve Hayman Copyright (c) 1994 by Steve Hayman.
  4. //                Version 1.0.  All rights reserved.
  5. //        This notice may not be removed from this source code.
  6. //
  7. //    This object is included in the MiscKit by permission from the author
  8. //    and its use is governed by the MiscKit license, found in the file
  9. //    "LICENSE.rtf" in the MiscKit distribution.  Please refer to that file
  10. //    for a list of all applicable permissions and restrictions.
  11. //    
  12.  
  13. #import <appkit/appkit.h>
  14.  
  15. // A category of Application that provides quick access to preferences
  16. // values from anywhere in an app.  You can use this category to
  17. // send messages to NXApp to retrieve default values (and optionally
  18. // convert them to integers or booleans), or to set values.
  19.  
  20. // All defaults are registered and looked up using an owner of
  21. // [NXApp appName], so you must be careful not to use these methods
  22. // too early (before Application gets fully running.)
  23.  
  24.  
  25. @interface Application(MiscAppDefaults) 
  26.  
  27. - (int) registerDefaults:(const NXDefaultsVector) v;
  28.  
  29. - (const char *)defaultValue:(const char *)defName;
  30. - (int) defaultIntValue:(const char *)defName;
  31. - (BOOL) defaultBoolValue:(const char *)defName;
  32.  
  33. - (int)setDefault:(const char *)defName to:(const char *)defValue;
  34. - (int)setIntDefault:(const char *)defName to:(int)defValue;
  35. - (int)setBoolDefault:(const char *)defName to:(BOOL)defValue;
  36.  
  37. @end
  38.