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{\indexit{wxBITMAP
\_TYPE\_BMP}}{Load a Windows bitmap file.
}
96 \twocolitem{\indexit{wxBITMAP
\_TYPE\_BMP\_RESOURCE}}{Load a Windows bitmap from the resource database.
}
97 \twocolitem{\indexit{wxBITMAP
\_TYPE\_GIF}}{Load a GIF bitmap file.
}
98 \twocolitem{\indexit{wxBITMAP
\_TYPE\_XBM}}{Load an X bitmap file.
}
99 \twocolitem{\indexit{wxBITMAP
\_TYPE\_XPM}}{Load an XPM bitmap file.
}
100 \twocolitem{\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 \perlnote{Constructors supported by wxPerl are:
\par
169 \item{Wx::Bitmap->new( width, height, depth = -
1 )
}
170 \item{Wx::Bitmap->new( name, type )
}
171 \item{Wx::Bitmap->new( icon )
}
175 \membersection{wxBitmap::
\destruct{wxBitmap
}}
177 \func{}{\destruct{wxBitmap
}}{\void}
179 Destroys the wxBitmap object and possibly the underlying bitmap data.
180 Because reference counting is used, the bitmap may not actually be
181 destroyed at this point - only when the reference count is zero will the
184 If the application omits to delete the bitmap explicitly, the bitmap will be
185 destroyed automatically by wxWindows when the application exits.
187 Do not delete a bitmap that is selected into a memory device context.
189 \membersection{wxBitmap::AddHandler
}\label{wxbitmapaddhandler
}
191 \func{static void
}{AddHandler
}{\param{wxBitmapHandler*
}{ handler
}}
193 Adds a handler to the end of the static list of format handlers.
195 \docparam{handler
}{A new bitmap format handler object. There is usually only one instance
196 of a given handler class in an application session.
}
200 \helpref{wxBitmapHandler
}{wxbitmaphandler
}
202 \membersection{wxBitmap::CleanUpHandlers
}
204 \func{static void
}{CleanUpHandlers
}{\void}
206 Deletes all bitmap handlers.
208 This function is called by wxWindows on exit.
210 \membersection{wxBitmap::Create
}\label{wxbitmapcreate
}
212 \func{virtual bool
}{Create
}{\param{int
}{ width
},
\param{int
}{ height
},
\param{int
}{ depth = -
1}}
214 Creates a fresh bitmap. If the final argument is omitted, the display depth of
217 \func{virtual bool
}{Create
}{\param{void*
}{ data
},
\param{int
}{ type
},
\param{int
}{ width
},
\param{int
}{ height
},
\param{int
}{ depth = -
1}}
219 Creates a bitmap from the given data, which can be of arbitrary type.
221 \wxheading{Parameters
}
223 \docparam{width
}{The width of the bitmap in pixels.
}
225 \docparam{height
}{The height of the bitmap in pixels.
}
227 \docparam{depth
}{The depth of the bitmap in pixels. If this is -
1, the screen depth is used.
}
229 \docparam{data
}{Data whose type depends on the value of
{\it type
}.
}
231 \docparam{type
}{A bitmap type identifier - see
\helpref{wxBitmap::wxBitmap
}{wxbitmapconstr
} for a list
234 \wxheading{Return value
}
236 TRUE if the call succeeded, FALSE otherwise.
240 The first form works on all platforms. The portability of the second form depends on the
245 \helpref{wxBitmap::wxBitmap
}{wxbitmapconstr
}
247 \membersection{wxBitmap::FindHandler
}
249 \func{static wxBitmapHandler*
}{FindHandler
}{\param{const wxString\&
}{name
}}
251 Finds the handler with the given name.
253 \func{static wxBitmapHandler*
}{FindHandler
}{\param{const wxString\&
}{extension
},
\param{long
}{ bitmapType
}}
255 Finds the handler associated with the given extension and type.
257 \func{static wxBitmapHandler*
}{FindHandler
}{\param{long
}{bitmapType
}}
259 Finds the handler associated with the given bitmap type.
261 \docparam{name
}{The handler name.
}
263 \docparam{extension
}{The file extension, such as ``bmp".
}
265 \docparam{bitmapType
}{The bitmap type, such as wxBITMAP
\_TYPE\_BMP.
}
267 \wxheading{Return value
}
269 A pointer to the handler if found, NULL otherwise.
273 \helpref{wxBitmapHandler
}{wxbitmaphandler
}
275 \membersection{wxBitmap::GetDepth
}
277 \constfunc{int
}{GetDepth
}{\void}
279 Gets the colour depth of the bitmap. A value of
1 indicates a
282 \membersection{wxBitmap::GetHandlers
}
284 \func{static wxList\&
}{GetHandlers
}{\void}
286 Returns the static list of bitmap format handlers.
290 \helpref{wxBitmapHandler
}{wxbitmaphandler
}
292 \membersection{wxBitmap::GetHeight
}\label{wxbitmapgetheight
}
294 \constfunc{int
}{GetHeight
}{\void}
296 Gets the height of the bitmap in pixels.
298 \membersection{wxBitmap::GetPalette
}\label{wxbitmapgetpalette
}
300 \constfunc{wxPalette*
}{GetPalette
}{\void}
302 Gets the associated palette (if any) which may have been loaded from a file
303 or set for the bitmap.
307 \helpref{wxPalette
}{wxpalette
}
309 \membersection{wxBitmap::GetMask
}\label{wxbitmapgetmask
}
311 \constfunc{wxMask*
}{GetMask
}{\void}
313 Gets the associated mask (if any) which may have been loaded from a file
314 or set for the bitmap.
318 \helpref{wxBitmap::SetMask
}{wxbitmapsetmask
},
\helpref{wxMask
}{wxmask
}
320 \membersection{wxBitmap::GetWidth
}\label{wxbitmapgetwidth
}
322 \constfunc{int
}{GetWidth
}{\void}
324 Gets the width of the bitmap in pixels.
328 \helpref{wxBitmap::GetHeight
}{wxbitmapgetheight
}
330 \membersection{wxBitmap::GetSubBitmap
}\label{wxbitmapgetsubbitmap
}
332 \constfunc{wxBitmap
}{GetSubBitmap
}{\param{const wxRect\&
}{rect
}}
334 Returns a sub bitmap of the current one as long as the rect belongs entirely to
335 the bitmap. This function preserves bit depth and mask information.
337 \membersection{wxBitmap::InitStandardHandlers
}
339 \func{static void
}{InitStandardHandlers
}{\void}
341 Adds the standard bitmap format handlers, which, depending on wxWindows
342 configuration, can be handlers for Windows bitmap, Windows bitmap resource, and XPM.
344 This function is called by wxWindows on startup.
348 \helpref{wxBitmapHandler
}{wxbitmaphandler
}
350 \membersection{wxBitmap::InsertHandler
}
352 \func{static void
}{InsertHandler
}{\param{wxBitmapHandler*
}{ handler
}}
354 Adds a handler at the start of the static list of format handlers.
356 \docparam{handler
}{A new bitmap format handler object. There is usually only one instance
357 of a given handler class in an application session.
}
361 \helpref{wxBitmapHandler
}{wxbitmaphandler
}
363 \membersection{wxBitmap::LoadFile
}\label{wxbitmaploadfile
}
365 \func{bool
}{LoadFile
}{\param{const wxString\&
}{ name
},
\param{long
}{ type
}}
367 Loads a bitmap from a file or resource.
369 \wxheading{Parameters
}
371 \docparam{name
}{Either a filename or a Windows resource name.
372 The meaning of
{\it name
} is determined by the
{\it type
} parameter.
}
374 \docparam{type
}{One of the following values:
378 \twocolitem{{\bf wxBITMAP
\_TYPE\_BMP}}{Load a Windows bitmap file.
}
379 \twocolitem{{\bf wxBITMAP
\_TYPE\_BMP\_RESOURCE}}{Load a Windows bitmap from the resource database.
}
380 \twocolitem{{\bf wxBITMAP
\_TYPE\_GIF}}{Load a GIF bitmap file.
}
381 \twocolitem{{\bf wxBITMAP
\_TYPE\_XBM}}{Load an X bitmap file.
}
382 \twocolitem{{\bf wxBITMAP
\_TYPE\_XPM}}{Load an XPM bitmap file.
}
385 The validity of these flags depends on the platform and wxWindows configuration.
387 In addition, wxBitmap can read all formats that
\helpref{wxImage
}{wximage
} can
388 (wxBITMAP
\_TYPE\_JPEG, wxBITMAP
\_TYPE\_PNG, wxBITMAP
\_TYPE\_GIF, wxBITMAP
\_TYPE\_PCX, wxBITMAP
\_TYPE\_PNM).
389 (Of course you must have wxImage handlers loaded.)
}
391 \wxheading{Return value
}
393 TRUE if the operation succeeded, FALSE otherwise.
397 A palette may be associated with the bitmap if one exists (especially for
398 colour Windows bitmaps), and if the code supports it. You can check
399 if one has been created by using the
\helpref{GetPalette
}{wxbitmapgetpalette
} member.
403 \helpref{wxBitmap::SaveFile
}{wxbitmapsavefile
}
405 \membersection{wxBitmap::Ok
}\label{wxbitmapok
}
407 \constfunc{bool
}{Ok
}{\void}
409 Returns TRUE if bitmap data is present.
411 \membersection{wxBitmap::RemoveHandler
}
413 \func{static bool
}{RemoveHandler
}{\param{const wxString\&
}{name
}}
415 Finds the handler with the given name, and removes it. The handler
418 \docparam{name
}{The handler name.
}
420 \wxheading{Return value
}
422 TRUE if the handler was found and removed, FALSE otherwise.
426 \helpref{wxBitmapHandler
}{wxbitmaphandler
}
428 \membersection{wxBitmap::SaveFile
}\label{wxbitmapsavefile
}
430 \func{bool
}{SaveFile
}{\param{const wxString\&
}{name
},
\param{int
}{ type
},
\param{wxPalette*
}{palette = NULL
}}
432 Saves a bitmap in the named file.
434 \wxheading{Parameters
}
436 \docparam{name
}{A filename. The meaning of
{\it name
} is determined by the
{\it type
} parameter.
}
438 \docparam{type
}{One of the following values:
442 \twocolitem{{\bf wxBITMAP
\_TYPE\_BMP}}{Save a Windows bitmap file.
}
443 \twocolitem{{\bf wxBITMAP
\_TYPE\_GIF}}{Save a GIF bitmap file.
}
444 \twocolitem{{\bf wxBITMAP
\_TYPE\_XBM}}{Save an X bitmap file.
}
445 \twocolitem{{\bf wxBITMAP
\_TYPE\_XPM}}{Save an XPM bitmap file.
}
448 The validity of these flags depends on the platform and wxWindows configuration.
450 In addition, wxBitmap can save all formats that
\helpref{wxImage
}{wximage
} can
451 (wxBITMAP
\_TYPE\_JPEG, wxBITMAP
\_TYPE\_PNG).
452 (Of course you must have wxImage handlers loaded.)
}
454 \docparam{palette
}{An optional palette used for saving the bitmap.
}
455 % TODO: this parameter should
456 %probably be eliminated; instead the app should set the palette before saving.
458 \wxheading{Return value
}
460 TRUE if the operation succeeded, FALSE otherwise.
464 Depending on how wxWindows has been configured, not all formats may be available.
468 \helpref{wxBitmap::LoadFile
}{wxbitmaploadfile
}
470 \membersection{wxBitmap::SetDepth
}\label{wxbitmapsetdepth
}
472 \func{void
}{SetDepth
}{\param{int
}{depth
}}
474 Sets the depth member (does not affect the bitmap data).
476 \wxheading{Parameters
}
478 \docparam{depth
}{Bitmap depth.
}
480 \membersection{wxBitmap::SetHeight
}\label{wxbitmapsetheight
}
482 \func{void
}{SetHeight
}{\param{int
}{height
}}
484 Sets the height member (does not affect the bitmap data).
486 \wxheading{Parameters
}
488 \docparam{height
}{Bitmap height in pixels.
}
490 \membersection{wxBitmap::SetMask
}\label{wxbitmapsetmask
}
492 \func{void
}{SetMask
}{\param{wxMask*
}{mask
}}
494 Sets the mask for this bitmap.
498 The bitmap object owns the mask once this has been called.
502 \helpref{wxBitmap::GetMask
}{wxbitmapgetmask
},
\helpref{wxMask
}{wxmask
}
504 \membersection{wxBitmap::SetOk
}
506 \func{void
}{SetOk
}{\param{int
}{isOk
}}
508 Sets the validity member (does not affect the bitmap data).
510 \wxheading{Parameters
}
512 \docparam{isOk
}{Validity flag.
}
514 \membersection{wxBitmap::SetPalette
}\label{wxbitmapsetpalette
}
516 \func{void
}{SetPalette
}{\param{const wxPalette\&
}{palette
}}
518 Sets the associated palette.
520 \wxheading{Parameters
}
522 \docparam{palette
}{The palette to set.
}
526 \helpref{wxPalette
}{wxpalette
}
528 \membersection{wxBitmap::SetWidth
}
530 \func{void
}{SetWidth
}{\param{int
}{width
}}
532 Sets the width member (does not affect the bitmap data).
534 \wxheading{Parameters
}
536 \docparam{width
}{Bitmap width in pixels.
}
538 \membersection{wxBitmap::operator $=$
}
540 \func{wxBitmap\&
}{operator $=$
}{\param{const wxBitmap\&
}{bitmap
}}
542 Assignment operator. This operator does not copy any data, but instead
543 passes a pointer to the data in
{\it bitmap
} and increments a reference
544 counter. It is a fast operation.
546 \wxheading{Parameters
}
548 \docparam{bitmap
}{Bitmap to assign.
}
550 \wxheading{Return value
}
552 Returns 'this' object.
554 \membersection{wxBitmap::operator $==$
}
556 \func{bool
}{operator $==$
}{\param{const wxBitmap\&
}{bitmap
}}
558 Equality operator. This operator tests whether the internal data pointers are
561 \wxheading{Parameters
}
563 \docparam{bitmap
}{Bitmap to compare with 'this'
}
565 \wxheading{Return value
}
567 Returns TRUE if the bitmaps were effectively equal, FALSE otherwise.
569 \membersection{wxBitmap::operator $!=$
}
571 \func{bool
}{operator $!=$
}{\param{const wxBitmap\&
}{bitmap
}}
573 Inequality operator. This operator tests whether the internal data pointers are
574 unequal (a fast test).
576 \wxheading{Parameters
}
578 \docparam{bitmap
}{Bitmap to compare with 'this'
}
580 \wxheading{Return value
}
582 Returns TRUE if the bitmaps were unequal, FALSE otherwise.
584 \section{\class{wxBitmapHandler
}}\label{wxbitmaphandler
}
586 \overview{Overview
}{wxbitmapoverview
}
588 This is the base class for implementing bitmap file loading/saving, and bitmap creation from data.
589 It is used within wxBitmap and is not normally seen by the application.
591 If you wish to extend the capabilities of wxBitmap, derive a class from wxBitmapHandler
592 and add the handler using
\helpref{wxBitmap::AddHandler
}{wxbitmapaddhandler
} in your
593 application initialisation.
595 \wxheading{Derived from
}
597 \helpref{wxObject
}{wxobject
}
599 \wxheading{Include files
}
605 \helpref{wxBitmap
}{wxbitmap
},
\helpref{wxIcon
}{wxicon
},
\helpref{wxCursor
}{wxcursor
}
607 \latexignore{\rtfignore{\wxheading{Members
}}}
609 \membersection{wxBitmapHandler::wxBitmapHandler
}\label{wxbitmaphandlerconstr
}
611 \func{}{wxBitmapHandler
}{\void}
613 Default constructor. In your own default constructor, initialise the members
614 m
\_name, m
\_extension and m
\_type.
616 \membersection{wxBitmapHandler::
\destruct{wxBitmapHandler
}}
618 \func{}{\destruct{wxBitmapHandler
}}{\void}
620 Destroys the wxBitmapHandler object.
622 \membersection{wxBitmapHandler::Create
}
624 \func{virtual bool
}{Create
}{\param{wxBitmap*
}{bitmap
},
\param{void*
}{ data
},
\param{int
}{ type
},
\param{int
}{ width
},
\param{int
}{ height
},
\param{int
}{ depth = -
1}}
626 Creates a bitmap from the given data, which can be of arbitrary type. The wxBitmap object
{\it bitmap
} is
627 manipulated by this function.
629 \wxheading{Parameters
}
631 \docparam{bitmap
}{The wxBitmap object.
}
633 \docparam{width
}{The width of the bitmap in pixels.
}
635 \docparam{height
}{The height of the bitmap in pixels.
}
637 \docparam{depth
}{The depth of the bitmap in pixels. If this is -
1, the screen depth is used.
}
639 \docparam{data
}{Data whose type depends on the value of
{\it type
}.
}
641 \docparam{type
}{A bitmap type identifier - see
\helpref{wxBitmapHandler::wxBitmapHandler
}{wxbitmapconstr
} for a list
644 \wxheading{Return value
}
646 TRUE if the call succeeded, FALSE otherwise (the default).
648 \membersection{wxBitmapHandler::GetName
}
650 \constfunc{wxString
}{GetName
}{\void}
652 Gets the name of this handler.
654 \membersection{wxBitmapHandler::GetExtension
}
656 \constfunc{wxString
}{GetExtension
}{\void}
658 Gets the file extension associated with this handler.
660 \membersection{wxBitmapHandler::GetType
}
662 \constfunc{long
}{GetType
}{\void}
664 Gets the bitmap type associated with this handler.
666 \membersection{wxBitmapHandler::LoadFile
}\label{wxbitmaphandlerloadfile
}
668 \func{bool
}{LoadFile
}{\param{wxBitmap*
}{bitmap
},
\param{const wxString\&
}{ name
},
\param{long
}{ type
}}
670 Loads a bitmap from a file or resource, putting the resulting data into
{\it bitmap
}.
672 \wxheading{Parameters
}
674 \docparam{bitmap
}{The bitmap object which is to be affected by this operation.
}
676 \docparam{name
}{Either a filename or a Windows resource name.
677 The meaning of
{\it name
} is determined by the
{\it type
} parameter.
}
679 \docparam{type
}{See
\helpref{wxBitmap::wxBitmap
}{wxbitmapconstr
} for values this can take.
}
681 \wxheading{Return value
}
683 TRUE if the operation succeeded, FALSE otherwise.
687 \helpref{wxBitmap::LoadFile
}{wxbitmaploadfile
}\\
688 \helpref{wxBitmap::SaveFile
}{wxbitmapsavefile
}\\
689 \helpref{wxBitmapHandler::SaveFile
}{wxbitmaphandlersavefile
}
691 \membersection{wxBitmapHandler::SaveFile
}\label{wxbitmaphandlersavefile
}
693 \func{bool
}{SaveFile
}{\param{wxBitmap*
}{bitmap
},
\param{const wxString\&
}{name
},
\param{int
}{ type
},
\param{wxPalette*
}{palette = NULL
}}
695 Saves a bitmap in the named file.
697 \wxheading{Parameters
}
699 \docparam{bitmap
}{The bitmap object which is to be affected by this operation.
}
701 \docparam{name
}{A filename. The meaning of
{\it name
} is determined by the
{\it type
} parameter.
}
703 \docparam{type
}{See
\helpref{wxBitmap::wxBitmap
}{wxbitmapconstr
} for values this can take.
}
705 \docparam{palette
}{An optional palette used for saving the bitmap.
}
707 \wxheading{Return value
}
709 TRUE if the operation succeeded, FALSE otherwise.
713 \helpref{wxBitmap::LoadFile
}{wxbitmaploadfile
}\\
714 \helpref{wxBitmap::SaveFile
}{wxbitmapsavefile
}\\
715 \helpref{wxBitmapHandler::LoadFile
}{wxbitmaphandlerloadfile
}
717 \membersection{wxBitmapHandler::SetName
}
719 \func{void
}{SetName
}{\param{const wxString\&
}{name
}}
721 Sets the handler name.
723 \wxheading{Parameters
}
725 \docparam{name
}{Handler name.
}
727 \membersection{wxBitmapHandler::SetExtension
}
729 \func{void
}{SetExtension
}{\param{const wxString\&
}{extension
}}
731 Sets the handler extension.
733 \wxheading{Parameters
}
735 \docparam{extension
}{Handler extension.
}
737 \membersection{wxBitmapHandler::SetType
}
739 \func{void
}{SetType
}{\param{long
}{type
}}
741 Sets the handler type.
743 \wxheading{Parameters
}
745 \docparam{name
}{Handler type.
}