| Portability | portable (depends on GHC) |
|---|---|
| Stability | provisional |
| Maintainer | [email protected] |
Graphics.UI.Gtk.General.Style
Contents
Description
Customization of widgets.
- data Style
- class GObjectClass o => StyleClass o
- castToStyle :: GObjectClass obj => obj -> Style
- gTypeStyle :: GType
- toStyle :: StyleClass o => o -> Style
- styleGetForeground :: Style -> StateType -> IO Color
- styleGetBackground :: Style -> StateType -> IO Color
- styleGetLight :: Style -> StateType -> IO Color
- styleGetMiddle :: Style -> StateType -> IO Color
- styleGetDark :: Style -> StateType -> IO Color
- styleGetText :: Style -> StateType -> IO Color
- styleGetBase :: Style -> StateType -> IO Color
- styleGetAntiAliasing :: Style -> StateType -> IO Color
- stylePaintFlatBox :: WidgetClass widget => Style -> DrawWindow -> StateType -> ShadowType -> Rectangle -> widget -> String -> Int -> Int -> Int -> Int -> IO ()
- stylePaintLayout :: WidgetClass widget => Style -> DrawWindow -> StateType -> Bool -> Rectangle -> widget -> String -> Int -> Int -> PangoLayout -> IO ()
Description
Styles are attached to widgets and determine how particular parts are
drawn and with what color. Thus they are should be seen as mandatory when
one implements a new custom widgets via DrawingArea. Although the
parameterized drawing function don't have to be used, it is strongly
advisable (and more robust) to make use of the predefined graphics contexts
for the different states of a widget (retrieved by
Graphics.UI.Gtk.Abstract.Widget.widgetGetState).
Types
Instances
class GObjectClass o => StyleClass o Source
Instances
castToStyle :: GObjectClass obj => obj -> StyleSource
toStyle :: StyleClass o => o -> StyleSource
Methods
styleGetAntiAliasing :: Style -> StateType -> IO ColorSource
Retrieve the color for drawing anti-aliased text.
- The anti-aliasing color is the color which is used when the rendering of a character does not make it clear if a certain pixel shoud be set or not. This color is between the text and the base color.
- The parameter
statedetermines for which widget state (one ofStateType) theColorshould be retrieved. UsewidgetGetStateto determine the current state of the widget.
stylePaintFlatBox :: WidgetClass widget => Style -> DrawWindow -> StateType -> ShadowType -> Rectangle -> widget -> String -> Int -> Int -> Int -> Int -> IO ()Source
stylePaintLayout :: WidgetClass widget => Style -> DrawWindow -> StateType -> Bool -> Rectangle -> widget -> String -> Int -> Int -> PangoLayout -> IO ()Source