home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************
- * CLASS: MiscArrowButtonCell
- * PROGRAMMER: Todd Thomas
- * DATE: Jan 16, 1993
- * VERSION 0.3
- *
- * With the help of ArrowButton, this is a recreation of that
- * button (well, it was a View there) from Websters.app (in the
- * Preferences panel).
- * I created a new designated initializer, since it would be nice
- * to be able to set both sides of the button at once. Also, since
- * stringValue did not return anything useful, I made it return a
- * pointer to either the contents (state 0) or altContents (state 1).
- *
- * CHANGES:
- * Now use setArrowAlignment/arrowAlignment to set/get whether the
- * the arrow is relative or absolutely aligned.
- * Added arrowAlignment instance method
- * This object is included in the MiscKit by permission from the author
- * and its use is governed by the MiscKit license, found in the file
- * "LICENSE.rtf" in the MiscKit distribution. Please refer to that file
- * for a list of all applicable permissions and restrictions.
- *******************************************************************/
-
- #import <appkit/appkit.h>
-
- // Use the method setArrowAlignment: with these defines
- // Used to use method setAlignment: but realized I still needed that method
-
- #define MISC_ARROW_ABSOLUTE 0
- #define MISC_ARROW_RELATIVE 1
-
-
- @interface MiscArrowButtonCell : ButtonCell
- {
- float cellHeight;
- unsigned int arrowAlignment;
- }
-
- - init;
- - initTextCell: (const char *)aString;
- - initTextCell: (const char *)aString altTitle: (const char *)altString;
- - (const char *)stringValue;
- - calcCellSize: (NXSize *)theSize inRect: (NXRect *)theRect;
- - getTitleRect: (NXRect *)theRect;
- - getAltTitleRect: (NXRect *)theRect;
- //- getDrawRect: (NXRect *)theRect;
- - setArrowAlignment: (int)alignment;
- - (int)arrowAlignment;
- - drawInside: (const NXRect *)cellFrame inView: controlView;
- - drawSelf: (const NXRect *)cellFrame inView: controlView;
- - read: (NXTypedStream *)stream;
- - write: (NXTypedStream *)stream;
- - (const char *)getInspectorClassName;
- - (const char *)getEditorClassName;
- @end
-