diff --git a/collects/typed/framework/framework.rkt b/collects/typed/framework/framework.rkt index d03ebffe..8501d9b0 100644 --- a/collects/typed/framework/framework.rkt +++ b/collects/typed/framework/framework.rkt @@ -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) diff --git a/collects/typed/mred/mred.rkt b/collects/typed/mred/mred.rkt index 9b1ca81a..2fa0519e 100644 --- a/collects/typed/mred/mred.rkt +++ b/collects/typed/mred/mred.rkt @@ -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)]