Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data FillSpec = FillSpec {}
- buttonFillSpec :: (Match w ~ FindOp orig orig (GetRectangle ()), Op (GetRectangle ()) w orig (IO Rectangle), Match x ~ FindOp orig orig (GetColor ()), Op (GetColor ()) x orig (IO Color), Match y ~ FindOp orig orig (GetLabelsize ()), Op (GetLabelsize ()) y orig (IO FontSize), Match z ~ FindOp orig orig (GetSelectionColor ()), Op (GetSelectionColor ()) z orig (IO Color)) => Ref orig -> IO FillSpec
- buttonIsHidden :: Ref Button -> IO Bool
- buttonNew :: (?assets :: Assets) => Rectangle -> Maybe Text -> IO (Ref Button)
- buttonSetup :: (?assets :: Assets, Match w ~ FindOp orig orig (SetColor ()), Op (SetColor ()) w orig (Color -> IO ()), Match x ~ FindOp orig orig (SetLabelfont ()), Op (SetLabelfont ()) x orig (Font -> IO ()), Match y ~ FindOp orig orig (SetLabelsize ()), Op (SetLabelsize ()) y orig (FontSize -> IO ()), Match z ~ FindOp orig orig (SetAlign ()), Op (SetAlign ()) z orig (Alignments -> IO ())) => Ref orig -> IO ()
- cancelButtonNew :: (?assets :: Assets) => Rectangle -> IO (Ref Button)
- checkButtonNew :: (?assets :: Assets) => Rectangle -> Maybe Text -> IO (Ref CheckButton)
- drawCheck :: FillSpec -> Bool -> Color -> FontSize -> IO Rectangle
- drawIndicatorButton :: (Parent orig Widget, Match b ~ FindOp orig orig (ActiveR ()), Op (ActiveR ()) b orig (IO Bool), Match c ~ FindOp orig orig (GetAlign ()), Op (GetAlign ()) c orig (IO Alignments), Match d ~ FindOp orig orig (GetImage ()), Op (GetImage ()) d orig (IO (Maybe (Ref Image))), Match e ~ FindOp orig orig (GetSelectionColor ()), Op (GetSelectionColor ()) e orig (IO Color), Match g ~ FindOp orig orig (GetRectangle ()), Op (GetRectangle ()) g orig (IO Rectangle), Match h ~ FindOp orig orig (GetColor ()), Op (GetColor ()) h orig (IO Color), Match i ~ FindOp orig orig (GetLabelsize ()), Op (GetLabelsize ()) i orig (IO FontSize), Match j ~ FindOp orig orig (DrawLabel ()), Op (DrawLabel ()) j orig (Maybe (Rectangle, Alignments) -> IO ()), Match k ~ FindOp orig orig (GetBox ()), Op (GetBox ()) k orig (IO Boxtype), Match l ~ FindOp orig orig (GetParent ()), Op (GetParent ()) l orig (IO (Maybe (Ref Group))), Match m ~ FindOp orig orig (GetColor ()), Op (GetColor ()) m orig (IO Color), Match n ~ FindOp orig orig (SetColor ()), Op (SetColor ()) n orig (Color -> IO ())) => (FillSpec -> Bool -> Color -> FontSize -> IO Rectangle) -> Bool -> Bool -> Bool -> FontSize -> Ref orig -> IO ()
- drawLight :: FillSpec -> Bool -> Color -> FontSize -> IO Rectangle
- drawMenuButton :: Ref MenuButton -> IO ()
- drawRegularButton :: FillSpec -> Ref Button -> IO ()
- drawRound :: FillSpec -> Bool -> Color -> FontSize -> IO Rectangle
- fillRectangle :: FillSpec -> Bool -> IO ()
- lightButtonNew :: (?assets :: Assets) => Rectangle -> Maybe Text -> IO (Ref LightButton)
- menuButtonNew :: (?assets :: Assets) => Rectangle -> Maybe Text -> IO (Ref MenuButton)
- okButtonNew :: (?assets :: Assets) => Rectangle -> IO (Ref Button)
- returnButtonNew :: (?assets :: Assets) => Rectangle -> Maybe Text -> IO (Ref ReturnButton)
- roundButtonNew :: (?assets :: Assets) => Rectangle -> Maybe Text -> IO (Ref RoundButton)
- toggleButtonNew :: (?assets :: Assets) => Rectangle -> Maybe Text -> IO (Ref ToggleButton)
Documentation
Specifies how a Rectangle
should be filled. Allows for a vertical color gradient.
FillSpec | |
|
buttonFillSpec :: (Match w ~ FindOp orig orig (GetRectangle ()), Op (GetRectangle ()) w orig (IO Rectangle), Match x ~ FindOp orig orig (GetColor ()), Op (GetColor ()) x orig (IO Color), Match y ~ FindOp orig orig (GetLabelsize ()), Op (GetLabelsize ()) y orig (IO FontSize), Match z ~ FindOp orig orig (GetSelectionColor ()), Op (GetSelectionColor ()) z orig (IO Color)) => Ref orig -> IO FillSpec Source #
Create a FillSpec
for the given button based on its color, bounds etc.
buttonIsHidden :: Ref Button -> IO Bool Source #
Check of the given button is HiddenButtonType
buttonSetup :: (?assets :: Assets, Match w ~ FindOp orig orig (SetColor ()), Op (SetColor ()) w orig (Color -> IO ()), Match x ~ FindOp orig orig (SetLabelfont ()), Op (SetLabelfont ()) x orig (Font -> IO ()), Match y ~ FindOp orig orig (SetLabelsize ()), Op (SetLabelsize ()) y orig (FontSize -> IO ()), Match z ~ FindOp orig orig (SetAlign ()), Op (SetAlign ()) z orig (Alignments -> IO ())) => Ref orig -> IO () Source #
Common setup for all buttons, setting the label fonts, background color etc.
checkButtonNew :: (?assets :: Assets) => Rectangle -> Maybe Text -> IO (Ref CheckButton) Source #
drawCheck :: FillSpec -> Bool -> Color -> FontSize -> IO Rectangle Source #
Draw the check part of a CheckButton. The Bool
indicated whether to draw the check or not.
drawIndicatorButton :: (Parent orig Widget, Match b ~ FindOp orig orig (ActiveR ()), Op (ActiveR ()) b orig (IO Bool), Match c ~ FindOp orig orig (GetAlign ()), Op (GetAlign ()) c orig (IO Alignments), Match d ~ FindOp orig orig (GetImage ()), Op (GetImage ()) d orig (IO (Maybe (Ref Image))), Match e ~ FindOp orig orig (GetSelectionColor ()), Op (GetSelectionColor ()) e orig (IO Color), Match g ~ FindOp orig orig (GetRectangle ()), Op (GetRectangle ()) g orig (IO Rectangle), Match h ~ FindOp orig orig (GetColor ()), Op (GetColor ()) h orig (IO Color), Match i ~ FindOp orig orig (GetLabelsize ()), Op (GetLabelsize ()) i orig (IO FontSize), Match j ~ FindOp orig orig (DrawLabel ()), Op (DrawLabel ()) j orig (Maybe (Rectangle, Alignments) -> IO ()), Match k ~ FindOp orig orig (GetBox ()), Op (GetBox ()) k orig (IO Boxtype), Match l ~ FindOp orig orig (GetParent ()), Op (GetParent ()) l orig (IO (Maybe (Ref Group))), Match m ~ FindOp orig orig (GetColor ()), Op (GetColor ()) m orig (IO Color), Match n ~ FindOp orig orig (SetColor ()), Op (SetColor ()) n orig (Color -> IO ())) => (FillSpec -> Bool -> Color -> FontSize -> IO Rectangle) -> Bool -> Bool -> Bool -> FontSize -> Ref orig -> IO () Source #
Radio and light buttons are examples of an "indicator" button, some visual indicator that the
button is enabled. It takes a function that draws the indicator and Bool
flags specifying
whether it is pressed, transparent or entirely hidden respectively, the FontSize
of the
label so the indicator can properly position itself next to the label and the widget itself.
drawLight :: FillSpec -> Bool -> Color -> FontSize -> IO Rectangle Source #
Draw the light part of a LightButton. The Bool
indicates whether the light is on.
drawMenuButton :: Ref MenuButton -> IO () Source #
Draw a themed menu button
drawRegularButton :: FillSpec -> Ref Button -> IO () Source #
Draw a regular button, i.e not a radio button, toggle button, etc.
drawRound :: FillSpec -> Bool -> Color -> FontSize -> IO Rectangle Source #
Draw the radio part of a RoundButton. The Bool
indicates whether it is enabled.
fillRectangle :: FillSpec -> Bool -> IO () Source #
Draw a box according to the FillSpec
. It was originally intended for custom Graphics.UI.FLTK.Theme.Light.Button
which is why it takes a Bool
specifies if the button is pressed but is used widely in the theme for any rounded
rectangular area.
lightButtonNew :: (?assets :: Assets) => Rectangle -> Maybe Text -> IO (Ref LightButton) Source #
menuButtonNew :: (?assets :: Assets) => Rectangle -> Maybe Text -> IO (Ref MenuButton) Source #
returnButtonNew :: (?assets :: Assets) => Rectangle -> Maybe Text -> IO (Ref ReturnButton) Source #
roundButtonNew :: (?assets :: Assets) => Rectangle -> Maybe Text -> IO (Ref RoundButton) Source #
toggleButtonNew :: (?assets :: Assets) => Rectangle -> Maybe Text -> IO (Ref ToggleButton) Source #