1 \section{\class{wxBitmap
}}\label{wxbitmap
}
3 %\overview{Overview}{wxbitmapoverview}
5 This class encapsulates the concept of a platform-dependent bitmap,
6 either monochrome or colour.
8 \wxheading{Derived from
}
10 \helpref{wxGDIObject
}{wxgdiobject
}\\
11 \helpref{wxObject
}{wxobject
}
13 \wxheading{Include file
}
17 \wxheading{Predefined objects
}
25 \helpref{wxBitmap overview
}{wxbitmapoverview
},
26 \helpref{supported bitmap file formats
}{supportedbitmapformats
},
27 \helpref{wxDC::Blit
}{wxdcblit
},
28 \helpref{wxIcon
}{wxicon
},
\helpref{wxCursor
}{wxcursor
},
\helpref{wxBitmap
}{wxbitmap
},
29 \helpref{wxMemoryDC
}{wxmemorydc
}
31 \latexignore{\rtfignore{\wxheading{Members
}}}
33 \membersection{wxBitmap::wxBitmap
}\label{wxbitmapconstr
}
35 \func{}{wxBitmap
}{\void}
39 \func{}{wxBitmap
}{\param{const wxBitmap\&
}{bitmap
}}
43 \func{}{wxBitmap
}{\param{void*
}{ data
},
\param{int
}{ type
},
\param{int
}{ width
},
\param{int
}{ height
},
\param{int
}{ depth = -
1}}
45 Creates a bitmap from the given data which is interpreted in platform-dependent
48 \func{}{wxBitmap
}{\param{const char
}{ bits
[]},
\param{int
}{ width
},
\param{int
}{ height
}\\
49 \param{int
}{ depth =
1}}
51 Creates a bitmap from an array of bits.
53 You should only use this function for monochrome bitmaps (
{\it depth
} 1) in
54 portable programs: in this case the
{\it bits
} parameter should contain an XBM
57 For other bit depths, the behaviour is platform dependent: under Windows, the
58 data is passed without any changes to the underlying
{\tt CreateBitmap()
} API.
59 Under other platforms, only monochrome bitmaps may be created using this
60 constructor and
\helpref{wxImage
}{wximage
} should be used for creating colour
61 bitmaps from static data.
63 \func{}{wxBitmap
}{\param{int
}{ width
},
\param{int
}{ height
},
\param{int
}{ depth = -
1}}
65 Creates a new bitmap. A depth of -
1 indicates the depth of the current screen
66 or visual. Some platforms only support
1 for monochrome and -
1 for the current
69 \func{}{wxBitmap
}{\param{const char**
}{ bits
}}
71 Creates a bitmap from XPM data.
73 \func{}{wxBitmap
}{\param{const wxString\&
}{name
},
\param{long
}{ type
}}
75 Loads a bitmap from a file or resource.
77 \wxheading{Parameters
}
79 \docparam{bits
}{Specifies an array of pixel values.
}
81 \docparam{width
}{Specifies the width of the bitmap.
}
83 \docparam{height
}{Specifies the height of the bitmap.
}
85 \docparam{depth
}{Specifies the depth of the bitmap. If this is omitted, the display depth of the
88 \docparam{name
}{This can refer to a resource name under MS Windows, or a filename under MS Windows and X.
89 Its meaning is determined by the
{\it type
} parameter.
}
91 \docparam{type
}{May be one of the following:
95 \twocolitem{{\bf \indexit{wxBITMAP
\_TYPE\_BMP}}}{Load a Windows bitmap file.
}
96 \twocolitem{{\bf \indexit{wxBITMAP
\_TYPE\_BMP\_RESOURCE}}}{Load a Windows bitmap from the resource database.
}
97 \twocolitem{{\bf \indexit{wxBITMAP
\_TYPE\_GIF}}}{Load a GIF bitmap file.
}
98 \twocolitem{{\bf \indexit{wxBITMAP
\_TYPE\_XBM}}}{Load an X bitmap file.
}
99 \twocolitem{{\bf \indexit{wxBITMAP
\_TYPE\_XPM}}}{Load an XPM bitmap file.
}
100 \twocolitem{{\bf \indexit{wxBITMAP
\_TYPE\_RESOURCE}}}{Load a Windows resource name.
}
103 The validity of these flags depends on the platform and wxWindows configuration.
104 If all possible wxWindows settings are used, the Windows platform supports BMP file, BMP resource,
105 XPM data, and XPM. Under wxGTK, the available formats are BMP file, XPM data, XPM file, and PNG file.
106 Under wxMotif, the available formats are XBM data, XBM file, XPM data, XPM file.
108 In addition, wxBitmap can read all formats that
\helpref{wxImage
}{wximage
} can, which currently include
109 wxBITMAP
\_TYPE\_JPEG, wxBITMAP
\_TYPE\_TIF, wxBITMAP
\_TYPE\_PNG, wxBITMAP
\_TYPE\_GIF, wxBITMAP
\_TYPE\_PCX,
110 and wxBITMAP
\_TYPE\_PNM. Of course, you must have wxImage handlers loaded.
}
114 The first form constructs a bitmap object with no data; an assignment or another member function such as Create
115 or LoadFile must be called subsequently.
117 The second and third forms provide copy constructors. Note that these do not copy the
118 bitmap data, but instead a pointer to the data, keeping a reference count. They are therefore
119 very efficient operations.
121 The fourth form constructs a bitmap from data whose type and value depends on
122 the value of the
{\it type
} argument.
124 The fifth form constructs a (usually monochrome) bitmap from an array of pixel values, under both
127 The sixth form constructs a new bitmap.
129 The seventh form constructs a bitmap from pixmap (XPM) data, if wxWindows has been configured
130 to incorporate this feature.
132 To use this constructor, you must first include an XPM file. For
133 example, assuming that the file
{\tt mybitmap.xpm
} contains an XPM array
134 of character pointers called mybitmap:
137 #include "mybitmap.xpm"
141 wxBitmap *bitmap = new wxBitmap(mybitmap);
144 The eighth form constructs a bitmap from a file or resource.
{\it name
} can refer
145 to a resource name under MS Windows, or a filename under MS Windows and X.
147 Under Windows,
{\it type
} defaults to wxBITMAP
\_TYPE\_BMP\_RESOURCE.
148 Under X,
{\it type
} defaults to wxBITMAP
\_TYPE\_XPM.
152 \helpref{wxBitmap::LoadFile
}{wxbitmaploadfile
}
154 \pythonnote{Constructors supported by wxPython are:
\par
155 \indented{2cm
}{\begin{twocollist
}
156 \twocolitem{{\bf wxBitmap(name, flag)
}}{Loads a bitmap from a file
}
157 \twocolitem{{\bf wxBitmapFromData(data, type, width, height, depth=
1)
}}{Creates
158 a bitmap from the given data, which can be of arbitrary type.
}
159 \twocolitem{{\bf wxNoRefBitmap(name, flag)
}}{This one won't own the
160 reference, so Python won't call the destructor, this is good for toolbars
161 and such where the parent will manage the bitmap.
}
162 \twocolitem{{\bf wxEmptyBitmap(width, height, depth = -
1)
}}{Creates an
163 empty bitmap with the given specifications
}
167 \membersection{wxBitmap::
\destruct{wxBitmap
}}
169 \func{}{\destruct{wxBitmap
}}{\void}
171 Destroys the wxBitmap object and possibly the underlying bitmap data.
172 Because reference counting is used, the bitmap may not actually be
173 destroyed at this point - only when the reference count is zero will the
176 If the application omits to delete the bitmap explicitly, the bitmap will be
177 destroyed automatically by wxWindows when the application exits.
179 Do not delete a bitmap that is selected into a memory device context.
181 \membersection{wxBitmap::AddHandler
}\label{wxbitmapaddhandler
}
183 \func{static void
}{AddHandler
}{\param{wxBitmapHandler*
}{ handler
}}
185 Adds a handler to the end of the static list of format handlers.
187 \docparam{handler
}{A new bitmap format handler object. There is usually only one instance
188 of a given handler class in an application session.
}
192 \helpref{wxBitmapHandler
}{wxbitmaphandler
}
194 \membersection{wxBitmap::CleanUpHandlers
}
196 \func{static void
}{CleanUpHandlers
}{\void}
198 Deletes all bitmap handlers.
200 This function is called by wxWindows on exit.
202 \membersection{wxBitmap::Create
}\label{wxbitmapcreate
}
204 \func{virtual bool
}{Create
}{\param{int
}{ width
},
\param{int
}{ height
},
\param{int
}{ depth = -
1}}
206 Creates a fresh bitmap. If the final argument is omitted, the display depth of
209 \func{virtual bool
}{Create
}{\param{void*
}{ data
},
\param{int
}{ type
},
\param{int
}{ width
},
\param{int
}{ height
},
\param{int
}{ depth = -
1}}
211 Creates a bitmap from the given data, which can be of arbitrary type.
213 \wxheading{Parameters
}
215 \docparam{width
}{The width of the bitmap in pixels.
}
217 \docparam{height
}{The height of the bitmap in pixels.
}
219 \docparam{depth
}{The depth of the bitmap in pixels. If this is -
1, the screen depth is used.
}
221 \docparam{data
}{Data whose type depends on the value of
{\it type
}.
}
223 \docparam{type
}{A bitmap type identifier - see
\helpref{wxBitmap::wxBitmap
}{wxbitmapconstr
} for a list
226 \wxheading{Return value
}
228 TRUE if the call succeeded, FALSE otherwise.
232 The first form works on all platforms. The portability of the second form depends on the
237 \helpref{wxBitmap::wxBitmap
}{wxbitmapconstr
}
239 \membersection{wxBitmap::FindHandler
}
241 \func{static wxBitmapHandler*
}{FindHandler
}{\param{const wxString\&
}{name
}}
243 Finds the handler with the given name.
245 \func{static wxBitmapHandler*
}{FindHandler
}{\param{const wxString\&
}{extension
},
\param{long
}{ bitmapType
}}
247 Finds the handler associated with the given extension and type.
249 \func{static wxBitmapHandler*
}{FindHandler
}{\param{long
}{bitmapType
}}
251 Finds the handler associated with the given bitmap type.
253 \docparam{name
}{The handler name.
}
255 \docparam{extension
}{The file extension, such as ``bmp".
}
257 \docparam{bitmapType
}{The bitmap type, such as wxBITMAP
\_TYPE\_BMP.
}
259 \wxheading{Return value
}
261 A pointer to the handler if found, NULL otherwise.
265 \helpref{wxBitmapHandler
}{wxbitmaphandler
}
267 \membersection{wxBitmap::GetDepth
}
269 \constfunc{int
}{GetDepth
}{\void}
271 Gets the colour depth of the bitmap. A value of
1 indicates a
274 \membersection{wxBitmap::GetHandlers
}
276 \func{static wxList\&
}{GetHandlers
}{\void}
278 Returns the static list of bitmap format handlers.
282 \helpref{wxBitmapHandler
}{wxbitmaphandler
}
284 \membersection{wxBitmap::GetHeight
}\label{wxbitmapgetheight
}
286 \constfunc{int
}{GetHeight
}{\void}
288 Gets the height of the bitmap in pixels.
290 \membersection{wxBitmap::GetPalette
}\label{wxbitmapgetpalette
}
292 \constfunc{wxPalette*
}{GetPalette
}{\void}
294 Gets the associated palette (if any) which may have been loaded from a file
295 or set for the bitmap.
299 \helpref{wxPalette
}{wxpalette
}
301 \membersection{wxBitmap::GetMask
}\label{wxbitmapgetmask
}
303 \constfunc{wxMask*
}{GetMask
}{\void}
305 Gets the associated mask (if any) which may have been loaded from a file
306 or set for the bitmap.
310 \helpref{wxBitmap::SetMask
}{wxbitmapsetmask
},
\helpref{wxMask
}{wxmask
}
312 \membersection{wxBitmap::GetWidth
}\label{wxbitmapgetwidth
}
314 \constfunc{int
}{GetWidth
}{\void}
316 Gets the width of the bitmap in pixels.
320 \helpref{wxBitmap::GetHeight
}{wxbitmapgetheight
}
322 \membersection{wxBitmap::GetSubBitmap
}\label{wxbitmapgetsubbitmap
}
324 \constfunc{wxBitmap
}{GetSubBitmap
}{\param{const wxRect\&
}{rect
}}
326 Returns a sub bitmap of the current one as long as the rect belongs entirely to
327 the bitmap. This function preserves bit depth and mask information.
329 \membersection{wxBitmap::InitStandardHandlers
}
331 \func{static void
}{InitStandardHandlers
}{\void}
333 Adds the standard bitmap format handlers, which, depending on wxWindows
334 configuration, can be handlers for Windows bitmap, Windows bitmap resource, and XPM.
336 This function is called by wxWindows on startup.
340 \helpref{wxBitmapHandler
}{wxbitmaphandler
}
342 \membersection{wxBitmap::InsertHandler
}
344 \func{static void
}{InsertHandler
}{\param{wxBitmapHandler*
}{ handler
}}
346 Adds a handler at the start of the static list of format handlers.
348 \docparam{handler
}{A new bitmap format handler object. There is usually only one instance
349 of a given handler class in an application session.
}
353 \helpref{wxBitmapHandler
}{wxbitmaphandler
}
355 \membersection{wxBitmap::LoadFile
}\label{wxbitmaploadfile
}
357 \func{bool
}{LoadFile
}{\param{const wxString\&
}{ name
},
\param{long
}{ type
}}
359 Loads a bitmap from a file or resource.
361 \wxheading{Parameters
}
363 \docparam{name
}{Either a filename or a Windows resource name.
364 The meaning of
{\it name
} is determined by the
{\it type
} parameter.
}
366 \docparam{type
}{One of the following values:
370 \twocolitem{{\bf wxBITMAP
\_TYPE\_BMP}}{Load a Windows bitmap file.
}
371 \twocolitem{{\bf wxBITMAP
\_TYPE\_BMP\_RESOURCE}}{Load a Windows bitmap from the resource database.
}
372 \twocolitem{{\bf wxBITMAP
\_TYPE\_GIF}}{Load a GIF bitmap file.
}
373 \twocolitem{{\bf wxBITMAP
\_TYPE\_XBM}}{Load an X bitmap file.
}
374 \twocolitem{{\bf wxBITMAP
\_TYPE\_XPM}}{Load an XPM bitmap file.
}
377 The validity of these flags depends on the platform and wxWindows configuration.
379 In addition, wxBitmap can read all formats that
\helpref{wxImage
}{wximage
} can
380 (wxBITMAP
\_TYPE\_JPEG, wxBITMAP
\_TYPE\_PNG, wxBITMAP
\_TYPE\_GIF, wxBITMAP
\_TYPE\_PCX, wxBITMAP
\_TYPE\_PNM).
381 (Of course you must have wxImage handlers loaded.)
}
383 \wxheading{Return value
}
385 TRUE if the operation succeeded, FALSE otherwise.
389 A palette may be associated with the bitmap if one exists (especially for
390 colour Windows bitmaps), and if the code supports it. You can check
391 if one has been created by using the
\helpref{GetPalette
}{wxbitmapgetpalette
} member.
395 \helpref{wxBitmap::SaveFile
}{wxbitmapsavefile
}
397 \membersection{wxBitmap::Ok
}\label{wxbitmapok
}
399 \constfunc{bool
}{Ok
}{\void}
401 Returns TRUE if bitmap data is present.
403 \membersection{wxBitmap::RemoveHandler
}
405 \func{static bool
}{RemoveHandler
}{\param{const wxString\&
}{name
}}
407 Finds the handler with the given name, and removes it. The handler
410 \docparam{name
}{The handler name.
}
412 \wxheading{Return value
}
414 TRUE if the handler was found and removed, FALSE otherwise.
418 \helpref{wxBitmapHandler
}{wxbitmaphandler
}
420 \membersection{wxBitmap::SaveFile
}\label{wxbitmapsavefile
}
422 \func{bool
}{SaveFile
}{\param{const wxString\&
}{name
},
\param{int
}{ type
},
\param{wxPalette*
}{palette = NULL
}}
424 Saves a bitmap in the named file.
426 \wxheading{Parameters
}
428 \docparam{name
}{A filename. The meaning of
{\it name
} is determined by the
{\it type
} parameter.
}
430 \docparam{type
}{One of the following values:
434 \twocolitem{{\bf wxBITMAP
\_TYPE\_BMP}}{Save a Windows bitmap file.
}
435 \twocolitem{{\bf wxBITMAP
\_TYPE\_GIF}}{Save a GIF bitmap file.
}
436 \twocolitem{{\bf wxBITMAP
\_TYPE\_XBM}}{Save an X bitmap file.
}
437 \twocolitem{{\bf wxBITMAP
\_TYPE\_XPM}}{Save an XPM bitmap file.
}
440 The validity of these flags depends on the platform and wxWindows configuration.
442 In addition, wxBitmap can save all formats that
\helpref{wxImage
}{wximage
} can
443 (wxBITMAP
\_TYPE\_JPEG, wxBITMAP
\_TYPE\_PNG).
444 (Of course you must have wxImage handlers loaded.)
}
446 \docparam{palette
}{An optional palette used for saving the bitmap.
}
447 % TODO: this parameter should
448 %probably be eliminated; instead the app should set the palette before saving.
450 \wxheading{Return value
}
452 TRUE if the operation succeeded, FALSE otherwise.
456 Depending on how wxWindows has been configured, not all formats may be available.
460 \helpref{wxBitmap::LoadFile
}{wxbitmaploadfile
}
462 \membersection{wxBitmap::SetDepth
}\label{wxbitmapsetdepth
}
464 \func{void
}{SetDepth
}{\param{int
}{depth
}}
466 Sets the depth member (does not affect the bitmap data).
468 \wxheading{Parameters
}
470 \docparam{depth
}{Bitmap depth.
}
472 \membersection{wxBitmap::SetHeight
}\label{wxbitmapsetheight
}
474 \func{void
}{SetHeight
}{\param{int
}{height
}}
476 Sets the height member (does not affect the bitmap data).
478 \wxheading{Parameters
}
480 \docparam{height
}{Bitmap height in pixels.
}
482 \membersection{wxBitmap::SetMask
}\label{wxbitmapsetmask
}
484 \func{void
}{SetMask
}{\param{wxMask*
}{mask
}}
486 Sets the mask for this bitmap.
490 The bitmap object owns the mask once this has been called.
494 \helpref{wxBitmap::GetMask
}{wxbitmapgetmask
},
\helpref{wxMask
}{wxmask
}
496 \membersection{wxBitmap::SetOk
}
498 \func{void
}{SetOk
}{\param{int
}{isOk
}}
500 Sets the validity member (does not affect the bitmap data).
502 \wxheading{Parameters
}
504 \docparam{isOk
}{Validity flag.
}
506 \membersection{wxBitmap::SetPalette
}\label{wxbitmapsetpalette
}
508 \func{void
}{SetPalette
}{\param{const wxPalette\&
}{palette
}}
510 Sets the associated palette.
512 \wxheading{Parameters
}
514 \docparam{palette
}{The palette to set.
}
518 \helpref{wxPalette
}{wxpalette
}
520 \membersection{wxBitmap::SetWidth
}
522 \func{void
}{SetWidth
}{\param{int
}{width
}}
524 Sets the width member (does not affect the bitmap data).
526 \wxheading{Parameters
}
528 \docparam{width
}{Bitmap width in pixels.
}
530 \membersection{wxBitmap::operator $=$
}
532 \func{wxBitmap\&
}{operator $=$
}{\param{const wxBitmap\&
}{bitmap
}}
534 Assignment operator. This operator does not copy any data, but instead
535 passes a pointer to the data in
{\it bitmap
} and increments a reference
536 counter. It is a fast operation.
538 \wxheading{Parameters
}
540 \docparam{bitmap
}{Bitmap to assign.
}
542 \wxheading{Return value
}
544 Returns 'this' object.
546 \membersection{wxBitmap::operator $==$
}
548 \func{bool
}{operator $==$
}{\param{const wxBitmap\&
}{bitmap
}}
550 Equality operator. This operator tests whether the internal data pointers are
553 \wxheading{Parameters
}
555 \docparam{bitmap
}{Bitmap to compare with 'this'
}
557 \wxheading{Return value
}
559 Returns TRUE if the bitmaps were effectively equal, FALSE otherwise.
561 \membersection{wxBitmap::operator $!=$
}
563 \func{bool
}{operator $!=$
}{\param{const wxBitmap\&
}{bitmap
}}
565 Inequality operator. This operator tests whether the internal data pointers are
566 unequal (a fast test).
568 \wxheading{Parameters
}
570 \docparam{bitmap
}{Bitmap to compare with 'this'
}
572 \wxheading{Return value
}
574 Returns TRUE if the bitmaps were unequal, FALSE otherwise.
576 \section{\class{wxBitmapHandler
}}\label{wxbitmaphandler
}
578 \overview{Overview
}{wxbitmapoverview
}
580 This is the base class for implementing bitmap file loading/saving, and bitmap creation from data.
581 It is used within wxBitmap and is not normally seen by the application.
583 If you wish to extend the capabilities of wxBitmap, derive a class from wxBitmapHandler
584 and add the handler using
\helpref{wxBitmap::AddHandler
}{wxbitmapaddhandler
} in your
585 application initialisation.
587 \wxheading{Derived from
}
589 \helpref{wxObject
}{wxobject
}
591 \wxheading{Include files
}
597 \helpref{wxBitmap
}{wxbitmap
},
\helpref{wxIcon
}{wxicon
},
\helpref{wxCursor
}{wxcursor
}
599 \latexignore{\rtfignore{\wxheading{Members
}}}
601 \membersection{wxBitmapHandler::wxBitmapHandler
}\label{wxbitmaphandlerconstr
}
603 \func{}{wxBitmapHandler
}{\void}
605 Default constructor. In your own default constructor, initialise the members
606 m
\_name, m
\_extension and m
\_type.
608 \membersection{wxBitmapHandler::
\destruct{wxBitmapHandler
}}
610 \func{}{\destruct{wxBitmapHandler
}}{\void}
612 Destroys the wxBitmapHandler object.
614 \membersection{wxBitmapHandler::Create
}
616 \func{virtual bool
}{Create
}{\param{wxBitmap*
}{bitmap
},
\param{void*
}{ data
},
\param{int
}{ type
},
\param{int
}{ width
},
\param{int
}{ height
},
\param{int
}{ depth = -
1}}
618 Creates a bitmap from the given data, which can be of arbitrary type. The wxBitmap object
{\it bitmap
} is
619 manipulated by this function.
621 \wxheading{Parameters
}
623 \docparam{bitmap
}{The wxBitmap object.
}
625 \docparam{width
}{The width of the bitmap in pixels.
}
627 \docparam{height
}{The height of the bitmap in pixels.
}
629 \docparam{depth
}{The depth of the bitmap in pixels. If this is -
1, the screen depth is used.
}
631 \docparam{data
}{Data whose type depends on the value of
{\it type
}.
}
633 \docparam{type
}{A bitmap type identifier - see
\helpref{wxBitmapHandler::wxBitmapHandler
}{wxbitmapconstr
} for a list
636 \wxheading{Return value
}
638 TRUE if the call succeeded, FALSE otherwise (the default).
640 \membersection{wxBitmapHandler::GetName
}
642 \constfunc{wxString
}{GetName
}{\void}
644 Gets the name of this handler.
646 \membersection{wxBitmapHandler::GetExtension
}
648 \constfunc{wxString
}{GetExtension
}{\void}
650 Gets the file extension associated with this handler.
652 \membersection{wxBitmapHandler::GetType
}
654 \constfunc{long
}{GetType
}{\void}
656 Gets the bitmap type associated with this handler.
658 \membersection{wxBitmapHandler::LoadFile
}\label{wxbitmaphandlerloadfile
}
660 \func{bool
}{LoadFile
}{\param{wxBitmap*
}{bitmap
},
\param{const wxString\&
}{ name
},
\param{long
}{ type
}}
662 Loads a bitmap from a file or resource, putting the resulting data into
{\it bitmap
}.
664 \wxheading{Parameters
}
666 \docparam{bitmap
}{The bitmap object which is to be affected by this operation.
}
668 \docparam{name
}{Either a filename or a Windows resource name.
669 The meaning of
{\it name
} is determined by the
{\it type
} parameter.
}
671 \docparam{type
}{See
\helpref{wxBitmap::wxBitmap
}{wxbitmapconstr
} for values this can take.
}
673 \wxheading{Return value
}
675 TRUE if the operation succeeded, FALSE otherwise.
679 \helpref{wxBitmap::LoadFile
}{wxbitmaploadfile
}\\
680 \helpref{wxBitmap::SaveFile
}{wxbitmapsavefile
}\\
681 \helpref{wxBitmapHandler::SaveFile
}{wxbitmaphandlersavefile
}
683 \membersection{wxBitmapHandler::SaveFile
}\label{wxbitmaphandlersavefile
}
685 \func{bool
}{SaveFile
}{\param{wxBitmap*
}{bitmap
},
\param{const wxString\&
}{name
},
\param{int
}{ type
},
\param{wxPalette*
}{palette = NULL
}}
687 Saves a bitmap in the named file.
689 \wxheading{Parameters
}
691 \docparam{bitmap
}{The bitmap object which is to be affected by this operation.
}
693 \docparam{name
}{A filename. The meaning of
{\it name
} is determined by the
{\it type
} parameter.
}
695 \docparam{type
}{See
\helpref{wxBitmap::wxBitmap
}{wxbitmapconstr
} for values this can take.
}
697 \docparam{palette
}{An optional palette used for saving the bitmap.
}
699 \wxheading{Return value
}
701 TRUE if the operation succeeded, FALSE otherwise.
705 \helpref{wxBitmap::LoadFile
}{wxbitmaploadfile
}\\
706 \helpref{wxBitmap::SaveFile
}{wxbitmapsavefile
}\\
707 \helpref{wxBitmapHandler::LoadFile
}{wxbitmaphandlerloadfile
}
709 \membersection{wxBitmapHandler::SetName
}
711 \func{void
}{SetName
}{\param{const wxString\&
}{name
}}
713 Sets the handler name.
715 \wxheading{Parameters
}
717 \docparam{name
}{Handler name.
}
719 \membersection{wxBitmapHandler::SetExtension
}
721 \func{void
}{SetExtension
}{\param{const wxString\&
}{extension
}}
723 Sets the handler extension.
725 \wxheading{Parameters
}
727 \docparam{extension
}{Handler extension.
}
729 \membersection{wxBitmapHandler::SetType
}
731 \func{void
}{SetType
}{\param{long
}{type
}}
733 Sets the handler type.
735 \wxheading{Parameters
}
737 \docparam{name
}{Handler type.
}