@@ -2,15 +2,36 @@ module Fable.Python.TkInter
22
33open Fable.Core
44
5+ type Event =
6+ abstract member x: int
7+ abstract member y: int
8+
59type Misc =
6- abstract member title : string with get , set
10+ abstract member bind : sequence : string * func : ( Event -> unit ) -> string option
711
8- [<Import ( " Frame " , " tkinter " ) >]
9- type Frame ( master : Misc ) =
10- do ()
12+ type Wm =
13+ abstract member title : unit -> string
14+ abstract member title : ``string`` : string -> unit
1115
1216[<Import( " Tk" , " tkinter" ) >]
13- type Tk ( name : string ) =
17+ type Tk ( screenName : string option ) =
18+ interface Wm with
19+ member _.title ( ``string`` : string ) = nativeOnly
20+ member _.title () = nativeOnly
21+
1422 interface Misc with
15- member _.title : string = nativeOnly
16- member _.title with set ( value : string ) = nativeOnly
23+ member _.bind ( sequence : string , func : ( Event -> unit )) = nativeOnly
24+
25+ new () = Tk ( None)
26+
27+ member _.title ( ``string`` : string ) = nativeOnly
28+ member _.title () = nativeOnly
29+
30+ member _.update () = nativeOnly
31+
32+ [<Import( " Frame" , " tkinter" ) >]
33+ type Frame ( master : Misc ) =
34+ [<Emit( " Frame($0, width=$1, height=$2, bg=$3)" ) >]
35+ new ( root : Tk , width : int , height : int , bg : string ) = Frame( root :> Misc)
36+
37+ member x.bind ( sequence : string , func : ( Event -> unit )) : string option = nativeOnly
0 commit comments