ltk-0.12.1.0: Leksah tool kit

Safe Haskell | None

Graphics.UI.Frame.Panes

Contents

- Panes and pane layout

Description

The basic definitions for all panes

Synopsis

- class MonadIO delta => PaneMonad delta where
  - setFrameState :: FrameState delta -> delta ()
  - getFrameState :: delta (FrameState delta)
  - runInIO :: forall alpha beta. (beta -> delta alpha) -> delta (beta -> IO alpha)
  - panePathForGroup :: String -> delta PanePath
  - getThisPane :: forall alpha beta. RecoverablePane alpha beta delta => delta (Maybe alpha)
  - displayThisPane :: forall alpha beta. RecoverablePane alpha beta delta => alpha -> Bool -> delta ()
  - getOrBuildThisPane :: forall alpha beta. RecoverablePane alpha beta delta => Either PanePath String -> delta (Maybe alpha)
  - buildThisPane :: forall alpha beta. RecoverablePane alpha beta delta => PanePath -> Notebook -> (PanePath -> Notebook -> Window -> delta (Maybe alpha, Connections)) -> delta (Maybe alpha)
  - activateThisPane :: forall alpha beta. RecoverablePane alpha beta delta => alpha -> Connections -> delta ()
  - closeThisPane :: forall alpha beta. RecoverablePane alpha beta delta => alpha -> delta Bool
- data IDEPane delta = forall alpha beta . RecoverablePane alpha beta delta => PaneC alpha
- class (Typeable alpha, PaneMonad delta) => Pane alpha delta | alpha -> delta where
  - getTopWidget :: alpha -> Widget
  - paneId :: alpha -> String
  - primPaneName :: alpha -> String
  - paneName :: alpha -> PaneName
  - getAddedIndex :: alpha -> Int
- class (Pane alpha delta, Typeable beta, Show beta, Read beta) => RecoverablePane alpha beta delta | beta -> alpha, alpha -> beta where
  - saveState :: alpha -> delta (Maybe beta)
  - recoverState :: PanePath -> beta -> delta (Maybe alpha)
  - builder :: PanePath -> Notebook -> Window -> delta (Maybe alpha, Connections)
  - makeActive :: alpha -> delta ()
  - closePane :: alpha -> delta Bool
  - getPane :: delta (Maybe alpha)
  - forceGetPane :: Either PanePath String -> delta alpha
  - getOrBuildPane :: Either PanePath String -> delta (Maybe alpha)
  - displayPane :: alpha -> Bool -> delta ()
  - getAndDisplayPane :: Either PanePath String -> Bool -> delta (Maybe alpha)
  - buildPane :: PanePath -> Notebook -> (PanePath -> Notebook -> Window -> delta (Maybe alpha, Connections)) -> delta (Maybe alpha)
- data PaneDirection
  - = TopP
  - | BottomP
  - | LeftP
  - | RightP
- data PanePathElement
  - = SplitP PaneDirection
  - | GroupP String
- type PanePath = [PanePathElement]
- data PaneLayout
  - = HorizontalP PaneLayout PaneLayout Int
  - | VerticalP PaneLayout PaneLayout Int
  - | TerminalP {
    - paneGroups :: Map String PaneLayout
    - paneTabs :: Maybe PaneDirection
    - currentPage :: Int
    - detachedId :: Maybe String
    - detachedSize :: Maybe (Int, Int)
    }
- type PaneName = String
- data Connection = forall alpha . GObjectClass alpha => ConnectC (ConnectId alpha)
- type Connections = [Connection]
- type StandardPath = PanePath
- data FrameState delta = FrameState {
  - windows :: [Window]
  - uiManager :: UIManager
  - panes :: Map PaneName (IDEPane delta)
  - paneMap :: Map PaneName (PanePath, Connections)
  - activePane :: Maybe (PaneName, Connections)
  - panePathFromNB :: !(Map Notebook PanePath)
  - layout :: PaneLayout
  }
- signalDisconnectAll :: Connections -> IO ()

# Panes and pane layout

class MonadIO delta => PaneMonad delta where Source

Methods

setFrameState :: FrameState delta -> delta ()Source

getFrameState :: delta (FrameState delta)Source

runInIO :: forall alpha beta. (beta -> delta alpha) -> delta (beta -> IO alpha)Source

