Commit Graph

5362 Commits

Author SHA1 Message Date
Matthew Flatt
3404c0084b racket/gui Unix: avoid startup output
original commit: 8ea68c743f338ec15eeb31710f9c4053436f01ac
2014-09-24 08:40:53 -06:00
Matthew Flatt
1167e184b8 racket/gui win32: try to make pan gestures work
A pan gesture is turned into a WM_{H.V}SCROLL event in a
way that `racket/gui` did not recognize as a change to the
scrollbar. I'm not sure that this change fixes the problem,
but it seems worth a try.

original commit: 40f0682075f86149a72a87cd028bd71f8e51cbbe
2014-09-24 08:40:52 -06:00
Matthew Flatt
dd3dfc6617 racket/draw: fix font metrics versus transformations
For a font with 'aligned hinting, the font map caches metric
information that depends on the destination transformation,
at least on Windows. Make the font-map cache sensitive to the
destination's current transformation.

This bug was exposed by support for DPI-aware GUIs on Windows,
but the problem was more general.

original commit: 9ee2bd9b6086c696c2be8f01a07db754e4406312
2014-09-24 08:40:52 -06:00
Matthew Flatt
e9b6c166a9 racket/draw: compensate for roundoff in Windows GUI scaling
Roundoff can place a child of a container so that it's position plus
width extend beyond the container's width. For some controls, that
looks especially bad. Approximate precise scaling by having those
control sizes round down, instead of up, while leaving other kinds
of controls alone.

original commit: ed92e271e848513fc0d2e9b54a89d86947fdb465
2014-09-24 08:40:52 -06:00
Matthew Flatt
22ac1a94f2 racket/gui win32: fix measurement of message% content
Strip away "&" before measuring.

original commit: 58e24e18a27fee2b6b487f5163c2eda48e347546
2014-09-24 08:40:52 -06:00
Matthew Flatt
20bc95fb98 racket/gui: DPI-aware on Windows
The `racket/draw` library is now independent of the screen resolution
on Windows. Font sizes in "points" are the only place where the
resolution mattered before, and now `racket/draw` assumes a
traditional 96dpi on Windows and Linux (and a traditional 72dpi
on Mac OS X).

Setting the scale for "text and other items" in Windows now adjusts
the backing scale of screen and canvas-compatible bitmaps, as well as
setting a scale on canvas drawing. Window and screen positions and
sizes are similarly scaled; for example, if the screen is 2048x1436
with text scaled by 200%, then `racket/gui` reports the display size
as 1024x768 (and the display backing scale as 2.0).

Backing scales of 1.25 and 1.5 are common for Windows. Rounding
associated with those scales could cause trouble for virtual -> actual
-> virtual conversions.

original commit: a64a1cb17722a49558ee76b5400d54aa040d1825
2014-09-24 08:40:52 -06:00
Robby Findler
382b050c4e fix parsing for when dot produces numbers in scientific notation
closes PR 14748
also, Rackety

original commit: e946fed565348ddb65fb7fb8e4d9fe604c5208c8
2014-09-23 16:58:48 -05:00
Robby Findler
25851cb537 fix magic-open-paren bug
also, replace some eq?s with equal?s.

original commit: f4d66ad4d172a597a82fe66c4f5018805e66b299
2014-09-07 15:34:48 -05:00
Robby Findler
d470a1b912 add the capability to dynamically adjust the edge label font
original commit: b212f21977f55c3ad56881c9d4c452aa241cc3cf
2014-09-01 10:47:29 -05:00
Robby Findler
463dcc2fec fix dot layout when children are deleted
closes PR 14718

original commit: 854e9a997ab127db791547efdbc3d51ca2a63d0e
2014-09-01 04:11:42 -05:00
Matthew Flatt
44a704d123 racket/gui keymap: adjust handling of 'control, etc., events
If a keymap has a grab, then discard key events that are modifier
changes or key releases.

Adjusts commit 8ba8d01ec0 so that Ctl-u work in DrRackt (and
other framework-based programs).

