API Reference

class wx_icons_humanity.HumanityDarkIconTheme(name, comment, directories, inherits=None, scaled_directories=None, hidden=False, example='')[source]
classmethod create()[source]

Create an instance of the Humanity Dark Icon Theme

find_icon(icon_name, size, scale, prefer_this_theme=True)[source]
Parameters
  • icon_name

  • size

  • scale

  • prefer_this_theme – Return an icon from this theme even if it has to be resized, rather than a correctly sized icon from the parent theme. Default True.

Returns

Return type

classmethod from_configparser(theme_index_path)

Constructs a IconTheme from config file.

Parameters

theme_index_path (Union[str, PathLike]) –

Return type

IconTheme

inherits: List[str]
scaled_directories: List[wx_icons_hicolor.directory.Directory]
class wx_icons_humanity.HumanityIconTheme(name, comment, directories, inherits=None, scaled_directories=None, hidden=False, example='')[source]
classmethod create()[source]

Create an instance of the Humanity Icon Theme

find_icon(icon_name, size, scale, prefer_this_theme=True)[source]
Parameters
  • icon_name (str) –

  • size (int) –

  • scale (Any) –

  • prefer_this_theme (bool) – Return an icon from this theme even if it has to be resized, rather than a correctly sized icon from the parent theme. Default True.

Returns

Return type

classmethod from_configparser(theme_index_path)

Constructs a IconTheme from config file.

Parameters

theme_index_path (Union[str, PathLike]) –

Return type

IconTheme

inherits: List[str]
scaled_directories: List[wx_icons_hicolor.directory.Directory]
wx_icons_humanity.version()[source]
class wx_icons_humanity.wxHumanityDarkIconTheme[source]
CreateBitmap(id, client, size)[source]

Returns the requested resource.

Parameters
  • id – Unique identifier of the bitmap.

  • client – Identifier of the client (i.e. who is asking for the bitmap). This only serves as a hint.

  • size – Preferred size of the bitmap. The function may return a bitmap of different dimensions; it will be automatically rescaled to meet client’s request.

static HasNativeProvider()
Return type

bool

static icon2bitmap(icon, size)

Converts an Icon to a wx.Bitmap.

Parameters
  • icon (Icon) –

  • size (int) – The desired size of the icon. If the icon isn’t scalable the icon is returned in its original size.

Return type

Bitmap

class wx_icons_humanity.wxHumanityIconTheme[source]
CreateBitmap(id, client, size)[source]

Returns the requested resource.

Parameters
  • id (Any) – Unique identifier of the bitmap.

  • client (Any) – Identifier of the client (i.e. who is asking for the bitmap). This only serves as a hint.

  • size (Union[Tuple[int], Size]) – Preferred size of the bitmap. The function may return a bitmap of different dimensions; it will be automatically rescaled to meet client’s request.

Return type

Bitmap

static HasNativeProvider()
Return type

bool

static icon2bitmap(icon, size)

Converts an Icon to a wx.Bitmap.

Parameters
  • icon (Icon) –

  • size (int) – The desired size of the icon. If the icon isn’t scalable the icon is returned in its original size.

Return type

Bitmap