Commit Graph

913 Commits

Author SHA1 Message Date
Robby Findler
6fff8a3030 make right-clicking on non-text offer copy and cut in the
popup menu

Extends append-editor-operation-menu-items so that when you
pass an editor and a position, it checks to see if that spot
has a non-string% snip and, if so, copies that one position
(or cuts it, depending).

Then, use that extension in DrRacket

closes PR 12791
2012-11-22 17:33:34 -06:00
Matthew Flatt
31f7cfb486 racket/gui gtk: fix end-doc' for printer-dc%'
Contract demands a void result.
2012-11-20 07:15:28 -07:00
Matthew Flatt
d90fbaeff4 scheme/gui/base: fix module-attach problem in `make-gui-base-namespace'
The `scheme/base' module had become unreachable from the `mred' module.
While that normally would be a good thing, it lead to troublesome
multiple instantiations of `scheme/base' that caused problems for
attaching further modules to the namespace.
2012-11-19 07:56:48 -07:00
Robby Findler
3aac6ec715 add the name of the function to the message string in the gui-event logger 2012-11-16 07:26:38 -06:00
Matthew Flatt
7b04571fac racket/gui: add `get-current-mouse-state' 2012-11-07 14:37:39 -07:00
Eli Barzilay
672910f27b Lots of bad TAB eliminations.
I started from tabs that are not on the beginning of lines, and in
several places I did further cleanings.