panePathForGroup :: String -> delta PanePath Source

getThisPane :: forall alpha beta. RecoverablePane alpha beta delta => delta (Maybe alpha)Source

displayThisPane :: forall alpha beta. RecoverablePane alpha beta delta => alpha -> Bool -> delta ()Source

getOrBuildThisPane :: forall alpha beta. RecoverablePane alpha beta delta => Either PanePath String -> delta (Maybe alpha)Source

buildThisPane :: forall alpha beta. RecoverablePane alpha beta delta => PanePath -> Notebook -> (PanePath -> Notebook -> Window -> delta (Maybe alpha, Connections)) -> delta (Maybe alpha)Source

activateThisPane :: forall alpha beta. RecoverablePane alpha beta delta => alpha -> Connections -> delta ()Source

closeThisPane :: forall alpha beta. RecoverablePane alpha beta delta => alpha -> delta Bool Source

data IDEPane delta Source

Constructors

forall alpha beta . RecoverablePane alpha beta delta => PaneC alpha |

Instances

Eq (IDEPane delta) |
Ord (IDEPane delta) |
Show (IDEPane delta) |

class (Typeable alpha, PaneMonad delta) => Pane alpha delta | alpha -> delta where Source

All kinds of panes are instances of pane

Methods

getTopWidget :: alpha -> Widget Source

gets the top Widget of this pane

paneId :: alpha -> String Source

primPaneName :: alpha -> String Source

paneName :: alpha -> PaneName Source

getAddedIndex :: alpha -> Int Source

class (Pane alpha delta, Typeable beta, Show beta, Read beta) => RecoverablePane alpha beta delta | beta -> alpha, alpha -> beta where Source

Methods

saveState :: alpha -> delta (Maybe beta)Source

recoverState :: PanePath -> beta -> delta (Maybe alpha)Source

builder :: PanePath -> Notebook -> Window -> delta (Maybe alpha, Connections)Source

makeActive :: alpha -> delta ()Source

closePane :: alpha -> delta Bool Source

getPane :: delta (Maybe alpha)Source

forceGetPane :: Either PanePath String -> delta alphaSource

getOrBuildPane :: Either PanePath String -> delta (Maybe alpha)Source

displayPane :: alpha -> Bool -> delta ()Source

getAndDisplayPane :: Either PanePath String -> Bool -> delta (Maybe alpha)Source

buildPane :: PanePath -> Notebook -> (PanePath -> Notebook -> Window -> delta (Maybe alpha, Connections)) -> delta (Maybe alpha)Source

data PaneDirection Source

The relative direction to a pane from the parent

Constructors

TopP |
BottomP |
LeftP |
RightP |

Instances

Eq PaneDirection |
Read PaneDirection |
Show PaneDirection |

data PanePathElement Source

An element of a path to a pane

Constructors

SplitP PaneDirection |
GroupP String |

Instances

Eq PanePathElement |
Read PanePathElement |
Show PanePathElement |

type PanePath = [PanePathElement]Source

A path to a pane

data PaneLayout Source

Description of a window layout Horizontal: top bottom Vertical: left right

Constructors

HorizontalP PaneLayout PaneLayout Int |
VerticalP PaneLayout PaneLayout Int |
TerminalP |

Fields

paneGroups :: Map String PaneLayout
paneTabs :: Maybe PaneDirection
currentPage :: Int
detachedId :: Maybe String
detachedSize :: Maybe (Int, Int)

Instances

Eq PaneLayout |
Read PaneLayout |
Show PaneLayout |

type PaneName = String Source

data Connection Source

Signal handlers for the different pane types

Constructors

forall alpha . GObjectClass alpha => ConnectC (ConnectId alpha) |

Instances

Show Connection |

type Connections = [Connection]Source

type StandardPath = PanePath Source

data FrameState delta Source

Constructors

FrameState |

Fields

windows :: [Window]
uiManager :: UIManager
panes :: Map PaneName (IDEPane delta)
paneMap :: Map PaneName (PanePath, Connections)
activePane :: Maybe (PaneName, Connections)
panePathFromNB :: !(Map Notebook PanePath)
layout :: PaneLayout

Instances

Show (FrameState delta) |

signalDisconnectAll :: Connections -> IO ()Source