gtk-0.12.4: Binding to the Gtk+ graphical user interface library.

Portabilityportable (depends on GHC)
Stabilityprovisional
Maintainergtk2hs-users@lists.sourceforge.net
Safe HaskellNone

Graphics.UI.Gtk.General.Style

Contents

Description

Customization of widgets.

Synopsis

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 widgetGetState).

Types

Methods

styleGetForeground :: Style -> StateType -> IO ColorSource

Retrieve the the foreground color.

  • The parameter state determines for which widget state (one of StateType) the Color should be retrieved. Use widgetGetState to determine the current state of the widget.

styleGetBackground :: Style -> StateType -> IO ColorSource

Retrieve the background color.

  • The parameter state determines for which widget state (one of StateType) the Color should be retrieved. Use widgetGetState to determine the current state of the widget.

styleGetLight :: Style -> StateType -> IO ColorSource

Retrieve a light color.

  • The parameter state determines for which widget state (one of StateType) the Color should be retrieved. Use widgetGetState to determine the current state of the widget.

styleGetMiddle :: Style -> StateType -> IO ColorSource

Retrieve a middle color.

  • The parameter state determines for which widget state (one of StateType) the Color should be retrieved. Use widgetGetState to determine the current state of the widget.

styleGetDark :: Style -> StateType -> IO ColorSource

Retrieve a dark color.

  • The parameter state determines for which widget state (one of StateType) the Color should be retrieved. Use widgetGetState to determine the current state of the widget.

styleGetText :: Style -> StateType -> IO ColorSource

Retrieve the text color.

  • The parameter state determines for which widget state (one of StateType) the Color should be retrieved. Use widgetGetState to determine the current state of the widget.

styleGetBase :: Style -> StateType -> IO ColorSource

Retrieve the base color.

  • The base color is the standard text background of a widget.
  • The parameter state determines for which widget state (one of StateType) the Color should be retrieved. Use widgetGetState to determine the current state of the widget.

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 state determines for which widget state (one of StateType) the Color should be retrieved. Use widgetGetState to 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