Copyright | (c) 2018 Francisco Vallarino |
---|---|
License | BSD-3-Clause (see the LICENSE file) |
Maintainer | fjvallarino@gmail.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Basic types for styling widgets.
Synopsis
- data SizeReq = SizeReq {}
- data CursorIcon
- data Style = Style {}
- data StyleState = StyleState {
- _sstSizeReqW :: Maybe SizeReq
- _sstSizeReqH :: Maybe SizeReq
- _sstPadding :: Maybe Padding
- _sstBorder :: Maybe Border
- _sstRadius :: Maybe Radius
- _sstBgColor :: Maybe Color
- _sstFgColor :: Maybe Color
- _sstSndColor :: Maybe Color
- _sstHlColor :: Maybe Color
- _sstText :: Maybe TextStyle
- _sstCursorIcon :: Maybe CursorIcon
- data Padding = Padding {}
- data BorderSide = BorderSide {}
- data Border = Border {}
- data RadiusType
- newtype RadiusCorner = RadiusCorner {}
- data Radius = Radius {}
- data TextStyle = TextStyle {}
Documentation
Represents a size requirement for a specific axis. Mainly used by stack and box, with grid using it as the base for its calculations. Each field represents:
- Fixed: A minimum size required by the widget. This type of space is the first that gets assigned.
- Flex: Additional space the widget accepts, up to the provided value. After fixed requirements are satisfied, flex sizes are assigned proportionally considering factor.
- Extra: After flex is satisfied, the remaining space is distributed proportionally, considering factor, to all non zero extra requirements. There is no limit to how much extra space can be assigned.
- Factor: How much flex/extra space a widget will get proportionally. This also affects how much a requirement is willing to lose: a value less than 1 can receive less space, but gives up less too.
Instances
data CursorIcon Source #
Different mouse pointer types.
Instances
Main style type, comprised of configurations for the different states:
- Basic: Starting state for a widget, without any kind of interaction. This is used as the base for all other states, which override values as needed.
- Hover: The mouse pointer is on top of the current widget.
- Focus: The widget has keyboard focus.
- Focus-Hover: The widget has keyboard focus and mouse is on top. Without this state one of Hover or Focus would take precedence and it would not be possible to specify the desired behavior.
- Active: The mouse button is currently presed and the pointer is within the boundaries of the widget.
- Disabled: The widget is disabled.
Instances
data StyleState Source #
Customizable style items for a specific state. All values are optional, and can be combined with the latest values taking precedence when the previous value is not empty.
StyleState | |
|
Instances
Padding definitions (space between border and content) for each side.
Instances
data BorderSide Source #
Defines width and color for a given border side.
Instances
Border definitions for each side.
Instances
data RadiusType Source #
Type of corner radius.
Instances
Eq RadiusType Source # | |
Defined in Monomer.Core.StyleTypes (==) :: RadiusType -> RadiusType -> Bool # (/=) :: RadiusType -> RadiusType -> Bool # | |
Show RadiusType Source # | |
Defined in Monomer.Core.StyleTypes showsPrec :: Int -> RadiusType -> ShowS # show :: RadiusType -> String # showList :: [RadiusType] -> ShowS # | |
Generic RadiusType Source # | |
Defined in Monomer.Core.StyleTypes type Rep RadiusType :: Type -> Type # from :: RadiusType -> Rep RadiusType x # to :: Rep RadiusType x -> RadiusType # | |
Semigroup RadiusType Source # | |
Defined in Monomer.Core.StyleTypes (<>) :: RadiusType -> RadiusType -> RadiusType # sconcat :: NonEmpty RadiusType -> RadiusType # stimes :: Integral b => b -> RadiusType -> RadiusType # | |
Monoid RadiusType Source # | |
Defined in Monomer.Core.StyleTypes mempty :: RadiusType # mappend :: RadiusType -> RadiusType -> RadiusType # mconcat :: [RadiusType] -> RadiusType # | |
Default RadiusType Source # | |
Defined in Monomer.Core.StyleTypes def :: RadiusType # | |
type Rep RadiusType Source # | |
newtype RadiusCorner Source #
Defines radius type and width/radius for a given corner.
Instances
Provides radius definitions for each corner.
Instances
Text related definitions.
TextStyle | |
|