X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..58f1fdc926e4fc0f0b8ca49384d72e51bea2e86b:/docs/latex/wx/imaglist.tex diff --git a/docs/latex/wx/imaglist.tex b/docs/latex/wx/imaglist.tex index 548b3dae78..6b71f3a53e 100644 --- a/docs/latex/wx/imaglist.tex +++ b/docs/latex/wx/imaglist.tex @@ -28,7 +28,7 @@ wxImageList is used principally in conjunction with \helpref{wxTreeCtrl}{wxtreec Default constructor. -\func{}{wxImageList}{\param{int }{width}, \param{int }{height}, \param{const bool }{mask = TRUE},\rtfsp +\func{}{wxImageList}{\param{int }{width}, \param{int }{height}, \param{const bool }{mask = true},\rtfsp \param{int }{initialCount = 1}} Constructor specifying the image size, whether image masks should be created, and the initial size of the list. @@ -39,7 +39,7 @@ Constructor specifying the image size, whether image masks should be created, an \docparam{height}{Height of the images in the list.} -\docparam{mask}{TRUE if masks should be created for all images.} +\docparam{mask}{true if masks should be created for all images.} \docparam{initialCount}{The initial size of the list.} @@ -51,11 +51,11 @@ Constructor specifying the image size, whether image masks should be created, an \func{int}{Add}{\param{const wxBitmap\&}{ bitmap}, \param{const wxBitmap\&}{ mask = wxNullBitmap}} -Adds a new image using a bitmap and optional mask bitmap. +Adds a new image or images using a bitmap and optional mask bitmap. \func{int}{Add}{\param{const wxBitmap\&}{ bitmap}, \param{const wxColour\&}{ maskColour}} -Adds a new image using a bitmap and mask colour. +Adds a new image or images using a bitmap and mask colour. \func{int}{Add}{\param{const wxIcon\&}{ icon}} @@ -79,6 +79,8 @@ The new zero-based image index. The original bitmap or icon is not affected by the {\bf Add} 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. + \pythonnote{In place of a single overloaded method name, wxPython implements the following methods:\par \indented{2cm}{\begin{twocollist} @@ -89,7 +91,7 @@ implements the following methods:\par } \membersection{wxImageList::Create}\label{wximagelistcreate} -\func{bool}{Create}{\param{int }{width}, \param{int }{height}, \param{const bool }{mask = TRUE},\rtfsp +\func{bool}{Create}{\param{int }{width}, \param{int }{height}, \param{const bool }{mask = true},\rtfsp \param{int }{initialCount = 1}} Initializes the list. See \helpref{wxImageList::wxImageList}{wximagelistconstr} for details. @@ -97,8 +99,8 @@ Initializes the list. See \helpref{wxImageList::wxImageList}{wximagelistconstr} \membersection{wxImageList::Draw}\label{wximagelistdraw} \func{bool}{Draw}{\param{int}{ index}, \param{wxDC\&}{ dc}, \param{int }{x},\rtfsp -\param{int }{x}, \param{int }{flags = wxIMAGELIST\_DRAW\_NORMAL},\rtfsp -\param{const bool }{solidBackground = FALSE}} +\param{int }{y}, \param{int }{flags = wxIMAGELIST\_DRAW\_NORMAL},\rtfsp +\param{const bool }{solidBackground = false}} Draws a specified image onto a device context. @@ -118,13 +120,25 @@ Draws a specified image onto a device context. \twocolitem{{\bf wxIMAGELIST\_DRAW\_NORMAL}}{Draw the image normally.} \twocolitem{{\bf wxIMAGELIST\_DRAW\_TRANSPARENT}}{Draw the image with transparency.} \twocolitem{{\bf wxIMAGELIST\_DRAW\_SELECTED}}{Draw the image in selected state.} -\twocolitem{{\bf wxIMAGELIST\_DRAW\_FOCUSED}}{Draw the image in a focussed state.} +\twocolitem{{\bf wxIMAGELIST\_DRAW\_FOCUSED}}{Draw the image in a focused state.} \end{twocollist} } \docparam{solidBackground}{For optimisation - drawing can be faster if the function is told that the background is solid.} +\membersection{wxImageList::GetBitmap}\label{wximagelistgetbitmap} + +\constfunc{wxBitmap}{GetBitmap}{\param{int }{index}} + +Returns the bitmap corresponding to the given index. + +\membersection{wxImageList::GetIcon}\label{wximagelistgeticon} + +\constfunc{wxIcon}{GetIcon}{\param{int }{index}} + +Returns the icon corresponding to the given index. + \membersection{wxImageList::GetImageCount}\label{wximagelistgetimagecount} \constfunc{int}{GetImageCount}{\void} @@ -148,7 +162,7 @@ parameter is ignored as all images in the list have the same size. \wxheading{Return value} -TRUE if the function succeeded, FALSE if it failed (for example, if the image +true if the function succeeded, false if it failed (for example, if the image list was not yet initialized). \membersection{wxImageList::Remove}\label{wximagelistremove} @@ -169,6 +183,8 @@ Removes all the images in the list. Replaces the existing image with the new image. +Windows only. + \func{bool}{Replace}{\param{int}{ index}, \param{const wxIcon\&}{ icon}} Replaces the existing image with the new image. @@ -183,7 +199,7 @@ Replaces the existing image with the new image. \wxheading{Return value} -TRUE if the replacement was successful, FALSE otherwise. +true if the replacement was successful, false otherwise. \wxheading{Remarks}