home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / BSP Tree 1.2 / Sources / Core / include / bound.h < prev    next >
Encoding:
Text File  |  1995-03-26  |  2.0 KB  |  41 lines  |  [TEXT/MMCC]

  1. //------------------------------------------------------------------------------
  2. //    File:                    bound.h
  3. //    Date:                    7/19/94
  4. //    Author:                Bretton Wade
  5. //
  6. //    Description:    this file contains the class definition for a bound widget. a
  7. //                                bound widget is a user interface item that bounds other
  8. //                                types of widgets
  9. //
  10. //------------------------------------------------------------------------------
  11.  
  12. #include    "widget.h"
  13.  
  14. #ifndef    BOUND
  15. #define    BOUND
  16.  
  17. //------------------------------------------------------------------------------
  18. //    constants
  19. //------------------------------------------------------------------------------
  20. const    short        kTop = 0;                                                                                                                    //    'top' constant for use in constraining the bounds
  21. const    short        kLeft = 1;                                                                                                                //    'left' constant for use in constraining the bounds
  22. const    short        kBottom = 2;                                                                                                            //    'bottom' constant for use in constraining the bounds
  23. const    short        kRight = 3;                                                                                                                //    'right' constant for use in constraining the bounds
  24.  
  25. //------------------------------------------------------------------------------
  26. //    classes
  27. //------------------------------------------------------------------------------
  28. class    bound : public widget                                                                                                            //    bound widget class
  29. {                                                                                                                                                                //    begin
  30.     private:                                                                                                                                            //    members internal to this class only
  31.     protected:                                                                                                                                        //    members internal to this class hierarchy
  32.                 Rect        constrain;                                                                                                            //    rect defining whether or not to constrain
  33.                 Rect        constraint;                                                                                                            //    rect defining linkage with parent
  34.     public:                                                                                                                                                //    members available externally
  35.                 bound (Rect&, Rect&);                                                                                                        //    constructor
  36. virtual    void        Resize (EventRecord&);                                                                                    //    recompute sizing information from parent
  37. };                                                                                                                                                            //    end
  38.  
  39. //------------------------------------------------------------------------------
  40.  
  41. #endif    //BOUND