*** choice.c.orig Tue May 14 13:59:29 1996 --- choice.c Tue May 14 13:59:30 1996 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/choice.c,v 3.0 1996/05/06 16:04:00 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/choice.c,v 3.1 1996/05/14 12:55:55 william Exp $"; #endif *************** *** 1456,1461 **** StyleMenu(x, y, FALSE); } else { ! if (curChoice != NOTHING && ! !(curChoice == DRAWTEXT && textCursorShown)) { if (TieLooseEnds()) { SetCurChoice(NOTHING); --- 1456,1460 ---- StyleMenu(x, y, FALSE); } else { ! if (curChoice == DRAWTEXT && !textCursorShown) { if (TieLooseEnds()) { SetCurChoice(NOTHING); *************** *** 1483,1488 **** int saved_font=curFont; ! if (curChoice != NOTHING && ! !(curChoice == DRAWTEXT && textCursorShown)) { if (TieLooseEnds()) { SetCurChoice(NOTHING); --- 1482,1486 ---- int saved_font=curFont; ! if (curChoice == DRAWTEXT && !textCursorShown) { if (TieLooseEnds()) { SetCurChoice(NOTHING); *************** *** 1519,1524 **** TextVSpaceLoop(button_ev); } else { ! if (curChoice != NOTHING && ! !(curChoice == DRAWTEXT && textCursorShown)) { if (TieLooseEnds()) { SetCurChoice(NOTHING); --- 1517,1521 ---- TextVSpaceLoop(button_ev); } else { ! if (curChoice == DRAWTEXT && !textCursorShown) { if (TieLooseEnds()) { SetCurChoice(NOTHING); *************** *** 1550,1555 **** int cur_index, saved_index; ! if (curChoice != NOTHING && ! !(curChoice == DRAWTEXT && textCursorShown)) { if (TieLooseEnds()) { SetCurChoice(NOTHING); --- 1547,1551 ---- int cur_index, saved_index; ! if (curChoice == DRAWTEXT && !textCursorShown) { if (TieLooseEnds()) { SetCurChoice(NOTHING); *************** *** 1754,1759 **** FillMenu(x, y, FALSE); } else { ! if (curChoice != NOTHING && ! !(curChoice == DRAWTEXT && textCursorShown)) { if (TieLooseEnds()) { SetCurChoice(NOTHING); --- 1750,1754 ---- FillMenu(x, y, FALSE); } else { ! if (curChoice == DRAWTEXT && !textCursorShown) { if (TieLooseEnds()) { SetCurChoice(NOTHING); *************** *** 1778,1783 **** PenMenu(x, y, FALSE); } else { ! if (curChoice != NOTHING && ! !(curChoice == DRAWTEXT && textCursorShown)) { if (TieLooseEnds()) { SetCurChoice(NOTHING); --- 1773,1777 ---- PenMenu(x, y, FALSE); } else { ! if (curChoice == DRAWTEXT && !textCursorShown) { if (TieLooseEnds()) { SetCurChoice(NOTHING); *** drawing.c.orig Tue May 14 13:59:33 1996 --- drawing.c Tue May 14 13:59:34 1996 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/drawing.c,v 3.0 1996/05/06 16:04:35 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/drawing.c,v 3.1 1996/05/14 17:31:10 william Exp $"; #endif *************** *** 1368,1371 **** --- 1368,1731 ---- } + static + int DoShortCut(name, key_sym, state, args) + char *name, *args; + KeySym key_sym; + unsigned int state; + { + if ((state & ControlMask) && (!(state & Mod1Mask))) { + switch (key_sym&0xff) { + case 'a': /*^a*/ SelAllObj(TRUE); break; + case 'b': /*^b*/ BackProc(); break; + case 'c': /*^c*/ ChangeDomain(); break; + case 'd': /*^d*/ DupSelObj(); break; + case 'e': /*^e*/ PushCurChoice(); break; + case 'f': /*^f*/ FrontProc(); break; + case 'g': /*^g*/ GroupSelObj(); break; + case 'h': /*^h*/ return(INVALID); + case 'i': /*^i*/ Instantiate(); break; + case 'j': /*^j*/ return(INVALID); + case 'k': /*^k*/ PopIcon(); break; + case 'l': /*^l*/ AlignSelObjs(); break; + case 'm': /*^m*/ return(INVALID); + case 'n': /*^n*/ NewProc(); break; + case 'o': /*^o*/ OpenProc(); break; + case 'p': /*^p*/ Dump(""); break; + case 'q': /*^q*/ return QuitProc(); + case 'r': /*^r*/ ClearAndRedrawDrawWindow(); break; + case 's': /*^s*/ SaveFile(); break; + case 't': /*^t*/ AlignSelToGrid(); break; + case 'u': /*^u*/ UngroupSelObj(); break; + case 'v': /*^v*/ PushIcon(); break; + case 'w': /*^w*/ SetCurChoice(DRAWTEXT); break; + case 'x': /*^x*/ DelAllSelObj(); break; + case 'y': /*^y*/ if (!CopyToCutBuffer()) return BAD; break; + case 'z': /*^z*/ return AnimateProc(); + case ',': /*^,*/ ScrollLeft(NULL); break; + case '.': /*^.*/ ScrollRight(NULL); break; + case '-': /*^-*/ PrintWithCommand(""); break; + } + } else if ((state & Mod1Mask) && (!(state & ControlMask))) { + switch (key_sym&0xff) { + case 'a': /*#a*/ AddAttrs(); break; + case 'b': /*#b*/ return ProbeProc(); + case 'c': /*#c*/ RotateCounter(); break; + case 'd': /*#d*/ DecGrid(); break; + case 'e': /*#e*/ AnimateSel(); break; + case 'f': /*#f*/ FlashSelColor(); break; + case 'g': /*#f*/ ToggleGridShown(); break; + case 'h': /*#h*/ FlipHorizontal(); break; + case 'i': /*#i*/ IncGrid(); break; + case 'j': /*#j*/ HideAllAttrNames(); break; + case 'k': /*#k*/ SetCurChoice(NOTHING); break; + case 'l': /*#l*/ DistrSelObjs(); break; + case 'm': /*#m*/ MoveAttr(); break; + case 'n': /*#n*/ ShowAllAttrNames(); break; + case 'o': /*#o*/ ZoomOut(); break; + case 'p': /*#p*/ ImportFile(); break; + case 'q': /*#q*/ SetCurChoice(DRAWPOLY); break; + case 'r': /*#r*/ SetCurChoice(DRAWBOX); break; + case 's': /*#s*/ return SolveProc(); + case 't': /*#t*/ DetachAttrs(); break; + case 'u': /*#u*/ UndoCmd(); break; + case 'v': /*#v*/ FlipVertical(); break; + case 'w': /*#w*/ RotateClockWise(); break; + case 'x': /*#x*/ return EscapeProc(); + case 'y': /*#y*/ return SimulateProc(); + case 'z': /*#z*/ ZoomIn(); break; + case '9': /*#9*/ MakePreciseArc(); break; + case '0': /*#0*/ UpdateSelObjs(); break; + case ',': /*#,*/ ScrollUp(NULL); break; + case '.': /*#.*/ ScrollDown(NULL); break; + case '-': /*#-*/ ShowAllAttrs(); break; + case '{': /*#{*/ AlignObjsTop(); break; + case '+': /*#+*/ AlignObjsMiddle(); break; + case '}': /*#}*/ AlignObjsBottom(); break; + case '[': /*#[*/ AlignObjsLeft(); break; + case '=': /*#=*/ AlignObjsCenter(); break; + case ']': /*#]*/ AlignObjsRight(); break; + case '"': /*#"*/ MakeRegularPolygon(); break; + case '%': /*#%*/ SetPrintReduction(); break; + case ':': /*#:*/ DefaultZoom(); break; + case '`': /*#`*/ ZoomWayOut(); break; + case '~': /*#~*/ SaveNewFile(TRUE); break; + case ';': /*#;*/ CutMaps(); break; + case '_': /*#_*/ AbutHorizontal(); break; + case '|': /*#|*/ AbutVertical(); break; + case '#': /*##*/ BreakUpText(); break; + case '^': /*#^*/ ScrollToOrigin(); break; + case '@': /*#@*/ ToggleMoveMode(); break; + case '$': /*#$*/ SetCurChoice(VERTEXMODE); break; + case '&': /*#&*/ AlignSelToPage(); break; + case '*': /*#**/ RedoCmd(); break; + case '(': /*#(*/ ImportEPSFile(FALSE); break; + case ')': /*#)*/ ScaleAllSelObj(); break; + case '<': /*#<*/ LockSelObj(); break; + case '>': /*#>*/ UnlockSelObj(); break; + } + } else if ((state & Mod1Mask) && (state & ControlMask)) { + switch (key_sym&0xff) { + case 'a': /*^#a*/ AddPoint(); break; + case 'b': /*^#b*/ ChangeFontStyle(STYLE_BR); break; + case 'c': /*^#c*/ ChangeFontJust(JUST_C); break; + case 'd': /*^#d*/ DeletePoint(); break; + case 'e': /*^#e*/ SetCurChoice(DRAWRCBOX); break; + case 'f': /*^#f*/ InvertXBitmaps(); break; + case 'g': /*^#g*/ ToggleSnapOn(); break; + case 'h': /*^#h*/ HideAllAttrs(); break; + case 'i': /*^#i*/ MakeIconic(); break; + case 'j': /*^#j*/ UnMakeIconic(); break; + case 'k': /*^#k*/ ToggleColorPostScript(); break; + case 'l': /*^#l*/ ChangeFontJust(JUST_L); break; + case 'm': /*^#m*/ MakeSymbolic(); break; + case 'n': /*^#n*/ UnMakeSymbolic(); break; + case 'o': /*^#o*/ ChangeFontStyle(STYLE_NR); break; + case 'p': /*^#p*/ ChangeFontStyle(STYLE_BI); break; + case 'q': /*^#q*/ SetCurChoice(DRAWPOLYGON); break; + case 'r': /*^#r*/ ChangeFontJust(JUST_R); break; + case 's': /*^#s*/ SaveNewFile(FALSE); break; + case 't': /*^#t*/ ChangeFontStyle(STYLE_NI); break; + case 'u': /*^#u*/ UpdateSymbols(); break; + case 'v': /*^#v*/ SetCurChoice(DRAWCIRCLE); break; + case 'w': /*^#w*/ ToggleAllSelLineType(); break; + case 'x': /*^#x*/ ToggleWhereToPrint(); break; + case 'y': /*^#y*/ if (!PasteFromCutBuffer()) return(BAD); break; + case 'z': /*^#z*/ SetCurChoice(DRAWARC); break; + case '.': /*^#.*/ ImportXBitmapFile(); break; + case ',': /*^#,*/ ImportXPixmapFile(); break; + case '-': /*^#-*/ ToggleGridSystem(); break; + } + } else if (name != NULL && key_sym == '\0' && state == 0) { + XButtonEvent button_ev; + + button_ev.state = ShiftMask; + if (strcmp(name, "ScrollPageUp()") == 0) { + ScrollUp (&button_ev); + } else if (strcmp(name, "ScrollPageDown()") == 0) { + ScrollDown (&button_ev); + } else if (strcmp(name, "ScrollPageRight()") == 0) { + ScrollRight (&button_ev); + } else if (strcmp(name, "ScrollPageLeft()") == 0) { + ScrollLeft (&button_ev); + } else if (strcmp(name, "FlushUndoBuffer()") == 0) { + FlushUndoBuffer(); + } else if (strcmp(name, "PrintMsgBuffer()") == 0) { + PrintMsgBuffer(); + } else if (strcmp(name, "SaveOrigin()") == 0) { + SaveOrigin(); + } else if (strcmp(name, "RestoreImageWH()") == 0) { + RestoreImageWH(); + } else if (strcmp(name, "UpdateEPS()") == 0) { + UpdateEPS(); + } else if (strcmp(name, "ToggleMapShown()") == 0) { + ToggleMapShown(); + } else if (strcmp(name, "ToggleUseGrayScale()") == 0) { + ToggleUseGray(); + } else if (strcmp(name, "FreeHandMode()") == 0) { + SetCurChoice (FREEHAND); + } else if (strcmp(name, "SaveSymInLibrary()") == 0) { + SaveSymInLibrary(); + } else if (strcmp(name, "CenterAnEndPoint()") == 0 || + strcmp(name, "CenterAVertex()") == 0) { + CenterAnEndPoint(); + } else if (strcmp(name, "NextPage()") == 0) { + NextPage(); + } else if (strcmp(name, "PrevPage()") == 0) { + PrevPage(); + } else if (strcmp(name, "NamePages()") == 0) { + NamePages(); + } else if (strcmp(name, "GotoPage()") == 0) { + GotoPage(); + } else if (strcmp(name, "AddPageBefore()") == 0) { + AddPageBefore(); + } else if (strcmp(name, "AddPageAfter()") == 0) { + AddPageAfter(); + } else if (strcmp(name, "DeleteCurPage()") == 0) { + DeleteCurPage(); + } else if (strcmp(name, "TogglePageLineShown()") == 0) { + TogglePageLineShown(); + } else if (strcmp(name, "SpecifyDrawingSize()") == 0) { + SpecifyDrawingSize(); + } else if (strcmp(name, "PrintOnePage()") == 0) { + PrintOnePage(); + } else if (strcmp(name, "ToggleNamedAttrShown()") == 0) { + if (args != NULL) { + ToggleNamedAttrShown(args); + } + } else if (strcmp(name, "AttachFileAttrs()") == 0) { + AddFileAttrs(); + } else if (strcmp(name, "DetachFileAttrs()") == 0) { + DetachFileAttrs(); + } else if (strcmp(name, "EditFileAttrs()") == 0) { + EditFileAttrs(); + } else if (strcmp(name, "PrintSelectedObjs()") == 0) { + PrintSelectedObjs(); + } else if (strcmp(name, "InputPolyPts()") == 0) { + InputPolyPts(); + } else if (strcmp(name, "InputPolygonPts()") == 0) { + InputPolygonPts(); + } else if (strcmp(name, "EditAttrs()") == 0) { + EditAttrs(); + } else if (strcmp(name, "ConvertIntSpline()") == 0) { + ConvertIntSpline(); + } else if (strcmp(name, "PasteFromFile()") == 0) { + if (!PasteFromFile()) return (INVALID); + } else if (strcmp(name, "ToggleShowMeasurement()") == 0) { + ToggleShowMeasurement(); + } else if (strcmp(name, "SetMeasureUnit()") == 0) { + SetMeasureUnit(); + } else if (strcmp(name, "Cut()") == 0) { + CutToCutBuffer(); + } else if (strcmp(name, "ToggleSmoothHinge()") == 0) { + ToggleSmoothHinge(); + } else if (strcmp(name, "ToggleShowMenubar()") == 0) { + ToggleShowMenubar(); + } else if (strcmp(name, "ToggleShowStatus()") == 0) { + ToggleShowStatus(); + } else if (strcmp(name, "BrowseXBitmap()") == 0) { + BrowseXBitmap(); + } else if (strcmp(name, "BrowseXPixmap()") == 0) { + BrowseXPixmap(); + } else if (strcmp(name, "SpecifyPaperSize()") == 0) { + SpecifyPaperSize(); + } else if (strcmp(name, "ToggleOneMotionSelMove()") == 0) { + ToggleOneMotionSelectMove(); + } else if (strcmp(name, "GoBack()") == 0) { + NavigateBack(); + } else if (strcmp(name, "GoForward()") == 0) { + NavigateForward(); + } else if (strcmp(name, "RefreshCurrent()") == 0) { + NavigateRefresh(); + } else if (strcmp(name, "HotList()") == 0) { + NavigateHotList(); + } else if (strcmp(name, "AddCurrentToHotList()") == 0) { + NavigateAddToHotList(); + } else if (strcmp(name, "SessionHistory()") == 0) { + NavigateSessionHistory(); + } else if (strcmp(name, "ToggleHyperSpace()") == 0) { + ToggleHyperSpace (FALSE); + } else if (strcmp(name, "EmbedEPSFile()") == 0) { + ImportEPSFile (TRUE); + } else if (strcmp(name, "SetSelLineWidth()") == 0) { + SetSelectedLineWidth(); + } else if (strcmp(name, "AddColor()") == 0) { + AddColor(); + } else if (strcmp(name, "ImportAttrs()") == 0) { + ImportAttrs(); + } else if (strcmp(name, "ExportAttrs()") == 0) { + ExportAttrs(); + } else if (strcmp(name, "MergeWithTable()") == 0) { + MergeWithTable(); + } else if (strcmp(name, "ExportToTable()") == 0) { + ExportToTable(); + } else if (strcmp(name, "DeletePages()") == 0) { + DeletePages(); + } else if (strcmp(name, "PrintOneFilePerPage()") == 0) { + PrintOneFilePerPage(); + } else if (strcmp(name, "ImportGIFFile()") == 0) { + ImportGIFFile(); + } else if (strcmp(name, "SetExportPixelTrim()") == 0) { + SetExportPixelTrim (NULL); + #ifdef _TGIF_WB + } else if (strcmp(name, "WhiteBoard()") == 0) { + WhiteBoard(); + #endif /* _TGIF_WB */ + } else if (strcmp(name, "ToggleColorLayers()") == 0) { + ToggleColorLayers(); + } else if (strcmp(name, "ToggleStretchableText()") == 0) { + ToggleStretchableText(); + } else if (strcmp(name, "BreakUpBit/Pixmap()") == 0) { + BreakUpMaps(); + } else if (strcmp(name, "LayoutOnArc()") == 0) { + LayoutOnArc(); + } else if (strcmp(name, "PreciseRotate()") == 0) { + PreciseRotate(); + } else if (strcmp(name, "JoinPoly()") == 0) { + JoinPoly(); + } else if (strcmp(name, "CutPoly()") == 0) { + CutPoly(); + } else if (strcmp(name, "GetBoundingBox()") == 0) { + GetBoundingBox(); + } else if (strcmp(name, "SetTemplate()") == 0) { + SetTemplate(); + } else if (strcmp(name, "MakeGray()") == 0) { + MakeGray(); + } else if (strcmp(name, "InvertColor()") == 0) { + InvertColor(); + } else if (strcmp(name, "InterpolateColor()") == 0) { + InterpolateColor(); + } else if (strcmp(name, "BrightenDarken()") == 0) { + BrightenDarken(); + } else if (strcmp(name, "ChangeSaturation()") == 0) { + ChangeSaturation(); + } else if (strcmp(name, "ChangeHue()") == 0) { + ChangeHue(); + } else if (strcmp(name, "ContrastEnhance()") == 0) { + ContrastEnhance(); + } else if (strcmp(name, "ColorBalance()") == 0) { + ColorBalance(); + } else if (strcmp(name, "Gamma()") == 0) { + Gamma(); + } else if (strcmp(name, "EdgeDetect()") == 0) { + EdgeDetect(); + } else if (strcmp(name, "Emboss()") == 0) { + Emboss(); + } else if (strcmp(name, "ReduceColors()") == 0) { + ReduceColors(); + } else if (strcmp(name, "ReduceToPixmapColors()") == 0) { + ReduceToPixmapColors(); + } else if (strcmp(name, "SetDefaultColorLevels()") == 0) { + SetDefaultColorLevels(); + } else if (strcmp(name, "ReduceToDefaultColors()") == 0) { + ReduceToDefaultColors(); + } else if (strcmp(name, "DefaultErrorDiffuse()") == 0) { + DefaultErrorDiffuse(); + } else if (strcmp(name, "Spread()") == 0) { + Spread(); + } else if (strcmp(name, "Sharpen()") == 0) { + Sharpen(); + } else if (strcmp(name, "Blur3()") == 0) { + Blur3(); + } else if (strcmp(name, "Blur5()") == 0) { + Blur5(); + } else if (strcmp(name, "Blur7()") == 0) { + Blur7(); + } else if (strcmp(name, "RunBggen()") == 0) { + RunBggen(); + } else if (strcmp(name, "CircularBggen()") == 0) { + CircularBggen(); + } else if (strcmp(name, "RegenerateImage()") == 0) { + RegenerateImage(); + } else if (strcmp(name, "CropImage()") == 0) { + CropImage(); + } else if (strcmp(name, "GetColor()") == 0) { + GetColor(); + } else if (strcmp(name, "ReplaceColor()") == 0) { + ReplaceColor(); + } else if (strcmp(name, "FloodFill()") == 0) { + FloodFill(); + } else if (strcmp(name, "CreateContour()") == 0) { + CreateContour(); + } else if (strcmp(name, "AlphaCombine()") == 0) { + AlphaCombine(); + } else if (strcmp(name, "ImportOtherFile()") == 0) { + ImportOtherFile(); + } else if (strcmp(name, "ImportOtherFileType()") == 0) { + if (args != NULL) { + ImportOtherFileType(args); + } + } else if (strcmp(name, "BrowseOther()") == 0) { + BrowseOther(); + } else if (strcmp(name, "BrowseOtherType()") == 0) { + if (args != NULL) { + BrowseOtherType(args); + } + } else if (strcmp(name, "ToggleShowCrossHair()") == 0) { + ToggleShowCrossHair(); + } + } + return BAD; + } + int ShortHand(input) XEvent *input; *************** *** 1375,1379 **** { register int i; ! char buf[80], * name, args[MAXSTRING+1]; int valid_shortcut=FALSE, have_ch; KeySym key_sym=(KeySym)0; --- 1735,1739 ---- { register int i; ! char buf[80], *name=NULL, args[MAXSTRING+1]; int valid_shortcut=FALSE, have_ch; KeySym key_sym=(KeySym)0; *************** *** 1384,1387 **** --- 1744,1749 ---- TranslateKeys (buf, &key_sym); + *args = '\0'; + if (key_sym>='\040' && key_sym<='\177' && (key_ev->state & (ControlMask | Mod1Mask))) *************** *** 1414,1776 **** { Msg (""); ! if ((key_ev->state & ControlMask) && (!(key_ev->state & Mod1Mask))) ! { ! switch (key_sym&0xff) ! { ! case 'a': /*^a*/ SelAllObj (TRUE); break; ! case 'b': /*^b*/ BackProc (); break; ! case 'c': /*^c*/ ChangeDomain (); break; ! case 'd': /*^d*/ DupSelObj (); break; ! case 'e': /*^e*/ PushCurChoice (); break; ! case 'f': /*^f*/ FrontProc (); break; ! case 'g': /*^g*/ GroupSelObj (); break; ! case 'h': /*^h*/ return (INVALID); ! case 'i': /*^i*/ Instantiate (); break; ! case 'j': /*^j*/ return (INVALID); ! case 'k': /*^k*/ PopIcon (); break; ! case 'l': /*^l*/ AlignSelObjs (); break; ! case 'm': /*^m*/ return (INVALID); ! case 'n': /*^n*/ NewProc (); break; ! case 'o': /*^o*/ OpenProc (); break; ! case 'p': /*^p*/ Dump (""); break; ! case 'q': /*^q*/ return (QuitProc ()); ! case 'r': /*^r*/ ClearAndRedrawDrawWindow (); break; ! case 's': /*^s*/ SaveFile (); break; ! case 't': /*^t*/ AlignSelToGrid (); break; ! case 'u': /*^u*/ UngroupSelObj (); break; ! case 'v': /*^v*/ PushIcon (); break; ! case 'w': /*^w*/ SetCurChoice (DRAWTEXT); break; ! case 'x': /*^x*/ DelAllSelObj (); break; ! case 'y': /*^y*/ if (!CopyToCutBuffer ()) return (BAD); break; ! case 'z': /*^z*/ return (AnimateProc ()); ! case ',': /*^,*/ ScrollLeft (NULL); break; ! case '.': /*^.*/ ScrollRight (NULL); break; ! case '-': /*^-*/ PrintWithCommand (""); break; ! } ! } ! else if ((key_ev->state & Mod1Mask) && (!(key_ev->state & ControlMask))) ! { ! switch (key_sym&0xff) ! { ! case 'a': /*#a*/ AddAttrs (); break; ! case 'b': /*#b*/ return (ProbeProc ()); ! case 'c': /*#c*/ RotateCounter (); break; ! case 'd': /*#d*/ DecGrid (); break; ! case 'e': /*#e*/ AnimateSel (); break; ! case 'f': /*#f*/ FlashSelColor (); break; ! case 'g': /*#f*/ ToggleGridShown (); break; ! case 'h': /*#h*/ FlipHorizontal (); break; ! case 'i': /*#i*/ IncGrid (); break; ! case 'j': /*#j*/ HideAllAttrNames (); break; ! case 'k': /*#k*/ SetCurChoice (NOTHING); break; ! case 'l': /*#l*/ DistrSelObjs (); break; ! case 'm': /*#m*/ MoveAttr (); break; ! case 'n': /*#n*/ ShowAllAttrNames (); break; ! case 'o': /*#o*/ ZoomOut (); break; ! case 'p': /*#p*/ ImportFile (); break; ! case 'q': /*#q*/ SetCurChoice (DRAWPOLY); break; ! case 'r': /*#r*/ SetCurChoice (DRAWBOX); break; ! case 's': /*#s*/ return (SolveProc ()); ! case 't': /*#t*/ DetachAttrs (); break; ! case 'u': /*#u*/ UndoCmd (); break; ! case 'v': /*#v*/ FlipVertical (); break; ! case 'w': /*#w*/ RotateClockWise (); break; ! case 'x': /*#x*/ return (EscapeProc ()); ! case 'y': /*#y*/ return (SimulateProc ()); ! case 'z': /*#z*/ ZoomIn (); break; ! case '9': /*#9*/ MakePreciseArc (); break; ! case '0': /*#0*/ UpdateSelObjs (); break; ! case ',': /*#,*/ ScrollUp (NULL); break; ! case '.': /*#.*/ ScrollDown (NULL); break; ! case '-': /*#-*/ ShowAllAttrs (); break; ! case '{': /*#{*/ AlignObjsTop (); break; ! case '+': /*#+*/ AlignObjsMiddle (); break; ! case '}': /*#}*/ AlignObjsBottom (); break; ! case '[': /*#[*/ AlignObjsLeft (); break; ! case '=': /*#=*/ AlignObjsCenter (); break; ! case ']': /*#]*/ AlignObjsRight (); break; ! case '"': /*#"*/ MakeRegularPolygon (); break; ! case '%': /*#%*/ SetPrintReduction (); break; ! case ':': /*#:*/ DefaultZoom (); break; ! case '`': /*#`*/ ZoomWayOut (); break; ! case '~': /*#~*/ SaveNewFile (TRUE); break; ! case ';': /*#;*/ CutMaps (); break; ! case '_': /*#_*/ AbutHorizontal (); break; ! case '|': /*#|*/ AbutVertical (); break; ! case '#': /*##*/ BreakUpText (); break; ! case '^': /*#^*/ ScrollToOrigin (); break; ! case '@': /*#@*/ ToggleMoveMode (); break; ! case '$': /*#$*/ SetCurChoice (VERTEXMODE); break; ! case '&': /*#&*/ AlignSelToPage (); break; ! case '*': /*#**/ RedoCmd (); break; ! case '(': /*#(*/ ImportEPSFile (FALSE); break; ! case ')': /*#)*/ ScaleAllSelObj (); break; ! case '<': /*#<*/ LockSelObj (); break; ! case '>': /*#>*/ UnlockSelObj (); break; ! } ! } ! else if ((key_ev->state & Mod1Mask) && (key_ev->state & ControlMask)) ! { ! switch (key_sym&0xff) ! { ! case 'a': /*^#a*/ AddPoint (); break; ! case 'b': /*^#b*/ ChangeFontStyle (STYLE_BR); break; ! case 'c': /*^#c*/ ChangeFontJust (JUST_C); break; ! case 'd': /*^#d*/ DeletePoint (); break; ! case 'e': /*^#e*/ SetCurChoice (DRAWRCBOX); break; ! case 'f': /*^#f*/ InvertXBitmaps (); break; ! case 'g': /*^#g*/ ToggleSnapOn (); break; ! case 'h': /*^#h*/ HideAllAttrs (); break; ! case 'i': /*^#i*/ MakeIconic (); break; ! case 'j': /*^#j*/ UnMakeIconic (); break; ! case 'k': /*^#k*/ ToggleColorPostScript (); break; ! case 'l': /*^#l*/ ChangeFontJust (JUST_L); break; ! case 'm': /*^#m*/ MakeSymbolic (); break; ! case 'n': /*^#n*/ UnMakeSymbolic (); break; ! case 'o': /*^#o*/ ChangeFontStyle (STYLE_NR); break; ! case 'p': /*^#p*/ ChangeFontStyle (STYLE_BI); break; ! case 'q': /*^#q*/ SetCurChoice (DRAWPOLYGON); break; ! case 'r': /*^#r*/ ChangeFontJust (JUST_R); break; ! case 's': /*^#s*/ SaveNewFile (FALSE); break; ! case 't': /*^#t*/ ChangeFontStyle (STYLE_NI); break; ! case 'u': /*^#u*/ UpdateSymbols (); break; ! case 'v': /*^#v*/ SetCurChoice (DRAWCIRCLE); break; ! case 'w': /*^#w*/ ToggleAllSelLineType (); break; ! case 'x': /*^#x*/ ToggleWhereToPrint (); break; ! case 'y': /*^#y*/ if (!PasteFromCutBuffer()) return(BAD); break; ! case 'z': /*^#z*/ SetCurChoice (DRAWARC); break; ! case '.': /*^#.*/ ImportXBitmapFile (); break; ! case ',': /*^#,*/ ImportXPixmapFile (); break; ! case '-': /*^#-*/ ToggleGridSystem (); break; ! } ! } ! else if (key_sym == '\0' && key_ev->state == 0) ! { ! XButtonEvent button_ev; ! ! button_ev.state = ShiftMask; ! if (strcmp (name, "ScrollPageUp()") == 0) ! ScrollUp (&button_ev); ! else if (strcmp (name, "ScrollPageDown()") == 0) ! ScrollDown (&button_ev); ! else if (strcmp (name, "ScrollPageRight()") == 0) ! ScrollRight (&button_ev); ! else if (strcmp (name, "ScrollPageLeft()") == 0) ! ScrollLeft (&button_ev); ! else if (strcmp (name, "FlushUndoBuffer()") == 0) ! FlushUndoBuffer (); ! else if (strcmp (name, "PrintMsgBuffer()") == 0) ! PrintMsgBuffer (); ! else if (strcmp (name, "SaveOrigin()") == 0) ! SaveOrigin (); ! else if (strcmp (name, "RestoreImageWH()") == 0) ! RestoreImageWH (); ! else if (strcmp (name, "UpdateEPS()") == 0) ! UpdateEPS (); ! else if (strcmp (name, "ToggleMapShown()") == 0) ! ToggleMapShown (); ! else if (strcmp (name, "ToggleUseGrayScale()") == 0) ! ToggleUseGray (); ! else if (strcmp (name, "FreeHandMode()") == 0) ! SetCurChoice (FREEHAND); ! else if (strcmp (name, "SaveSymInLibrary()") == 0) ! SaveSymInLibrary (); ! else if (strcmp (name, "CenterAnEndPoint()") == 0 || ! strcmp (name, "CenterAVertex()") == 0) ! CenterAnEndPoint (); ! else if (strcmp (name, "NextPage()") == 0) ! NextPage (); ! else if (strcmp (name, "PrevPage()") == 0) ! PrevPage (); ! else if (strcmp (name, "NamePages()") == 0) ! NamePages (); ! else if (strcmp (name, "GotoPage()") == 0) ! GotoPage (); ! else if (strcmp (name, "AddPageBefore()") == 0) ! AddPageBefore (); ! else if (strcmp (name, "AddPageAfter()") == 0) ! AddPageAfter (); ! else if (strcmp (name, "DeleteCurPage()") == 0) ! DeleteCurPage (); ! else if (strcmp (name, "TogglePageLineShown()") == 0) ! TogglePageLineShown (); ! else if (strcmp (name, "SpecifyDrawingSize()") == 0) ! SpecifyDrawingSize (); ! else if (strcmp (name, "PrintOnePage()") == 0) ! PrintOnePage (); ! else if (strcmp (name, "ToggleNamedAttrShown()") == 0) ! ToggleNamedAttrShown (args); ! else if (strcmp (name, "AttachFileAttrs()") == 0) ! AddFileAttrs (); ! else if (strcmp (name, "DetachFileAttrs()") == 0) ! DetachFileAttrs (); ! else if (strcmp (name, "EditFileAttrs()") == 0) ! EditFileAttrs (); ! else if (strcmp (name, "PrintSelectedObjs()") == 0) ! PrintSelectedObjs (); ! else if (strcmp (name, "InputPolyPts()") == 0) ! InputPolyPts (); ! else if (strcmp (name, "InputPolygonPts()") == 0) ! InputPolygonPts (); ! else if (strcmp (name, "EditAttrs()") == 0) ! EditAttrs (); ! else if (strcmp (name, "ConvertIntSpline()") == 0) ! ConvertIntSpline (); ! else if (strcmp (name, "PasteFromFile()") == 0) ! { ! if (!PasteFromFile ()) return (INVALID); ! } ! else if (strcmp (name, "ToggleShowMeasurement()") == 0) ! ToggleShowMeasurement (); ! else if (strcmp (name, "SetMeasureUnit()") == 0) ! SetMeasureUnit (); ! else if (strcmp (name, "Cut()") == 0) ! CutToCutBuffer (); ! else if (strcmp (name, "ToggleSmoothHinge()") == 0) ! ToggleSmoothHinge (); ! else if (strcmp (name, "ToggleShowMenubar()") == 0) ! ToggleShowMenubar (); ! else if (strcmp (name, "ToggleShowStatus()") == 0) ! ToggleShowStatus (); ! else if (strcmp (name, "BrowseXBitmap()") == 0) ! BrowseXBitmap (); ! else if (strcmp (name, "BrowseXPixmap()") == 0) ! BrowseXPixmap (); ! else if (strcmp (name, "SpecifyPaperSize()") == 0) ! SpecifyPaperSize (); ! else if (strcmp (name, "ToggleOneMotionSelMove()") == 0) ! ToggleOneMotionSelectMove (); ! else if (strcmp (name, "GoBack()") == 0) ! NavigateBack (); ! else if (strcmp (name, "GoForward()") == 0) ! NavigateForward (); ! else if (strcmp (name, "RefreshCurrent()") == 0) ! NavigateRefresh (); ! else if (strcmp (name, "HotList()") == 0) ! NavigateHotList (); ! else if (strcmp (name, "AddCurrentToHotList()") == 0) ! NavigateAddToHotList (); ! else if (strcmp (name, "SessionHistory()") == 0) ! NavigateSessionHistory (); ! else if (strcmp (name, "ToggleHyperSpace()") == 0) ! ToggleHyperSpace (FALSE); ! else if (strcmp (name, "EmbedEPSFile()") == 0) ! ImportEPSFile (TRUE); ! else if (strcmp (name, "SetSelLineWidth()") == 0) ! SetSelectedLineWidth (); ! else if (strcmp (name, "AddColor()") == 0) ! AddColor (); ! else if (strcmp (name, "ImportAttrs()") == 0) ! ImportAttrs (); ! else if (strcmp (name, "ExportAttrs()") == 0) ! ExportAttrs (); ! else if (strcmp (name, "MergeWithTable()") == 0) ! MergeWithTable (); ! else if (strcmp (name, "ExportToTable()") == 0) ! ExportToTable (); ! else if (strcmp (name, "DeletePages()") == 0) ! DeletePages (); ! else if (strcmp (name, "PrintOneFilePerPage()") == 0) ! PrintOneFilePerPage (); ! else if (strcmp (name, "ImportGIFFile()") == 0) ! ImportGIFFile (); ! else if (strcmp (name, "SetExportPixelTrim()") == 0) ! SetExportPixelTrim (NULL); ! #ifdef _TGIF_WB ! else if (strcmp (name, "WhiteBoard()") == 0) ! WhiteBoard (); ! #endif /* _TGIF_WB */ ! else if (strcmp (name, "ToggleColorLayers()") == 0) ! ToggleColorLayers (); ! else if (strcmp (name, "ToggleStretchableText()") == 0) ! ToggleStretchableText (); ! else if (strcmp (name, "BreakUpBit/Pixmap()") == 0) ! BreakUpMaps (); ! else if (strcmp (name, "LayoutOnArc()") == 0) ! LayoutOnArc (); ! else if (strcmp (name, "PreciseRotate()") == 0) ! PreciseRotate (); ! else if (strcmp (name, "JoinPoly()") == 0) ! JoinPoly (); ! else if (strcmp (name, "CutPoly()") == 0) ! CutPoly (); ! else if (strcmp (name, "GetBoundingBox()") == 0) ! GetBoundingBox (); ! else if (strcmp (name, "SetTemplate()") == 0) ! SetTemplate (); ! else if (strcmp (name, "MakeGray()") == 0) ! MakeGray (); ! else if (strcmp (name, "InvertColor()") == 0) ! InvertColor (); ! else if (strcmp (name, "InterpolateColor()") == 0) ! InterpolateColor (); ! else if (strcmp (name, "BrightenDarken()") == 0) ! BrightenDarken (); ! else if (strcmp (name, "ChangeSaturation()") == 0) ! ChangeSaturation (); ! else if (strcmp (name, "ChangeHue()") == 0) ! ChangeHue (); ! else if (strcmp (name, "ContrastEnhance()") == 0) ! ContrastEnhance (); ! else if (strcmp (name, "ColorBalance()") == 0) ! ColorBalance (); ! else if (strcmp (name, "Gamma()") == 0) ! Gamma (); ! else if (strcmp (name, "EdgeDetect()") == 0) ! EdgeDetect (); ! else if (strcmp (name, "Emboss()") == 0) ! Emboss (); ! else if (strcmp (name, "ReduceColors()") == 0) ! ReduceColors (); ! else if (strcmp (name, "ReduceToPixmapColors()") == 0) ! ReduceToPixmapColors (); ! else if (strcmp (name, "SetDefaultColorLevels()") == 0) ! SetDefaultColorLevels (); ! else if (strcmp (name, "ReduceToDefaultColors()") == 0) ! ReduceToDefaultColors (); ! else if (strcmp (name, "DefaultErrorDiffuse()") == 0) ! DefaultErrorDiffuse (); ! else if (strcmp (name, "Spread()") == 0) ! Spread (); ! else if (strcmp (name, "Sharpen()") == 0) ! Sharpen (); ! else if (strcmp (name, "Blur3()") == 0) ! Blur3 (); ! else if (strcmp (name, "Blur5()") == 0) ! Blur5 (); ! else if (strcmp (name, "Blur7()") == 0) ! Blur7 (); ! else if (strcmp (name, "RunBggen()") == 0) ! RunBggen (); ! else if (strcmp (name, "CircularBggen()") == 0) ! CircularBggen (); ! else if (strcmp (name, "RegenerateImage()") == 0) ! RegenerateImage (); ! else if (strcmp (name, "CropImage()") == 0) ! CropImage (); ! else if (strcmp (name, "GetColor()") == 0) ! GetColor (); ! else if (strcmp (name, "ReplaceColor()") == 0) ! ReplaceColor (); ! else if (strcmp (name, "FloodFill()") == 0) ! FloodFill (); ! else if (strcmp (name, "CreateContour()") == 0) ! CreateContour (); ! else if (strcmp (name, "AlphaCombine()") == 0) ! AlphaCombine (); ! else if (strcmp (name, "ImportOtherFile()") == 0) ! ImportOtherFile (); ! else if (strcmp (name, "ImportOtherFileType()") == 0) ! ImportOtherFileType (args); ! else if (strcmp (name, "BrowseOther()") == 0) ! BrowseOther (); ! else if (strcmp (name, "BrowseOtherType()") == 0) ! BrowseOtherType (args); ! else if (strcmp (name, "ToggleShowCrossHair()") == 0) ! ToggleShowCrossHair (); ! } ! return (BAD); } return (INVALID); } --- 1776,1791 ---- { Msg (""); ! return DoShortCut(name, key_sym, key_ev->state, args); } return (INVALID); + } + + int CallShortCut(name, argc, argv, code, state) + char *name, *argv[], code; + int argc; + unsigned int state; + { + DoShortCut(name, (KeySym)code, state, (argc<=1 ? NULL : argv[1])); + return TRUE; } *** exec.c.orig Tue May 14 13:59:39 1996 --- exec.c Tue May 14 13:59:40 1996 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/exec.c,v 3.1 1996/05/12 05:17:32 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/exec.c,v 3.2 1996/05/14 17:31:14 william Exp $"; #endif *************** *** 85,88 **** --- 85,89 ---- #include "select.e" #include "setup.e" + #include "shortcut.e" #include "stk.e" #include "stretch.e" *************** *** 234,237 **** --- 235,240 ---- int ExecNewId ARGS_DECL((char**, struct ObjRec *, char*)); int ExecRotateSelObj ARGS_DECL((char**, struct ObjRec *, char*)); + int ExecCallSimpleShortCut ARGS_DECL((char**, struct ObjRec *, char*)); + int ExecCallOneArgShortCut ARGS_DECL((char**, struct ObjRec *, char*)); static *************** *** 314,317 **** --- 317,322 ---- { (void*)ExecNewId, "new_id", 1, 0}, { (void*)ExecRotateSelObj, "rotate_selected_obj", 1, 0}, + { (void*)ExecCallSimpleShortCut, "call_simple_shortcut", 1, 0}, + { (void*)ExecCallOneArgShortCut, "call_one_arg_shortcut", 2, 0}, { NULL, NULL, 0, 0 } }; *************** *** 4463,4466 **** --- 4468,4562 ---- } RotateAllSelObj(d_val); + return TRUE; + } + + int ExecCallSimpleShortCut(argv, obj_ptr, orig_cmd) + char **argv, *orig_cmd; + struct ObjRec *obj_ptr; + /* call_simple_shortcut(shortcut_name); */ + { + char *shortcut_name=argv[0], *func_name=NULL, *buf=NULL, code='\0'; + unsigned int state; + int len; + + UtilRemoveQuotes(shortcut_name); + + if (strcmp(shortcut_name, "Quit") == 0 || + !ValidShortCut(shortcut_name, 0, &code, &state)) { + sprintf(gszMsgBox, "%s '%s' %s '%s' %s.", + "Invalid shortcut name", shortcut_name, + "when executing the", orig_cmd, "command"); + MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); + return FALSE; + } + len = strlen(shortcut_name); + if ((func_name=(char*)malloc((len+3)*sizeof(char))) == NULL) { + FailAllocMessage(); + return FALSE; + } + sprintf(func_name, "%s()", shortcut_name); + if ((buf=UtilStrDup(func_name)) == NULL) { + free(func_name); + FailAllocMessage(); + return FALSE; + } + CallShortCut(func_name, 1, &buf, code, state); + free(buf); + free(func_name); + return TRUE; + } + + int ExecCallOneArgShortCut(argv, obj_ptr, orig_cmd) + char **argv, *orig_cmd; + struct ObjRec *obj_ptr; + /* call_one_arg_shortcut(shortcut_name); */ + { + char *shortcut_name=argv[0], *arg=argv[1], **ppsz_buf=NULL, code='\0'; + char *func_name=NULL; + unsigned int state; + int len; + + UtilRemoveQuotes(shortcut_name); + UtilRemoveQuotes(arg); + + if (strcmp(shortcut_name, "Quit") == 0 || + !ValidShortCut(shortcut_name, 1, &code, &state)) { + sprintf(gszMsgBox, "%s '%s' %s '%s' %s.", + "Invalid shortcut name", shortcut_name, + "when executing the", orig_cmd, "command"); + MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); + return FALSE; + } + len = strlen(shortcut_name); + if ((func_name=(char*)malloc((len+3)*sizeof(char))) == NULL) { + FailAllocMessage(); + return FALSE; + } + sprintf(func_name, "%s()", shortcut_name); + if ((ppsz_buf=(char**)malloc(2*sizeof(char*))) == NULL) { + free(func_name); + FailAllocMessage(); + return FALSE; + } + if ((ppsz_buf[0]=UtilStrDup(func_name)) == NULL) { + free(ppsz_buf); + free(func_name); + FailAllocMessage(); + return FALSE; + } + len = strlen(arg); + if ((ppsz_buf[1]=(char*)malloc((len+2)*sizeof(char))) == NULL) { + free(ppsz_buf[0]); + free(ppsz_buf); + free(func_name); + FailAllocMessage(); + return FALSE; + } + sprintf(ppsz_buf[1], "%s)", arg); + CallShortCut(func_name, 2, ppsz_buf, code, state); + free(ppsz_buf[1]); + free(ppsz_buf[0]); + free(ppsz_buf); + free(func_name); return TRUE; } *** shortcut.c.orig Tue May 14 13:59:44 1996 --- shortcut.c Tue May 14 13:59:44 1996 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/shortcut.c,v 3.0 1996/05/06 16:07:39 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/shortcut.c,v 3.1 1996/05/14 17:31:08 william Exp $"; #endif *************** *** 417,424 **** *state = shortCutXlateTbl[shortCutIndex[c]].state; *name = shortCutXlateTbl[shortCutIndex[c]].name; ! if (shortCutXlateTbl[shortCutIndex[c]].num_args == 0) *args = '\0'; ! else ! strcpy (args, shortCutArgs[c]); return (TRUE); } --- 417,446 ---- *state = shortCutXlateTbl[shortCutIndex[c]].state; *name = shortCutXlateTbl[shortCutIndex[c]].name; ! if (shortCutXlateTbl[shortCutIndex[c]].num_args == 0) { *args = '\0'; ! } else { ! strcpy(args, shortCutArgs[c]); ! } return (TRUE); + } + + int ValidShortCut(name, num_args, code, state) + char *name, *code; + short num_args; + unsigned int *state; + { + int j, len=strlen(name); + + if (len <= 2) return FALSE; + for (j=0; *(shortCutXlateTbl[j].name) != '\0'; j++) { + if (num_args == shortCutXlateTbl[j].num_args && + strncmp(shortCutXlateTbl[j].name, name, len-2) == 0 && + shortCutXlateTbl[j].name[len] == '(' && + shortCutXlateTbl[j].name[len+1] == ')') { + *code = shortCutXlateTbl[j].code; + *state = shortCutXlateTbl[j].state; + return TRUE; + } + } + return FALSE; } *** stk.c.orig Tue May 14 13:59:47 1996 --- stk.c Tue May 14 13:59:48 1996 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/stk.c,v 3.0 1996/05/06 16:11:56 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/stk.c,v 3.1 1996/05/14 12:56:01 william Exp $"; #endif *************** *** 335,339 **** sprintf(gszMsgBox, "Current file is '%s'.", file_name); } ! MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); if (lastPageNum != 1) { --- 335,339 ---- sprintf(gszMsgBox, "Current file is '%s'.", file_name); } ! Msg(gszMsgBox); if (lastPageNum != 1) { *** text.c.orig Tue May 14 13:59:51 1996 --- text.c Tue May 14 13:59:52 1996 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/text.c,v 3.0 1996/05/06 16:12:14 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/text.c,v 3.1 1996/05/14 12:55:58 william Exp $"; #endif *************** *** 921,924 **** --- 921,937 ---- if (ABS_X(x) > rbx) rbx = ABS_X(x); if (ABS_Y(textOrigY+textH+1) > rby) rby = ABS_Y(textOrigY+textH+1); + if (curTextObj->ctm != NULL) { + int i; + + for (i=0; i < 4; i++) { + int tmp_x=ABS_X(curTextObj->rotated_obbox[i].x); + int tmp_y=ABS_Y(curTextObj->rotated_obbox[i].y); + + if (tmp_x < ltx) ltx = tmp_x; + if (tmp_y < lty) lty = tmp_y; + if (tmp_x > rbx) rbx = tmp_x; + if (tmp_y > rby) rby = tmp_y; + } + } RedrawAreas(botObj, savedTextLtX-GRID_ABS_SIZE(2), savedTextLtY-GRID_ABS_SIZE(2), savedTextRbX+GRID_ABS_SIZE(2), *** drawing.e.orig Tue May 14 13:59:55 1996 --- drawing.e Tue May 14 13:59:56 1996 *************** *** 28,32 **** * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/drawing.e,v 3.0 1996/05/06 16:04:37 william Exp $ */ --- 28,32 ---- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/drawing.e,v 3.1 1996/05/14 17:31:13 william Exp $ */ *************** *** 75,78 **** --- 75,80 ---- extern void CleanUpDrawingWindow ARGS_DECL((void)); extern int ShortHand ARGS_DECL((XEvent *)); + extern int CallShortCut ARGS_DECL((char *Name, int argc, char *argv[], + char Code, unsigned int State)); extern int SomethingDirty ARGS_DECL((void)); extern int DrawingEventHandler ARGS_DECL((XEvent *)); *** shortcut.e.orig Tue May 14 13:59:58 1996 --- shortcut.e Tue May 14 13:59:59 1996 *************** *** 28,32 **** * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/shortcut.e,v 3.0 1996/05/06 16:07:40 william Exp $ */ --- 28,32 ---- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/shortcut.e,v 3.1 1996/05/14 17:31:09 william Exp $ */ *************** *** 38,41 **** --- 38,43 ---- extern int FetchShortCut ARGS_DECL((int C, char *Code, unsigned int *State, char **Name, char *Args)); + extern int ValidShortCut ARGS_DECL((char *name, short num_args, char *Code, + unsigned int *State)); #endif /*_SHORTCUT_E_*/ *** patchlvl.h.orig Tue May 14 14:00:02 1996 --- patchlvl.h Tue May 14 14:00:03 1996 *************** *** 28,32 **** * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/patchlvl.h,v 3.3 1996/05/12 05:17:19 william Exp $ */ --- 28,32 ---- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/patchlvl.h,v 3.4 1996/05/14 12:55:54 william Exp $ */ *************** *** 34,38 **** #define _TGIF_PATCHLEVEL_H_ ! #define TGIF_PATCHLEVEL 3 #endif /*_TGIF_PATCHLEVEL_H_*/ --- 34,38 ---- #define _TGIF_PATCHLEVEL_H_ ! #define TGIF_PATCHLEVEL 4 #endif /*_TGIF_PATCHLEVEL_H_*/ *** Imakefile.orig Tue May 14 14:00:06 1996 --- Imakefile Tue May 14 14:00:07 1996 *************** *** 36,40 **** XCOMM PERFORMANCE OF THIS SOFTWARE. XCOMM ! XCOMM @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/Imakefile,v 3.3 1996/05/12 05:17:18 william Exp $ XCOMM --- 36,40 ---- XCOMM PERFORMANCE OF THIS SOFTWARE. XCOMM ! XCOMM @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/Imakefile,v 3.5 1996/05/14 13:00:53 william Exp $ XCOMM *************** *** 45,49 **** XCOMM EXTRA_LDOPTIONS = ! TGIFVERSION = 3.0-p3 PROGRAMS = tgif prtgif XCOMM frontend11.o testdrive XCOMM CDEBUGFLAGS= -g --- 45,49 ---- XCOMM EXTRA_LDOPTIONS = ! TGIFVERSION = 3.0-p4 PROGRAMS = tgif prtgif XCOMM frontend11.o testdrive XCOMM CDEBUGFLAGS= -g *************** *** 66,75 **** XCOMM RS6000: -D_BSD XCOMM Solaris: ! XCOMM Irix: -D_NO_EXTERN -D_NO_PROTO -D_USE_XDRAWPOINT_TO_PUT_A_POINT ! XCOMM SunOS: -D_BACKGROUND_DONT_FORK ! XCOMM HP-UX: -D_USE_XDRAWPOINT_TO_PUT_A_POINT XCOMM VMS: -D_NO_GETTIMEOFDAY ! XCOMM Linux: -D_BACKGROUND_DONT_FORK -D_USE_XDRAWPOINT_TO_PUT_A_POINT ! XCOMM FreeBSD: -D_USE_XDRAWPOINT_TO_PUT_A_POINT LOCAL_LIBRARIES = $(XLIB) --- 66,75 ---- XCOMM RS6000: -D_BSD XCOMM Solaris: ! XCOMM Irix: -D_NO_PROTO ! XCOMM SunOS: ! XCOMM HP-UX: XCOMM VMS: -D_NO_GETTIMEOFDAY ! XCOMM Linux: ! XCOMM FreeBSD: LOCAL_LIBRARIES = $(XLIB) *** HISTORY.orig Tue May 14 14:00:09 1996 --- HISTORY Tue May 14 14:00:10 1996 *************** *** 1,5 **** ! /* ! * @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/HISTORY,v 3.4 1996/05/12 08:15:33 william Exp $ ! */ -----------------------> tgif-3.0-p2 => tgif-3.0-p3 <----------------------- I've just put tgif-3.0-patch3 (3rd patch for tgif-3.0) in --- 1,42 ---- ! -----------------------> tgif-3.0-p3 => tgif-3.0-p4 <----------------------- ! I've just put tgif-3.0-patch4 (4th patch for tgif-3.0) in ! the following places for anonymous ftp (binaries are still not ! available at the time of this release, please check ! for availability): ! ! ftp://ftp.x.org/contrib/applications/tgif/tgif-3.0-patch4.gz ! ftp://ftp.cs.ucla.edu/pub/tgif/tgif-3.0-patch4.gz ! ftp://bourbon.cs.ucla.edu/pub/tgif-3.0-patch4.gz ! ! Tgif is an Xlib-based 2-D drawing tool. It's also a hyper-graphics (or ! hyper-structured-graphics) browser on the World-Wide-Web. Its hyper-text home ! page is at and its hyper-graphics ! home page is at . ! (Please note that the Content-type of a tgif file sent by the httpd at ! bourbon.cs.ucla.edu:8001 is applications/x-tgif.) ! ! Tgif is free, but please read the Copyright file in the distribution ! (or select Copyright from the Help Menu in tgif) for restrictions. ! ! (Pelase note that tgif is NEITHER an html viewer NOR an html editor. ! It is also NOT directly related to GIF nor Transparent GIF.) ! ! Please gunzip and then apply the patch with ! 'patch -p -N < tgif-3.0-patch4'. ! Here's a short list of added features/bug fixes. ! ! 1) Fix some minor bugs with clicking in the panel window. ! 2) Fix a bug with redrawing transformed text objects. ! 3) Add two new internal commands: call_simple_shortcut() and ! call_one_arg_shortcut(,). With these commands, the ! following code will make a pixmap object named "toy" gray: ! ! exec=disable_undo(); ! begin_animate(); ! select_obj_by_name(toy); ! call_simple_shortcut(MakeGray); ! unselect_all_obj(); ! end_animate(); ! enable_undo(); -----------------------> tgif-3.0-p2 => tgif-3.0-p3 <----------------------- I've just put tgif-3.0-patch3 (3rd patch for tgif-3.0) in *************** *** 145,146 **** --- 182,187 ---- and Tgif.ImportFilter# in the tgif.Xdefault file of the distribution for examples. + + /* + * @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/HISTORY,v 3.6 1996/05/14 17:55:44 william Exp $ + */