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 \func{}{wxBitmap
}{\param{const wxImage\&
}{ img
},
\param{int
}{ depth = -
1}}
79 Creates bitmap object from the image. This has to be done
80 to actually display an image as you cannot draw an image directly on a window.
81 The resulting bitmap will use the provided colour depth (or that of the
82 current system if depth is -
1) which entails that a colour reduction has
85 When in
8-bit mode (PseudoColour mode), the GTK port will use a
color cube created
86 on program start-up to look up colors. This ensures a very fast conversion, but
87 the image quality won't be perfect (and could be better for photo images using more
88 sophisticated dithering algorithms).
90 On Windows, if there is a palette present (set with SetPalette), it will be used when
91 creating the wxBitmap (most useful in
8-bit display mode). On other platforms,
92 the palette is currently ignored.
94 \wxheading{Parameters
}
96 \docparam{bits
}{Specifies an array of pixel values.
}
98 \docparam{width
}{Specifies the width of the bitmap.
}
100 \docparam{height
}{Specifies the height of the bitmap.
}
102 \docparam{depth
}{Specifies the depth of the bitmap. If this is omitted, the display depth of the
105 \docparam{name
}{This can refer to a resource name under MS Windows, or a filename under MS Windows and X.
106 Its meaning is determined by the
{\it type
} parameter.
}
108 \docparam{type
}{May be one of the following:
112 \twocolitem{\indexit{wxBITMAP
\_TYPE\_BMP}}{Load a Windows bitmap file.
}
113 \twocolitem{\indexit{wxBITMAP
\_TYPE\_BMP\_RESOURCE}}{Load a Windows bitmap from the resource database.
}
114 \twocolitem{\indexit{wxBITMAP
\_TYPE\_GIF}}{Load a GIF bitmap file.
}
115 \twocolitem{\indexit{wxBITMAP
\_TYPE\_XBM}}{Load an X bitmap file.
}
116 \twocolitem{\indexit{wxBITMAP
\_TYPE\_XPM}}{Load an XPM bitmap file.
}
117 \twocolitem{\indexit{wxBITMAP
\_TYPE\_RESOURCE}}{Load a Windows resource name.
}
120 The validity of these flags depends on the platform and wxWindows configuration.
121 If all possible wxWindows settings are used, the Windows platform supports BMP file, BMP resource,
122 XPM data, and XPM. Under wxGTK, the available formats are BMP file, XPM data, XPM file, and PNG file.
123 Under wxMotif, the available formats are XBM data, XBM file, XPM data, XPM file.
125 In addition, wxBitmap can read all formats that
\helpref{wxImage
}{wximage
} can, which currently include
126 wxBITMAP
\_TYPE\_JPEG, wxBITMAP
\_TYPE\_TIF, wxBITMAP
\_TYPE\_PNG, wxBITMAP
\_TYPE\_GIF, wxBITMAP
\_TYPE\_PCX,
127 and wxBITMAP
\_TYPE\_PNM. Of course, you must have wxImage handlers loaded.
}
129 \docparam{img
}{Platform-independent wxImage object.
}
133 The first form constructs a bitmap object with no data; an assignment or another member function such as Create
134 or LoadFile must be called subsequently.
136 The second and third forms provide copy constructors. Note that these do not copy the
137 bitmap data, but instead a pointer to the data, keeping a reference count. They are therefore
138 very efficient operations.
140 The fourth form constructs a bitmap from data whose type and value depends on
141 the value of the
{\it type
} argument.
143 The fifth form constructs a (usually monochrome) bitmap from an array of pixel values, under both
146 The sixth form constructs a new bitmap.
148 The seventh form constructs a bitmap from pixmap (XPM) data, if wxWindows has been configured
149 to incorporate this feature.
151 To use this constructor, you must first include an XPM file. For
152 example, assuming that the file
{\tt mybitmap.xpm
} contains an XPM array
153 of character pointers called mybitmap:
156 #include "mybitmap.xpm"
160 wxBitmap *bitmap = new wxBitmap(mybitmap);
163 The eighth form constructs a bitmap from a file or resource.
{\it name
} can refer
164 to a resource name under MS Windows, or a filename under MS Windows and X.
166 Under Windows,
{\it type
} defaults to wxBITMAP
\_TYPE\_BMP\_RESOURCE.
167 Under X,
{\it type
} defaults to wxBITMAP
\_TYPE\_XPM.
171 \helpref{wxBitmap::LoadFile
}{wxbitmaploadfile
}
173 \pythonnote{Constructors supported by wxPython are:
\par
174 \indented{2cm
}{\begin{twocollist
}
175 \twocolitem{{\bf wxBitmap(name, flag)
}}{Loads a bitmap from a file
}
176 \twocolitem{{\bf wxBitmapFromData(data, type, width, height, depth=
1)
}}{Creates
177 a bitmap from the given data, which can be of arbitrary type.
}
178 \twocolitem{{\bf wxNoRefBitmap(name, flag)
}}{This one won't own the
179 reference, so Python won't call the destructor, this is good for toolbars
180 and such where the parent will manage the bitmap.
}
181 \twocolitem{{\bf wxEmptyBitmap(width, height, depth = -
1)
}}{Creates an
182 empty bitmap with the given specifications
}
186 \perlnote{Constructors supported by wxPerl are:
\par
188 \item{Wx::Bitmap->new( width, height, depth = -
1 )
}
189 \item{Wx::Bitmap->new( name, type )
}
190 \item{Wx::Bitmap->new( icon )
}
194 \membersection{wxBitmap::
\destruct{wxBitmap
}}
196 \func{}{\destruct{wxBitmap
}}{\void}
198 Destroys the wxBitmap object and possibly the underlying bitmap data.
199 Because reference counting is used, the bitmap may not actually be
200 destroyed at this point - only when the reference count is zero will the
203 If the application omits to delete the bitmap explicitly, the bitmap will be
204 destroyed automatically by wxWindows when the application exits.
206 Do not delete a bitmap that is selected into a memory device context.
208 \membersection{wxBitmap::AddHandler
}\label{wxbitmapaddhandler
}
210 \func{static void
}{AddHandler
}{\param{wxBitmapHandler*
}{ handler
}}
212 Adds a handler to the end of the static list of format handlers.
214 \docparam{handler
}{A new bitmap format handler object. There is usually only one instance
215 of a given handler class in an application session.
}
219 \helpref{wxBitmapHandler
}{wxbitmaphandler
}
221 \membersection{wxBitmap::CleanUpHandlers
}
223 \func{static void
}{CleanUpHandlers
}{\void}
225 Deletes all bitmap handlers.
227 This function is called by wxWindows on exit.
229 \membersection{wxBitmap::ConvertToImage
}\label{wxbitmapconverttoimage
}
231 \func{wxImage
}{ConvertToImage
}{\void}
233 Creates an image from a platform-dependent bitmap. This preserves
234 mask information so that bitmaps and images can be converted back
235 and forth without loss in that respect.
237 \membersection{wxBitmap::Create
}\label{wxbitmapcreate
}
239 \func{virtual bool
}{Create
}{\param{int
}{ width
},
\param{int
}{ height
},
\param{int
}{ depth = -
1}}
241 Creates a fresh bitmap. If the final argument is omitted, the display depth of
244 \func{virtual bool
}{Create
}{\param{void*
}{ data
},
\param{int
}{ type
},
\param{int
}{ width
},
\param{int
}{ height
},
\param{int
}{ depth = -
1}}
246 Creates a bitmap from the given data, which can be of arbitrary type.
248 \wxheading{Parameters
}
250 \docparam{width
}{The width of the bitmap in pixels.
}
252 \docparam{height
}{The height of the bitmap in pixels.
}
254 \docparam{depth
}{The depth of the bitmap in pixels. If this is -
1, the screen depth is used.
}
256 \docparam{data
}{Data whose type depends on the value of
{\it type
}.
}
258 \docparam{type
}{A bitmap type identifier - see
\helpref{wxBitmap::wxBitmap
}{wxbitmapconstr
} for a list
261 \wxheading{Return value
}
263 TRUE if the call succeeded, FALSE otherwise.
267 The first form works on all platforms. The portability of the second form depends on the
272 \helpref{wxBitmap::wxBitmap
}{wxbitmapconstr
}
274 \membersection{wxBitmap::FindHandler
}
276 \func{static wxBitmapHandler*
}{FindHandler
}{\param{const wxString\&
}{name
}}
278 Finds the handler with the given name.
280 \func{static wxBitmapHandler*
}{FindHandler
}{\param{const wxString\&
}{extension
},
\param{long
}{ bitmapType
}}
282 Finds the handler associated with the given extension and type.
284 \func{static wxBitmapHandler*
}{FindHandler
}{\param{long
}{bitmapType
}}
286 Finds the handler associated with the given bitmap type.
288 \docparam{name
}{The handler name.
}
290 \docparam{extension
}{The file extension, such as ``bmp".
}
292 \docparam{bitmapType
}{The bitmap type, such as wxBITMAP
\_TYPE\_BMP.
}
294 \wxheading{Return value
}
296 A pointer to the handler if found, NULL otherwise.
300 \helpref{wxBitmapHandler
}{wxbitmaphandler
}
302 \membersection{wxBitmap::GetDepth
}
304 \constfunc{int
}{GetDepth
}{\void}
306 Gets the colour depth of the bitmap. A value of
1 indicates a
309 \membersection{wxBitmap::GetHandlers
}
311 \func{static wxList\&
}{GetHandlers
}{\void}
313 Returns the static list of bitmap format handlers.
317 \helpref{wxBitmapHandler
}{wxbitmaphandler
}
319 \membersection{wxBitmap::GetHeight
}\label{wxbitmapgetheight
}
321 \constfunc{int
}{GetHeight
}{\void}
323 Gets the height of the bitmap in pixels.
325 \membersection{wxBitmap::GetPalette
}\label{wxbitmapgetpalette
}
327 \constfunc{wxPalette*
}{GetPalette
}{\void}
329 Gets the associated palette (if any) which may have been loaded from a file
330 or set for the bitmap.
334 \helpref{wxPalette
}{wxpalette
}
336 \membersection{wxBitmap::GetMask
}\label{wxbitmapgetmask
}
338 \constfunc{wxMask*
}{GetMask
}{\void}
340 Gets the associated mask (if any) which may have been loaded from a file
341 or set for the bitmap.
345 \helpref{wxBitmap::SetMask
}{wxbitmapsetmask
},
\helpref{wxMask
}{wxmask
}
347 \membersection{wxBitmap::GetWidth
}\label{wxbitmapgetwidth
}
349 \constfunc{int
}{GetWidth
}{\void}
351 Gets the width of the bitmap in pixels.
355 \helpref{wxBitmap::GetHeight
}{wxbitmapgetheight
}
357 \membersection{wxBitmap::GetSubBitmap
}\label{wxbitmapgetsubbitmap
}
359 \constfunc{wxBitmap
}{GetSubBitmap
}{\param{const wxRect\&
}{rect
}}
361 Returns a sub bitmap of the current one as long as the rect belongs entirely to
362 the bitmap. This function preserves bit depth and mask information.
364 \membersection{wxBitmap::InitStandardHandlers
}
366 \func{static void
}{InitStandardHandlers
}{\void}
368 Adds the standard bitmap format handlers, which, depending on wxWindows
369 configuration, can be handlers for Windows bitmap, Windows bitmap resource, and XPM.
371 This function is called by wxWindows on startup.
375 \helpref{wxBitmapHandler
}{wxbitmaphandler
}
377 \membersection{wxBitmap::InsertHandler
}
379 \func{static void
}{InsertHandler
}{\param{wxBitmapHandler*
}{ handler
}}
381 Adds a handler at the start of the static list of format handlers.
383 \docparam{handler
}{A new bitmap format handler object. There is usually only one instance
384 of a given handler class in an application session.
}
388 \helpref{wxBitmapHandler
}{wxbitmaphandler
}
390 \membersection{wxBitmap::LoadFile
}\label{wxbitmaploadfile
}
392 \func{bool
}{LoadFile
}{\param{const wxString\&
}{ name
},
\param{long
}{ type
}}
394 Loads a bitmap from a file or resource.
396 \wxheading{Parameters
}
398 \docparam{name
}{Either a filename or a Windows resource name.
399 The meaning of
{\it name
} is determined by the
{\it type
} parameter.
}
401 \docparam{type
}{One of the following values:
405 \twocolitem{{\bf wxBITMAP
\_TYPE\_BMP}}{Load a Windows bitmap file.
}
406 \twocolitem{{\bf wxBITMAP
\_TYPE\_BMP\_RESOURCE}}{Load a Windows bitmap from the resource database.
}
407 \twocolitem{{\bf wxBITMAP
\_TYPE\_GIF}}{Load a GIF bitmap file.
}
408 \twocolitem{{\bf wxBITMAP
\_TYPE\_XBM}}{Load an X bitmap file.
}
409 \twocolitem{{\bf wxBITMAP
\_TYPE\_XPM}}{Load an XPM bitmap file.
}
412 The validity of these flags depends on the platform and wxWindows configuration.
414 In addition, wxBitmap can read all formats that
\helpref{wxImage
}{wximage
} can
415 (wxBITMAP
\_TYPE\_JPEG, wxBITMAP
\_TYPE\_PNG, wxBITMAP
\_TYPE\_GIF, wxBITMAP
\_TYPE\_PCX, wxBITMAP
\_TYPE\_PNM).
416 (Of course you must have wxImage handlers loaded.)
}
418 \wxheading{Return value
}
420 TRUE if the operation succeeded, FALSE otherwise.
424 A palette may be associated with the bitmap if one exists (especially for
425 colour Windows bitmaps), and if the code supports it. You can check
426 if one has been created by using the
\helpref{GetPalette
}{wxbitmapgetpalette
} member.
430 \helpref{wxBitmap::SaveFile
}{wxbitmapsavefile
}
432 \membersection{wxBitmap::Ok
}\label{wxbitmapok
}
434 \constfunc{bool
}{Ok
}{\void}
436 Returns TRUE if bitmap data is present.
438 \membersection{wxBitmap::RemoveHandler
}
440 \func{static bool
}{RemoveHandler
}{\param{const wxString\&
}{name
}}
442 Finds the handler with the given name, and removes it. The handler
445 \docparam{name
}{The handler name.
}
447 \wxheading{Return value
}
449 TRUE if the handler was found and removed, FALSE otherwise.
453 \helpref{wxBitmapHandler
}{wxbitmaphandler
}
455 \membersection{wxBitmap::SaveFile
}\label{wxbitmapsavefile
}
457 \func{bool
}{SaveFile
}{\param{const wxString\&
}{name
},
\param{int
}{ type
},
\param{wxPalette*
}{palette = NULL
}}
459 Saves a bitmap in the named file.
461 \wxheading{Parameters
}
463 \docparam{name
}{A filename. The meaning of
{\it name
} is determined by the
{\it type
} parameter.
}
465 \docparam{type
}{One of the following values:
469 \twocolitem{{\bf wxBITMAP
\_TYPE\_BMP}}{Save a Windows bitmap file.
}
470 \twocolitem{{\bf wxBITMAP
\_TYPE\_GIF}}{Save a GIF bitmap file.
}
471 \twocolitem{{\bf wxBITMAP
\_TYPE\_XBM}}{Save an X bitmap file.
}
472 \twocolitem{{\bf wxBITMAP
\_TYPE\_XPM}}{Save an XPM bitmap file.
}
475 The validity of these flags depends on the platform and wxWindows configuration.
477 In addition, wxBitmap can save all formats that
\helpref{wxImage
}{wximage
} can
478 (wxBITMAP
\_TYPE\_JPEG, wxBITMAP
\_TYPE\_PNG).
479 (Of course you must have wxImage handlers loaded.)
}
481 \docparam{palette
}{An optional palette used for saving the bitmap.
}
482 % TODO: this parameter should
483 %probably be eliminated; instead the app should set the palette before saving.
485 \wxheading{Return value
}
487 TRUE if the operation succeeded, FALSE otherwise.
491 Depending on how wxWindows has been configured, not all formats may be available.
495 \helpref{wxBitmap::LoadFile
}{wxbitmaploadfile
}
497 \membersection{wxBitmap::SetDepth
}\label{wxbitmapsetdepth
}
499 \func{void
}{SetDepth
}{\param{int
}{depth
}}
501 Sets the depth member (does not affect the bitmap data).
503 \wxheading{Parameters
}
505 \docparam{depth
}{Bitmap depth.
}
507 \membersection{wxBitmap::SetHeight
}\label{wxbitmapsetheight
}
509 \func{void
}{SetHeight
}{\param{int
}{height
}}
511 Sets the height member (does not affect the bitmap data).
513 \wxheading{Parameters
}
515 \docparam{height
}{Bitmap height in pixels.
}
517 \membersection{wxBitmap::SetMask
}\label{wxbitmapsetmask
}
519 \func{void
}{SetMask
}{\param{wxMask*
}{mask
}}
521 Sets the mask for this bitmap.
525 The bitmap object owns the mask once this has been called.
529 \helpref{wxBitmap::GetMask
}{wxbitmapgetmask
},
\helpref{wxMask
}{wxmask
}
531 \membersection{wxBitmap::SetOk
}
533 \func{void
}{SetOk
}{\param{int
}{isOk
}}
535 Sets the validity member (does not affect the bitmap data).
537 \wxheading{Parameters
}
539 \docparam{isOk
}{Validity flag.
}
541 \membersection{wxBitmap::SetPalette
}\label{wxbitmapsetpalette
}
543 \func{void
}{SetPalette
}{\param{const wxPalette\&
}{palette
}}
545 Sets the associated palette.
547 \wxheading{Parameters
}
549 \docparam{palette
}{The palette to set.
}
553 \helpref{wxPalette
}{wxpalette
}
555 \membersection{wxBitmap::SetWidth
}
557 \func{void
}{SetWidth
}{\param{int
}{width
}}
559 Sets the width member (does not affect the bitmap data).
561 \wxheading{Parameters
}
563 \docparam{width
}{Bitmap width in pixels.
}
565 \membersection{wxBitmap::operator $=$
}
567 \func{wxBitmap\&
}{operator $=$
}{\param{const wxBitmap\&
}{bitmap
}}
569 Assignment operator. This operator does not copy any data, but instead
570 passes a pointer to the data in
{\it bitmap
} and increments a reference
571 counter. It is a fast operation.
573 \wxheading{Parameters
}
575 \docparam{bitmap
}{Bitmap to assign.
}
577 \wxheading{Return value
}
579 Returns 'this' object.
581 \membersection{wxBitmap::operator $==$
}
583 \func{bool
}{operator $==$
}{\param{const wxBitmap\&
}{bitmap
}}
585 Equality operator. This operator tests whether the internal data pointers are
588 \wxheading{Parameters
}
590 \docparam{bitmap
}{Bitmap to compare with 'this'
}
592 \wxheading{Return value
}
594 Returns TRUE if the bitmaps were effectively equal, FALSE otherwise.
596 \membersection{wxBitmap::operator $!=$
}
598 \func{bool
}{operator $!=$
}{\param{const wxBitmap\&
}{bitmap
}}
600 Inequality operator. This operator tests whether the internal data pointers are
601 unequal (a fast test).
603 \wxheading{Parameters
}
605 \docparam{bitmap
}{Bitmap to compare with 'this'
}
607 \wxheading{Return value
}
609 Returns TRUE if the bitmaps were unequal, FALSE otherwise.
611 \section{\class{wxBitmapHandler
}}\label{wxbitmaphandler
}
613 \overview{Overview
}{wxbitmapoverview
}
615 This is the base class for implementing bitmap file loading/saving, and bitmap creation from data.
616 It is used within wxBitmap and is not normally seen by the application.
618 If you wish to extend the capabilities of wxBitmap, derive a class from wxBitmapHandler
619 and add the handler using
\helpref{wxBitmap::AddHandler
}{wxbitmapaddhandler
} in your
620 application initialisation.
622 \wxheading{Derived from
}
624 \helpref{wxObject
}{wxobject
}
626 \wxheading{Include files
}
632 \helpref{wxBitmap
}{wxbitmap
},
\helpref{wxIcon
}{wxicon
},
\helpref{wxCursor
}{wxcursor
}
634 \latexignore{\rtfignore{\wxheading{Members
}}}
636 \membersection{wxBitmapHandler::wxBitmapHandler
}\label{wxbitmaphandlerconstr
}
638 \func{}{wxBitmapHandler
}{\void}
640 Default constructor. In your own default constructor, initialise the members
641 m
\_name, m
\_extension and m
\_type.
643 \membersection{wxBitmapHandler::
\destruct{wxBitmapHandler
}}
645 \func{}{\destruct{wxBitmapHandler
}}{\void}
647 Destroys the wxBitmapHandler object.
649 \membersection{wxBitmapHandler::Create
}
651 \func{virtual bool
}{Create
}{\param{wxBitmap*
}{bitmap
},
\param{void*
}{ data
},
\param{int
}{ type
},
\param{int
}{ width
},
\param{int
}{ height
},
\param{int
}{ depth = -
1}}
653 Creates a bitmap from the given data, which can be of arbitrary type. The wxBitmap object
{\it bitmap
} is
654 manipulated by this function.
656 \wxheading{Parameters
}
658 \docparam{bitmap
}{The wxBitmap object.
}
660 \docparam{width
}{The width of the bitmap in pixels.
}
662 \docparam{height
}{The height of the bitmap in pixels.
}
664 \docparam{depth
}{The depth of the bitmap in pixels. If this is -
1, the screen depth is used.
}
666 \docparam{data
}{Data whose type depends on the value of
{\it type
}.
}
668 \docparam{type
}{A bitmap type identifier - see
\helpref{wxBitmapHandler::wxBitmapHandler
}{wxbitmapconstr
} for a list
671 \wxheading{Return value
}
673 TRUE if the call succeeded, FALSE otherwise (the default).
675 \membersection{wxBitmapHandler::GetName
}
677 \constfunc{wxString
}{GetName
}{\void}
679 Gets the name of this handler.
681 \membersection{wxBitmapHandler::GetExtension
}
683 \constfunc{wxString
}{GetExtension
}{\void}
685 Gets the file extension associated with this handler.
687 \membersection{wxBitmapHandler::GetType
}
689 \constfunc{long
}{GetType
}{\void}
691 Gets the bitmap type associated with this handler.
693 \membersection{wxBitmapHandler::LoadFile
}\label{wxbitmaphandlerloadfile
}
695 \func{bool
}{LoadFile
}{\param{wxBitmap*
}{bitmap
},
\param{const wxString\&
}{ name
},
\param{long
}{ type
}}
697 Loads a bitmap from a file or resource, putting the resulting data into
{\it bitmap
}.
699 \wxheading{Parameters
}
701 \docparam{bitmap
}{The bitmap object which is to be affected by this operation.
}
703 \docparam{name
}{Either a filename or a Windows resource name.
704 The meaning of
{\it name
} is determined by the
{\it type
} parameter.
}
706 \docparam{type
}{See
\helpref{wxBitmap::wxBitmap
}{wxbitmapconstr
} for values this can take.
}
708 \wxheading{Return value
}
710 TRUE if the operation succeeded, FALSE otherwise.
714 \helpref{wxBitmap::LoadFile
}{wxbitmaploadfile
}\\
715 \helpref{wxBitmap::SaveFile
}{wxbitmapsavefile
}\\
716 \helpref{wxBitmapHandler::SaveFile
}{wxbitmaphandlersavefile
}
718 \membersection{wxBitmapHandler::SaveFile
}\label{wxbitmaphandlersavefile
}
720 \func{bool
}{SaveFile
}{\param{wxBitmap*
}{bitmap
},
\param{const wxString\&
}{name
},
\param{int
}{ type
},
\param{wxPalette*
}{palette = NULL
}}
722 Saves a bitmap in the named file.
724 \wxheading{Parameters
}
726 \docparam{bitmap
}{The bitmap object which is to be affected by this operation.
}
728 \docparam{name
}{A filename. The meaning of
{\it name
} is determined by the
{\it type
} parameter.
}
730 \docparam{type
}{See
\helpref{wxBitmap::wxBitmap
}{wxbitmapconstr
} for values this can take.
}
732 \docparam{palette
}{An optional palette used for saving the bitmap.
}
734 \wxheading{Return value
}
736 TRUE if the operation succeeded, FALSE otherwise.
740 \helpref{wxBitmap::LoadFile
}{wxbitmaploadfile
}\\
741 \helpref{wxBitmap::SaveFile
}{wxbitmapsavefile
}\\
742 \helpref{wxBitmapHandler::LoadFile
}{wxbitmaphandlerloadfile
}
744 \membersection{wxBitmapHandler::SetName
}
746 \func{void
}{SetName
}{\param{const wxString\&
}{name
}}
748 Sets the handler name.
750 \wxheading{Parameters
}
752 \docparam{name
}{Handler name.
}
754 \membersection{wxBitmapHandler::SetExtension
}
756 \func{void
}{SetExtension
}{\param{const wxString\&
}{extension
}}
758 Sets the handler extension.
760 \wxheading{Parameters
}
762 \docparam{extension
}{Handler extension.
}
764 \membersection{wxBitmapHandler::SetType
}
766 \func{void
}{SetType
}{\param{long
}{type
}}
768 Sets the handler type.
770 \wxheading{Parameters
}
772 \docparam{name
}{Handler type.
}