original commit: b3b9eb0eb4ea8ef4e97bde4b9799f92caf958737
2014-08-31 15:26:59 +02:00
Matthew Flatt
3dcb02a3fc racket/gui win32: fix Space handling of buttons and checkboxes
Suppress WM_KEYDOWN messages to a button or checkbox, so that the
top-level window takes care of Space and Return for a button or
checkbox with the keyboard focus.

Closes PR 14710

original commit: 032397d6f9694d4c3dff24e3511d51657d19cf15
2014-08-31 11:59:44 +02:00
Matthew Flatt
4a497f5be3 racket/gui cocoa: adjust control font for 10.10
original commit: 321a3be29f121f4acc11bfff58cbce22ecdb383a
2014-08-29 14:56:27 -06:00
Neil Toronto
02d85d78ab Altered keymap% to not claim to handle key events that it doesn't
Previously, `keymap%` would return #t for all shift, ctrl, and key release
events. DrRacket's editors would then not handle those events (correctly,
as they shouldn't handle already-handled events), meaning that the events
weren't sent to any snips.

original commit: 8ba8d01ec07d45ec67bd06df0670c7498fa20bb9
2014-08-29 16:44:02 -04:00
Matthew Flatt
d1eb9f9843 racket/gui gtk: workaround problem with async IBus input method
Affects Ubuntu 13.10 and 14.04, especially with multiple processors.

original commit: 3a716b98c0c932465a0e9bd75e9086afd75b32d0
2014-08-29 10:12:27 -06:00
Matthew Flatt
17c089c814 racket/gui: change placement of children in panel% and pane%
The `panel%` and `pane%` classes were not originally intended for
direct instantiation; instead, `horizontal-pane[l]%` and
`vertical-pane[l]%` provide basic placements that make sense for
multiple children. Adjusting `pane[l]%` to just overlay all children
seems both sensible and useful (if only one child is shown at a time,
for example).

As suggested by David Nelson.

original commit: 32ae3f83080ab625f0bcfdf907e3682a2da9f36b
2014-08-24 07:29:55 -06:00
Spencer Florence
43d84704c6 Slight change to how drracket handles lexer/colorers, and doc changes to color:text<%>
original commit: dc4398235a4cdef97a14dce9f2342721486e3bbc
2014-08-20 22:25:50 -05:00
Phil Nguyen
d2ff4f11c4 fix tiny typo in documentation for framework/test
original commit: 77ae11e2483366d46f5261957bdef8e80d985756
2014-08-15 11:19:48 -04:00
Matthew Flatt
7b93d2c8e3 add update-implies to package "info.rkt"s
original commit: eb9cbe20bf7b4ebc1eee63e2ca079ae566ff8c05
2014-08-14 16:49:53 +01:00
Matthew Flatt
3f05abfcd0 racket/gui: fix problems with canvas autoscroll
original commit: 39eae2e647dd7351e79db9a5152dcf1dfdb35847
2014-08-14 15:58:54 +01:00
Matthew Flatt
0d66aeb218 racket/gui: minor test clean-up
original commit: ad870a1d0f4c50306297183daa91e94320a9accb
2014-08-13 09:17:16 +01:00
Matthew Flatt
fe9f9afffd racket/draw and racket/snip: avoid some undefined-checking wrappers
The changes to `pen%` and `brush%` are related to the
`racket/class` repair of the previous commit, while the
`style%` change is because I didn't look at it before.

original commit: fd67feddab577f8e756c78a9c2b89a9b4a66dbb5
2014-08-06 08:48:19 +01:00
Matthew Flatt
3de4b74d6b racket/gui: report AltGr combination for left Control plus right Alt
Use the new AltGr report to enable Control-Alt- combinations in
DrRacket (and other framework programs) when they do not intefere
with plain AltGr combinations.

original commit: 513ff778110b0a4f4ed725a9d4d79bacb275f97f
2014-08-05 16:23:09 +01:00
Matthew Flatt
984c5ca1a1 racket/gui cocoa: revive make-gl-bitmap for Mac OS X 10.7 and up
Port from AppleGL to CoreGL, and implement offscreen drawing through
a framebuffer instead of CGLSetOffScreen() for 10.7 and later.

