Class: Wx::ImageList
Overview
A ImageList contains a list of images, which are stored in an unspecified form.
Images can use alpha channel or masks for transparent drawing, and can be made from a variety of sources including bitmaps and icons. ImageList is used principally in conjunction with TreeCtrl and ListCtrl classes. Use of this class is not recommended in the new code as it doesn’t support showing DPI-dependent bitmaps. Please use WithImages#set_images instead of WithImages#set_image_list.
Category: Graphics Device Interface (GDI)
Instance Method Summary collapse
- #add(*args) ⇒ Object
-
#create(width, height, mask = true, initialCount = 1) ⇒ Boolean
Initializes the list.
-
#destroy ⇒ void
Destroys the current list.
-
#draw(index, dc, x, y, flags = Wx::IMAGELIST_DRAW_NORMAL, solidBackground = false) ⇒ Boolean
Draws a specified image onto a device context.
-
#get_bitmap(index) ⇒ Wx::Bitmap
(also: #bitmap)
Returns the bitmap corresponding to the given index.
-
#get_icon(index) ⇒ Wx::Icon
(also: #icon)
Returns the icon corresponding to the given index.
-
#get_image_count ⇒ Integer
(also: #image_count)
Returns the number of images in the list.
-
#get_size ⇒ Wx::Size
(also: #size)
Retrieves the size of the image list as passed to #create.
-
#initialize(*args) ⇒ ImageList
constructor
A new instance of ImageList.
-
#remove(index) ⇒ Boolean
Removes the image at the given position.
-
#remove_all ⇒ Boolean
Removes all the images in the list.
- #replace(*args) ⇒ Object
Methods inherited from Object
#clone, #dup, #is_same_as, #un_share
Constructor Details
#initialize ⇒ Wx::ImageList #initialize(width, height, mask = true, initialCount = 1) ⇒ Wx::ImageList
Returns a new instance of ImageList.
60 |
# File 'lib/wx/doc/gen/image_list.rb', line 60 def initialize(*args) end |
Instance Method Details
#add(bitmap, mask = Wx::NULL_BITMAP) ⇒ Integer #add(bitmap, maskColour) ⇒ Integer #add(icon) ⇒ Integer
91 |
# File 'lib/wx/doc/gen/image_list.rb', line 91 def add(*args) end |
#create(width, height, mask = true, initialCount = 1) ⇒ Boolean
Initializes the list.
See image_list for details. This function can be called only once after creating the object using its default ctor or after calling #destroy.
102 |
# File 'lib/wx/doc/gen/image_list.rb', line 102 def create(width, height, mask=true, initialCount=1) end |
#destroy ⇒ void
This method returns an undefined value.
Destroys the current list.
This function resets the object to its initial state and does more than just #remove_all in the native WXMSW version. After calling it, #create may be called again to recreate the image list, e.g. using a different size.
109 |
# File 'lib/wx/doc/gen/image_list.rb', line 109 def destroy; end |
#draw(index, dc, x, y, flags = Wx::IMAGELIST_DRAW_NORMAL, solidBackground = false) ⇒ Boolean
Draws a specified image onto a device context.
124 |
# File 'lib/wx/doc/gen/image_list.rb', line 124 def draw(index, dc, x, y, flags=Wx::IMAGELIST_DRAW_NORMAL, solidBackground=false) end |
#get_bitmap(index) ⇒ Wx::Bitmap Also known as: bitmap
Returns the bitmap corresponding to the given index.
129 |
# File 'lib/wx/doc/gen/image_list.rb', line 129 def get_bitmap(index) end |
#get_icon(index) ⇒ Wx::Icon Also known as: icon
Returns the icon corresponding to the given index.
135 |
# File 'lib/wx/doc/gen/image_list.rb', line 135 def get_icon(index) end |
#get_image_count ⇒ Integer Also known as: image_count
Returns the number of images in the list.
140 |
# File 'lib/wx/doc/gen/image_list.rb', line 140 def get_image_count; end |
#get_size ⇒ Wx::Size Also known as: size
Retrieves the size of the image list as passed to #create.
the size of the image list, which may be zero if the image list was not yet initialised.
147 |
# File 'lib/wx/doc/gen/image_list.rb', line 147 def get_size; end |
#remove(index) ⇒ Boolean
Removes the image at the given position.
153 |
# File 'lib/wx/doc/gen/image_list.rb', line 153 def remove(index) end |
#remove_all ⇒ Boolean
Removes all the images in the list.
157 |
# File 'lib/wx/doc/gen/image_list.rb', line 157 def remove_all; end |
#replace(index, bitmap, mask = Wx::NULL_BITMAP) ⇒ Boolean #replace(index, icon) ⇒ Boolean
189 |
# File 'lib/wx/doc/gen/image_list.rb', line 189 def replace(*args) end |