home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************
- *
- * ElementHelpers.h
- *
- * Public function prototypes for ElementHelpers.c
- *
- ****************************************************************************/
-
- #ifndef __ELEMENTHELPERS__
- #define __ELEMENTHELPERS__
-
- #include "Structs.h"
-
- // --------------------------------------------------------------------------
-
- ElementReference GetFirstSubElement (ElementReference element);
- ElementReference GetGroupElementBelongsTo (ElementList list, ElementReference element);
- Boolean IsElementInList (ElementList list, ElementReference element, ElementReference *groupElement);
- ElementList GetSubElementList (ElementReference element);
-
-
- ElementReference GetElementByNumber (ElementList list, unsigned long number);
- void GetElementNameByType (ElementType type, char *name);
-
-
-
- long CountElementsByClass (ElementList list, DescType elementClass);
- OSErr FindElementByIndex (ElementList list, DescType elementClass, long index, ElementReference *element);
- ElementReference FindElementByUniqueID (ElementList list, long uniqueID);
-
- OSErr ConvertObjectClassToElementType (const DescType elementClass, ElementType *elementType);
- OSErr ConvertElementTypeToObjectClass (const ElementType elementType, DescType *elementClass);
-
- long GetIndexForElementType (DocumentReference document, ElementReference element, ElementType elementType);
- long GetIndexForSubElementType (DocumentReference document, ElementReference element, ElementReference subElement, ElementType elementType);
-
- // --------------------------------------------------------------------------
-
- void PopulateElementWithDefaultData (ElementReference element);
- Rect CalculateElementBounds (ElementReference element);
-
- // --------------------------------------------------------------------------
-
- #endif
-