original commit: a57734d7ae8606b01d9d054bfc761f0c74db2368
2014-07-31 14:47:30 +01:00
Robby Findler
b8f71d1d6b fix some bugs found by the contract library's random testing
the procedure common-get-file-list was apparently never implemented,
so just remove it

original commit: a3c7c557eaf432451294e2fadab26c6635de60f0
2014-07-29 09:38:09 -05:00
Robby Findler
be3e5f35f4 fix contracts for racket:get-color-prefs-table and
racket:get-white-on-black-color-prefs-table

Apparently these contracts have always been wrong;
5.2.1 had these exports with the wrong contracts and
5.2 didn't have them

closes PR 14664

original commit: 10ae6fbb90dc0dde015e6c8e5263ebe12433b19e
2014-07-29 09:38:09 -05:00
Jay McCarthy
a74928552b Adding legacy/core decision in gl-config/canvas
original commit: 31001f3484c3d379a2c85b5c5974283d3f909d61
2014-07-23 08:56:32 -04:00
Matthew Flatt
4c71b5d039 racket/draw: fix problems with set-argb-pixels on scaled, no-alpha bitmaps
Also, fix the docs to clarify that `just-alpha?` as #t means a no-op for
a target bitmap that has an alpha channel.

original commit: a1147335597ef2879ad19678e067a62a6b930973
2014-07-23 09:19:34 +01:00
Matthew Flatt
1deb80b255 racket/draw: fix get-argb-pixels for unscaled and just-alpha
Closes PR 14653

Merge to v6.1

original commit: 295cb46c48bd70c1158bdc5e2b1f285b4ac2d086
2014-07-23 08:44:17 +01:00
Robby Findler
1740b64498 remove call to 'time'
Please add to 6.1 release branch

original commit: cdd06f108ca7ecb2ce4a1a471566b0863a2a4fad
2014-07-22 18:18:28 -05:00
Robby Findler
d734fe9449 I'm also responsible for the gui pkgs
original commit: 07dde04ef2f289eb744c737c17fbff32b15c65c7
2014-07-16 09:52:16 -05:00
Robby Findler
86b2e602a8 added insert/io
original commit: fc492049564ce0b7d2a3b6f889f4e9b86aef6ed4
2014-07-16 09:52:16 -05:00
Robby Findler
5672033374 add on-goodbye-event
This change requires a coordinated change to the snip-lib pkg and to
the gui-lib package. The docs are in the gui-doc pkg and yet point to
the snip-pkg as the containing pkg, so I updated the version number
for snip-lib and left the version number for gui-lib alone

original commit: 4b92117a9fd6fb638240bc6e57e25bc9de138c53
2014-07-16 09:52:16 -05:00
Robby Findler
ea74e9ffe2 use simple-form-path instead of normalize-path
in the code that decides what to put in DrRacket's pop up
menu that opens file dialogs for the subdirectories of
the place where the current file is saved

closes PR 14634

original commit: 031a0711cfabcb5ddb53d75cb5c04e8ea1881b2f
2014-07-13 08:46:54 -05:00
Robby Findler
3d82b4a974 fix misspelling tracker
please include on the release branch

original commit: 83a76027d558a2c72996028dd846310b57f38ac1
2014-07-09 23:18:38 -05:00
Robby Findler
ade83b6df5 add to the framework's spell checking support
the ability to determine if specific spots in the editor correspond to
misspelled words

original commit: 94230076523d10beb2676898a3b99aa5a426225a
2014-06-17 03:27:13 -05:00
Robby Findler
88bac3bab9 add keyboard shortcuts to unsaved dialog warning on mac os x
closes PR 12927
closes PR 10708
closes PR 8996

