home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-03-26 | 2.0 KB | 41 lines | [TEXT/MMCC] |
- //------------------------------------------------------------------------------
- // File: bound.h
- // Date: 7/19/94
- // Author: Bretton Wade
- //
- // Description: this file contains the class definition for a bound widget. a
- // bound widget is a user interface item that bounds other
- // types of widgets
- //
- //------------------------------------------------------------------------------
-
- #include "widget.h"
-
- #ifndef BOUND
- #define BOUND
-
- //------------------------------------------------------------------------------
- // constants
- //------------------------------------------------------------------------------
- const short kTop = 0; // 'top' constant for use in constraining the bounds
- const short kLeft = 1; // 'left' constant for use in constraining the bounds
- const short kBottom = 2; // 'bottom' constant for use in constraining the bounds
- const short kRight = 3; // 'right' constant for use in constraining the bounds
-
- //------------------------------------------------------------------------------
- // classes
- //------------------------------------------------------------------------------
- class bound : public widget // bound widget class
- { // begin
- private: // members internal to this class only
- protected: // members internal to this class hierarchy
- Rect constrain; // rect defining whether or not to constrain
- Rect constraint; // rect defining linkage with parent
- public: // members available externally
- bound (Rect&, Rect&); // constructor
- virtual void Resize (EventRecord&); // recompute sizing information from parent
- }; // end
-
- //------------------------------------------------------------------------------
-
- #endif //BOUND