home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 January / macformat-033.iso / mac / Shareware City / Developers / ABox.v1.8 / Header Files / ABText.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-23  |  3.5 KB  |  136 lines  |  [TEXT/MMCC]

  1. /*    
  2.     Copyright © 1991-1995 by TopSoft Inc.  All rights reserved.
  3.  
  4.     You may diTextibute this file under the terms of the TopSoft
  5.     Artistic License, accompanying this package.
  6.     
  7.     This file was developed by George (ty) Tempel in connection with TopSoft, Inc..
  8.     See the Modification History for more details.
  9.  
  10. Product
  11.     About Box
  12.  
  13. FILE
  14.     ABText.h
  15.  
  16. NAME
  17.     ABText.h, part of the ABox project source code,
  18.     responsible for handling the AboutBox Text class stuff.
  19.  
  20. DESCRIPTION
  21.     This file contains defines for the about box modules.
  22.     
  23. DEVELOPED BY
  24.     George (ty) Tempel                netromancr@aol.com
  25.     All code in this file, and its associated header file was
  26.     Created by George (ty) Tempel in connection with the TopSoft, Inc.
  27.     "FilterTop" application development, except where noted.
  28.  
  29. CARETAKER - George (ty) Tempel <netromancr@aol.com>
  30.      Please consult this person for any changes or suggestions to this file.
  31.  
  32. MODIFICATION HISTORY
  33.  
  34.     dd mmm yy    -    xxx    -    patchxx: description of patch
  35.     9 June 94    -    ty    -    Initial Version Created
  36.     27-jun-94    -    ty    -    added support for Drag and Drop Manager
  37.     20-july-94    -    ty    -    initial version released
  38.     23-may-95    -    ty    -    changes for compatibility with the CodeWarrior CW6
  39.                             release and the associated Universal Headers from Apple:
  40.                             most methods that returned references now have "Ref" at
  41.                             the end of their methods names to prevent possible collisions
  42.                             with datatypes and classes of the same name (older versions
  43.                             of the compiler didn't have a problem with this).
  44.     
  45. */
  46.  
  47. /*===========================================================================*/
  48.  
  49. /*========== Exclusion Macros ============*/
  50.  
  51. #pragma    once
  52.  
  53. #ifndef    _ABText_
  54. #define    _ABText_
  55.  
  56.  
  57. /*============ Header Files ==============*/
  58.  
  59. #include    "ABResource.h"
  60. #include    "ABUTextBox.h"
  61. #include    "ABUText.h"
  62. #include    "ABUControls.h"
  63. #include    "ABUEnvDragMgr.h"
  64.  
  65.  
  66. /*=========== External Linkage ===========*/
  67.  
  68. /*================ Macros ================*/
  69.  
  70. /*============== Constants ===============*/
  71.  
  72. #define        kABtextResource                        ((ResType)'TEXT')
  73. #define        kABstyleResource                    ((ResType)'styl')
  74.  
  75. /*================ Enums =================*/
  76.  
  77. /*=============== structs ================*/
  78.  
  79. /*=============== Typedefs ===============*/
  80.  
  81. /*=========== Class Definitions ==========*/
  82.  
  83. #define    kABTextSuperProperties    ABResource
  84. class    ABText : public ABResource, 
  85.                     ABUTextBox, 
  86.                     ABUText, 
  87.                     ABUControls,
  88.                     ABUEnvDragMgr
  89. {
  90.     public:
  91.                         ABText(void);
  92.         virtual            ~ABText(void);
  93.  
  94.         virtual    OSErr    Draw(WindowPtr window);
  95.         virtual    OSErr    Update(WindowPtr window);
  96.  
  97.         virtual    Boolean    Event(EventRecord *event);
  98.         virtual    OSErr    Stop(void);
  99.         virtual    OSErr    Initialize(void);
  100.         virtual    OSErr    Begin(void);
  101.  
  102.                 Boolean HasTEh(void) const    { return this->TEh() != NULL; }
  103.                 Boolean DoesntHaveTEh(void) const { return ! this->HasTEh(); }
  104.                 
  105.                 Boolean HasScrollbar(void) const { return this->Scrollbar() != NULL; }
  106.                 Boolean DoesntHaveScrollbar(void) const { return ! this->HasScrollbar(); }
  107.                 
  108.         
  109.     protected:
  110.                 TEHandle        mTEh;        //    handle for the TERecord
  111.                 ControlHandle    mScrollH;    //    handle for scrollbar
  112.  
  113.                 TEHandle& TEh(void) const { return this->mTEh; }
  114.                 ControlHandle& Scrollbar(void) const { return this->mScrollH; }
  115.                 
  116.         virtual    OSErr            BuildText(Rect *area, WindowPtr window);
  117.         
  118.         virtual  OSErr    LocalSendProc(FlavorType theType,
  119.                                         void *dragSendRefCon,
  120.                                         ItemReference theItemRef,
  121.                                         DragReference theDragRef);
  122.                                         
  123.     private:
  124. };
  125.  
  126.  
  127.  
  128.  
  129. /*========== Function Prototypes =========*/
  130.  
  131.  
  132.  
  133.  
  134. #endif    // _ABText_
  135.  
  136.