YaST2 Developers Documentation: Unknown YCP Module

Unknown YCP Module

This module has an unstable interface.

Imports

  • Directory

Structures

Global Functions

Info:

File: modules/Icon.ycp Package: YaST2 Authors: Lukas Ocilka Summary: Transparent access to Icons Flags: Stable

global IconPath (string icon_type) -> string

Returns path to an image

Parameters:
icon_type
Example

	Icon::IconPath ("warning") -> "/usr/share/YaST2/theme/current/icons/32x32/apps/msg_warning.png"
See
Icon::Image() for details
global Image (string icon_type, map <string, any> options) -> term

Returns `Image() term defined by parameters. Returns `Empty() if the current UI doesn't support images.

Structure 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
 ]
Parameters:
icon_type
options
Example

  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)
    )
global Simple (string icon_type) -> term

Function calls Icon::Image with default options

Parameters:
icon_type
See
Icon for more information
global Warning () -> term

Returns UI term `Image() widget with a warning-icon.

Return value:
warning icon
global Error () -> term

Returns UI term `Image() widget with an error-icon.

Return value:
error-icon
global Info () -> term

Returns UI term `Image() widget with an info-icon.

Return value:
info icon