Commit Graph

143 Commits

Author SHA1 Message Date
Robby Findler
1298c11d2f adjust find-string in text% so it doesn't allocate as many temporary strings
Also, Rackety
2012-12-24 23:35:12 -06:00
Robby Findler
0264d3d5ad Adjust text%s so they don't call on-reflow as often
Specifically, when a style change happens that ends up
not changing the size of anything, then track that
lack of size change enough to be able to avoid
calling on-reflow.

This is important for the interaction between the
colorer and the search bubbles in DrRacket. That is,
when you make an edit that causes the colorer to have
lots of work, then each chunk of work it does before
yielding control to the event loop would also trigger
a call to on-reflow, which would cause the search bubbles
to recompute their sizes. Overall, the main bad thing
this does is cause lots of allocation and aside from
that it doesn't hurt interactivity. Still, there is a
lot of useless work here, and those extra GCs can be
pretty substantial when you're doing something crazy like
searching for " " in a big file.... (there are 95k spaces
in unit.rkt, in case you were curious)
2012-11-25 20:58:13 -06:00
Matthew Flatt
11045a0384 improve editor-canvas resizing
A recent bug fix involved moving part of an `editor-canvas%' resize
out of atomic mode by queueing a callback (because the resize involves
quesrying the editor for its size, etc.), but then the callback
happens after a canvas is shown, which can cause it to appear with
bogus initial scrollbars. Queue the callback instead as a "refresh"
level callback, which gets a chance to run before a frame is made
visible.
2012-09-13 14:17:14 -06:00
Matthew Flatt
64eb4f9389 racket/gui: make `editor-canvas%' fail more gracefully on too-large content
Closes PR 13087
2012-09-02 10:08:23 -06:00
Matthew Flatt
dba3c14746 fix editor-canvas%' internal on-size' handling
The `on-size' method is called in atomic mode,
and we can't call into the editor's sizing functions
in atomic mode.

Watch out for refresh and/or window-sizing problems.
2012-08-28 17:21:45 -06:00
Matthew Flatt
230463fa3d racket/gui: fix problem with recent edit-sequence change
Restores undo support in DrRacket, for example.
2012-05-05 22:09:13 -06:00
Matthew Flatt
48f7ddafe4 racket/gui: fix some concurrency problems `text%'
Changed `open-output-text-editor' to put its additions into
an edit sequence to better work with threads.

Fixed problems in editor-canvas refresh and resize events, where
the editor's refresh synchronization wasn't used properly.

Fixed race conditions in the the protocol that is used to separate
refreshes and edit sequences.

Related to PR 12749
2012-05-05 10:32:05 -06:00
Eli Barzilay
2b76d9e5b0 A bunch of scheme' -> racket' conversions.
I think that there are no user-visible changes from these changes.
2012-04-19 16:02:03 -04:00
Asumu Takikawa
d7fefc848b Fix requires to avoid circular dependencies. 2012-03-30 23:34:34 -04:00
Matthew Flatt
6e01d1586a racket/gui: fix refresh for right-aligned or centered paragraphs in text% 2012-01-30 11:01:18 -07:00
Matthew Flatt
e12bf33f8d 'rshift and 'rcontrol don't interrupt keybindings
Closes PR 12461
2011-12-25 19:39:37 -06:00
Matthew Flatt
d3cbea068a fix treatment of caps lock in keymap%
Somewhere along the way --- probably in porting the editor
classes to Racket --- the caps-lock specification in a keymap
string was treated the same as other modifiers, but it is
supposed to be neutral when the key string starts with ":".

Closes PR 5486, 10347, 10993, 12184
2011-11-25 13:19:42 -07:00
Matthew Flatt
506aa79d14 fix editor refresh problem when line numbers are shown
More generally, fix horizontal refresh when an editor has left
padding. Otherwise, deleting a character in DrRacket with line
numbers shown seems sluggish, because the update waits for a
refresh event.
2011-10-28 20:01:19 -06:00
Matthew Flatt
379991c5bb fix text% `get-paragraph-{start,end}-position' bug and doc bugs
Merge to 5.2
2011-10-08 09:12:30 -06:00
lvilnis
b0d909bd8f Fixed a bug with delete, undo and clickbacks in DrRacket 2011-08-26 06:07:57 -06:00
Matthew Flatt
f13a669d05 add 'no-focus style to `editor-canvas%' 2011-07-25 11:30:23 -04:00
Eli Barzilay
3157955d40 ".ss" -> ".rkt" scan done. 2011-07-02 10:37:53 -04:00
Vincent St-Amour
5c77b19416 Fix remove-clickback. 2011-06-24 15:18:31 -04:00
Matthew Flatt
909aaddf3d protect against nested snip deletes in `pasteboard%' 2011-05-25 07:32:47 -06:00
Matthew Flatt
b0115ee360 add 'wheel-left and 'wheel-right events 2011-04-03 09:49:56 -06:00
Matthew Flatt
6e1f35a319 fix WXME stream write-bytes' and write' method results 2011-03-27 16:30:44 -06:00
Robby Findler
288caacdfd added get-extend-start-position and get-extend-end-position
added the extend-position method
adjusted the wxme.rkt test suite so that it only prints when tests fail
2011-03-25 15:10:49 -05:00
David Van Horn
760a58b65d Fixes more spelling errors. 2011-02-04 19:44:13 -07:00
David Van Horn
c9519fd113 Fixed various spelling errors. 2011-02-03 17:42:33 -05:00
Matthew Flatt
98822cf1f9 adjust `racket/gui' and dependencies to survive a locked preference file
- adds a `#:timeout-lock-there' argument to `get-preference'
 - fixes preference looup in `racket/gui'
 - make preference names consistently use `GRacket' and consistently
   fall back on `MrEd' names
 - fix Emacs-style undo mode while we're at it
2011-01-18 17:37:33 -07:00
Matthew Flatt
183323a2c5 fix `editor<%>' printing problems
- pagination for `pastebard%'
 - always put everything on a single page for EPS mode
 - add PDF support to mirror PS support
2011-01-18 14:16:25 -07:00
Matthew Flatt
a9dd80110a restore doc & page checking for `post-script-dc%' et al.
and also fix up wiring of `printer-dc%' in `editor<%>' so
 that `is-a?' tests works as expected
2011-01-14 20:30:51 -07:00
Matthew Flatt
be6ba896e0 repairs for line numbers in DrRacket 2011-01-07 11:57:50 -07:00
Matthew Flatt
ae5093a134 more consistent on-size' and on-move' 2011-01-05 10:00:07 -07:00
Matthew Flatt
b0095111d4 restore and document scrolling behavior
Closes PR 11583, and
 everts the previous fix for PR 10853 and fixes
  it in a different way
2011-01-05 07:02:00 -07:00
Asumu Takikawa
24050a5bc6 Remove do-copy, do-paste, and do-paste-x-selection from editor<%>.
text% and pasteboard% now do not override the methods.
2011-01-04 13:04:28 -05:00
Matthew Flatt
b0ed2f5bc2 fix result of editor<%> `load-file' when the editor is locked
relevant to PR 11590
2011-01-04 06:11:46 -07:00
Matthew Flatt
5809860dd3 fix problem with text% padding 2010-12-31 14:40:27 -07:00
Matthew Flatt
d3fd1ba013 add `set-padding' to text% 2010-12-29 13:42:58 -07:00
Robby Findler
5eec85a5a2 change the way scrolling works so that canvases that are 'primary-owner's are respected when calling scroll-to on an admin
This change may also affect other attempts to scroll, however, so watch for strange scrollings when multiple editor-canvaess are displaying the same text% object.
  closes PR 10853
2010-12-28 16:37:13 -06:00
Sam Tobin-Hochstadt
abf2215de7 Fix send to the wrong administrator.
Bug found by tests/gracket/wxme-random.
2010-12-19 22:56:15 -05:00
Sam Tobin-Hochstadt
491eeaa759 Move mred/private/wxme/style to racket/snip/private/style.
`racket/snip' now exports the style classes and the add,mult-color interfaces.
2010-12-19 22:56:15 -05:00
Matthew Flatt
c259d0839a make editor caret adapt to background color 2010-12-18 07:22:40 -07:00
Sam Tobin-Hochstadt
70955d5540 Split mred/private/wxme/private into two files. 2010-12-18 00:10:26 -05:00
Sam Tobin-Hochstadt
cf3aec6b95 Move load-one to racket/snip.
Create private directory for racket/snip.
Remove snip dependence on events.
2010-12-18 00:10:26 -05:00
Sam Tobin-Hochstadt
fb76a887d8 Refactor to create `racket/snip' collection. 2010-12-17 12:32:26 -05:00
Sam Tobin-Hochstadt
8a8a8dbe4b Separate snip% from the gui 2010-12-17 12:32:26 -05:00
Sam Tobin-Hochstadt
398add4e29 Move symbol predicates to their own file. 2010-12-17 12:32:26 -05:00
Sam Tobin-Hochstadt
13cae20838 Fixes for PNG conversion, and make `image-snip%' convertible. 2010-12-17 12:32:25 -05:00
Matthew Flatt
cad500d802 fix problems with image-snip%, masks or alpha channels, and saving
and also generalize image-snip% to accept input port instead
 of filenames, and avoid temporary files for loading and saving images
2010-12-14 21:11:10 -07:00
Matthew Flatt
39c6fe02d7 use `assert' around a debugging check 2010-12-13 14:54:07 -07:00
Matthew Flatt
82ab45b11d gtk: fix clipboard; implement ye olde X selection 2010-12-01 20:48:23 -07:00
Matthew Flatt
ed8aa132de improve editor highlighting of selected image-snip% 2010-12-01 15:48:54 -07:00
Matthew Flatt
e9710d08f5 fix autowrap bitmap drawing so it isn't covered up by a selection 2010-12-01 15:48:54 -07:00
Matthew Flatt
59bf78b6c8 avoid xor for pasteboard rubberband hiliting 2010-11-05 20:26:24 -06:00