home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Headers / misckit / MiscFramingView.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-09-27  |  3.2 KB  |  121 lines

  1. /*============================== FramingView.h ==============================*/
  2. //        Written by Dale Amon, copyright 1994 by Genesis Project, Ltd.
  3. //                Version 0.8.  All rights reserved.
  4. //
  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. /* Class that implements a frame and background fill.
  14.  
  15. HISTORY
  16. 7-Feb-93   Dale Amon at GPL
  17.        Created.
  18.  
  19. */
  20.  
  21. /* Justification types */
  22. #define    MISC_FV_LL        0
  23. #define    MISC_FV_UL        1
  24. #define    MISC_FV_UR        2
  25. #define    MISC_FV_LR        3
  26. #define    MISC_FV_CENTER    4
  27.  
  28. /* Resizing types */
  29. #define    MISC_FV_NOFIT        0
  30. #define    MISC_FV_BESTFIT        1
  31. #define    MISC_FV_EXACTFIT    2
  32. #define    MISC_FV_FILLFIT        3
  33.  
  34. /* Outline types */
  35. #define    MISC_FV_PLAIN        0
  36. #define    MISC_FV_OUTLINE        1
  37.  
  38. /* Widths of outlines */
  39. #define MISC_FV_PLAIN_WIDTH        0.0
  40. #define MISC_FV_OUTLINE_WIDTH    1.0
  41.  
  42. /* Defaults */
  43. #define MISC_DEFAULT_BACKGROUND        NX_LTGRAY
  44. #define MISC_DEFAULT_OUTLINE        MISC_FV_OUTLINE
  45. #define    MISC_DEFAULT_OUTLINE_WIDTH    MISC_FV_OUTLINE_WIDTH
  46. #define    MISC_DEFAULT_JUSTIFICATION    MISC_FV_CENTER
  47. #define    MISC_DEFAULT_RESIZING        MISC_FV_BESTFIT
  48.  
  49. #define    MISC_FRAMINGVIEW_VERSION_ID        0.8
  50.  
  51. #ifdef MiscFramingViewCompat
  52. #define    FV_LL MISC_FV_LL
  53. #define    FV_UL MISC_FV_UL
  54. #define FV_UR MISC_FV_UR
  55. #define    FV_LR MISC_FV_LR
  56. #define    FV_CENTER MISC_FV_CENTER
  57. #define    FV_NOFIT MISC_FV_NOFIT
  58. #define    FV_BESTFIT MISC_FV_BESTFIT
  59. #define    FV_EXACTFIT MISC_FV_EXACTFIT
  60. #define    FV_FILLFIT MISC_FV_FILLFIT
  61. #define    FV_PLAIN MISC_FV_PLAIN
  62. #define    FV_OUTLINE MISC_FV_OUTLINE
  63. #define FV_PLAIN_WIDTH MISC_FV_PLAIN_WIDTH
  64. #define FV_OUTLINE_WIDTH MISC_FV_OUTLINE_WIDTH
  65. #define DEFAULT_BACKGROUND MISC_DEFAULT_BACKGROUND    
  66. #define DEFAULT_OUTLINE MISC_FV_OUTLINE
  67. #define    DEFAULT_OUTLINE_WIDTH MISC_FV_OUTLINE_WIDTH
  68. #define    DEFAULT_JUSTIFICATION MISC_FV_CENTER
  69. #define    DEFAULT_RESIZING MISC_FV_BESTFIT
  70. #define    FRAMINGVIEW_VERSION_ID MISC_FRAMINGVIEW_VERSION_ID
  71. #define FramingView MiscFramingView
  72. #endif MiscFramingViewCompat
  73.  
  74. @interface MiscFramingView : MiscTargetActionView
  75. {
  76.     float    backgroundGray;        /* Background gray */
  77.     int    justification;        /* type of justification */
  78.     int    resizing;        /* Type of resizing */
  79.     int    outline;        /* Type of outline */
  80.     id    contentView;        /* content view */
  81.  
  82.     float    outlineWidth;        /* Width of outline */
  83.  
  84.     BOOL    _dirty;            /* Content frame must update */
  85. }
  86.  
  87. + initialize;
  88.  
  89. - initFrame: (const NXRect *) theRect;
  90. - free;
  91.  
  92. - setContentView: (View*) aView;
  93. - contentView;
  94.  
  95. - drawSelf:(const NXRect *)rects :(int)rectCount;
  96.  
  97. - (float)backgroundGray;
  98. - setBackgroundGray:(float)grayscale;
  99. - (int)outline;
  100. - setOutline:(int)type;
  101. - (int)justification;
  102. - setJustification:(int)type;
  103. - (int)resizing;
  104. - setResizing:(int)type;
  105.  
  106. /* Disallowed */
  107. - addSubview:aView;
  108. - addSubview:aView :(int)place relativeTo:otherView;
  109. - replaceSubview:oldView with:newView;
  110.  
  111. /* Set dirty bit before doing them */
  112. - rotateTo:(NXCoord)angle;
  113. - sizeTo:(NXCoord)width :(NXCoord)height;
  114. - descendantFrameChanged:sender;
  115.  
  116. - write: (NXTypedStream *) stream;
  117. - read: (NXTypedStream *) stream;
  118. - awake;
  119.  
  120. @end
  121.