Safe Haskell | None |
---|---|
Language | Haskell98 |
This module provides functions to alter the view in a notebook and a maybewidget with a notebook inside based on what is selected in a model view (icon view, list view, tree view)
This pattern appears very often in my programs. I like to use model views to let the user choose what to see (instead of using the tab pages).
- modelViewNotebookSync :: (ViewWithPathSelection a c, NotebookClass b) => a -> b -> (TreePath -> Int) -> IO ()
- modelViewNotebookSyncId :: (ViewWithPathSelection a c, NotebookClass b) => a -> b -> IO ()
- modelViewMaybeNotebookSync :: (ViewWithPathSelection a c, NotebookClass b) => a -> MaybeWidget b -> (TreePath -> Maybe Int) -> IO ()
- modelViewMaybeNotebookSyncId :: (ViewWithPathSelection a c, NotebookClass b) => a -> MaybeWidget b -> IO ()
Documentation
modelViewNotebookSync :: (ViewWithPathSelection a c, NotebookClass b) => a -> b -> (TreePath -> Int) -> IO () Source
Keeps the page of a notebook in sync with the selection in a model view. It uses an auxiliary function to determine which page to select.
modelViewNotebookSyncId :: (ViewWithPathSelection a c, NotebookClass b) => a -> b -> IO () Source
Keeps the page of a notebook in sync with the selection in a model view. It selects the page with the same number as the element selected in the model view. If there's more than one selection, or if the model view is not flat and the selected element is not at the first level, then it selects nothing.
modelViewMaybeNotebookSync :: (ViewWithPathSelection a c, NotebookClass b) => a -> MaybeWidget b -> (TreePath -> Maybe Int) -> IO () Source
Keeps the page of a notebook inside a maybe widget in sync with the selection in a model view.
It uses an auxiliary function to determine which page to select. If the function returns Nothing, then the maybe widget is deactivated.
modelViewMaybeNotebookSyncId :: (ViewWithPathSelection a c, NotebookClass b) => a -> MaybeWidget b -> IO () Source
Keeps the page of a notebook inside a maybe widget in sync with the selection in a model view.
It selects the page with the same number as the element selected in the model view. If there's more than one selection, or if the model view is not flat and the selected element is not at the first level, then it selects nothing.