UI
User interface, using GTK.
Element
type
Element
A user interface element is something that goes inside a window.
run
: Action Element -> Element
Element that runs an Action first.
blank
: Element
Blank element
draw
: WholeRef +((Integer, Integer) -> Drawing) -> Element
Drawable element
unitCheckBox
: WholeRef +Text -> WholeRef () -> Element
(TBD)
checkBox
: WholeRef +Text -> WholeRef Boolean -> Element
Checkbox. Use shift-click to set to unknown.
textEntry
: WholeRef Text -> Element
Text entry, unknown reference will be interpreted as empty text, but the element will not delete the reference.
textArea
: WholeRef Text -> Element
Text area, unknown reference will be interpreted as empty text, but the element will not delete the reference.
label
: WholeRef +Text -> Element
Label.
horizontal
: [(Boolean, Element)] -> Element
Items arranged horizontally, each flag is whether to expand into remaining space.
vertical
: [(Boolean, Element)] -> Element
Items arranged vertically, each flag is whether to expand into remaining space.
notebook
: WholeRef -Integer -> [(Element, Element)] -> Element
A notebook of pages. First of each pair is for the page tab (typically a label), second is the content.
button
: WholeRef +Text -> WholeRef +(Action Any) -> Element
A button with this text that does this action. Button will be disabled if the action reference is unknown.
pick
: WholeRef +[(Entity & a, Text)] -> WholeRef {a,+Entity} -> Element
A drop-down menu.
listTable
: [(WholeRef +Text, a -> WholeRef +Text)] -> ListRef {+Entity,+a} -> (a -> Action Any) -> Maybe (WholeRef {a,+Entity}) -> Element
A list table. First arg is columns (name, property), second is list-reference of items, third is the action for item activation, fourth is an optional reference for the selected row.
calendar
: WholeRef Date -> Element
A calendar.
scrolled
: Element -> Element
A scrollable container.
dynamic
: WholeRef +Element -> Element
An element that can be updated to different UIs.
name
: Text -> Element -> Element
An element with name set. You can use something like #text
to refer to it in the CSS style-sheet.
styleClass
: Text -> Element -> Element
An element with CSS class set. You can use something like .text
to refer to all elements in this class in the CSS style-sheet.
styleSheet
: WholeRef +Text -> Element -> Element
An element with a CSS style-sheet (applied to the whole tree of elements). See the GTK+ CSS overview and properties for how this works.
Menu
type
MenuItem
A item of a menu.
menuSeparator
: MenuItem
Separator menu item.
menuSubmenu
: Text -> [MenuItem] -> MenuItem
Submenu menu item.
menuAction
: Text -> Maybe Text -> WholeRef +(Action Any) -> MenuItem
Action menu item. Item will be disabled if the action reference is unknown.
Window
type
Window
A user interface window.
openWindow
: (Integer, Integer) -> WholeRef +Text -> WholeRef +[MenuItem] -> Element -> Action Window
Open a new window with this size, title and element.
closeWindow
: Window -> Action ()
Close a window.
showWindow
: Window -> Action ()
Show a window.
hideWindow
: Window -> Action ()
Hide a window.
exitUI
: Action ()
Exit the user interface.