home *** CD-ROM | disk | FTP | other *** search
- # include "TransSkel.h"
-
- # include "FLMaca.h"
- # include "FLMapInfo.h"
- # include "FaceLift.h"
-
- # define enter 3
- # define cr '\r'
-
-
- /*
- * Local data for creating controls
- */
-
-
- /*
- * maxSize = number of point-size selection radio buttons
- * maxStyle = number of style selection check boxes
- * maxFonts = maximum number of fonts allowed in scrollable list
- */
-
- # define maxSize 7
- # define maxStyle 9
- # define maxFonts 102
-
-
- typedef enum /* control types, by function */
- {
- sizeType, /* size radio button */
- styleType /* style check box */
- };
-
-
- typedef struct CtrlInfo
- {
- Str255 cTitle; /* initial control title */
- int ch, cv; /* location of upper left corner */
- } CtrlInfo;
-
-
- static CtrlInfo ctrlInfo[maxSize+maxStyle] =
- {
- { "\pSame", 188, 20 },
- { "\p9", 172, 40 },
- { "\p10", 172, 60 },
- { "\p12", 172, 80 },
- { "\p14", 217, 40 },
- { "\p18", 217, 60 },
- { "\p24", 217, 80 },
- { "\pSame", 312, 20 },
- { "\pPlain", 265, 40 },
- { "\pBold", 265, 60 },
- { "\pItalic", 265, 80 },
- { "\pUnderline", 265, 100 },
- { "\pOutline", 355, 40 },
- { "\pShadow", 355, 60 },
- { "\pSuperscript", 355, 80 },
- { "\pSubscript", 355, 100 }
- };
-
-
- static ControlHandle styleCtrl[maxStyle];
- static ControlHandle sizeCtrl[maxSize];
- static ControlHandle sizeScroll;
- static int trackPart;
-
-
- /*
- * Standard MacWrite point sizes, plus the "any size" selection.
- * The order of these corresponds to the size radio buttons.
- */
-
- static int sizeInfo[maxSize] = { anySize, 9, 10, 12, 14, 18, 24 };
-
-
- /*
- * Masks for manipulating style selections. The order of these
- * corresponds to the style check boxes.
- */
-
-
- static int styleMask[maxStyle] =
- {
- anyStyle,
- 0, /* plain; special-cased */
- styleBold,
- styleItalic,
- styleUnder,
- styleOutline,
- styleShadow,
- styleSuper,
- styleSub
- };
-
-
- /*
- * Standard font specifications
- */
-
-
- typedef struct
- {
- int fontNum;
- StringHandle fontName;
- } FontSpec;
-
-
- static FontSpec fontSpecs[maxFonts];
- static int nFontSpecs;
-
-
- static short fontOffsets[2] = { 0, 137 };
-
-
- static LineList fontStruct =
- {
- nil, /* port - filled in later */
- nil, /* control - filled in later */
- { 20, 5, 116, 141 }, /* text display rect, t, l, b, r */
- 0, /* max lines */
- 6, /* max visible lines */
- 0, /* top visible line */
- 16, /* line height */
- 0, /* number of lines */
- noLine, /* current line */
- false, /* no hiliting */
- 1, /* number of fields/line */
- fontOffsets, /* field offsets */
- nil /* line array */
- };
-
-
- static LListPtr fontList = &fontStruct;
-
-
- static MapSpec *curMSpec;
- static ConvSpec *curCSpec;
- static int curMSpecNo;
-
-
- /* ---------------------------------------------------------------- */
- /* General Control Operations */
- /* ---------------------------------------------------------------- */
-
-
-
- /*
- * Set a control value, but only when it changes, to avoid
- * unnecessary redrawing (ugly, since gobs of them are usually
- * changed together).
- *
- * Use for check boxes and radio buttons only, not scroll bars!
- * (The value is boolean (on/off), not a range.)
- */
-
- static void
- SetControl (ControlHandle ctrl, Boolean value)
- {
- if (mapWind != FrontWindow ())
- value = false;
- if (GetCtlValue (ctrl) != value)
- SetCtlValue (ctrl, value);
- }
-
-
- /*
- * Reset a control's title, if it's different than the current one.
- * The control bounds rectangle is validated because changing the
- * title seems to invalidate it, resulting in an update event.
- * Since the thing was just redrawn, there's no need waste time on
- * an update.
- */
-
- static void
- SetControlTitle (ControlHandle ctrl, StringPtr title)
- {
- Str255 curTitle;
- Rect r;
-
- GetCTitle (ctrl, curTitle);
- if (CompareString (curTitle, title) != 0)
- {
- SetCTitle (ctrl, title);
- r = (**ctrl).contrlRect;
- ValidRect (&r);
- }
- }
-
-
- /* ---------------------------------------------------------------- */
- /* Font List Operations */
- /* ---------------------------------------------------------------- */
-
-
- /*
- * Add a font to the spec list. Return false if there's overrun.
- */
-
- Boolean
- SetFontSpec (int fNum, StringPtr fName)
- {
- StringHandle h;
- Str255 s;
- short i, result;
-
- for (i = 0; i < nFontSpecs; ++i) /* see if already there */
- {
- h = fontSpecs[i].fontName;
- HLock ((Handle) h);
- result = CompareString (*h, fName);
- HUnlock ((Handle) h);
- if (result == 0) /* font name's a duplicate */
- return (true); /* but that's ok */
- }
-
- if (nFontSpecs >= fontList->maxLines) /* will list be too full? */
- {
- NumToString ((long) maxFonts - 2, s);
- Message3 ("\pSorry, I am such a brain-damaged program that I only allow ",
- s, "\p fonts!");
- return (false);
- }
-
- h = (StringHandle) NewHandle ((long) (fName[0] + 1));
- HLock ((Handle) h);
- CopyString (fName, *h);
- HUnlock ((Handle) h);
- fontSpecs[nFontSpecs].fontName = h;
- fontSpecs[nFontSpecs++].fontNum = fNum;
- return (true);
- }
-
-
- /*
- * Set up to construct a new font list. Note that the other
- * selector controls must have been initialized by this point.
- */
-
- void
- ResetFontList (void)
- {
- short i;
-
- for (i = 0; i < fontList->nLines; ++i)
- DisposeHandle ((Handle) fontSpecs[i].fontName);
- nFontSpecs = 0;
- ResetList (fontList);
- SetFontSpec (anyFont, "\pAny");
- SetFontSpec (applFont, "\pApplication");
- }
-
-
- /*
- * Sync information in fontSpec to fontList by constructing the LineList
- * elements.
- */
-
- void
- SyncFontSpecs (void)
- {
- short i, j;
- short tmp;
- FontSpec *f1, *f2;
- StringHandle h1, h2;
- LineHandle hField;
-
- /*
- * Sort font names, except for "Any" and "Application", which
- * stay at the front of the list.
- */
-
- for (i = 2; i < nFontSpecs - 1; ++i)
- {
- for (j = i + 1; j < nFontSpecs; ++j)
- {
- f1 = &fontSpecs[i];
- f2 = &fontSpecs[j];
- h1 = f1->fontName;
- h2 = f2->fontName;
- HLock ((Handle) h1);
- HLock ((Handle) h2);
- if (CompareString (*h1, *h2) > 0)
- {
- f1->fontName = h2;
- f2->fontName = h1;
- tmp = f1->fontNum;
- f1->fontNum = f2->fontNum;
- f2->fontNum = tmp;
- }
- HUnlock ((Handle) h1);
- HUnlock ((Handle) h2);
- }
- }
-
- /*
- * Add names to fontList
- */
-
- ResetList (fontList);
- for (i = 0; i < nFontSpecs; ++i)
- {
- h1 = fontSpecs[i].fontName;
- HLock ((Handle) h1);
- hField = NewLine (1);
- SetFieldStr (hField, *h1);
- HUnlock ((Handle) h1);
- (void) InsertLine (fontList, hField, i);
- }
- SelectLine (fontList, 0);
- ScrollToLine (fontList, 0); /* force scroll to top */
- }
-
-
- /*
- * Given a font number, find its index in the stdFontSpecs
- * array. Return -1 if it's not there.
- */
-
- short
- FontIndex (int fontNum)
- {
- int i;
-
- for (i = 0; i < fontList->nLines; ++i)
- {
- if (fontNum == fontSpecs[i].fontNum)
- return (i);
- }
- return (-1);
- }
-
-
- /*
- * Return a font name corresponding to the given index
- */
-
- void
- FontName (int fontIndex, StringPtr str)
- {
- StringHandle hStr;
-
- hStr = fontSpecs[fontIndex].fontName;
- HLock ((Handle) hStr);
- CopyString (*hStr, str);
- HUnlock ((Handle) hStr);
- }
-
-
- /* ---------------------------------------------------------------- */
- /* Size Control Operations */
- /* ---------------------------------------------------------------- */
-
-
- /*
- * Given a point size, find its index in the sizeInfo
- * array. (Return -1 if it's not there.)
- */
-
- short
- SizeIndex (int size)
- {
- int i;
-
- for (i = 0; i < maxSize; ++i)
- {
- if (size == sizeInfo[i])
- return (i);
- }
- return (-1);
- }
-
-
- static void
- SetSizeScroll (int hilite)
- {
- int value;
-
- value = curCSpec->size;
- if (value == anySize)
- value = 0;
- if (mapWind != FrontWindow ()) /* don't hilite if window not front */
- hilite = 255;
- if (hilite == 0)
- {
- if (value != GetCtlValue (sizeScroll))
- SetCtlValue (sizeScroll, value);
- }
- if (hilite != (**sizeScroll).contrlHilite)
- HiliteControl (sizeScroll, hilite);
- }
-
-
- /*
- * Set the size scroll to the current size value, and turn on the
- * appropriate radio button if the size is one of the standard
- * MacWrite sizes.
- */
-
- static void
- SetSizeCtrls (void)
- {
- int i;
-
- SetSizeScroll (0);
- for (i = 0; i < maxSize; ++i)
- SetControl (sizeCtrl[i], sizeInfo[i] == curCSpec->size);
- }
-
-
- /* ---------------------------------------------------------------- */
- /* Style Control Operations */
- /* ---------------------------------------------------------------- */
-
-
- /*
- * Set the style controls based on the current value of theStyle.
- *
- * The any/same bit and the attributes bits cause the corresponding
- * boxes to be checked if they are set. If the style is zero, it's
- * plain.
- */
-
- static void
- SetStyleCtrls (void)
- {
- int i;
- Boolean any;
- int theStyle;
-
- theStyle = curCSpec->style;
- any = ((theStyle & anyStyle) != 0);
- SetControl (styleCtrl[0], any);
-
- if (any)
- {
- for (i = 1; i < maxStyle; ++i)
- SetControl (styleCtrl[i], false);
- }
- else if (theStyle == 0) /* plain */
- {
- SetControl (styleCtrl[1], true);
- for (i = 2; i < maxStyle; ++i)
- SetControl (styleCtrl[i], false);
- }
- else /* not plain */
- {
- SetControl (styleCtrl[1], false);
- for (i = 2; i < maxStyle; ++i)
- SetControl (styleCtrl[i], (theStyle & styleMask[i]) != 0);
- }
- }
-
-
- /*
- * Determine style value. The argument is an index into the control
- * array not a style value itself. Style controls interact in
- * wretched complexity.
- *
- * If any/same is toggled on, all the other style boxes are toggled off.
- * If it's toggled off, plain is toggled on.
- *
- * If plain is toggled on, all the other style boxes are toggled off.
- * If it's toggled off, any/same is toggled on.
- *
- * The other style boxes correspond to style attributes. If any of
- * them are toggled on, then any/same and plain are toggle off if
- * they were on. If all the attributes are toggled off, plain is
- * toggled on. Superscript and subscript are mutually exclusive,
- * so that if one of them is toggled on, the other is toggled off.
- */
-
- static int
- NewStyleValue (int i)
- {
- int curValue;
- int theStyle;
-
- curValue = GetCtlValue (styleCtrl[i]); /* current value - new value */
- /* will be opposite */
- theStyle = curCSpec->style;
-
- if (i == 0) /* any/same box clicked */
- {
- if (curValue) /* currently any, turn off (implies plain) */
- theStyle = 0;
- else
- theStyle = styleMask[0]; /* currently off, turn on */
- }
- else if (i == 1) /* plain box clicked */
- {
- if (curValue) /* currently plain, turn off (implies any/same) */
- theStyle = styleMask[0];
- else
- theStyle = 0; /* currently off, turn on */
- }
- else
- {
- /*
- * Flip box value.
- * Can't have superscript and subscript at the same time.
- */
- if (curValue) /* currently on, turn off */
- theStyle &= ~styleMask[i];
- else /* currently off, turn on (turn any/same off) */
- {
- theStyle |= styleMask[i];
- theStyle &= ~styleMask[0];
- }
-
- if (i == 7) /* superscript. if turning on, turn off sub */
- {
- if (curValue == 0)
- theStyle &= ~styleMask[8];
- }
- if (i == 8) /* subscript. if turning on, turn off super */
- {
- if (curValue == 0)
- theStyle &= ~styleMask[7];
- }
- }
- return (theStyle);
- }
-
-
- /* ---------------------------------------------------------------- */
-
-
- /*
- * Set a field in the currently selected line. Don't call this if
- * no line is selected, or if the field already has the same value.
- */
-
- void
- SetMapFieldValue (int fieldType, int value)
- {
- int fieldOffset;
- Str255 s;
- StringPtr defStr;
-
- /*
- * Figure out the default string for putting in the mapping if
- * any/same was selected.
- */
-
- if (curMSpec->isInput == true)
- {
- defStr = (StringPtr) "\pAny";
- fieldOffset = 0;
- }
- else
- {
- defStr = (StringPtr) "\pSame";
- fieldOffset = mapList->nFields/2;
- }
-
- switch (fieldType)
- {
-
- case fontField:
- undoVal = curCSpec->font;
- FontToStr (value, s, defStr);
- curCSpec->font = value;
- SelectLine (fontList, FontIndex (value));
- break;
-
- case sizeField:
- undoVal = curCSpec->size;
- SizeToStr (value, s, defStr);
- curCSpec->size = value;
- SetSizeCtrls ();
- break;
-
- case styleField:
- undoVal = curCSpec->style;
- StyleToStr (value, s, defStr);
- curCSpec->style = value;
- SetStyleCtrls ();
- break;
- }
-
- PasteField (mapList, mapList->curLine, fieldOffset + fieldType, s);
- mapModified = true;
- undoOp = undoFieldChg;
- undoFieldType = fieldType;
- }
-
-
- /*
- * Set the selection controls and font list to reflect currently
- * selected conversion specification. Also sets current MapSpec
- * and ConvSpec pointers.
- */
-
- void
- SetSelectors (int lineNo)
- {
- int i;
- StringPtr anySame;
- FieldHandle hField;
-
- if (lineNo == noLine) /* no map line selected */
- {
- curMSpec = nil;
- curMSpecNo = noLine;
-
- ListActivate (fontList, false);
-
- SetSizeScroll (255);
- for (i = 0; i < maxSize; ++i)
- SetControl (sizeCtrl[i], false);
-
- for (i = 0; i < maxStyle; ++i)
- SetControl (styleCtrl[i], false);
-
- /*SetIO ();*/
-
- return;
- }
-
- curMSpec = &mapSpec[curMSpecNo = lineNo];
- if (curMSpec->isInput)
- {
- curCSpec = &curMSpec->inFmt;
- anySame = (StringPtr) "\pAny";
- }
- else
- {
- curCSpec = &curMSpec->outFmt;
- anySame = (StringPtr) "\pSame";
- }
-
- hField = ListLine (fontList, 0);
- HLock ((Handle) hField);
- if (CompareString ((**hField).fStr, anySame) != 0)
- PasteField (fontList, 0, 0, anySame);
- HUnlock ((Handle) hField);
- SetControlTitle (sizeCtrl[0], anySame);
- SetControlTitle (styleCtrl[0], anySame);
-
- SelectLine (fontList, FontIndex (curCSpec->font));
- ListActivate (fontList, true);
- if (showCurFont)
- ScrollToLine (fontList, fontList->curLine);
- SetSizeCtrls ();
- SetStyleCtrls ();
- /*SetIO ();*/
- }
-
-
- static void
- SetIO (Boolean value)
- {
- Str255 s;
-
- MarkToStr (value, s);
- PasteField (mapList, mapList->curLine, markField, s);
- MarkToStr (!value, s);
- PasteField (mapList, mapList->curLine, markField+mapList->nFields/2, s);
- }
-
-
- static pascal void
- TrackScroll (ControlHandle theScroll, short partCode)
- {
- short value, curVal;
-
- if (partCode == trackPart) /* still in same part? */
- {
- switch (partCode)
- {
- case inUpButton: value = -1; break;
- case inDownButton: value = 1; break;
- case inPageUp: value = -5; break;
- case inPageDown: value = 5; break;
- }
- curVal = GetCtlValue (sizeScroll);
- SetCtlValue (sizeScroll, curVal + value);
- value = GetCtlValue (sizeScroll);
- if (value != curVal) /* did it change? */
- {
- if (value == 0)
- value = anySize;
- SetMapFieldValue (sizeField, value);
- }
- }
- }
-
-
- /*
- * Map window mouse handler.
- *
- * First test the scroll bars, and return if one was hit; they
- * require no further action.
- *
- * Then check for hit in map list. If a new line was selected, or
- * if the click was in the other half of the current line, set the
- * selectors to the values, and disable undo.
- *
- * Then, if a line is currently selected, check the selection controls.
- * If one is hit, change the values in the current line and reset the
- * controls properly - but only if the current values *change*.
- */
-
- static pascal void
- Mouse (Point pt, long t, short mods)
- {
- ControlHandle ctrl;
- int index;
- int type;
- long refCon;
- int newVal;
- int curLine;
-
- if (ListTestScroll (mapList, pt) || ListTestScroll (fontList, pt))
- return;
-
- curLine = mapList->curLine; /* current line */
- if (ListTestText (mapList, pt))
- {
- if (curLine != mapList->curLine) /* different now? */
- undoOp = noUndo;
- GetMouse (&pt);
- if (mapList->curLine != noLine)
- {
- Boolean newIO;
-
- newIO = (Boolean) (pt.h
- < mapList->textRect.left + mapList->offset[mapList->nFields/2]);
- if (/*newVal*/ newIO != mapSpec[mapList->curLine].isInput)
- {
- undoOp = noUndo;
- mapSpec[mapList->curLine].isInput = newIO;
- SetIO (newIO);
- }
- }
- SetSelectors (mapList->curLine);
- FixMenus ();
- return;
- }
-
- if (curMSpec == nil)
- return; /* no current line - controls irrelevant */
-
- if (ListTestText (fontList, pt))
- {
- if (fontList->curLine == noLine)
- SelectLine (fontList, fontList->nLines - 1);
- newVal = fontSpecs[fontList->curLine].fontNum;
- if (curCSpec->font != newVal)
- {
- SetMapFieldValue (fontField, newVal);
- FixMenus ();
- }
- return;
- }
-
- /*
- * If a control isn't hit and it's not a check box, it's the size
- * scroll. Track as necessary. Otherwise the control is a check
- * box or radio button. The control type and index is coded in
- * the reference constant (see MakeControl).
- */
-
- if ((trackPart = FindControl (pt, mapWind, &ctrl)) != 0)
- {
- if (trackPart != inCheckBox)
- {
- int saveVal;
-
- /*
- * This isn't quite right, because non-thumb hits might not change
- * the value - if already at end of range, for instance.
- */
-
- if (trackPart == inThumb)
- {
- /*
- * Track thumb and reset size if it changed
- */
- (void) TrackControl (sizeScroll, pt, nil);
- newVal = GetCtlValue (sizeScroll);
- if (newVal == 0)
- newVal = anySize;
- if (newVal != curCSpec->size)
- SetMapFieldValue (sizeField, newVal);
- }
- else
- {
- /*
- * Track other parts. Save starting value, because
- * SetMapFieldValue (called by TrackScroll) may set
- * the value many times, but the undo value is really
- * the start value of the scroll.
- */
- saveVal = curCSpec->size;
- (void) TrackControl (sizeScroll, pt, TrackScroll);
- undoVal = saveVal;
- }
- }
- else if (TrackControl (ctrl, pt, nil) == inCheckBox)
- {
- refCon = GetCRefCon (ctrl);
- index = refCon & 0x00ff;
- type = (refCon & 0xff00) >> 8;
-
- switch (type)
- {
-
- case sizeType:
- newVal = sizeInfo[index];
- if (newVal != curCSpec->size)
- SetMapFieldValue (sizeField, newVal);
- break;
-
- case styleType:
- newVal = NewStyleValue (index);
- if (newVal != curCSpec->style)
- SetMapFieldValue (styleField, newVal);
- break;
-
- }
-
- }
- FixMenus ();
- return;
- }
- }
-
-
- /*
- * Process key click in window for mark string. Only keys used are tab,
- * enter and return. Typing any of them selects the next line. If the
- * shift key is down, then the previous line is selected.
- */
-
- static pascal void
- Key (short c, short code, short mods)
- {
- if (curMSpec == nil)
- return;
-
- switch (c)
- {
-
- case '\t':
- case enter:
- case cr:
- undoOp = noUndo;
- if (mods & shiftKey)
- {
- if (--curMSpecNo < 0)
- curMSpecNo = mapList->nLines - 1;
- }
- else
- {
- if (++curMSpecNo >= mapList->nLines)
- curMSpecNo = 0;
- }
- SelectMapping (curMSpecNo);
- break;
-
- }
- }
-
-
- static pascal void
- Update (Boolean resized)
- {
- int i;
- Rect r;
-
- MoveTo (65, 14);
- DrawString ("\pFont");
- MoveTo (180, 14);
- DrawString ("\pPoint Size");
- MoveTo (322, 14);
- DrawString ("\pStyle");
- DrawControls (mapWind);
- DrawListFrame (fontList);
- DrawListFrame (mapList);
-
- MoveTo (68, 143);
- DrawString ("\pInput Formats");
- MoveTo (287, 143);
- DrawString ("\pOutput Formats");
-
- DrawListText (fontList);
- DrawListText (mapList);
- }
-
-
- /*
- * When the window is activated, do appropriate map list and font list
- * line and scroll bar hiliting, and set size and style controls to
- * current values.
- *
- * When the window is deactivated, all hiliting is turned off, the
- * scroll bars are unhilited and the size and style controls go blank.
- *
- * Note that SetSelectors takes care of setting font list line and scroll
- * bar hiliting and size scroll hiliting; it doesn't have to be done here.
- */
-
- static pascal void
- Activate (Boolean active)
- {
- if (active)
- {
- SkelDoUpdates ();
- ListActivate (mapList, true);
- SetSelectors (mapList->curLine);
- }
- else
- {
- SetSelectors (noLine);
- ListActivate (mapList, false);
- }
- FixMenus ();
- }
-
-
- static pascal void
- Clobber (void)
- {
- HideWindow (mapWind);
- /*DisposeList (mapList);
- DisposeList (fontList);*/
- DisposeWindow (mapWind);
- }
-
-
- /*
- * Create controls. These are created in the same order as the specs
- * in the ctrlInfo array.
- */
-
- static ControlHandle
- MakeControl (int proc, int type, int index)
- {
- static short i = 0; /* used to step through ctrlInfo array */
- CtrlInfo *cInfo;
- Rect r;
- StringPtr title;
- short h, v;
- ControlHandle ctrl;
-
- cInfo = &ctrlInfo[i++];
- title = cInfo->cTitle;
- h = cInfo->ch;
- v = cInfo->cv;
- SetRect (&r, h, v, h + StringWidth (title) + 20, v + 20);
- ctrl = NewControl (mapWind,
- &r,
- title,
- true,
- 0, 0, 1,
- proc,
- (long) (type << 8 | index));
- return (ctrl);
- }
-
-
- void
- MapSetup (void)
- {
- short i;
- Rect r;
-
- SetRect (&r, 0, 0, 460, 251);
- if (SkelQuery (skelQHasColorQD))
- {
- mapWind = NewCWindow (nil, &r, "\p", false, noGrowDocProc,
- (WindowPtr) -1L, false, 0L);
- }
- else
- {
- mapWind = NewWindow (nil, &r, "\p", false, noGrowDocProc,
- (WindowPtr) -1L, false, 0L);
- }
- (void) SkelWindow (mapWind,
- Mouse,
- Key,
- Update,
- Activate,
- nil,
- Clobber,
- nil,
- false);
-
- TextFont (0); /* do this so StringWidth calculations */
- TextSize (0); /* for controls will be accurate */
-
- SetRect (&r, 167, 104, 256, 120);
- sizeScroll = NewControl (mapWind, &r, "\p", true, 0, 0, maxPtSize,
- scrollBarProc, 0L);
- for (i = 0; i < maxSize; ++i)
- sizeCtrl[i] = MakeControl (radioButProc, sizeType, i);
-
- for (i = 0; i < maxStyle; ++i)
- styleCtrl[i] = MakeControl (checkBoxProc, styleType, i);
-
- /*
- * These two are created with title "Same" so that the control bounds
- * rect will be big enough for both "Same" and "Any". Change title now
- * because initial title should really be "Any".
- */
-
- SetControlTitle (sizeCtrl[0], "\pAny");
- SetControlTitle (styleCtrl[0], "\pAny");
-
- InitList (fontList, maxFonts); /* initialize empty list */
- InitList (mapList, maxMappings);
-
- /*
- * Add default set of fonts: ImageWriter fonts and LaserWriter fonts.
- */
-
- ResetFontList ();
- StrFonts (false);
-
- ClearMapName ();
- SkelPositionWindow (mapWind, skelPositionOnMainDevice,
- FixRatio (1, 2), FixRatio (1, 5));
- ShowWindow (mapWind);
- }
-