import "UILib"
UILib.
type
Context.UILib.
Context type for using GTK, storage, and undo together.
Mk.Context.UILib.
: Context.UILib.
gtk
: Context.GTK
undoHandler
: UndoHandler
store
: Store
Context.UILib.
run.Context.UILib.
: (Context -> Action a) -> Action a
Run an action, giving a
Context
.
Widget.UILib.
page.Widget.UILib.
: WholeModel {+Text} -> Widget -> Widget *: Widget
Create a labelled page for use with
notebook.Widget.GTK
.
labelled.Widget.UILib.
: WholeModel {+Text} -> Widget -> Widget
Create a labelled layout row.
type
Pane.UILib.
A pane is a title, GTK widget, and menu.
Mk.Pane.UILib.
: Pane.UILib.
titleModel
: WholeModel Text
extraMenusModel
: WholeModel (List MenuEntry) [optional]
widget
: Widget
type
NewItem.UILib.
+q
A menu entry for creating a new “item” (of type
q
).
Mk.NewItem.UILib.
: NewItem.UILib.
name
: Text
mkey
: Maybe Text [optional]
newItem
: Action q
type
SetWidget.UILib.
{-p,+q}
A widget for a set, for a model of the current selection
Mk.SetWidget.UILib.
: (Maybe (WholeModel {-q,+p}) -> Widget) -> SetWidget.UILib.
SetWidget.UILib.
toWidget.SetWidget.UILib.
: SetWidget {} -> Widget
type
SetPresentation.UILib.
{-p,+q}
A way of presenting some set of items as a
Pane
.
Mk.SetPresentation.UILib.
: SetPresentation.UILib.
setName
: Text
name for a collection of the items
itemSet
: SetModel p
the set of items
newItems
: List (NewItem q) [optional]
menu items for creating new items
extraMenus
: List MenuEntry [optional]
extra menus
itemPane
: p -> Pane
a
Pane
for a individual item
setWidget
: SetWidget {-p,+q}
a
SetWidget
for the set as a whole.
Pane.UILib.
simple.Pane.UILib.
: Text -> Widget -> Pane
A pane with this title and widget
notebook.Pane.UILib.
: WholeModel {+Text} -> List Pane -> Action Pane
Create a notebook from a list of panes
type
UI.Pane.UILib.
This
UI
type has some functions for windows.
Mk.UI.Pane.UILib.
: UI.Pane.UILib.
Mk.Context.UILib
stdWindow
: WholeModel {+Text} -> WholeModel {+List MenuEntry} -> Widget -> Action Window
A window that comes with some menus.
paneWindow
: Pane -> Action Window
Open a
Window
with thisPane
.
presentSet
: SetPresentation item -> Action Pane
Create a simple
Pane
for this set of items.
presentSetWithItem
: SetPresentation item -> Action Pane
Create a two-column
Pane
, with the set list on one side, and a selected item on the other.
UI.Pane.UILib.
mk.UI.Pane.UILib.
: Context.UILib -> UI.Pane
type
Named.UILib.
An open entity type; something with a name
Named.UILib.
type
Props.Named.UILib.
“name” property for a given store, etc.
Mk.Props.Named.UILib.
: Props.Named.UILib.
nameOf
: Property Named Text
A name is a text that identifies (in some sense) an entity.
nameOrder
: ModelOrder Named
Order alphabetically (case-insensitive) by name
byName
: FiniteSetModel {+a,+Named} -> WholeModel {+List (a *: Text)}
Order a set of entities by their names.
Props.Named.UILib.
mk.Props.Named.UILib.
: Store -> Props
type
UI.Named.UILib.
Mk.UI.Named.UILib.
: UI.Named.UILib.
Mk.UI.Pane
Mk.Props
namedPane
: (a -> Widget) -> (a & Named) -> Pane
A pane for a widget, where the title is the name of the widget.
nameColumn
: WholeModel {+Text} *: (Named -> WholeModel Text)
A “name” column for
listTable.Widget
.
namedTable
: FiniteSetModel {a,+Named} -> (a -> Widget) -> SetWidget {a,-Named}
A
SetWidget
for this set that’s a list of widgets by name.
UI.Named.UILib.
mk.UI.Named.UILib.
: Context.UILib -> UI.Named