Safe Haskell | None |
---|---|
Language | Haskell2010 |
GHCup.Brick.Common
Synopsis
- installedSign :: String
- setSign :: String
- notInstalledSign :: String
- checkBoxSelectedSign :: String
- showKey :: Key -> String
- showMod :: Modifier -> String
- keyToWidget :: KeyCombination -> Widget n
- separator :: Widget n
- frontwardLayer :: Text -> Widget n -> Widget n
- enableScreenReader :: n -> Widget n -> Widget n
- zoom :: forall {m} {n} {s} {t} {k} {c} {is :: IxList}. (Zoom m n s t, Is k A_Lens, Functor (Zoomed m c)) => Optic k is t t s s -> m c -> n c
- defaultAppSettings :: BrickSettings
- lr :: Iso' BrickData [ListResult]
- showAllVersions :: Iso' BrickSettings Bool
- data Name
- = AllTools
- | Singular Tool
- | ListItem Tool Int
- | KeyInfoBox
- | TutorialBox
- | ContextBox
- | CompileGHCBox
- | AdvanceInstallBox
- | MenuElement ResourceId
- data Mode
- data BrickData = BrickData {
- _lr :: [ListResult]
- data BrickSettings = BrickSettings {}
- data ResourceId where
- pattern UrlEditBox :: ResourceId
- pattern SetCheckBox :: ResourceId
- pattern IsolateEditBox :: ResourceId
- pattern ForceCheckBox :: ResourceId
- pattern AdditionalEditBox :: ResourceId
- pattern TargetGhcEditBox :: ResourceId
- pattern BootstrapGhcEditBox :: ResourceId
- pattern HadrianGhcEditBox :: ResourceId
- pattern JobsEditBox :: ResourceId
- pattern BuildConfigEditBox :: ResourceId
- pattern PatchesEditBox :: ResourceId
- pattern CrossTargetEditBox :: ResourceId
- pattern AddConfArgsEditBox :: ResourceId
- pattern OvewrwiteVerEditBox :: ResourceId
- pattern BuildFlavourEditBox :: ResourceId
- pattern BuildSystemEditBox :: ResourceId
- pattern OkButton :: ResourceId
- pattern AdvanceInstallButton :: ResourceId
- pattern CompileGHCButton :: ResourceId
- pattern CompileHLSButton :: ResourceId
- pattern CabalProjectEditBox :: ResourceId
- pattern CabalProjectLocalEditBox :: ResourceId
- pattern UpdateCabalCheckBox :: ResourceId
- pattern GitRefEditBox :: ResourceId
- pattern BootstrapGhcSelectBox :: ResourceId
- pattern HadrianGhcSelectBox :: ResourceId
- pattern ToolVersionBox :: ResourceId
- pattern GHCInstallTargets :: ResourceId
Documentation
keyToWidget :: KeyCombination -> Widget n Source #
Given a KeyComb, produces a string widget with and user friendly text
separator :: Widget n Source #
A section separator with max width. Looks like this: -------- o --------
frontwardLayer :: Text -> Widget n -> Widget n Source #
Used to create a layer on top of the main navigation widget (tutorial, info, menus...)
enableScreenReader :: n -> Widget n -> Widget n Source #
puts a cursor at the line beginning so It can be read by screen readers
zoom :: forall {m} {n} {s} {t} {k} {c} {is :: IxList}. (Zoom m n s t, Is k A_Lens, Functor (Zoomed m c)) => Optic k is t t s s -> m c -> n c Source #
Given a lens, zoom on it. It is needed because Brick uses microlens but GHCup uses optics.
Name data type. Uniquely identifies each widget in the TUI. some constructors might end up unused, but still is a good practise to have all of them defined, just in case
Constructors
AllTools | The main list widget |
Singular Tool | The particular list for each tool |
ListItem Tool Int | An item in list |
KeyInfoBox | The text box widget with action informacion |
TutorialBox | The tutorial widget |
ContextBox | The resource for Context Menu |
CompileGHCBox | The resource for CompileGHC Menu |
AdvanceInstallBox | The resource for AdvanceInstall Menu |
MenuElement ResourceId | Each element in a Menu. Resources must not be share for visible Menus, but MenuA and MenuB can share resources if they both are invisible, or just one of them is visible. |
Mode type. It helps to dispatch events to different handlers.
Constructors
Navigation | |
KeyInfo | |
Tutorial | |
ContextPanel | |
AdvanceInstallPanel | |
CompileGHCPanel | |
CompileHLSPanel |
data BrickSettings Source #
Constructors
BrickSettings | |
Fields |
data ResourceId where Source #
A newtype for labeling resources in menus. It is bundled along with pattern synonyms
Bundled Patterns
Instances
Show ResourceId Source # | |
Defined in GHCup.Brick.Common Methods showsPrec :: Int -> ResourceId -> ShowS # show :: ResourceId -> String # showList :: [ResourceId] -> ShowS # | |
Eq ResourceId Source # | |
Defined in GHCup.Brick.Common | |
Ord ResourceId Source # | |
Defined in GHCup.Brick.Common Methods compare :: ResourceId -> ResourceId -> Ordering # (<) :: ResourceId -> ResourceId -> Bool # (<=) :: ResourceId -> ResourceId -> Bool # (>) :: ResourceId -> ResourceId -> Bool # (>=) :: ResourceId -> ResourceId -> Bool # max :: ResourceId -> ResourceId -> ResourceId # min :: ResourceId -> ResourceId -> ResourceId # |