[][src]Module kas::widget

Widget library

Unlike the rest of the kas crate, this module is not infrastructure but merely a library of useful widgets. It may be moved to a new crate in the future. Any implementation can be directly copied into user code if desired.

Dialogs

  • MessageBox: a simple window with a message and an "Ok" button

Container widgets

  • Frame: a simple frame around a single child
  • ScrollRegion: may be larger on the inside than the outside
  • Stack: a stack of widgets in the same rect (TODO: TabbedStack)
  • List: a dynamic row / column of children
  • Splitter: similar to List but with resizing handles
  • Window is usually the root widget and has special handling for pop-ups and callbacks

Controls

Static widgets

  • Filler: an empty widget, sometimes used to fill space
  • Separator: a visible bar to separate things
  • Label: a simple text label

Components

Structs

AccelLabel

A label supporting an accelerator key

CheckBox

A checkable box with optional label

CheckBoxBare

A bare checkbox (no label)

ComboBox

A pop-up multiple choice menu

DragHandle

Draggable Handle

EditBox

An editable, single-line text box.

Filler

A space filler

Frame

A frame around content

Label

A simple text label

List

A generic row/column widget

MenuBar

A menu-bar

MenuEntry

A standard menu entry

MenuFrame

A frame around content, plus background

MenuToggle

A menu entry which can be toggled

MessageBox

A simple message box.

RadioBox

A radiobox with optional label

RadioBoxBare

A bare radiobox (no label)

ScrollBar

A scroll bar

ScrollRegion

A scrollable region

Separator

A separator

Slider

A slider

Splitter

A resizable row/column widget

Stack

A stack of widgets

SubMenu

A sub-menu

TextButton

A push-button with a text label

Window

The main instantiation of the Window trait.

Traits

EditGuard

A guard around an EditBox

Menu

Trait governing menus, sub-menus and menu-entries

Type Definitions

BoxColumn

A column of boxed widgets

BoxColumnSplitter

A column of boxed widgets

BoxList

A row/column of boxed widgets

BoxRow

A row of boxed widgets

BoxRowSplitter

A row of boxed widgets

BoxSplitter

A row/column of boxed widgets

BoxStack

A stack of boxed widgets

Column

A generic column widget

ColumnSplitter

A generic column widget

EditBoxVoid

An EditBox with no EditGuard

RefColumn

A column of widget references

RefColumnSplitter

A column of widget references

RefList

A row/column of widget references

RefRow

A row of widget references

RefRowSplitter

A row of widget references

RefSplitter

A row/column of widget references

RefStack

A stack of widget references

Row

A generic row widget

RowSplitter

A generic row widget