Add more specific class types instead of Any.

Fixes Insert Large Letters dialog.  Merge to 5.3.1.

original commit: 4124c9a41b26092aa0dd7a33916fd8e080aa626f
This commit is contained in:
Sam Tobin-Hochstadt 2012-10-27 17:44:12 -07:00
parent b299fdb71c
commit 4d00c00072
2 changed files with 27 additions and 24 deletions

View File

@ -9,28 +9,13 @@
()
([get-font (-> (Instance Font%))]))))])))
(dt Racket:Text% (Class ()
()
([begin-edit-sequence (-> Void)]
[end-edit-sequence (-> Void)]
[lock (Boolean -> Void)]
[last-position (-> Number)]
[last-paragraph (-> Exact-Nonnegative-Integer)]
[delete (Number Number -> Void)]
[auto-wrap (Any -> Void)]
[paragraph-end-position (Number -> Natural)]
[paragraph-start-position (Number -> Natural)]
[get-start-position (-> Number)]
[get-end-position (-> Number)]
[insert (String Number Number -> Void)])))
(require/typed/provide
framework/framework
[preferences:set-default (Symbol Sexp (Any -> Boolean) -> Void)]
[preferences:set (Symbol Sexp -> Void)]
[editor:get-standard-style-list
(-> (Instance Style-List%))]
[racket:text% Racket:Text%]
[racket:text% Text:Basic%]
[gui-utils:ok/cancel-buttons
((Instance Horizontal-Panel%)
((Instance Button%) (Instance Event%) -> Void)

View File

@ -20,28 +20,30 @@
([parent Any] [width Integer] [label String])
([show (Any -> Void)])))
(dt Text-Field% (Class ()
([parent Any] [callback Any] [label String])
([get-value (-> String)]
[focus (-> Void)])))
([parent (Instance Dialog%)]
[callback (Any Any -> Any)]
[label String])
([get-value (-> String)]
[focus (-> Void)])))
(dt Horizontal-Panel% (Class ()
([parent Any]
([parent (Instance Dialog%)]
[stretchable-height Any #t]
[alignment (List Symbol Symbol) #t])
()))
(dt Choice% (Class ()
([parent Any] [label String] [choices (Listof Any)] [callback Any])
([parent (Instance Horizontal-Panel%)] [label String] [choices (Listof Any)] [callback (Any Any -> Any)])
([get-selection (-> (Option Natural))]
[set-selection (Integer -> Any)]
[get-string-selection (-> (Option String))]
[set-string-selection (String -> Void)])))
(dt Message% (Class ()
([parent Any] [label String])
([parent (Instance Horizontal-Panel%)] [label String])
([set-label ((U String (Instance Bitmap%)) -> Void)])))
(dt Horizontal-Pane% (Class ()
([parent Any])
([parent (Instance Horizontal-Panel%)])
()))
(dt Editor-Canvas% (Class ()
([parent Any] [editor Any])
([parent (Instance Dialog%)] [editor (Instance Text:Basic%)])
([set-line-count ((U #f Integer) -> Void)])))
(dt Bitmap-DC% (Class ((Instance Bitmap%))
()
@ -55,6 +57,22 @@
(dt Snip% (Class () () ([get-count (-> Integer)])))
(dt Text:Basic% (Class ()
()
([begin-edit-sequence (-> Void)]
[end-edit-sequence (-> Void)]
[lock (Boolean -> Void)]
[last-position (-> Number)]
[last-paragraph (-> Exact-Nonnegative-Integer)]
[delete (Number Number -> Void)]
[auto-wrap (Any -> Void)]
[paragraph-end-position (Number -> Integer)]
[paragraph-start-position (Number -> Integer)]
[get-start-position (-> Integer)]
[get-end-position (-> Integer)]
[get-text (Integer (U Integer 'eof) -> String)]
[insert (String Number Number -> Void)])))
(dt Text% (Class ()
()
([begin-edit-sequence (-> Void)]