Go to main content

man pages section 3: Extended Library Functions, Volume 1

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

wxImageList (3erl)

Name

wxImageList - Functions for wxImageList class

Synopsis

Please see following description for synopsis

Description

wxImageList(3)             Erlang Module Definition             wxImageList(3)



NAME
       wxImageList - Functions for wxImageList class

DESCRIPTION
       A wxImageList contains a list of images, which are stored in an unspec-
       ified form. Images can have masks for transparent drawing, and  can  be
       made from a variety of sources including bitmaps and icons.

       wxImageList  is  used  principally  in  conjunction with wxTreeCtrl and
       wxListCtrl classes.

       See: wxTreeCtrl, wxListCtrl

       wxWidgets docs: wxImageList

DATA TYPES
       wxImageList() = wx:wx_object()

EXPORTS
       new() -> wxImageList()

              Default ctor.

       new(Width, Height) -> wxImageList()

              Types:

                 Width = Height = integer()

       new(Width, Height, Options :: [Option]) -> wxImageList()

              Types:

                 Width = Height = integer()
                 Option = {mask, boolean()} | {initialCount, integer()}

              Constructor specifying  the  image  size,  whether  image  masks
              should be created, and the initial size of the list.

              See: create/4

       add(This, Icon) -> integer()

              Types:

                 This = wxImageList()
                 Icon = wxIcon:wxIcon() | wxBitmap:wxBitmap()

              Adds a new image using an icon.

              Return: The new zero-based image index.

              Remark: The original bitmap or icon is not affected by the add/3
              operation, and can be deleted afterwards. If the bitmap is wider
              than  the images in the list, then the bitmap will automatically
              be split into smaller images, each matching  the  dimensions  of
              the image list. This does not apply when adding icons.

              Only for:wxmsw,wxosx

       add(This, Bitmap, Mask) -> integer()

       add(This, Bitmap, MaskColour) -> integer()

              Types:

                 This = wxImageList()
                 Bitmap = wxBitmap:wxBitmap()
                 MaskColour = wx:wx_colour()

              Adds a new image or images using a bitmap and mask colour.

              Return: The new zero-based image index.

              Remark: The original bitmap or icon is not affected by the add/3
              operation, and can be deleted afterwards. If the bitmap is wider
              than  the images in the list, then the bitmap will automatically
              be split into smaller images, each matching  the  dimensions  of
              the image list. This does not apply when adding icons.

       create(This, Width, Height) -> boolean()

              Types:

                 This = wxImageList()
                 Width = Height = integer()

       create(This, Width, Height, Options :: [Option]) -> boolean()

              Types:

                 This = wxImageList()
                 Width = Height = integer()
                 Option = {mask, boolean()} | {initialCount, integer()}

              Initializes the list.

              See new/3 for details.

       draw(This, Index, Dc, X, Y) -> boolean()

              Types:

                 This = wxImageList()
                 Index = integer()
                 Dc = wxDC:wxDC()
                 X = Y = integer()

       draw(This, Index, Dc, X, Y, Options :: [Option]) -> boolean()

              Types:

                 This = wxImageList()
                 Index = integer()
                 Dc = wxDC:wxDC()
                 X = Y = integer()
                 Option = {flags, integer()} | {solidBackground, boolean()}

              Draws a specified image onto a device context.

       getBitmap(This, Index) -> wxBitmap:wxBitmap()

              Types:

                 This = wxImageList()
                 Index = integer()

              Returns the bitmap corresponding to the given index.

       getIcon(This, Index) -> wxIcon:wxIcon()

              Types:

                 This = wxImageList()
                 Index = integer()

              Returns the icon corresponding to the given index.

       getImageCount(This) -> integer()

              Types:

                 This = wxImageList()

              Returns the number of images in the list.

       getSize(This, Index) -> Result

              Types:

                 Result =
                     {Res  ::  boolean(),  Width :: integer(), Height :: inte-
                 ger()}
                 This = wxImageList()
                 Index = integer()

              Retrieves the size of the images in the list.

              Currently, the index parameter is ignored as all images  in  the
              list have the same size.

              Return:  true if the function succeeded, false if it failed (for
              example, if the image list was not yet initialized).

       remove(This, Index) -> boolean()

              Types:

                 This = wxImageList()
                 Index = integer()

              Removes the image at the given position.

       removeAll(This) -> boolean()

              Types:

                 This = wxImageList()

              Removes all the images in the list.

       replace(This, Index, Icon) -> boolean()

              Types:

                 This = wxImageList()
                 Index = integer()
                 Icon = wxIcon:wxIcon() | wxBitmap:wxBitmap()

              Replaces the existing image with the new image.

              Return: true if the replacement was successful, false otherwise.

              Remark: The original bitmap or  icon  is  not  affected  by  the
              replace/4 operation, and can be deleted afterwards.

              Only for:wxmsw,wxosx

       replace(This, Index, Bitmap, Mask) -> boolean()

              Types:

                 This = wxImageList()
                 Index = integer()
                 Bitmap = Mask = wxBitmap:wxBitmap()

              Replaces the existing image with the new image.

              Windows only.

              Return: true if the replacement was successful, false otherwise.

              Remark:  The  original  bitmap  or  icon  is not affected by the
              replace/4 operation, and can be deleted afterwards.

       destroy(This :: wxImageList()) -> ok

              Destroys the object.



wxWidgets team.                    wx 2.1.1                     wxImageList(3)