Name

IconFactory —

This module provides access to IconFactory, IconSet and IconSource. - DOCU - TODO

The following functions are not bound: iconFactoryLookup, iconFactoryLookupDefault It is not a good idea to lookup an IconSet directly. If an Icon needs to be displayed it happends always in the context of a widget. The best practice is to get the widgets Style and call styleLookupIconSet.

Synopsis

newtype
        IconSet
newtype
        IconSource
iconFactoryNew:: IO IconFactory
iconSetNew:: IO IconSet
iconSourceNew:: IO IconSource
iconFactoryAdd:: IconFactory -> String -> IconSet -> IO ()
iconFactoryAddDefault:: IconFactory -> IO ()
iconFactoryRemoveDefault:: IconFactory -> IO ()
iconSetAddSource:: IconSet -> IconSource -> IO ()
iconSizeCheck:: IconSize -> IO Bool
iconSizeFromName:: String -> IO IconSize
iconSizeGetName:: IconSize -> IO (Maybe String)
iconSizeRegister:: Int -> String -> Int -> IO IconSize
iconSizeRegisterAlias:: IconSize -> String -> IO ()
iconSourceGetDirection:: IconSource -> IO (Maybe TextDirection)
iconSourceGetFilename:: IconSource -> IO (Maybe String)
iconSourceGetSize:: IconSource -> IO (Maybe IconSize)
iconSourceGetState:: IconSource -> IO (Maybe StateType)

iconSourceResetDirection <no type information>

iconSourceResetSize:: IconSource -> IO ()
iconSourceResetState:: IconSource -> IO ()
iconSourceSetDirection:: IconSource -> TextDirection -> IO ()
iconSourceSetFilename:: IconSource -> FilePath -> IO ()
iconSourceSetSize:: IconSource -> IconSize -> IO ()
iconSourceSetState:: IconSource -> StateType -> IO ()

Datatypes

newtype IconSet

newtype IconSet =IconSet (ForeignPtr (IconSet))

newtype IconSource

newtype IconSource =IconSource (ForeignPtr (IconSource))

Constructors

iconFactoryNew

Create a new IconFactory.

iconFactoryNew

An application should create a new IconFactory and add all needed icons. By calling iconFactoryAddDefault these icons become available as stock objects and can easily be displayed by Image. Furthermore, a theme can override the icons defined by the application.

iconSetNew

Create a new IconSet.

iconSetNew

Each icon in an application is contained in an IconSet. The IconSet contains several variants ( IconSources) to accomodate for different sizes and states.

iconSourceNew

Create a new IconSource.

iconSourceNew

An IconSource is a single image that is usually added to an IconSet. Next to the image it contains information about which state, text direction and size it should apply.

Methods

iconFactoryAdd

Add an IconSet to an IconFactory.

iconFactoryAdd:: IconFactory:: String:: IconSet:: IO ()
istockIdiconSet

In order to use the new stock object, the factory as to be added to the default factories by iconFactoryAddDefault.

iconFactoryAddDefault

Add all entries of the IconFactory to the applications stock object database.

iconFactoryAddDefault:: IconFactory:: IO ()

iconFactoryRemoveDefault

Remove an IconFactory from the application's stock database.

iconFactoryRemoveDefault:: IconFactory:: IO ()

iconSetAddSource

Add an IconSource (an Icon with attributes) to an IconSet.

iconSetAddSource:: IconSet:: IconSource:: IO ()
setsource

If an icon is looked up in the IconSet set the best matching IconSource will be taken. It is therefore advisable to add a default (wildcarded) icon, than can be used if no exact match is found.

iconSizeCheck

Check if a given IconSize is registered.

iconSizeCheck:: IconSize:: IO Bool
size

Useful if your application expects a theme to install a set with a specific size. You can test if this actually happend and use another size if not.

iconSizeFromName

Lookup an IconSize by name.

iconSizeFromName:: String:: IO IconSize
name

This fixed value iconSizeInvalid is returned if the name was not found.

iconSizeGetName

Lookup the name of an IconSize.

iconSizeGetName:: IconSize:: IO (Maybe String)
size

Returns Nothing if the name was not found.

iconSizeRegister

Register a new IconSize.

iconSizeRegister:: Int:: String:: Int:: IO IconSize
heightnamewidth

iconSizeRegisterAlias

Register an additional alias for a name.

iconSizeRegisterAlias:: IconSize:: String:: IO ()
targetalias

iconSourceGetDirection

Retrieve the TextDirection of this IconSource.

iconSourceGetDirection:: IconSource:: IO (Maybe TextDirection)
is

Nothing is returned if no explicit direction was set.

iconSourceGetFilename

Retrieve the filename this IconSource was based on.

iconSourceGetFilename:: IconSource:: IO (Maybe String)
is

Returns Nothing if the IconSource was generated by a Pixbuf.

iconSourceGetSize

Retrieve the IconSize of this IconSource.

iconSourceGetSize:: IconSource:: IO (Maybe IconSize)
is

Nothing is returned if no explicit size was set (i.e. this IconSource matches all sizes).

iconSourceGetState

Retrieve the StateType of this IconSource.

iconSourceGetState:: IconSource:: IO (Maybe StateType)
is

Nothing is returned if the IconSource matches all states.

no type info on symbol iconSourceResetDirection

iconSourceResetSize

Reset the IconSize of this IconSource so that is matches anything.

iconSourceResetSize:: IconSource:: IO ()
is

iconSourceResetState

Reset the StateType of this IconSource so that is matches anything.

iconSourceResetState:: IconSource:: IO ()
is

iconSourceSetDirection

Mark this IconSource that it should only apply to the specified TextDirection.

iconSourceSetDirection:: IconSource:: TextDirection:: IO ()
istd

iconSourceSetFilename

Load an icon picture from this filename.

iconSourceSetFilename:: IconSource:: FilePath:: IO ()
isname

iconSourceSetSize

Set this IconSource to a specific size.

iconSourceSetSize:: IconSource:: IconSize:: IO ()
issize

iconSourceSetState

Mark this icon to be used only with this specific state.

iconSourceSetState:: IconSource:: StateType:: IO ()
isstate