X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5b6aa0ff15be125c6f5f641e586002ec0c0330a2..d3e78bab3ea46183c22a5f0484b931a99b897636:/docs/latex/wx/icon.tex diff --git a/docs/latex/wx/icon.tex b/docs/latex/wx/icon.tex index cb0c24cef5..4a7243fa00 100644 --- a/docs/latex/wx/icon.tex +++ b/docs/latex/wx/icon.tex @@ -9,6 +9,22 @@ some platforms (X-based applications usually standardize on XPMs for small bitma and icons). However, some platforms (such as Windows) make the distinction, so a separate class is provided. +\wxheading{Derived from} + +\helpref{wxBitmap}{wxbitmap}\\ +\helpref{wxGDIObject}{wxgdiobject}\\ +\helpref{wxObject}{wxobject} + +\wxheading{Include files} + + + +\wxheading{Predefined objects} + +Objects: + +{\bf wxNullIcon} + \wxheading{Remarks} It is usually desirable to associate a pertinent icon with a frame. Icons @@ -28,12 +44,6 @@ be deleted when the frame is deleted. For more information please see \helpref{Bitmap and icon overview}{wxbitmapoverview}. -\wxheading{Derived from} - -\helpref{wxBitmap}{wxbitmap}\\ -\helpref{wxGDIObject}{wxgdiobject}\\ -\helpref{wxObject}{wxobject} - \wxheading{See also} \helpref{Bitmap and icon overview}{wxbitmapoverview}, \helpref{supported bitmap file formats}{supportedbitmapformats}, @@ -64,6 +74,8 @@ Creates an icon from an array of bits. Creates a new icon. +\func{}{wxIcon}{\param{char**}{ bits}} + \func{}{wxIcon}{\param{const char**}{ bits}} Creates an icon from XPM data. @@ -73,6 +85,10 @@ Creates an icon from XPM data. Loads an icon from a file or resource. +\func{}{wxIcon}{\param{const wxIconLocation\& }{loc}} + +Loads an icon from the specified \helpref{location}{wxiconlocation}. + \wxheading{Parameters} \docparam{bits}{Specifies an array of pixel values.} @@ -95,16 +111,19 @@ screen is used.} \docparam{name}{This can refer to a resource name under MS Windows, or a filename under MS Windows and X. Its meaning is determined by the {\it flags} parameter.} +\docparam{loc}{The object describing the location of the native icon, see +\helpref{wxIconLocation}{wxiconlocation}.} + \docparam{type}{May be one of the following: \twocolwidtha{5cm} \begin{twocollist} -\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_ICO}}}{Load a Windows icon file.} -\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_ICO\_RESOURCE}}}{Load a Windows icon from the resource database.} -\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_GIF}}}{Load a GIF bitmap file.} -\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_XBM}}}{Load an X bitmap file.} -\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_XPM}}}{Load an XPM bitmap file.} -%\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_RESOURCE}}}{Load a Windows resource name.} +\twocolitem{\indexit{wxBITMAP\_TYPE\_ICO}}{Load a Windows icon file.} +\twocolitem{\indexit{wxBITMAP\_TYPE\_ICO\_RESOURCE}}{Load a Windows icon from the resource database.} +\twocolitem{\indexit{wxBITMAP\_TYPE\_GIF}}{Load a GIF bitmap file.} +\twocolitem{\indexit{wxBITMAP\_TYPE\_XBM}}{Load an X bitmap file.} +\twocolitem{\indexit{wxBITMAP\_TYPE\_XPM}}{Load an XPM bitmap file.} +%\twocolitem{\indexit{wxBITMAP\_TYPE\_RESOURCE}}{Load a Windows resource name.} \end{twocollist} The validity of these flags depends on the platform and wxWindows configuration. @@ -169,8 +188,26 @@ Under X, {\it type} defaults to wxBITMAP\_TYPE\_XPM. \wxheading{See also} + +\membersection{wxIcon::CopyFromBitmap}\label{wxiconcopyfrombitmap} + +\func{void}{CopyFromBitmap}{\param{const wxBitmap\&}{ bmp}} + +Copies {\it bmp} bitmap to this icon. Under MS Windows the bitmap +must have mask colour set. + + \helpref{wxIcon::LoadFile}{wxiconloadfile} +\perlnote{Constructors supported by wxPerl are:\par +\begin{itemize} +\item{Wx::Icon->new( width, height, depth = -1 )} +\item{Wx::Icon->new( name, type, desiredWidth = -1, desiredHeight = -1 )} +\item{Wx::Icon->newFromBits( bits, width, height, depth = 1 )} +\item{Wx::Icon->newFromXPM( data )} +\end{itemize} +} + \membersection{wxIcon::\destruct{wxIcon}} \func{}{\destruct{wxIcon}}{\void} @@ -234,7 +271,7 @@ The validity of these flags depends on the platform and wxWindows configuration. \wxheading{Return value} -TRUE if the operation succeeded, FALSE otherwise. +true if the operation succeeded, false otherwise. \wxheading{See also} @@ -244,7 +281,7 @@ TRUE if the operation succeeded, FALSE otherwise. \constfunc{bool}{Ok}{\void} -Returns TRUE if icon data is present. +Returns true if icon data is present. \begin{comment} \membersection{wxIcon::SaveFile}\label{wxiconsavefile} @@ -273,7 +310,7 @@ The validity of these flags depends on the platform and wxWindows configuration. \wxheading{Return value} -TRUE if the operation succeeded, FALSE otherwise. +true if the operation succeeded, false otherwise. \wxheading{Remarks} @@ -353,7 +390,7 @@ equal (a fast test). \wxheading{Return value} -Returns TRUE if the icons were effectively equal, FALSE otherwise. +Returns true if the icons were effectively equal, false otherwise. \membersection{wxIcon::operator $!=$} @@ -368,6 +405,6 @@ unequal (a fast test). \wxheading{Return value} -Returns TRUE if the icons were unequal, FALSE otherwise. +Returns true if the icons were unequal, false otherwise.