SectionOptionsExpDialog
SectionOptionsExpDialog Display publisher and subscriber options
dialog boxes
#include <Editions.h> Edition Manager
OSErr SectionOptionsExpDialog ( reply,, where, expansionDITLresID,
dlgHook, filterProc, yourDataPtr);
SectionOptionsReply * reply ; [TOKEN:64768]+the new section options
reply record.
Point where ; [TOKEN:28783]sitions the dialog box on the
screen
short expansionDITLresID ; should be 0 or a valid dialog item
list ('DITL') resource ID
ExpDlgHookProcPtr dlgHook ; [TOKEN:64769]+be a valid expandable dialog
hook procedure pointer or NIL
ExpModalFilterProcPtr filterProc ; should be a valid expandable modal
filter procedure pointer or NIL
void * yourDataPtr ; is reserved for your use
returns Error Code; 0=no error
The NewSubscriberExpDialog, NewPublisherExpDialog, and
SectionOptionsExpDialog functions are the same as the simple dialog
functions but have five additional parameters. These additional parameters
allow you to add items to the bottom of the dialog boxes, apply alternate
mapping of events to item hits, apply alternate meanings to the item hits, and
choose the location of the dialog boxes.
* reply; contains a pointer from the new subscriber reply, new publisher
reply, or the section options reply records.
where ; You can automatically center the dialog box by passing (-1, -1) in
the where parameter.
expansionDITLresID; should be 0 or a valid dialog item list ('DITL') resource ID. This
integer is the ID of a dialog item list whose items are appended to
the end of the standard dialog item list. The dialog items keep
their relative positions, but they are moved as a group to the
bottom of the dialog box. See the Dialog Manager for additional
information on dialog item lists.
dlgHook; should be a valid expandable dialog hook procedure pointer or NIL.
This procedure is called after each call to the ModalDialog procedure.
The dialog hook procedure takes the appropriate action, such as
filling in a check box. The itemOffset parameter to the procedure is
the number of items in the dialog item list before your expansion
dialog items. You need to subtract the item offset from the item hit to
get the relative item number in the expansion dialog item list. The
return value from the dialog hook procedure is the absolute item
number.
filterProc ; should be a valid expandable modal filter procedure pointer or NIL.
This procedure is called by the ModalDialog procedure. This function
allows you to map real events (such as a mouse-down event) to an
item hit (such as clicking a Cancel button). For instance, you may
want to map a keyboard equivalent to an item hit.
*yourDataPtr ; is reserved for your use. It is passed back to your hook and
modal-dialog filter function. This parameter does not have to be of
type Ptr--it can be any 32-bit quantity that you want. In Pascal,
you can pass in register A6 for yourDataPtr, and make dialog hook
and filter procedure local functions without the last parameter. The
stack frame is set up properly for these functions to access their
parent local variables. See the Standard File Package for detailed
information.
Returns: an operating system Error Code.
noErr (0) No error
badSubPartErr (-454) Bad edition container spec
editionMgrInitErr (-450) Manager not initialized

Notes: For the NewPublisherExpDialog and NewSubscriberExpDialog
functions, all the pseudo-items for the Standard File Package such as:
sfHookFirstCall
sfHookNullEvent
sfHookRebuildList
sfHookLastCall
emHookRedrawPreview
For the SectionOptionsExpDialog function, the only valid pseudo-items
are
sfHookFirstCall emHookGoToPublisher
sfHookNullEvent emHookGetEditionNow
sfHookLastCall emHookSendEditionNow
emHookRedrawPreview emHookManualUpdateMode
emHookCancelSection emHookAutoUpdateMode
See Customizing Your Interface for more information on
Standard File Package pseudo-items.
If you have an expandable dialog hook function, it must contain the
following parameters.
short MyExpDlgHook ( short itemOffset, short itemHit, DialogPtr
theDialog, Ptr yourDataPtr);
If you have an expandable modal-dialog filter function, it must contain the
following parameters.
Boolean MyExpModalFilter (DialogPtr theDialog, EventRecord
*theEvent, short itemOffset, short *itemHit, Ptr
yourDataPtr);