## 28.4 Action Widgets

Class | Example | Reference
--- | --- | ---
`Tk.button` | Section 5.1 of ``Window Programming in Mozart'' | `button`
`Tk.checkbutton` | Section 5.2 of ``Window Programming in Mozart'' | `checkbutton`
`Tk.radiobutton` | Section 5.2 of ``Window Programming in Mozart'' | `radiobutton`
`Tk.scale` | Section 5.8 of ``Window Programming in Mozart'' | `scale`
`Tk.scrollbar` | Section 5.9 of ``Window Programming in Mozart'' | `scrollbar`

`tkInit`

  > > `tkInit(parent:` `+WidgetO``
  > > action:` `+Action``
  > > args:` `+Args``<= nil
  > > ...)`

  Initializes the widget object and creates the widget.

  The field `WidgetO` for the special feature `parent` must be a tickle object. `self` becomes a slave of `WidgetO`. `Action` and `Args` are described in Section 28.2.1 and Section 28.2.2.

`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.

`tkAction`

  > > `tkAction(action:` `+Action``<= unit
  > > args:` `+Args``)`

  Redefines or deletes an action. `Action` and `Args` are described in Section 28.2.1 and Section 28.2.2.

`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 28.2.3.

`tkClose`

  > > `tkClose()`

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