original commit: 64fd649ee573c73499566b7cbb77271842a33ab7
2014-06-15 04:16:02 -05:00
Robby Findler
64c4456dc0 add tabbing rule for with-syntax*
original commit: 445a5dca15b02f67dfb6e2c342c9b14f46b0a1c3
2014-06-12 04:05:48 -05:00
Matthew Flatt
bfe669e216 rackt/draw: fix internal error on too-large bitmap
original commit: 71bbe6ca9cac9bf853a36d5ce8744ce42f1c452b
2014-06-12 07:42:47 +01:00
Matthew Flatt
583b8b040a fix many more 3-argument calls to the module name resolver
original commit: 2f46525a7d9a13f4830b756c0935d60809ff11d8
2014-06-09 09:04:14 +01:00
Matthew Flatt
f1121af8d2 tests: remove "gui" lock declarations
The fresh PLTUSERHOME created by `raco test --drdr` should avoid
the problems that made the lock necessary before.

original commit: 165f21a192f28746519c21cfd3b079ac73ff1b84
2014-06-03 07:40:05 +01:00
Matthew Flatt
4491fd3362 rackunit/docs-complete: move to the "racket-index" package
Modules are not supposed to move to different packages, anymore, so
I'm breaking a rule. The problem is that having `rackunit/docs-complete`
in "scribble-lib" made "scribble-lib" depend on "racket-index", and
that's an undesirable dependency. (Installing Scribble shouldn't
force you to have Racket documentation.) I should have noticed
the problem when I moved `setup/xref` to "racket-index", but I missed
it.

As far as I can tell, there's only one package on pkgs.racket-lang.org
that isn't in the main repository and uses `rackunit/docs-index`. The
package doesn't correctly declare its dependencies, anyway.

original commit: d33c2252e10dbeb22e49c85f03707345e2756ce5
2014-06-02 12:34:12 +01:00
Robby Findler
6b2a12a9ad make c:x;c:f keybinding use file-menu:open-callback (when it can)
original commit: 8ff984a934fa1d8159e936e2d2bcf989f5ed3b45
2014-05-26 14:53:55 -05:00
Robby Findler
bedb06c837 tweak save-file docs based on my own earlier confusion
original commit: c0dfc135c0e1ff32bf7232f12a715b3047c90171
2014-05-22 14:28:14 -05:00
Robby Findler
c448ae87cd fix timeout computation in the REPL io
In the case that the flush queue was empty, the first byte that
comes it would appear to have come from a long time ago and
thus get flushed immediately.

Instead, when the first byte comes in, we restart the timer at that
point, intead of holding the old value

original commit: 4db7477b0da5aa6ceca593b53de57caaf4793dd2
2014-05-20 17:20:31 -05:00
Robby Findler
99762f704e use Menlo as the default font, when it is available
original commit: 251eb235d900b2522d1643368375b44a5a2fbd4a
2014-05-19 21:43:22 -05:00
Robby Findler
779275c204 fix a problem that leads to spurious 'file has changed on disk' messages
Before this commit, autosave files would (incorrectly) contribute to
the file's last modification time in a way that meant that after an autosave,
the warning would start triggering when the file is saved normally

original commit: 5751ebe530c9278aa5cad83e9b27205bc7bc0186
2014-05-19 10:05:17 -05:00
Robby Findler
29971bb642 fix a performance bug in drracket's REPL IO.
This one of those classic n^2-loop-that-should-be-linear bug. The fix
speeds up this program (when run in DrRacket) by about 1.75x:

  (for ([x (in-range 10000)])
    (display "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\n"))

The bug is fairly old too: I introduced this bug on March 6th,
2004. (Thanks, Sam, for making that old history accessible!)

original commit: 95cdd6e6198ea08d0ad7546bb8c19d12b4e5a83f
2014-05-10 20:02:03 -05:00
Matthew Flatt
50b592404a racket/gui: adapt text-editor-load-handler to missing-module exception
Raise `exn:fail:{filesystem,syntax}:missing-module` instead of
`exn:fail:filesystem` when a module file does not exist.

original commit: b420967b02f767c50bbae688cad67f2f9cca91e4
2014-05-03 20:06:03 -06:00
Matthew Flatt
e1aed6f3ea racket/gui: fix for Mac OS X 10.6
Closes PR 14482

original commit: afe06ed070577fad6eb74bf27717ce5337ff2b48
2014-05-02 15:14:50 -06:00