home *** CD-ROM | disk | FTP | other *** search
- /* ==========================================================================
- **
- ** GraphicObject.h
- **
- ** Object<GraphicObject
- **
- ** A GraphicObject is a virtual class, derrived from class Object.
- ** Potentially anything that can be drawn on a RastPort is a
- ** graphic object.
- **
- **
- ** ©1991 WILLISoft
- **
- ** ==========================================================================
- */
-
- #ifndef GRAPHICOBJECT_H
- #define GRAPHICOBJECT_H
-
- #include "Object.h"
- #include "Intuition_typedefs.h"
- #include "Precognition_utils.h"
-
- typedef struct GraphicObject
- {
- Class *isa;
- char *ObjectName;
- void *Next; /* Points to next GraphicObject in chain. */
- } GraphicObject;
-
-
-
-
- Point Location( GraphicObject *self );
- /*
- ** Returns the LeftEdge, TopEdge of 'self'.
- */
-
-
-
- Point SetLocation( GraphicObject *self,
- PIXELS LeftEdge,
- PIXELS TopEdge );
- /*
- ** Sets the LeftEdge, TopEdge of 'self'.
- ** Returns the LeftEdge, TopEdge.
- */
-
-
- Point Size( GraphicObject *self );
- /*
- ** Returns the Width, Height of 'self'.
- */
-
-
- Point AskSize( GraphicObject *self,
- PIXELS Width,
- PIXELS Height );
- /*
- ** Given a (Width, Height), returns the nearest (Width, Height)
- ** that 'self' modify itself to be. Does NOT actually change
- ** the dimensions of 'self'. (Some graphic objects have
- ** constraints on their size.)
- */
-
- #define MinSize(s) AskSize(s,0,0)
- #define MaxSize(s) AskSize(s,32767,32767)
-
-
- Point SetSize( GraphicObject *self,
- PIXELS Width,
- PIXELS Height );
- /*
- ** Sets 'self's size to be as near (Width, Height) as possible,
- ** returns the actual (Width, Height).
- */
-
-
- UWORD SizeFlags( GraphicObject *self );
- /*
- ** Returns the flags which define the axis's on which this object may
- ** be sized.
- ** (This is useful for the editor environment)
- */
-
- #define OBJSIZE_X 0x0001 /* object can be resized along the X axis. */
- #define OBJSIZE_Y 0x0002 /* object can be resized along the Y axis. */
-
-
-
- void Render( GraphicObject *self,
- RastPort *RPort );
-
-
-
- /*-- NOTE: Not all GraphicObjects support titles. --*/
-
- BOOL SetTitle( GraphicObject *self, char *title );
- /*
- ** returns FALSE if object does not support titles.
- */
-
- char *Title( GraphicObject *self );
- /*
- ** Returns a pointer to the title of an object, or NULL if none.
- */
-
- #endif