[−][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 childScrollRegion
: may be larger on the inside than the outsideStack
: a stack of widgets in the same rect (TODO:TabbedStack
)List
: a dynamic row / column of childrenSplitter
: similar toList
but with resizing handlesWindow
is usually the root widget and has special handling for pop-ups and callbacks
Menus
ComboBox
: a simple pop-up selectorMenuBar
,SubMenu
: menu parent widgetsMenuEntry
,MenuToggle
,Separator
: menu entriesMenuFrame
: edges of a pop-up menu
Controls
TextButton
: a simple buttonCheckBox
: a checkable boxRadioBox
: a checkable box bound to a groupEditBox
: a text-editing boxScrollBar
: a scrollbarSlider
: a slider
Static widgets
Filler
: an empty widget, sometimes used to fill spaceSeparator
: a visible bar to separate thingsLabel
: a simple text label
Components
AccelLabel
: a label which parses accelerator keysCheckBoxBare
:CheckBox
without its labelRadioBoxBare
:RadioBox
without its labelDragHandle
: a handle (e.g. for a slider, splitter or scrollbar)
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 |
Traits
EditGuard | A guard around an |
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 | |
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 |