## 27.5 Toplevel Widgets

The class `Tk.toplevel` provides the following methods:

`tkInit`

  > > `tkInit(parent:` `+ParentTcl``
  > > delete:` `+DeleteAction``
  > > title:` `+TitleTcl``
  > > withdraw:` `+WithdrawB``
  > > ...)`

  Initializes the widget object and creates a new toplevel widget.

  For more information see Section 3.1 of ``Window Programming in Mozart'' and Section 5.10 of ``Window Programming in Mozart''

`tk`

  > > `tk(...)`

  Sends a command for `self` to the graphics engine.

`tkReturn`

  > > `tkReturn(...` `?S``)
  > > tkReturnString(...` `?S``)
  > > tkReturnAtom(...` `?A``)
  > > tkReturnInt(...` `?IB``)
  > > tkReturnFloat(...` `?FB``)
  > > tkReturnList(...` `?Ss``)
  > > tkReturnListString(...` `?Ss``)
  > > tkReturnListAtom(...` `?As``)
  > > tkReturnListInt(...` `?IBs``)
  > > tkReturnListFloat(...` `?FBs``)`

  Sends a command for `self` to the graphics engine and returns the result in the field with the highest integer feature.

`tkBind`

  > > `tkBind(event:` `EventV``
  > > action:` `Action``<= _
  > > args:` `Args``<= nil
  > > append:` `AppendB``<= false
  > > break:` `BreakB``<= false)`

  Defines an event binding for `self`. Events are described in Section 5.5 of ``Window Programming in Mozart'' and Section 27.2.3.

`tkClose`

  > > `tkClose()`

  Closes the widget object and destroys the widgets and all slave widgets. Further object application raises an exception.