| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
GI.Gtk.Declarative.State
Contents
Description
The StateTree and SomeState form a "shadow state"
representation, used in patching. Declarative widgets can return,
and later on reuse, its underlying GTK+ widget, collected
properties and classes, style context, custom internal state, and
child states. This reduces the need for querying GTK+ widgets
excessively, and recalculating/resetting, greatly improving the
performance of patching.
Synopsis
- data SomeState where
- data StateType
- data StateTree (stateType :: StateType) widget child event customState where
- StateTreeWidget :: !(StateTreeNode widget event customState) -> StateTree WidgetState widget child event customState
- StateTreeBin :: !(StateTreeNode widget event customState) -> SomeState -> StateTree BinState widget child event customState
- StateTreeContainer :: (IsContainer widget, IsContainer widget child) => !(StateTreeNode widget event customState) -> Vector SomeState -> StateTree ContainerState widget child event customState
- data StateTreeNode widget event customState = StateTreeNode {
- stateTreeWidget :: !widget
- stateTreeStyleContext :: !StyleContext
- stateTreeCollectedAttributes :: !(Collected widget event)
- stateTreeCustomState :: customState
- stateTreeNode :: StateTree stateType widget child event customState -> StateTreeNode widget event customState
- stateTreeNodeWidget :: StateTree stateType widget child event customState -> widget
- someStateWidget :: SomeState -> IO Widget
Documentation
The types of state trees that are available, matching the types of GTK+ widgets (single widget, bin, and container.)
Constructors
| WidgetState | |
| BinState | |
| ContainerState |
data StateTree (stateType :: StateType) widget child event customState where Source #
A state tree for a specific widget. This is built up recursively
to contain child state trees, for bin and container child widgets.
Constructors
| StateTreeWidget :: !(StateTreeNode widget event customState) -> StateTree WidgetState widget child event customState | |
| StateTreeBin :: !(StateTreeNode widget event customState) -> SomeState -> StateTree BinState widget child event customState | |
| StateTreeContainer :: (IsContainer widget, IsContainer widget child) => !(StateTreeNode widget event customState) -> Vector SomeState -> StateTree ContainerState widget child event customState |
data StateTreeNode widget event customState Source #
The common structure for all state tree nodes.
Constructors
| StateTreeNode | |
Fields
| |
Convenience accessor functions
stateTreeNode :: StateTree stateType widget child event customState -> StateTreeNode widget event customState Source #
Get the common state tree node information.
stateTreeNodeWidget :: StateTree stateType widget child event customState -> widget Source #
Get the specific type of GTK+ widget of a state tree.