Commit Graph

152 Commits

Author SHA1 Message Date
Robby Findler
fa85d30773 adjust the search bubbles so they flicker less when typing 2012-12-25 17:40:32 -06:00
Robby Findler
2fced5d7d6 drracket tracks the frame position and size on a
per-monitor-configuration basis and (possibly) moves/resizes
the frame when it changes
2012-12-21 19:22:59 -06:00
Robby Findler
03daa7f3c2 whoops; @racket[] should have been @method[] 2012-11-30 21:33:48 -06:00
Robby Findler
d6efcde6ca docs fixes related to somewhat recent DrRacket window
resizing commit
2012-11-30 21:31:57 -06:00
Robby Findler
993cd40208 Adjust DrRacket so the window can get narrower
For example, a new DrRacket window (with a file named tmp.rkt in the
and 356 afterwards.  This is under mac os x with, I believe, the
default system font sizes. (The file is important because different
languages can have different buttons in the toolbar and the filename's
length itself can affect the minimum size.)

Mostly this change is the addition of a new kind of panel that
lets its children have multiple fixed sizes (as opposed to
just a single minimum size and (optionally  arbitrarily large))
It also adjusts the various toolbar buttons to use this new code.

Also, there's a few tweaks to shrink other things that became the
limiting factor in shrinking the width of the DrRacket window.

Currently, at least for #lang racket programs, the toolbar buttons
along the top of the window are the limiting factor (including the
save button).  With a bogus language (ie, #lang rackeeet), the bottom
bar is the limiting factor, since that will have only the Save, Run,
and Stop buttons.

related to PR 13281
2012-11-29 09:43:05 -06:00
Robby Findler
43e7150fdf clean up the text:searchable docs based on recent changes 2012-11-26 18:42:18 -06:00
Nadeem Abdul Hamid
8f3343cd01 automatic parenthesis mode improvements
Handle close parentheses in a smarter way while in
auto-parens mode and be a little more smart about
inserting brace pairs in general.

In summary:

 - Add some "smart-skip" behavior to insert-close-paren,
   described in the documentation.
    - When auto-parens mode is enabled,
      the existing "balance-parens" keybinding invokes
      insert-close-paren with a smart-skip argument of
      'adjacent
    - A new "balance-parens-forward" keybinding invokes
      insert-close-paren with a smart-skip argument of
      'forward (whether or not auto-parens mode is
      enabled)

 - Enable basic smart-skip behavior for
   strings ("...") and |...| pairs, specifically, typing
   a double-quote or bar character when the cursor
   immediately precedes one causes the cursor to simply
   skip over the existing one

 - Tweak auto-insertion of block comment pairs; i.e.
   typing hash and a bar results in a properly balanced
   #||# pair. Also, when you type a bar character when
   the cursor immediately precedes a closing bar and
   hash of a comment, then the cursor skips over both
   characters (this seems better than having it just
   skip over the bar, and then having to introduce a
   new keybinding to detect when a hash is typed while
   the cursor is between a bar and a hash)

 - In strings and line/block comments, auto-parens mode
   no longer has any effect (you can still use the M+..
   keybindings to force insertion of a particular brace
   pair)

 - Detect when a character constant is being typed, and
   don't insert brace pairs if so; i.e. if the cursor
   is immediately after #\ , then typing any open parens,
   double quote, or bar, does _not_ result in the
   insertion of an open/close pair even in auto-parens
   mode

 - Add a bunch of tests related to auto-parens, matching
   pairs of braces, strings, comments, etc. to
   collects/tests/framework/racket.rkt
2012-11-25 21:57:52 -06:00
Robby Findler
5197649cb7 improve the interactivity of DrRacket's search
Changes the implementation of highlight-range so that it
only recomputes all of the new locations from the positions
when on-reflow is called (otherwise only computing the
relevant ones) and make the on-reflow callback chop itself
up, in case there are lots of highlighted ranges to avoid
tying up the event loop.

Changes searching so that it doesn't neccessarily compute
the entire search results in a single event callback
(but also make it start the computation more aggressively)

Overall, this changes the strategy from one that, for any potentially
long-running callback, just tried to push it off into the future, into
a strategy that tries to avoid long-running callbacks by breaking the
work up into chunks, but starting the first chunk immediately (in a
low-priority callback).

Also, misc other changes to make this work better and generally clean
things up.
2012-11-25 20:58:13 -06:00
Robby Findler
e55d32b2eb fix docs bug in recent commit 2012-11-22 20:02:59 -06:00
Robby Findler
5b18645a9a added spelling dictionary support
related to PR 13242
2012-11-22 19:24:22 -06:00
Robby Findler
d0ce0de398 change the way that the delegate text is specified, using
getter/setters instead of overriding a method

this has the benefit that the delegate does not have to be
rebuilt when switching tabs in drracket; we just leave the
old delegate on the old definitions text, and the swap it
back into the editor-canvas when we swap the text% object
itself back in.
2012-11-16 14:33:17 -06: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
Robby Findler
fdfa5bf134 add docs for get-spell-check-strings and set-spell-check-strings 2012-10-31 10:16:16 -05:00
Robby Findler
b16843a908 add a find-from-selection menu item that grabs the selection and puts
it directly into the find window

related to PR 12978
2012-08-06 18:00:57 -05:00
Robby Findler
b520696d6f typos 2012-07-30 21:46:22 -05:00
Asumu Takikawa
a1aedaff1e Fix doc typos 2012-07-06 18:59:10 -04:00
Robby Findler
0d6b825377 add a preference to control whether or not there is an extra
pixel of space in between lines in DrRacket.

This change is based on Matthew's experience having a look
at the font setup on the three platforms.

He writes:
>  * Mac OS X: the convention seems to be to add space between lines.
>   TextEdit, for example, looks like DrRacket: the maze has spaces.
>
>   (I can't find a font that makes the maze look right, actually, even
>   if I adjust the line spacing.)
>
>  * Windows: the convention seems to be that space is built into the
>   font. DrRacket (and SirMail) draw lines more sparsely than Notepad.
>
>   Perhaps consistent with the differing conventions, the height of
>   "Courier New" at 11-pixel size is 14 on Windows, 13 on Mac OS X.
>
>  * Unix: the convention seems to be to add space. DrRacket looks like
>   the default Terminal and Text Editor programs on Ubuntu.
>
>   The maze nevertheless looks right everywhere, because the glyphs
>   extend an extra pixel above the declared bounding box!
2012-03-24 20:20:05 -05:00
Asumu Takikawa
04f7bdbb02 framework: add missing methods to interface and docs
The set-replace-start and get-replace-search-hit methods were
missing in the text:searchable<%> interface. The latter was
also undocumented.
2012-03-01 13:17:48 -05:00
Robby Findler
c9fcde258f docs bug (as noted by Marijn on racket-dev) 2011-12-27 08:53:35 -06:00
Robby Findler
458e2c2282 some long overdue Rackety: renaming the 'scheme:' exports of the framework to 'racket:' 2011-11-30 06:45:50 -06:00
Robby Findler
d381c7b40b add the ability to pass a bitmap directly for the splash screen 2011-11-28 14:35:44 -06:00
Matthew Flatt
f2082e6eeb fix framework doc reference to `set-icon' method
Merge to 5.2
2011-10-11 17:17:58 -06:00
Robby Findler
9b3f2427d7 make right-click in the space between the definitions and
interactions window pop up a menu to let you change from
vertical to horizontal orientation
2011-10-04 16:47:10 -05:00
Robby Findler
951de8cc51 add get-default-percentages to panel:dragable and then add a dragable panel
to the debugger
2011-10-02 14:34:28 -05:00
Robby Findler
4a2757f200 Adjust DrRacket so that it saves files with CRLF
line terminators when:

  a) running under windows, and
  b) the file on the disk (when DrRacket first opens it)
     contains all CRLF line endings.

In all other situations, the file is saved with LF terminators.

Before this commit, DrRacket would always use the platform-specific
convention, regardless of the original content of the file.

closes PR 12242
2011-09-30 17:08:07 -05:00
Robby Findler
b95b346a4e adjust various plumbing to get the drracket icon to the startup screen. Only to realize
that the startup screen is a dialog% and thus doesn't have set-icon

related to PR 12241
2011-09-30 17:08:03 -05:00
Eli Barzilay
093236fea4 Improve code generation in the framework collection.
Instead of generating a file for code and one for documentation, do both
via a macro instead.  Most of the code is the same (modulo reformatting
in a more modern style), and instead of printing the result to a file,
it just returns it as the result of a macro.  (Since this is done in a
naive way, the macro is bad -- it is unhygienic since this is basically
what it did before only through a generated file; it should eventually
be improved to avoid these hacks.)
2011-09-30 10:51:28 -04:00
Eli Barzilay
656de69636 Don't create a page-setup menu item if `file-menu:create-print?' returns #f. 2011-09-30 10:45:43 -04:00
Robby Findler
2ec720176a extend and refactor minor stuff in the framework
specifically add an argument to move/copy-to-edit so that it
does copy-only and export a function for trigger a submission
to the input port of a text:ports<%> object programmatically
2011-09-22 10:51:47 -05:00
Robby Findler
048fa1d7b8 get rid of the "open here" functionality
This is a backwards incompatible change; there is a more complex change
that just stubs this stuff out that may be better that we may need
isntead of this commit.
2011-09-21 22:53:03 -05:00
Robby Findler
67d17645c4 wrong super interface 2011-09-05 12:33:53 -05:00
Robby Findler
a67f509f90 add frame:focus-table-mixin & related things to be able to make drracket
test suites that don't depend on the OS giving any focus messages
2011-09-05 08:30:49 -05:00
Robby Findler
e4ddd0718a break lines better 2011-09-05 08:30:46 -05:00
Robby Findler
171858add1 wrong check for the result of system-type 2011-09-02 08:58:22 -05:00
Robby Findler
49dbb5d963 adjust the close/close window/close tab menu items to be more like other apps on the various platforms 2011-09-01 10:53:09 -05:00
Robby Findler
8f6fb87597 adjust keybindings to free up <menukey>-r for "Run" and <menukey>-t for "New Tab" 2011-09-01 10:53:07 -05:00
Eli Barzilay
d61eb53686 Lots of documentation formatting.
Started as fixing misindented definitions, then more indentations, then
a bunch of similar things (square brackets, huge spaces at end-of-lines,
etc).
2011-08-15 07:50:04 -04:00
Robby Findler
0c6bc11ac3 start a section for documenting the symbols that DrRacket passes to a language's get-info proc
add docs for a few of these, notably the syntax colorer
2011-08-04 21:40:29 -07:00
Robby Findler
3fa2cc0d67 adjust the size-pref frame mixin to track the position of the frame in a multi-monitor sensitive way
(also fix various issues with that code and unify the framework and drracket way of doing this)
2011-07-19 16:16:50 -05:00
Asumu Takikawa
6c3284a828 Fix a few framework contracts to match code 2011-07-14 18:15:48 -04:00
Robby Findler
2fb03852b3 fix bad contract 2011-07-13 06:47:20 -06:00
Eli Barzilay
3157955d40 ".ss" -> ".rkt" scan done. 2011-07-02 10:37:53 -04:00
Ryan Culpepper
1b702a2ae3 docs reorganization
added tutorial, racket categories
  relabeled some other categories
  normalized manual names: de-bolded, changed some names
2011-07-01 17:16:53 -06:00
Eli Barzilay
78dacef817 Get rid of "defaultly"s. 2011-06-28 02:11:24 -04:00
Robby Findler
f93ff4de26 added get-pos/text-dc-location method to editor:basic in framework 2011-06-26 15:49:55 +08:00
Eli Barzilay
ac26fe7554 A ton of @scheme*' -> @racket*' and related updates.
Also, updates some of the mzlib files to point at `racket/*' libraries
rather than to `scheme/*' ones.
2011-06-25 04:08:47 -04:00
Eli Barzilay
debd1f9f1e Recketizing much in `net/*', mass ".ss" -> ".rkt" conversion in .scrbl files.
(Some other minor things here and there.)
2011-06-20 04:27:14 -04:00
Robby Findler
9bf26ef69e add more caching to avoid calling normalize-path so much;
this should affect the test coverage coloring and the stacktrace
arrows/stop-sign window
2011-06-15 16:45:47 +08:00
Robby Findler
d6ef130fd2 cleaned up framework docs 2011-05-01 14:16:04 -05:00
Asumu Takikawa
4b575c315b Fixed inconsistent return values for get-pos/text. 2011-04-29 14:11:21 -04:00