Skip to content

Commit

Permalink
Export configuration types to have Haddock generate documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fjvallarino committed Aug 13, 2021
1 parent c1903ed commit 68a8eb7
Show file tree
Hide file tree
Showing 47 changed files with 928 additions and 721 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.stack-work/
.vscode/
haddock/
dist-docs.*/
*~
*.aux
*.hp
Expand Down
2 changes: 1 addition & 1 deletion monomer.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cabal-version: 1.12
-- see: https://github.com/sol/hpack

name: monomer
version: 1.0.0.0
version: 1.0.0.1
synopsis: A GUI library for writing native Haskell applications.
description: Monomer is an easy to use, cross platform, GUI library for writing native
Haskell applications.
Expand Down
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: monomer
version: 1.0.0.0
version: 1.0.0.1
github: fjvallarino/monomer
license: BSD3
author: Francisco Vallarino
Expand Down
5 changes: 3 additions & 2 deletions src/Monomer/Core/Combinators.hs
Original file line number Diff line number Diff line change
Expand Up @@ -500,11 +500,12 @@ class CmbSizeReqH t where
class CmbSizeReqUpdater t where
sizeReqUpdater :: ((SizeReq, SizeReq) -> (SizeReq, SizeReq)) -> t

-- | Resize factor combinator.
-- | Resize factor combinator. A value of 0 represents fixed size.
class CmbResizeFactor t where
resizeFactor :: Double -> t

-- | Resize factor combinator for individual w and h components.
-- | Resize factor combinator for individual w and h components. A value of 0
-- represents fixed size.
class CmbResizeFactorDim t where
resizeFactorW :: Double -> t
resizeFactorH :: Double -> t
Expand Down
2 changes: 1 addition & 1 deletion src/Monomer/Graphics/RemixIcon.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Utility functions to retrieve the Unicode code point of a Remix Font using its
representative name. These code points can be used in labels or buttons to show
icons instead of regular text.
Make sure to load the remixicon.ttf font in your application and set `textFont`
Make sure to load the remixicon.ttf font in your application and set 'textFont'
in the corresponding widget.
Existing icons can be browsed in https://remixicon.com.
Expand Down
18 changes: 11 additions & 7 deletions src/Monomer/Widgets/Animation/Fade.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,9 @@ Portability : non-portable
Fade animation widget. Wraps a child widget whose content will be animated.
Config:
- autoStart: whether the first time the widget is added, animation should run.
- duration: how long the animation lasts in ms.
- onFinished: event to raise when animation is complete.
Messages:
- Receives a 'AnimationMsg', used to control the state of the animation.
- Accepts an 'AnimationMsg', used to control the state of the animation.
-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
Expand All @@ -25,6 +19,9 @@ Messages:
{-# LANGUAGE OverloadedStrings #-}

module Monomer.Widgets.Animation.Fade (
-- * Configuration
FadeCfg,
-- * Constructors
animFadeIn,
animFadeIn_,
animFadeOut,
Expand All @@ -47,6 +44,13 @@ import Monomer.Widgets.Animation.Types

import qualified Monomer.Lens as L

{-|
Configuration options for fade:
- 'autoStart': whether the first time the widget is added, animation should run.
- 'duration': how long the animation lasts in ms.
- 'onFinished': event to raise when animation is complete.
-}
data FadeCfg e = FadeCfg {
_fdcAutoStart :: Maybe Bool,
_fdcDuration :: Maybe Int,
Expand Down
20 changes: 12 additions & 8 deletions src/Monomer/Widgets/Animation/Slide.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,19 @@ Portability : non-portable
Slide animation widget. Wraps a child widget whose content will be animated.
Config:
- autoStart: whether the first time the widget is added, animation should run.
- duration: how long the animation lasts in ms.
- onFinished: event to raise when animation is complete.
- Individual combinators for direction.
Messages:
- Receives a 'AnimationMsg', used to control the state of the animation.
- Accepts a 'AnimationMsg', used to control the state of the animation.
-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}

module Monomer.Widgets.Animation.Slide (
-- * Configuration
SlideCfg,
-- * Constructors
animSlideIn,
animSlideIn_,
animSlideOut,
Expand Down Expand Up @@ -58,6 +54,14 @@ data SlideDirection
| SlideDown
deriving (Eq, Show)

{-|
Configuration options for slide:
- 'autoStart': whether the first time the widget is added, animation should run.
- 'duration': how long the animation lasts in ms.
- 'onFinished': event to raise when animation is complete.
- Individual combinators for direction.
-}
data SlideCfg e = SlideCfg {
_slcDirection :: Maybe SlideDirection,
_slcAutoStart :: Maybe Bool,
Expand Down
Loading

0 comments on commit 68a8eb7

Please sign in to comment.