.\" This is a wxWidgets manpage page generated from the XML docs .TH wxIcon 3wx 2005-02-15 "wxWidgets" "wxWidgets class documentation" .SH NAME wxIcon \- A small, transparent bitmap for assigning to frames and drawing on device contexts .SH DESCRIPTION An icon is a small rectangular bitmap usually used for denoting a minimized application. It differs from a wxBitmap in always having a mask associated with it for transparent drawing. On some platforms, icons and bitmaps are implemented identically, since there is no real distinction between a wxBitmap with a mask and an icon; and there is no specific icon format on some platforms (X-based applications usually standardize on XPMs for small bitmaps and icons). However, some platforms (such as Windows) make the distinction, so a separate class is provided. .SH REMARKS It is usually desirable to associate a pertinent icon with a frame. Icons can also be used for other purposes, for example with wxTreeCtrl and wxListCtrl . Icons have different formats on different platforms. Therefore, separate icons will usually be created for the different environments. Platform-specific methods for creating a wxIcon structure are catered for, and this is an occasion where conditional compilation will probably be required. Note that a new icon must be created for every time the icon is to be used for a new window. In Windows, the icon will not be reloaded if it has already been used. An icon allocated to a frame will be deleted when the frame is deleted. For more information please see Bitmap and icon overview . .SH "PARENTS" wxBitmap wxGDIObject wxObject .SH "INCLUDE FILES" wx/icon.h .SH MEMBERS .SS wxIcon () Default constructor. .SS wxIcon (const wxIcon& icon) Copy constructor. .SS wxIcon (void* dataint typeint widthint heightint depth = -1) Creates an icon from the given data, which can be of arbitrary type. .SS wxIcon (const char bits[]int widthint heightint depth = 1) Creates an icon from an array of bits. .SS wxIcon (int widthint heightint depth = -1) Creates a new icon. .SS wxIcon (char** bits) .SS wxIcon (const char** bits) Creates an icon from XPM data. .SS wxIcon (const wxString& namewxBitmapType typeint desiredWidth = -1int desiredHeight = -1) Loads an icon from a file or resource. .SS wxIcon (const wxIconLocation& loc) Loads an icon from the specified location . .SS void CopyFromBitmap (const wxBitmap& bmp) Copies bmp bitmap to this icon. Under MS Windows the bitmap must have mask colour set. wxIcon::LoadFile .SS ~wxIcon () Destroys the wxIcon object and possibly the underlying icon data. Because reference counting is used, the icon may not actually be destroyed at this point - only when the reference count is zero will the data be deleted. If the application omits to delete the icon explicitly, the icon will be destroyed automatically by wxWidgets when the application exits. Do not delete an icon that is selected into a memory device context. .SS int GetDepth () Gets the colour depth of the icon. A value of 1 indicates a monochrome icon. .SS int GetHeight () Gets the height of the icon in pixels. .SS int GetWidth () Gets the width of the icon in pixels. .SS bool LoadFile (const wxString& namewxBitmapType type) Loads an icon from a file or resource. .SS bool Ok () Returns true if icon data is present. \begin{comment} .SS bool SaveFile (const wxString& namewxBitmapType typewxPalette* palette = NULL) Saves an icon in the named file. .SS void SetDepth (int depth) Sets the depth member (does not affect the icon data). .SS void SetHeight (int height) Sets the height member (does not affect the icon data). .SS void SetWidth (int width) Sets the width member (does not affect the icon data). .SS wxIcon& operator = (const wxIcon& icon) Assignment operator. This operator does not copy any data, but instead passes a pointer to the data in icon and increments a reference counter. It is a fast operation. .SS bool operator == (const wxIcon& icon) Equality operator. This operator tests whether the internal data pointers are equal (a fast test). .SS bool operator != (const wxIcon& icon) Inequality operator. This operator tests whether the internal data pointers are unequal (a fast test). .SH "SEE ALSO" wxBitmap wxGDIObject wxObject Bitmap and icon overview supported bitmap file formats wxDC::DrawIcon wxCursor .SH "AUTHORS" Documentation content by Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al Conversion to manpage format by Arnout Engelen (http://bzzt.net), bugreports welcome.