fltkhs-themes-0.1.0.1

Safe HaskellNone
LanguageHaskell2010

Graphics.UI.FLTK.Theme.Light.Button

Synopsis

Documentation

data FillSpec Source #

Specifies how a Rectangle should be filled. Allows for a vertical color gradient.

Constructors

FillSpec 

Fields

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

buttonNew :: (?assets :: Assets) => Rectangle -> Maybe Text -> IO (Ref Button) Source #

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.

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.

okButtonNew :: (?assets :: Assets) => Rectangle -> IO (Ref Button) Source #