home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / appkit / Box.h < prev    next >
Text File  |  1991-10-18  |  2KB  |  76 lines

  1. /*
  2.     Box.h
  3.     Application Kit, Release 2.0
  4.     Copyright (c) 1988,UDU9, 1990, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7. #import "View.h"
  8.  
  9. /* Box types */
  10.  
  11. #define NX_NOBORDER    0
  12. #define NX_LINE        1
  13. #define NX_BEZEL    2
  14. #define NX_GROOVE    3
  15. #define NX_RIDGE    3    /* historical - use NX_GROOVE */
  16.  
  17. /* Box title positions */
  18.  
  19. #define NX_NOTITLE    0
  20. #define NX_ABOVETOP    1
  21. #define NX_ATTOP    2
  22. #define NX_BELOWTOP    3
  23. #define NX_ABOVEBOTTOM    4
  24. #define NX_ATBOTTOM    5
  25. #define NX_BELOWBOTTOM    6
  26.  
  27. @interface Box : View
  28. {
  29.     id                  cell;
  30.     id                  contentView;
  31.     NXSize              offsets;
  32.     NXRect              borderRect;
  33.     NXRect              titleRect;
  34.     struct _bFlags {
  35.     unsigned int        borderType:2;
  36.     unsigned int        titlePosition:3;
  37.     unsigned int        _transparent:1;
  38.     unsigned int        _RESERVED:10;
  39.     }                   bFlags;
  40. }
  41.  
  42. - initFrame:(const NXRect *)frameRect;
  43.  
  44. - awake;
  45. - free;
  46. - (int)borderType;
  47. - (int)titlePosition;
  48. - setBorderType:(int)aType;
  49. - setTitlePosition:(int)aPosition;
  50. - (const char *)title;
  51. - setTitle:(const char *)aString;
  52. - cell;
  53. - font;
  54. - setFont:fontObj;
  55. - getOffsets:(NXSize *)aSize;
  56. - setOffsets:(NXCoord)width :(NXCoord)height;
  57. - sizeTo:(NXCoord)width :(NXCoord)height;
  58. - sizeToFit;
  59. - setFrameFromContentFrame:(const NXRect *)contentFrame;
  60. - contentView;
  61. - setContentView:aView;
  62. - addSubview:aView;
  63. - replaceSubview:oldView with:newView;
  64. - drawSelf:(const NXRect *)rects :(int)rectCount;
  65. - write:(NXTypedStream *)stream;
  66. - read:(NXTypedStream *)stream;
  67.  
  68. /* 
  69.  * The following new... methods are now obsolete.  They remain in this  
  70.  * interface file for backward compatibility only.  Use Object's alloc method  
  71.  * and the init... methods defined in this class instead.
  72.  */
  73. + newFrame:(const NXRect *)frameRect;
  74.  
  75. @end
  76.