If you're worried about knowing who wrote some code, for example, if you
get to this commit in "git blame", then note that you can use the "-w"
flag in many git commands to ignore whitespaces.  For example, to see
per-line authors, use "git blame -w <file>".  Another example: to see
the (*much* smaller) non-whitespace changes in this (or any other)
commit, use "git log -p -w -1 <sha1>".
2012-11-07 11:22:20 -05:00
Matthew Flatt
068240e9fe racket/gui: fix problems with control labels and client/global positions
Closes PR 13232
2012-11-04 08:47:50 -07:00
Matthew Flatt
0c82f54912 racket/gui: add delete' to choice%' and `list-control<%>'
Closes PR 13230
2012-11-04 08:25:43 -07:00
Matthew Flatt
ad703025c5 error message repair 2012-11-04 06:09:21 -07:00
Robby Findler
95841b9303 lift the restriction that the port passed to open-input-text-editor
cannot change its revision number during reading

This restriction was enforced only for editors that have non
string-snip% snips. The restriction was in place because the
implementation strategy was to chain thru the snips in the editor
using (send snip next) and that isn't safe if the revision number
changes.

The lifting of the restriction is implemented by tracking the position
in the editor where the last snip ended and, if the revision number
changes, starting over trying to get a snip from that position. This
has the effect that, if the revision number never changes, the code
should behave the same as it was doing before (so hopefully any new
bugs I've introduced in this commit will only show up if the old
implementation would have raised an error)

Also, exploit the lifting of this restriction in the colorer so it
doesn't to restart the port during to coloring that happens along with
the parsing
2012-11-02 10:24:34 -05:00
Robby Findler
6c760b086f reindent the implementation of open-input-text-editor
Apologies for the gratuitious reindent, but I was having
a lot of trouble reading this file; it appears to have
last been worked on in an Emacs that used tabs for indentation
and doesn't use the same tab width as drracket.
2012-11-02 10:24:34 -05:00
Robby Findler
33eba697a0 adjust the fields of the gui-event struct 2012-10-29 06:45:13 -05:00
Matthew Flatt
ba6e383963 racket/gui gtk: fix on-subwindow-... handling
Handling was broken by changes to fix enter and
leave events (in commit a5d7812732)

Merge to v5.3.1
2012-10-27 21:34:08 -06:00
Robby Findler
7e8ac872fe add logging to mred's event callback mechanism to record
how long event processing takes
2012-10-26 21:49:44 -05:00
Matthew Flatt
ebe0b64d47 racket/gui win32: fix drag-and-drop onto frame
Closes PR 13109

Merge to v5.3.1
2012-10-09 21:13:34 -06:00
Matthew Flatt
75008f14d7 win32: fix combo-field% click handling
Closes PR 13173

Merge to v5.3.1
2012-10-09 20:05:47 -06:00
Matthew Flatt
7ddd99cf52 racket/gui win32: fix duplicate pre- events for controls 2012-10-02 07:26:25 -06:00
Matthew Flatt
a5d7812732 racket/gui: skip some redundant 'enter & 'leave events 2012-10-02 07:26:25 -06:00
Matthew Flatt
efcad101d1 win32: fix coordinates of non-client mouse events
Closes PR 13141
2012-10-01 13:08:24 -06:00
Matthew Flatt
c16b696272 win32: fix for clipboard bitmap decoding
Closes PR 13119
2012-09-19 09:12:57 -06:00
Matthew Flatt
4f75350bf3 win32: fix(?) printing page-size calculation when in 100*mm
Windows provide page metrics in either 1000ths of inches or
100ths of millimeters. I think Racket's calculation was wrong
in the mm case.
2012-09-19 08:40:24 -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
69d2adce4d racket/gui: new-style error messages 2012-09-02 16:38:43 -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
19b2ee5e90 racket/gui: get get-scroll-pos', etc., arguments for canvas%' 2012-09-02 10:08:18 -06:00
Matthew Flatt
7291e1a24d racket/gui win32: atomicity repair 2012-08-29 17:45:59 -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
088d1dadb4 add ffi/unsafe/nsalloc' and ffi/unsafe/nsstring' 2012-08-24 15:48:58 -06:00
Matthew Flatt
d9784aa7eb win32 racket/gui: fix decoding of system font name
Closes PR 12997
2012-08-23 08:16:23 -06:00
Matthew Flatt
30da0f4bf4 fix internal position adjustment for `pane%'
Closes PR 13038
2012-08-22 09:07:05 -06:00
Matthew Flatt
0648556bea racket/gui: internal cleanup
As suggested by Robby.
2012-08-13 17:11:20 -06:00
Matthew Flatt
1800680c6b racket/gui: fix access of scrollbar values for canvas without a scrollbar 2012-08-12 20:17:29 -06:00
Matthew Flatt
d5024f0f20 win64 racket/gui: another work around for Cairo clipping issues
Cairo doesn't seem to deal correctly with an HDC produced
by BeginPaint() that has a clipping region. The problem affects
only Win64. Work around the problem by drawing to a separate
HDC and copying to/from the screen. (To see the problem before
this patch, draw the DrRacket window to the edge of the screen
and back, and observe tha the toolbar doesn't update correctly.)

This change could affect performance, but it should mostly
be limited to refresh when a window moves.
2012-08-08 09:56:44 -06:00
Matthew Flatt
b111241afe racket/gui/init: fix load handler 2012-07-18 03:52:20 -06:00
Matthew Flatt
cc2c701a7d racket/gui/init: make load handler chain to original
For a non-WXME file, fall back to the original load handler,
instead of re-implementing it. This makes module caching work
the right way. Falling back to the original means closing
the port and then re-opening the file to load, but that seems
ok.
2012-07-17 06:19:15 -06:00
Matthew Flatt
5f1c8d3ec9 Revert "racket/gui/init: module caching in the load handler"
This reverts commit 5c02b1c95a.

The caching table doesn't hold entries weakly, which means that
it can be a space leak.
2012-07-17 06:11:35 -06:00
Matthew Flatt
5c02b1c95a racket/gui/init: module caching in the load handler 2012-07-16 19:22:30 -06:00
Jay McCarthy
1685952b9b Making key-code-symbol consistent with docs 2012-07-10 19:21:24 -04:00
Matthew Flatt
c7d181c2a9 racket/gui, win32: fix problem with mimize for fixed-size window 2012-06-23 04:15:28 -06:00
Asumu Takikawa
0e4f9fcd97 racket/gui: fixed by-position widget initialization
This was broken in the class100 port. The init arguments
previously handled by the class100*/kw macro need to be
explicitly passed down.

Also, an (init-rest) is needed at the leaves of the class
hierarchy to ensure that internal super init args don't
leak via error messages. (the class100 macro always
inserts these)

Added a test file so similar breakage is detectable in the
future.
2012-06-19 12:37:35 -04:00
Matthew Flatt
7a9c8e5d40 racket/gui win32: fix East Asian font problem
When the theme-specified default font has a localized name,
using it as a Pango faily name doesn't work, with the result that
text on controls could be truncated. Get a Pango-friendly
name by converting a LOGFONT to a Pango font description and
getting the name from the font description.
2012-06-06 13:25:14 +08:00
Matthew Flatt
16f0b0c3f0 racket/gui: fix canvas%' implementation on-paint'
Broken in the conversion from `class100'.
2012-05-31 05:56:35 -06:00
Matthew Flatt
74844152bc fix load handlers to match docs on parameters
Problems exposed by setting `read-accept-lang' to #f.
2012-05-29 13:57:32 -06:00
Matthew Flatt
58db5f8b46 racket/gui: implement set-clipboard-bitmap' in clipboard<%>'
Closes PR 12689

Cocoa implementation provided by Jens Axel Søgaard
2012-05-26 19:42:48 -06:00
Asumu Takikawa
8a52613463 racket/gui: remove empty modules 2012-05-26 16:45:00 -04:00
Asumu Takikawa
a38e6a19ab racket/gui: fix a mzscheme->racket/base issue 2012-05-26 16:23:30 -04:00
Asumu Takikawa
05394aff7e Remove mred/private/kw.rkt
This handled init argument inheritance for class100, but
all uses of it have now been removed.
2012-05-26 11:12:56 -04:00
Asumu Takikawa
cfe1711494 Convert all uses of mzlib/class100 to racket/class 2012-05-26 11:12:55 -04:00
Matthew Flatt
5b80fd37c7 racket/gui win32: fix screen info to not assume main is first
Thanks to Kieron Hardy for tracking down the problem.
2012-05-26 07:38:24 -06:00
Matthew Flatt
3a9f8eea4f racket/gui cocoa: fix internal ObjC class names
"My" -> "Racket". The "My" prefix was from initial experiments,
of course, and I just never got around to changing it before.
I think these names go into a global namespace, though, at the
ObjC level, so they need to have a distinct and Racket-specific
prefix.
2012-05-16 09:43:23 -06:00