Name

Styles —

Customization of widgets.

Synopsis

data
        GError
type
        GQuark
styleGetAntiAliasing:: StateType -> Style -> IO GC
styleGetBackground:: StateType -> Style -> IO GC
styleGetBase:: StateType -> Style -> IO GC
styleGetDark:: StateType -> Style -> IO GC
styleGetForeground:: StateType -> Style -> IO GC
styleGetLight:: StateType -> Style -> IO GC
styleGetMiddle:: StateType -> Style -> IO GC
styleGetText:: StateType -> Style -> IO GC

Introduction

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

When creating complicated objects in DrawingArea the predefined graphics contexts and the single font in the canvas might not be enough to customize the rendering process. gtk_rc_get_style_by_paths is the solution for this.

Todo

It seems sensible to treat Styles as read only. The only way to modify a style should be for the programmer to apply the RcStyle patches directly to the widget.

Bind the draw... functions, they might be useful.

Datatypes

data GError

data GError =GError GQuarkInt32String

type GQuark

GQuarkCUInt

Methods

styleGetAntiAliasing

Retrieve the GC for drawing anti-aliased text.

styleGetAntiAliasing:: StateType:: Style:: IO GC
tyst

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 GC should be recieved. Use widgetGetState to determine the current state of the widget.

styleGetBackground

Retrieve the GC for the background color.

styleGetBackground:: StateType:: Style:: IO GC
tyst

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

styleGetBase

Retrieve the GC for the base color.

styleGetBase:: StateType:: Style:: IO GC
tyst

The base color is the standard text background of a widget.

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

styleGetDark

Retrieve the GC for a dark color.

styleGetDark:: StateType:: Style:: IO GC
tyst

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

styleGetForeground

Retrieve the GC for the foreground color.

styleGetForeground:: StateType:: Style:: IO GC
tyst

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

styleGetLight

Retrieve the GC for a light color.

styleGetLight:: StateType:: Style:: IO GC
tyst

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

styleGetMiddle

Retrieve the GC for a middle color.

styleGetMiddle:: StateType:: Style:: IO GC
tyst

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

styleGetText

Retrieve the GC for the text color.

styleGetText:: StateType:: Style:: IO GC
tyst

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