summaryrefslogtreecommitdiffstats
path: root/generic/tkText.c
Commit message (Collapse)AuthorAgeFilesLines
* Purge RCS Keywords.dgp2011-06-081-2/+0
|
* Apply (upgraded) version of [Patch 1469210].dkf2009-10-221-20/+58
|
* * generic/tkText.c (DeleteChars, TextEditCmd, updateDirtyFlag):hobbs2007-12-131-39/+48
| | | | | | | * tests/text.test (text-25.10.1,25.11.[12]): Don't require [update idle] to trigger Modified event [Bug 1809538] Modified virtual event should only fire on state change [Bug 1799782] Make sure we delete chars before triggering <<Modified>> [Bug 1737288]
* * generic/tkCanvas.c: allow -selectforeground option to be None; adddas2007-04-291-3/+3
| | | | | | | | | | | | | | | | * generic/tkCanvText.c: fallback to fgColor when selFgColor is None * generic/tkEntry.c: (new default on aqua to match native L&F). * generic/tkListbox.c: * generic/tkText.c: * generic/tkCanvas.c: add support for bypassing all of Tk's double * generic/tkEntry.c: buffered drawing into intermediate pixmaps * generic/tkFrame.c: (via TK_NO_DOUBLE_BUFFERING #define), it is * generic/tkListbox.c: unnecessary & wasteful on aqua where all * generic/tkPanedWindow.c: drawing is already double-buffered by the * generic/tkTextDisp.c: window server. (Use of this on other * unix/tkUnixScale.c: platforms would only require implementation of TkpClipDrawableToRect()).
* * generic/tkPanedWindow.c: Cleaned up some code flagged by adgp2006-10-171-3/+3
| | | | | | * generic/tkText.c: `make checkexports` test. * generic/tkText.h * generic/tkTextTag.c:
* * macosx/tkMacOSXColor.c (TkSetMacColor, TkpGetColor): use AppearanceMgrdas2006-09-101-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * macosx/tkMacOSXDefault.h: to retrieve platform std colors for text * macosx/tkMacOSXPort.h: selections, add "systemHighlightSecondary" color name for standard color of inactive selections. * library/text.tcl (aqua): change focus bindings to implement platform standard look for inactive text selections using this new color. * generic/tkTextBTree.c (TkTextIsElided): on TkAqua, don't show text * generic/tkTextDisp.c (GetStyle): selection when text widget * generic/tkText.c (TextEventProc): is in disabled state. * generic/tkEntry.c (DisplayEntry): change default TkAqua selection * macosx/tkMacOSXDefault.h: relief to "flat" (platform std). * generic/tkText.c (Tk_TextCmd): fix bug leading to default text selection relief string DEF_TEXT_SELECT_RELIEF being ignored. * macosx/tkMacOSXMouseEvent.c (TkMacOSXProcessMouseEvent): allow mouse event delivery to background windows with kWindowNoActivatesAttribute (e.g. overrideredirect windows), as these never come to the foreground they would not receive any mouse events otherwise. [Bug 1472624] * macosx/tkMacOSXWindowEvent.c (TkMacOSXGenerateFocusEvent): do not send focus events to any windows with kWindowNoActivatesAttribute. * macosx/tkMacOSXXStubs.c (XQueryColor, XQueryColors): implement basic XColor computation from pixel values, enough to make tkImg's window.c happy, fixes img::window failures reported on tcl-mac. * macosx/tkMacOSXMenu.c (DrawMenuEntryLabel): fix leak. [Bug 1554672] * macosx/Makefile: workaround bug in 'cp -pRH' on Darwin 6 and earlier, fixes 'make embedded' failure reported on tcl-mac; fix error from 'make deploy' with same build tree as previous 'make embedded'. * macosx/tkMacOSXEntry.c (TkpDrawEntryBorderAndFocus): fix typo. * unix/tcl.m4: sync with tcl/unix/tcl.m4.
* * generic/tkEntry.c: move hard-coded ALWAYS_SHOW_SELECTIONhobbs2006-09-061-19/+20
| | | | | | | | | | * generic/tkInt.h: control of entry/text selection display * generic/tkText.c: based on focus to the Tcl level, * generic/tkTextBTree.c: controlled by ::tk::AlwaysShowSelection * generic/tkTextDisp.c: (boolean, private). [Bug 1553691] * generic/tkWindow.c: * library/tk.tcl * unix/tkUnixPort.h:
* * generic/tkText.c (DeleteChars): backport of 8.5 text deletehobbs2006-09-061-1/+20
| | | | speedup that removes tags from deleted area first. [Bug 1456342]
* * generic/tkText.c (DumpLine): stop dumping if we detect that thehobbs2006-04-051-100/+117
| | | | | | text widget state has changed while dumping. [Bug 1414171] (InsertChars, DeleteChars): fix undo with space-based path. * tests/text.test (text-25.14): [Bug 1452419]
* (TextWidgetCmd): remove unused lastEnd var. [Bug #664790]hobbs2003-02-181-4/+3
|
* * generic/tkText.c (TextBlinkProc): don't blink the cursor unlesshobbs2002-10-021-4/+5
| | | | it is visible. [Bug #616791] [Patch #614474] (bonfield)
* *** macosx-8-4-branch merged into the mainline [tcl patch #602770] ***macosx_8_4_merge_2002_08_31_trunkdas2002-08-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tk.decls: * generic/tkInt.decls: added new "aqua" specific entries to the stubs tables. Changed all "unix" entries to "x11" to allow us to distinguish and build both "aqua" on MacOSX and "x11" on MacOSX. * generic/tk.h: added a #ifnded RESOURCE_INCLUDED so that tk.h can be passed to the resource compiler. * generic/tkCmds.c (Tk_TkObjCmd): added [tk windowingsystem] subcommand: returns "x11" when running on X11, "win32" on Windows, "classic" on MacOS9 and "aqua" on MacOSX Aqua (i.e. Carbon) * generic/tkFont.c (TkFontGetFirstTextLayout): new private function returning the first chunk of a Tk_TextLayout, i.e. until the first font change on the first line (or the whole first line if there is no such font change). * generic/tkMain.c: made Tcl_ThreadDataKey static * library/demos/puzzle.tcl: fixed button metrics for aqua * tests/cursor.test: check for presence of arrow cursor instead of heart cursor * xlib/xcolors.c: changed xColors static initialization to more standard C * macosx/Wish.pbproj/jingham.pbxuser (new): * macosx/Wish.pbproj/project.pbxproj (new): project for Apple's ProjectBuilder IDE. * macosx/Makefile (new): simple makefile for building the project from the command line via the ProjectBuilder tool 'pbxbuild'. * macosx/tkMacOSXAppInit.c (new): macosx specific AppInit looking for a AppMain.tcl file in its bundled Resources/Scripts folder. If present, argv[1] is set to that file and the Scripts folder is added to the auto_path. This allows tk apps to embed scripts within their bundle directory structure. * macosx/tkMacOSXInit.c (new): macosx adapted version of tkUnixInit.c: we initialize & cache the Carbon native encoding (e.g. 'macRoman') and try to find the tk script library files inside Tk packaged as a framework. * macosx/tkMacOSXNotify.c (new): new macosx specific merged Carbon/select-based notifier. * macosx/tkMacOSXEvent.c (new): * macosx/tkMacOSXEvent.h (new): * macosx/tkMacOSXKeyEvent.c (new): * macosx/tkMacOSXMouseEvent.c (new): * macosx/tkMacOSXWindowEvent.c (new): new macosx specific event handling functionality. * macosx/tkMacOSX.h (new): * macosx/tkMacOSXBitmap.c (new): * macosx/tkMacOSXButton.c (new): * macosx/tkMacOSXClipboard.c (new): * macosx/tkMacOSXColor.c (new): * macosx/tkMacOSXConfig.c (new): * macosx/tkMacOSXCursor.c (new): * macosx/tkMacOSXDefault.h (new): * macosx/tkMacOSXDialog.c (new): * macosx/tkMacOSXDraw.c (new): * macosx/tkMacOSXEmbed.c (new): * macosx/tkMacOSXFont.c (new): * macosx/tkMacOSXHLEvents.c (new): * macosx/tkMacOSXInt.h (new): * macosx/tkMacOSXKeyboard.c (new): * macosx/tkMacOSXMenu.c (new): * macosx/tkMacOSXMenubutton.c (new): * macosx/tkMacOSXMenus.c (new): * macosx/tkMacOSXPort.h (new): * macosx/tkMacOSXRegion.c (new): * macosx/tkMacOSXScale.c (new): * macosx/tkMacOSXScrlbr.c (new): * macosx/tkMacOSXSubwindows.c (new): * macosx/tkMacOSXTest.c (new): * macosx/tkMacOSXUtil.c (new): * macosx/tkMacOSXUtil.h (new): * macosx/tkMacOSXWm.c (new): * macosx/tkMacOSXWm.h (new): * macosx/tkMacOSXXStubs.c (new): macosx ports of classic mac Tk implementation in tk/mac. * macosx/tkMacOSXSend.c (new): only send to local interp implemented currently. * macosx/tkMacOSXDebug.h (new): * macosx/tkMacOSXDebug.c (new): new macosx specific functions for debugging MacOS events, regions, etc. * macosx/tkAboutDlg.r (new): * macosx/tkMacOSXApplication.r (new): * macosx/tkMacOSXCursors.r (new): * macosx/tkMacOSXLibrary.r (new): * macosx/tkMacOSXMenu.r (new): * macosx/tkMacOSXResource.r (new): * macosx/tkMacOSXXCursors.r (new): * macosx/tclets.r (new): sources for Rez resource compiler. * macosx/Wish.icns (new): Wish application icon. * generic/tk.h: * generic/default.h: * generic/tkBind.c: * generic/tkCmds.c: * generic/tkGrab.c: * generic/tkPointer.c: * generic/tkPort.h: * generic/tkSelect.c: * generic/tkStubLib.c: * generic/tkTest.c: * generic/tkText.c: * generic/tkWindow.c: * unix/tkUnix3d.c: * xlib/xgc.c: * xlib/X11/X.h: * xlib/X11/Xlib.h: * xlib/X11/Xutil.h: added #includes and #ifdefs for macosx * library/bgerror.tcl: * library/button.tcl: * library/console.tcl: * library/dialog.tcl: * library/entry.tcl: * library/listbox.tcl: * library/menu.tcl: * library/msgbox.tcl: * library/scrlbar.tcl: * library/spinbox.tcl: * library/text.tcl: * library/tk.tcl: * library/demos/menu.tcl: * library/demos/menubu.tcl: * library/demos/widget: check [tk windowingsystem] instead of and/or in addition to $tcl_platform(platform). * generic/tkInt.h: * mac/tkMacBitmap.c: * mac/tkMacWm.c: added missing CONSTification * generic/tkIntDecls.h: * generic/tkIntPlatDecls.h: * generic/tkIntXlibDecls.h: * generic/tkPlatDecls.h: * generic/tkStubInit.c: regen
* Applied companion patch for Tcl Patch 585105,dgp2002-08-051-32/+34
| | | | | | | | | | | | | | | | | | | | | updating Tk to use Tcl 8.4's fully CONST-ified interface, and fully CONSTifying Tk at the same time. This patch includes purging Tk of its last direct access to interp->result. [Bug 589853] The substantial changes include copying event sequence strings into Tcl_DStrings in tkBind.c, and copying [text] indices into Tcl_DStrings because parsing them involved overwriting them. If this causes performance trouble, that can be resolved by further converting them to Tcl_Obj's. The #defines USE_NON_CONST and USE_COMPAT_CONST have the same effect for Tk as they do for Tcl. (They actually change tcl.h)
* * generic/tkText.c (TextEditUndo): set isDirtyIncrement to -1 whenhobbs2002-07-241-14/+16
| | | | reverting to note proper "dirtiness". [Bug #580362] (callewaert)
* * doc/text.n: TIP #93 implementation thathobbs2002-06-221-38/+226
| | | | | | | * generic/tkText.c (TextWidgetCmd): enhances the text get and * generic/tkTextIndex.c (TkTextGetIndex): delete methods to accept * tests/text.test: multiple range pairs. This handles the delete case in an atomic, fixed-index fashion.
* * doc/text.n: TIP #104 implementation which generalizes thehobbs2002-06-211-252/+118
| | | | | | | | | | | | | | | * generic/tkText.c: undo/redo stack to not be tied solely to the * generic/tkText.h: text widget. The APIs are still private. * generic/tkUndo.c: This also adds a stack limiting ability and * generic/tkUndo.h: a -maxundo option to the text widget (in * library/text.tcl: addition to the options from TIP #26) should * mac/tkMacDefault.h: users want to limit the undo/redo stack * tests/text.test: (should not be necessary in most cases). * unix/Makefile.in: [Patch #554763] (callewart) * unix/tkUnixDefault.h: * win/Makefile.in: * win/makefile.vc: * win/tkWinDefault.h:
* * generic/tkText.c (ConfigureText): reenable the blinking cursorhobbs2002-02-261-1/+11
| | | | on state change where necessary. [Bug #503772]
* * Updated callers of Tcl_SplitList and Tcl_Merge.dgp2002-01-251-4/+4
| | | | | | | | | * Updated callers of Tcl_GetStringResult. Rewrote PrintScrollFractions to ScrollFractions to stop scribbling directly on interp->result. * Updated callers of Tcl_GetVar, Tcl_GetVar2 * Updated callers of Tcl_SplitPath, Tcl_JoinPath, and Tcl_TranslateFileName.
* * Updated callers of Tcl_Utf* and Tcl_Regexp* APIs to reflect TIP 27dgp2002-01-171-2/+2
| | | | API changes (see Tcl Patch 471509). [Patch 471513]
* * generic/tkText.c:hobbs2001-12-051-16/+16
| | | | | * generic/tkText.h: changed TkTextEditType enums to be prefaced with TK_EDIT_ to prevent name collision.
* added static to TextGetText and popStack func definitionshobbs2001-11-211-3/+3
|
* (DestroyText): plugged mem leak when not clearing stack (callewaert)hobbs2001-11-211-8/+8
| | | | (TextGetText): more efficient string size calculation (darley)
* * generic/tkText.c (TextGetText): reworked to use DString forhobbs2001-11-201-54/+58
| | | | improved speed. (callewaert, darley)
* added TIP#26 text widget undo/redo functionalityhobbs2001-11-131-72/+591
|
* Overall change: Implemented TIP 5, which exportsericm2000-11-221-6/+5
| | | | | | | | | TkClassProcs/TkSetClassProcs as Tk_ClassProcs/Tk_SetClassProcs, adding a size field to Tk_ClassProcs to allow for future expansion, and renaming the geometryProc to worldChangedProc, which is more in keeping with the actual use of the callback. See ChangeLog for details.
* * tests/text.test: Added tests for -regexp -nocase searches withericm2000-07-251-4/+11
| | | | | | | | | | backslash character classes. * generic/tkText.c (TextSearchCmd): Text search did not work properly when -regexp and -nocase were used, in combination with backslash character classes represented by capital letters (ie, \W, \M); altered implementation of -regexp -nocase searches to use new regexp interfaces to fix this problem. [Bug: 5988].
* * tests/text.test: Added tests for searching when text is elided.ericm2000-07-211-5/+9
| | | | | | | | * generic/tkText.c (TextSearchCmd): Text search was not returning the correct index when the search covered (but did not search) elided characters; corrected this by adjusting the match index by the number of elided characters preceeding the start of the match, just as is done with embedded windows, etc. [Bug: 5470].
* * generic/tkText.c (TextSearchCmd): Added a test for a NULLericm2000-07-191-2/+6
| | | | | segment pointer when doing backwards searches for "" on an empty text widget. [Bug: 6007].
* * tests/text.test:ericm2000-02-031-15/+23
| | | | | | | * generic/tkText.c (DumpLine/DumpSegment): Changed DumpSegment to take a TkTextIndex instead of two integer offsets, so that it could use TkTextPrintIndex to format the offsets into an index, which makes it UTF smart (bug #2582).
* * tests/text.test:ericm2000-01-211-2/+3
| | | | | * generic/tkText.c: Fixed bug relating to regexp searching for empty lines; previously, the starting line was ignored. (bug #1643).
* * generic/tkInt.h: moved new TkDisplay useInputMethods structurehobbs2000-01-211-6/+6
| | | | | | | | | | | | | | | | | | element to end to not disturb position of previous elements in the structure (as compared to Tk <=8.2). * generic/tkCanvLine.c (LineCoords): fixed segfault when too few coords were passed to a line with certain options set (it should always have thrown an error anyway). [Bug: 4042] * tests/text.test: * generic/tkText.c: fixed missing " in error case and missing 'dump' in subcommand listing [Bug: 4036] * generic/tkListbox.c: adjusted use of basic string concatenation in (non-K&R behavior) [Bug: 4027] Swapped bg/fg class for -select(bg|fg) for listbox and their items [Bug: 4039]
* * generic/tkCanvas.c: fixed mem leak with TagSearchExprInithobbs2000-01-121-2/+3
| | | | | | | | | | | | | | | [Bug: 3977] * generic/tkStubInit.c: * generic/tkDecls.h: remove non-existent Tk_(Get|Create)CanvasVisitor prototypes * generic/tkText.c: * generic/tkEntry.c: fixed cursor to not blink when widget was disabled [Bug: 1807] * generic/tkRectOval.c: added note about change to bloat for RectOval bounds calculation for WIN32 only
* * doc/text.n:hobbs2000-01-061-11/+18
| | | | | | | | | | * generic/tkText.c: * generic/tkText.h: * generic/tkTextBTree.c: * generic/tkTextDisp.c: * generic/tkTextTag.c: removed the -state option for text tags, and reoriented it around -elide, as -state disabled was never implemented, and -state hidden is better as -elide.
* * generic/tkStubInit.c:hobbs1999-12-141-32/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tkDecls.h: * generic/tkIntXlibDecls.h: * generic/tkInt.decls: added XSetDashes and XWarpPointer * generic/tk.decls: added Tk_CreateSmoothMethod, and reserved two spots * generic/tk.h: added Tk_SmoothMethod struct, state item to canvas record, #defines for item state, support for using old char*-based canvas item C creation procedures with -DUSE_OLD_CANVAS, Tk_Dash, Tk_TSOffset (-offsets) & Tk_Outline structs and #defs, decls for dash, outline and postscript routines * generic/tkBind.c: added support for Quadruple clicks, and added the -warp option to 'event' with pointer warping routines * xlib/xgc.c: * generic/tkRectOval.c: * generic/tkCanvArc.c: * generic/tkCanvBmap.c: * generic/tkCanvImg.c: * generic/tkCanvLine.c: * generic/tkCanvPoly.c: * generic/tkCanvPs.c: * generic/tkCanvText.c: * generic/tkCanvUtil.c: * generic/tkCanvWind.c: * generic/tkCanvas.c: * generic/tkCanvas.h: Canvas and items received overhaul to with the addition of the dash patch (Nijtmans, et al) This includes objectification of the 'canvas' command, as well as support for (where appropriate) dashes in items, extended stipple support, state for all items, and postscript generation of images and windows. See the new canvas man page for related docs. * generic/tkEntry.c: added entry widget validation, see entry.n * generic/tkEvent.c: on simulated events, ButtonPress should be matched with ButtonRelease to be correct * generic/tkFont.c: corrected possible null reference * generic/tkFrame.c: made frame a Tcl_Obj based command * generic/tkGet.c: added TkGetDoublePixels * generic/tkImage.c: bug fixes from Img patch and new Tk_PostscriptImage and Tk_SetTSOrigin functions * generic/tkImgBmap.c: new ImgBmapPostscript function * generic/tkImgPhoto.c: new Tk_CreatePhotoOption, Tk_DitherPhoto * generic/tkInt.h: declarations for some new functions * generic/tkMessage.c: reworked relief drawing * generic/tkOldConfig.c: added TK_CONFIG_OBJS so old style ConfigureWidget calls can pass in Tcl_Obj arrays * generic/tkScrollbar.c: * generic/tkScrollbar.h: made -orient use an option table * generic/tkText.c: * generic/tkText.h: made -wrap and -state use option tables * generic/tkTextBTree.c: * generic/tkTextDisp.c: * generic/tkTextImage.c: * generic/tkTextMark.c: * generic/tkTextTag.c: * generic/tkTextWind.c: added support for -elide and -state hidden * generic/tkTrig.c: changed TkMakeBezierCurve to support returning the upper limit of points needed for spline * generic/tkUtil.c: new option table parsing routines * generic/tkWindow.c: init'ing of warp stuff, mouseButtonState
* * generic/tkText.c: fixed bug in TextSearchCmd for multibyte charshobbs1999-12-121-2/+2
| | | | (Darley) [Bug: 3839]
* Merged 8-1-0 into mainline.rjohnson1999-04-211-1/+1
|
* Added new tests to scale and text.rjohnson1999-04-201-3/+4
| | | | Fixed core dump in text serach code: Bug 1642
* Fixed bug 1853 - called NULL interp.rjohnson1999-04-171-1/+2
|
* Fixed bug 1790 - memory leak.rjohnson1999-04-171-5/+8
|
* * Merged 8.1 branch into the main trunkstanton1999-04-161-125/+123
|
* Replaced SCCS strings, fixed binary filesstanton1998-09-141-1/+1
|
* Initial revisionrjohnson1998-04-011-0/+2264