-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Terminal interface for the hledger accounting system
--   
--   A simple terminal user interface for the hledger accounting system. It
--   can be a more convenient way to browse your accounts than the CLI.
--   
--   hledger is a robust, cross-platform set of tools for tracking money,
--   time, or any other commodity, using double-entry accounting and a
--   simple, editable file format, with command-line, terminal and web
--   interfaces. It is a Haskell rewrite of Ledger, and one of the leading
--   implementations of Plain Text Accounting. Read more at:
--   <a>https://hledger.org</a>
@package hledger-ui
@version 1.43.2


-- | The all-important theming engine!
--   
--   Cf
--   <a>https://hackage.haskell.org/package/vty/docs/Graphics-Vty-Attributes.html</a>
--   <a>http://hackage.haskell.org/package/brick/docs/Brick-AttrMap.html</a>
--   <a>http://hackage.haskell.org/package/brick-0.1/docs/Brick-Util.html</a>
--   <a>http://hackage.haskell.org/package/brick-0.1/docs/Brick-Widgets-Core.html#g:5</a>
--   <a>http://hackage.haskell.org/package/brick-0.1/docs/Brick-Widgets-Border.html</a>
module Hledger.UI.Theme
defaultTheme :: AttrMap

-- | Look up the named theme, if it exists.
getTheme :: String -> Maybe AttrMap

-- | A selection of named themes specifying terminal colours and styles.
--   One of these is active at a time.
--   
--   A hledger-ui theme is a vty/brick AttrMap. Each theme specifies a
--   default style (Attr), plus extra styles which are applied when their
--   (hierarchical) name matches the widget rendering context. "More
--   specific styles, if present, are used and only fall back to more
--   general ones when the more specific ones are absent, but also these
--   styles get merged, so that if a more specific style only provides the
--   foreground color, its more general parent style can set the background
--   color, too." For example: rendering a widget named "b" inside a widget
--   named "a", - if a style named "a" &lt;&gt; "b" exists, it will be
--   used. Anything it does not specify will be taken from a style named
--   "a" if that exists, otherwise from the default style. - otherwise if a
--   style named "a" exists, it will be used, and anything it does not
--   specify will be taken from the default style. - otherwise (you guessed
--   it) the default style is used.
themes :: Map String AttrMap
themeNames :: [String]

module Hledger.UI.UIOptions
packageversion :: PackageVersionString
progname :: ProgramName

-- | Generate the version string for this program. The template haskell
--   call is here rather than in Hledger.Cli.Version to avoid wasteful
--   recompilation.
prognameandversion :: String
binaryinfo :: HledgerBinaryInfo
uiflags :: [Flag RawOpts]
uimode :: Mode RawOpts
data UIOpts
UIOpts :: Bool -> Maybe String -> Maybe String -> CliOpts -> UIOpts
[uoWatch] :: UIOpts -> Bool
[uoTheme] :: UIOpts -> Maybe String
[uoRegister] :: UIOpts -> Maybe String
[uoCliOpts] :: UIOpts -> CliOpts
defuiopts :: UIOpts

-- | Process a RawOpts into a UIOpts. An invalid --theme name will raise an
--   error.
rawOptsToUIOpts :: RawOpts -> IO UIOpts
getHledgerUIOpts :: IO UIOpts
instance Hledger.Data.Balancing.HasBalancingOpts Hledger.UI.UIOptions.UIOpts
instance Hledger.Cli.CliOptions.HasCliOpts Hledger.UI.UIOptions.UIOpts
instance Hledger.Read.InputOptions.HasInputOpts Hledger.UI.UIOptions.UIOpts
instance Hledger.Reports.ReportOptions.HasReportOptsNoUpdate Hledger.UI.UIOptions.UIOpts
instance Hledger.Reports.ReportOptions.HasReportOpts Hledger.UI.UIOptions.UIOpts
instance Hledger.Reports.ReportOptions.HasReportSpec Hledger.UI.UIOptions.UIOpts
instance GHC.Internal.Show.Show Hledger.UI.UIOptions.UIOpts


-- | hledger-ui - a hledger add-on providing an efficient TUI.
--   
--   SPDX-License-Identifier: GPL-3.0-or-later Copyright (c) 2007-2025
--   (each year in this range) Simon Michael <a>simon@joyful.com</a> and
--   contributors.
--   
--   This program is free software: you can redistribute it and/or modify
--   it under the terms of the GNU General Public License as published by
--   the Free Software Foundation, either version 3 of the License, or (at
--   your option) any later version.
--   
--   This program is distributed in the hope that it will be useful, but
--   WITHOUT ANY WARRANTY; without even the implied warranty of
--   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--   General Public License for more details. You should have received a
--   copy of the GNU General Public License along with this program. If
--   not, see <a>https://www.gnu.org/licenses/</a>.
module Hledger.UI.Main
newChan :: IO (BChan a)
writeChan :: BChan a -> a -> IO ()
hledgerUiMain :: IO ()
runBrickUi :: UIOpts -> Journal -> IO ()
brickApp :: Maybe String -> App UIState AppEvent Name
uiHandle :: BrickEvent Name AppEvent -> EventM Name UIState ()
uiDraw :: UIState -> [Widget Name]


-- | This is the root module of the <tt>hledger-ui</tt> package, providing
--   hledger's terminal user interface. The main function, command-line
--   options, and terminal themes are exported.
--   
--   <h2>See also:</h2>
--   
--   <ul>
--   <li>hledger-lib:Hledger</li>
--   <li>hledger:Hledger.Cli</li>
--   <li><a>The README files</a></li>
--   <li><a>The high-level developer docs</a></li>
--   </ul>
module Hledger.UI
