Transparent access to Icons
List of Global Functions
Error - Returns UI term `Image() widget with an error-icon.
IconPath - Returns path to an image
Image - Returns `Image() term defined by parameters. Returns `Empty() if the current UI doesn't support images.
Info - Returns UI term `Image() widget with an info-icon.
Simple - Function calls Icon::Image with default options
Warning - Returns UI term `Image() widget with a warning-icon.
List of Global Variables
Returns path to an image
Function parameters
string icon_type
Return value
string
Example 21.
Icon::IconPath ("warning") -> "/usr/share/YaST2/theme/current/icons/32x32/apps/msg_warning.png"
See also:
Icon::Image() for details
Returns `Image() term defined by parameters. Returns `Empty() if the current UI doesn't support images.
Function parameters
string icon_type
map <string, any> options
Return value
term
options = $[ "id" : any_icon_id, "label" : (string) icon_label, // (used if icon is missing) "margin_left" : 0, // HSpacing on the left "margin_right" : 5, // HSpacing on the right ]
Example 22.
Icon::Image ("warning", $["id":`my_warning, "label":_("My Warning")]) -> `Image (`id (`my_warning), "/usr/share/YaST2/theme/current/icons/32x32/apps/msg_warning.png", "My Warning") Icon::Image ("info", $["margin_left":1, "margin_right":2]) -> `HBox ( `HSpacing (1), `Image (`id ("icon_id_info"), "/usr/share/YaST2/theme/current/icons/32x32/apps/msg_info.png", "info"), `HSpacing (2) )
Function calls Icon::Image with default options
Function parameters
string icon_type
Return value
term
See also:
Icon for more information