OCETemplates.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:115k
- /*
- File: OCETemplates.h
-
- Contains: Apple Open Collaboration Environment Templates Interfaces.
-
- Version: Technology: AOCE Toolbox 1.02
- Release: QuickTime 6.0.2
-
- Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
-
- Bugs?: For bug reports, consult the following page on
- the World Wide Web:
-
- http://developer.apple.com/bugreporter/
-
- */
- #ifndef __OCETEMPLATES__
- #define __OCETEMPLATES__
- #ifndef REZ
- #ifndef __MACTYPES__
- #include "MacTypes.h"
- #endif
- #ifndef __EVENTS__
- #include "Events.h"
- #endif
- #endif /* REZ */
- #ifndef __OCE__
- #include "OCE.h"
- #endif
- #ifndef REZ
- #ifndef __OCESTANDARDMAIL__
- #include "OCEStandardMail.h"
- #endif
- #if PRAGMA_ONCE
- #pragma once
- #endif
- #ifdef __cplusplus
- extern "C" {
- #endif
- #if PRAGMA_IMPORT
- #pragma import on
- #endif
- #if PRAGMA_STRUCT_ALIGN
- #pragma options align=mac68k
- #elif PRAGMA_STRUCT_PACKPUSH
- #pragma pack(push, 2)
- #elif PRAGMA_STRUCT_PACK
- #pragma pack(2)
- #endif
- #endif /* REZ */
- /************************************************************************************************
- ********************************* Template Resource Constants: *********************************
- ************************************************************************************************/
- /* Current versions of all the different template types: */
- #define kDETAspectVersion -976
- #define kDETInfoPageVersion -976
- #define kDETKillerVersion -976
- #define kDETForwarderVersion -976
- #define kDETFileTypeVersion -976
- /* 'Normal' separation for template IDs within the file (this is just a suggestion; you can use whatever
- separation you like, so long as two separate templates don't have overlapping resources): */
- #define kDETIDSep 250
- /* A few predefined base IDs (again, just suggestions): */
- #define kDETFirstID (1000)
- #define kDETSecondID (1000+kDETIDSep)
- #define kDETThirdID (1000+2*kDETIDSep)
- #define kDETFourthID (1000+3*kDETIDSep)
- #define kDETFifthID (1000+4*kDETIDSep)
- /* Templates consist of a set of associated resources, at constant offsets from a 'base ID' set by the
- signature resource of the template. In the case of aspect templates, most of the resources in the
- template are accessible from the template as property default values. The property number is the same
- as the offset from the base ID of the resource. In describing the resources which make up templates,
- we give the type, the offset, and a description. For aspect templates, the offset is also the property #.
-
- All templates include the following resource fork resources:
- Type Offset Description
- ---- ------ -----------
- 'rstr' kDETTemplateName Contains the name of the template
- */
- #define kDETTemplateName 0
- /* Aspects, info-pages, and forwarders include the following as well:
- Type Offset Description
- ---- ------ -----------
- 'rstr' kDETRecordType Contains the type of record this applies to
- 'rstr' kDETAttributeType Contains the type of attribute this applies to
- 'detn' kDETAttributeValueTag Contains the tag of the attribute values this applies to
- */
- #define kDETRecordType 1
- #define kDETAttributeType 2
- #define kDETAttributeValueTag 3
- /* ************************************ Aspects */
- /* In the case of aspects, property numbers and resource id offsets are the same. Therefore, some of the following
- defines are used for resource offsets, some are used for dynamically generated properties, and some are used for
- both (i.e., properties which may be dynamically generated, but if they aren't, then they're taken from the
- resource). Resource types are given in all cases below; even if there is no actual resource (for example in
- the case of kDETAspectName), it indicates the type for the dynamically generated property. A resource type of
- 'rstr' corresponds to a property type of kDETPrTypeString; type 'detn' corresponds to kDETPrTypeNumber; and
- 'detb' corresponds to kDETPrTypeBinary.
- Type Offset Description
- ---- ------ -----------
- 'deta' 0 Identifies the type of resource
- 'detc' kDETCode Is the code resource, if any is used
- 'ICN#' kDETAspectMainBitmap
- 'icl8' kDETAspectMainBitmap
- 'icl4' kDETAspectMainBitmap
- 'ics#' kDETAspectMainBitmap
- 'ics8' kDETAspectMainBitmap
- 'ics4' kDETAspectMainBitmap
- 'sicn' kDETAspectMainBitmap Is the icon suite to display for this item type (main aspect only)
- 'rstr' kDETAspectName Contains the name of the item (attribute main aspect only)
- 'rst#' kDETAspectCategory Contains the internal categories for the record type (main aspect only)
- 'rst#' kDETAspectExternalCategory Contains the external (user-visible) names which correspond to the categories in
- kDETAspectCategory; if this resource is not present, external names are taken from
- another template; if no other template provides an external name for a given internal
- category, the internal name is used as the external name (main aspect only)
- 'rstr' kDETAspectKind Is the item kind to display (main aspect only)
- 'detn' kDETAspectGender Is the gender of this kind of object for internationalization (main aspect only)
- 'rstr' kDETAspectWhatIs Is the string for balloon help when item is in sublist (main aspect only)
- 'rstr' kDETAspectAliasKind Is the item kind to display for aliases to this type of item (main aspect only)
- 'detn' kDETAspectAliasGender Is the gender of an alias to this kind of object for internationalization (main aspect only)
- 'rstr' kDETAspectAliasWhatIs Is the string for balloon help when an alias to the item is in sublist (main aspect only)
- 'rst#' kDETAspectBalloons Is a list of strings for balloon help; for each item in an info-page, it's
- property # times 2 is used as an index into this array; if the item is not editable,
- then the property # times 2 plus 1 is used
- 'rstr' kDETAspectNewMenuName Is the string to be used for the user to select new item creation; for records, the
- string is used as a menu entry in the Catalogs menu; for attributes, the string
- is used in a selection dialog invoked by an 'Add...' button
- 'rstr' kDETAspectNewEntryName Is the name to be used for new records (with a digit appended if not unique)
- 'detb' kDETAspectNewValue Is the value to use when creating a new attribute value; the first four bytes
- is the tag; the rest is the attribute value contents
- 'detn' kDETAspectSublistOpenOnNew If true (non-zero), automatically open newly created entries (property can be set
- from a code resource, or via a default value in a resource)
- 'dett' kDETAspectLookup Is the attribute-to-property translation table
- 'rstr' kDETAspectDragInString Is a string describing the action of dragging into this aspect (if any)
- 'rstr' kDETAspectDragInVerb Is a single, short word that's the verb of the action (like 'add' or 'drop'; if
- there's any doubt, use 'OK')
- 'rstr' kDETAspectDragInSummary Is a short phrase that describes the action, suitable to be included in a selection list
- 'rst#' kDETAspectRecordDragIn Is a list of type pairs; in each pair, the first is the type of a record which
- can be dragged into this aspect, and the second is the attribute type to store
- the reference in
- 'rst#' kDETAspectRecordCatDragIn Is a list of category/attribute type pairs; in each pair, the first is the
- category of records which can be dragged in, and the second is the type of
- attribute to place the alias in
- 'rst#' kDETAspectAttrDragIn Is a list of type triples; in each triple, the first is the record type which can be
- dragged from (or '' for any), the second is the attribute type which can be dragged
- in, and the third is the attribute type to store the new attribute in
- 'rst#' kDETAspectDragOut Is a list of attribute types which can be dragged out of this aspect (an 'rst#'
- resource with no entries means nothing can be dragged out; no 'rst#' resource means
- everything can be dragged out)
- 'detm' kDETAspectViewMenu Is a table to fill in the view menu from
- 'detp' kDETAspectReverseSort Is a table listing which properties to sort in reverse order
- 'detw' kDETAspectInfoPageCustomWindow Is a specification of a custom window size/placement & whether to use the
- page-selector (main aspect only)
- 'detv' kDETAspectInfoPageCustomWindow Is a view list which is common to all info-pages (main aspect only)
- */
- #define kDETAspectCode 4
- #define kDETAspectMainBitmap 5
- #define kDETAspectName 6
- #define kDETAspectCategory 7
- #define kDETAspectExternalCategory 8
- #define kDETAspectKind 9
- #define kDETAspectGender 10
- #define kDETAspectWhatIs 11
- #define kDETAspectAliasKind 12
- #define kDETAspectAliasGender 13
- #define kDETAspectAliasWhatIs 14
- #define kDETAspectBalloons 15
- #define kDETAspectNewMenuName 16
- #define kDETAspectNewEntryName 17
- #define kDETAspectNewValue 18
- #define kDETAspectSublistOpenOnNew 19
- #define kDETAspectLookup 20
- #define kDETAspectDragInString 21
- #define kDETAspectDragInVerb 22
- #define kDETAspectDragInSummary 23
- #define kDETAspectRecordDragIn 24
- #define kDETAspectRecordCatDragIn 25
- #define kDETAspectAttrDragIn 26
- #define kDETAspectAttrDragOut 27
- #define kDETAspectViewMenu 28
- #define kDETAspectReverseSort 29
- #define kDETAspectInfoPageCustomWindow 30
- /* Properties: */
- #define kDETNoProperty -1
- /* Each aspect has 250 attribute properties in this range: */
- #define kDETFirstLocalProperty 0
- #define kDETLastLocalProperty (kDETFirstLocalProperty+249)
- /* Developers should use property numbers starting at this point: */
- #define kDETFirstDevProperty 40
- /* The following range provides constant numeric properties for use in patterns and comparisons (constant n is
- given by kDETFirstConstantProperty+n): */
- #define kDETFirstConstantProperty 250
- #define kDETLastConstantProperty (kDETFirstConstantProperty+249)
- /* To convert a number into a constant property, add this: */
- #define kDETConstantProperty kDETFirstConstantProperty
- #define kDETZeroProperty (kDETConstantProperty+0)
- #define kDETOneProperty (kDETConstantProperty+1)
- #define kDETFalseProperty (kDETConstantProperty+0)
- #define kDETTrueProperty (kDETConstantProperty+1)
- /* The following apply to records, attributes, or aliases; they are the name and kind, as they appear in icon lists: */
- #define kDETPrName 3050
- #define kDETPrKind 3051
- /* Access mask properties: */
- #define kDETDNodeAccessMask 25825 /* The DNode access mask */
- #define kDETRecordAccessMask 25826 /* The record access mask */
- #define kDETAttributeAccessMask 25827 /* The attribute access mask */
- #define kDETPrimaryMaskByBit 25828 /* A set of sixteen properties to access all bits of the primary mask */
- /* See AOCE documentation for details definitions of each of these bits: */
- #define kDETPrimarySeeMask kDETPrimaryMaskByBit
- #define kDETPrimaryAddMask (kDETPrimaryMaskByBit+1)
- #define kDETPrimaryDeleteMask (kDETPrimaryMaskByBit+2)
- #define kDETPrimaryChangeMask (kDETPrimaryMaskByBit+3)
- #define kDETPrimaryRenameMask (kDETPrimaryMaskByBit+4)
- #define kDETPrimaryChangePrivsMask (kDETPrimaryMaskByBit+5)
- #define kDETPrimaryTopMaskBit (kDETPrimaryMaskByBit+15)
- /* The following property is zero until we've completed the first catalog lookup; from then on it's 1 */
- #define kDETPastFirstLookup 26550
- /* The following property is the page number; issuing a property command with this property will flip info-pages */
- #define kDETInfoPageNumber 27050
- /* The value of the following properties contains the template number of the targeted aspect's template, and the
- currently open info-page (if any). These values can be used with kDETAspectTemplate and kDETInfoPageTemplate
- target selectors. */
- #define kDETAspectTemplateNumber 26551
- #define kDETInfoPageTemplateNumber 26552
- /* Properties for property commands to deal with sublist items: */
- #define kDETOpenSelectedItems 26553 /* Open selected sublist items */
- #define kDETAddNewItem 26554 /* Add new sublist item */
- #define kDETRemoveSelectedItems 26555 /* Remove selected sublist items */
- /* Property types are used to specify types of properties and conversions between types (zero and negative numbers
- are reserved for Apple; developer code resources can use positive numbers): */
- #define kDETPrTypeNumber -1 /* A number */
- #define kDETPrTypeString -2 /* A string */
- #define kDETPrTypeBinary -3 /* A binary block */
- /* Rez-compatible tag definitions (These are the same as in OCE.h, but they're enums there and can't be rezedゥ