wxRuby Documentation Home

# Wx::IconBundle

This class contains multiple copies of an icon in different sizes,
see also Dialog#set_icons and
TopLevelWindow#set_icons.

## Derived from

No base class

## Methods

- IconBundle.new
- IconBundle#add_icon
- IconBundle#get_icon

### IconBundle.new

IconBundle.new(%(arg-type)String% file, Integer type)

Initializes the bundle with the icon(s) found in the file.

IconBundle.new(%(arg-type)Icon% icon)

Initializes the bundle with a single icon.

IconBundle.new(%(arg-type)IconBundle% ic)

Copy constructor.

### IconBundle#add_icon

add_icon(%(arg-type)String% file, Integer type)

Adds all the icons contained in the file to the bundle;
if the collection already contains icons with the same
width and height, they are replaced by the new ones.

add_icon(%(arg-type)Icon% icon)

Adds the icon to the collection; if the collection already
contains an icon with the same width and height, it is
replaced by the new one.

Note that “<<” is an alias for “add_icon”.

### IconBundle#get_icon

Icon get_icon(%(arg-type)Size% size)

Returns the icon with the given size; if no such icon exists,
returns the icon with size SYS_ICON_X/SYS_ICON_Y;
if no such icon exists,
returns the first icon in the bundle. If size = Size( -1, -1 ),
returns the icon with size SYS_ICON_X/SYS_ICON_Y.

Icon get_icon(%(arg-type)Integer% size = -1)

Same as GetIcon( Size( size, size ) ).

[This page automatically generated from the Textile source at 2023-06-09 00:45:33 +0000]