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.
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 () |
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.
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.
Add an IconSet to an IconFactory.
| iconFactoryAdd | :: IconFactory | :: String | :: IconSet | :: IO () |
| i | stockId | iconSet |
In order to use the new stock object, the factory as to be added to the default factories by iconFactoryAddDefault.
Add all entries of the IconFactory to the applications stock object database.
| iconFactoryAddDefault | :: IconFactory | :: IO () |
Remove an IconFactory from the application's stock database.
| iconFactoryRemoveDefault | :: IconFactory | :: IO () |
Add an IconSource (an Icon with attributes) to an IconSet.
| iconSetAddSource | :: IconSet | :: IconSource | :: IO () |
| set | source |
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.
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.
Lookup an IconSize by name.
| iconSizeFromName | :: String | :: IO IconSize |
| name |
This fixed value iconSizeInvalid is returned if the name was not found.
Lookup the name of an IconSize.
| iconSizeGetName | :: IconSize | :: IO (Maybe String) |
| size |
Returns Nothing if the name was not found.
Register a new IconSize.
| iconSizeRegister | :: Int | :: String | :: Int | :: IO IconSize |
| height | name | width |
Register an additional alias for a name.
| iconSizeRegisterAlias | :: IconSize | :: String | :: IO () |
| target | alias |
Retrieve the TextDirection of this IconSource.
| iconSourceGetDirection | :: IconSource | :: IO (Maybe TextDirection) |
| is |
Nothing is returned if no explicit direction was set.
Retrieve the filename this IconSource was based on.
| iconSourceGetFilename | :: IconSource | :: IO (Maybe String) |
| is |
Returns Nothing if the IconSource was generated by a Pixbuf.
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).
Retrieve the StateType of this IconSource.
| iconSourceGetState | :: IconSource | :: IO (Maybe StateType) |
| is |
Nothing is returned if the IconSource matches all states.
Reset the IconSize of this IconSource so that is matches anything.
| iconSourceResetSize | :: IconSource | :: IO () |
| is |
Reset the StateType of this IconSource so that is matches anything.
| iconSourceResetState | :: IconSource | :: IO () |
| is |
Mark this IconSource that it should only apply to the specified TextDirection.
| iconSourceSetDirection | :: IconSource | :: TextDirection | :: IO () |
| is | td |
Load an icon picture from this filename.
| iconSourceSetFilename | :: IconSource | :: FilePath | :: IO () |
| is | name |
Set this IconSource to a specific size.
| iconSourceSetSize | :: IconSource | :: IconSize | :: IO () |
| is | size |