]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/bitmap.tex
a1e0e2dd30b4af9e4d035994dcfa364b720a6f60
[wxWidgets.git] / docs / latex / wx / bitmap.tex
1 \section{\class{wxBitmap}}\label{wxbitmap}
2
3 %\overview{Overview}{wxbitmapoverview}
4 %
5 This class encapsulates the concept of a platform-dependent bitmap,
6 either monochrome or colour.
7
8 \wxheading{Derived from}
9
10 \helpref{wxGDIObject}{wxgdiobject}\\
11 \helpref{wxObject}{wxobject}
12
13 \wxheading{Include files}
14
15 <wx/bitmap.h>
16
17 \wxheading{Predefined objects}
18
19 Objects:
20
21 {\bf wxNullBitmap}
22
23 \wxheading{See also}
24
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}
30
31 \latexignore{\rtfignore{\wxheading{Members}}}
32
33 \membersection{wxBitmap::wxBitmap}\label{wxbitmapconstr}
34
35 \func{}{wxBitmap}{\void}
36
37 Default constructor.
38
39 \func{}{wxBitmap}{\param{const wxBitmap\& }{bitmap}}
40
41 Copy constructor.
42
43 \func{}{wxBitmap}{\param{void*}{ data}, \param{int}{ type}, \param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}}
44
45 Creates a bitmap from the given data, which can be of arbitrary type.
46 Windows only, I think.
47
48 \func{}{wxBitmap}{\param{const char}{ bits[]}, \param{int}{ width}, \param{int}{ height}\\
49 \param{int}{ depth = 1}}
50
51 Creates a bitmap from an array of bits.
52
53 Note that the bit depth is ignored on GTK+ and Motif. If you want to create a bitmap
54 from something else than a 1-bit data array, use the \helpref{wxImage}{wximage} class.
55
56 \func{}{wxBitmap}{\param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}}
57
58 Creates a new bitmap. A depth of -1 indicates the depth of the current screen or
59 visual. Some platforms only support 1 for monochrome and -1 for the current colour
60 setting.
61
62 \func{}{wxBitmap}{\param{const char**}{ bits}}
63
64 Creates a bitmap from XPM data.
65
66 \func{}{wxBitmap}{\param{const wxString\& }{name}, \param{long}{ type}}
67
68 Loads a bitmap from a file or resource.
69
70 \wxheading{Parameters}
71
72 \docparam{bits}{Specifies an array of pixel values.}
73
74 \docparam{width}{Specifies the width of the bitmap.}
75
76 \docparam{height}{Specifies the height of the bitmap.}
77
78 \docparam{depth}{Specifies the depth of the bitmap. If this is omitted, the display depth of the
79 screen is used.}
80
81 \docparam{name}{This can refer to a resource name under MS Windows, or a filename under MS Windows and X.
82 Its meaning is determined by the {\it type} parameter.}
83
84 \docparam{type}{May be one of the following:
85
86 \twocolwidtha{5cm}
87 \begin{twocollist}
88 \twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_BMP}}}{Load a Windows bitmap file.}
89 \twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_BMP\_RESOURCE}}}{Load a Windows bitmap from the resource database.}
90 \twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_GIF}}}{Load a GIF bitmap file.}
91 \twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_XBM}}}{Load an X bitmap file.}
92 \twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_XPM}}}{Load an XPM bitmap file.}
93 \twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_RESOURCE}}}{Load a Windows resource name.}
94 \end{twocollist}
95
96 The validity of these flags depends on the platform and wxWindows configuration.
97 If all possible wxWindows settings are used, the Windows platform supports BMP file, BMP resource,
98 XPM data, and XPM. Under wxGTK, the available formats are BMP file, XPM data, XPM file, and PNG file.
99 Under wxMotif, the available formats are XBM data, XBM file, XPM data, XPM file.}
100
101 \wxheading{Remarks}
102
103 The first form constructs a bitmap object with no data; an assignment or another member function such as Create
104 or LoadFile must be called subsequently.
105
106 The second and third forms provide copy constructors. Note that these do not copy the
107 bitmap data, but instead a pointer to the data, keeping a reference count. They are therefore
108 very efficient operations.
109
110 The fourth form constructs a bitmap from data whose type and value depends on
111 the value of the {\it type} argument.
112
113 The fifth form constructs a (usually monochrome) bitmap from an array of pixel values, under both
114 X and Windows.
115
116 The sixth form constructs a new bitmap.
117
118 The seventh form constructs a bitmap from pixmap (XPM) data, if wxWindows has been configured
119 to incorporate this feature.
120
121 To use this constructor, you must first include an XPM file. For
122 example, assuming that the file {\tt mybitmap.xpm} contains an XPM array
123 of character pointers called mybitmap:
124
125 \begin{verbatim}
126 #include "mybitmap.xpm"
127
128 ...
129
130 wxBitmap *bitmap = new wxBitmap(mybitmap);
131 \end{verbatim}
132
133 The eighth form constructs a bitmap from a file or resource. {\it name} can refer
134 to a resource name under MS Windows, or a filename under MS Windows and X.
135
136 Under Windows, {\it type} defaults to wxBITMAP\_TYPE\_BMP\_RESOURCE.
137 Under X, {\it type} defaults to wxBITMAP\_TYPE\_XPM.
138
139 \wxheading{See also}
140
141 \helpref{wxBitmap::LoadFile}{wxbitmaploadfile}
142
143 \pythonnote{Constructors supported by wxPython are:\par
144 \indented{2cm}{\begin{twocollist}
145 \twocolitem{\bf{wxBitmap(name, flag)}}{Loads a bitmap from a file}
146 \twocolitem{\bf{wxNoRefBitmap(name, flag)}}{This one won't own the
147 reference, so Python won't call the destructor, this is good for toolbars
148 and such where the parent will manage the bitmap.}
149 \twocolitem{\bf{wxEmptyBitmap(width, height, depth = -1)}}{Creates an
150 empty bitmap with the given specifications}
151 \end{twocollist}}
152 }
153
154 \membersection{wxBitmap::\destruct{wxBitmap}}
155
156 \func{}{\destruct{wxBitmap}}{\void}
157
158 Destroys the wxBitmap object and possibly the underlying bitmap data.
159 Because reference counting is used, the bitmap may not actually be
160 destroyed at this point - only when the reference count is zero will the
161 data be deleted.
162
163 If the application omits to delete the bitmap explicitly, the bitmap will be
164 destroyed automatically by wxWindows when the application exits.
165
166 Do not delete a bitmap that is selected into a memory device context.
167
168 \membersection{wxBitmap::AddHandler}\label{wxbitmapaddhandler}
169
170 \func{static void}{AddHandler}{\param{wxBitmapHandler*}{ handler}}
171
172 Adds a handler to the end of the static list of format handlers.
173
174 \docparam{handler}{A new bitmap format handler object. There is usually only one instance
175 of a given handler class in an application session.}
176
177 \wxheading{See also}
178
179 \helpref{wxBitmapHandler}{wxbitmaphandler}
180
181 \membersection{wxBitmap::CleanUpHandlers}
182
183 \func{static void}{CleanUpHandlers}{\void}
184
185 Deletes all bitmap handlers.
186
187 This function is called by wxWindows on exit.
188
189 \membersection{wxBitmap::Create}
190
191 \func{virtual bool}{Create}{\param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}}
192
193 Creates a fresh bitmap. If the final argument is omitted, the display depth of
194 the screen is used.
195
196 \func{virtual bool}{Create}{\param{void*}{ data}, \param{int}{ type}, \param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}}
197
198 Creates a bitmap from the given data, which can be of arbitrary type.
199
200 \wxheading{Parameters}
201
202 \docparam{width}{The width of the bitmap in pixels.}
203
204 \docparam{height}{The height of the bitmap in pixels.}
205
206 \docparam{depth}{The depth of the bitmap in pixels. If this is -1, the screen depth is used.}
207
208 \docparam{data}{Data whose type depends on the value of {\it type}.}
209
210 \docparam{type}{A bitmap type identifier - see \helpref{wxBitmap::wxBitmap}{wxbitmapconstr} for a list
211 of possible values.}
212
213 \wxheading{Return value}
214
215 TRUE if the call succeeded, FALSE otherwise.
216
217 \wxheading{Remarks}
218
219 The first form works on all platforms. The portability of the second form depends on the
220 type of data.
221
222 \wxheading{See also}
223
224 \helpref{wxBitmap::wxBitmap}{wxbitmapconstr}
225
226 \membersection{wxBitmap::FindHandler}
227
228 \func{static wxBitmapHandler*}{FindHandler}{\param{const wxString\& }{name}}
229
230 Finds the handler with the given name.
231
232 \func{static wxBitmapHandler*}{FindHandler}{\param{const wxString\& }{extension}, \param{long}{ bitmapType}}
233
234 Finds the handler associated with the given extension and type.
235
236 \func{static wxBitmapHandler*}{FindHandler}{\param{long }{bitmapType}}
237
238 Finds the handler associated with the given bitmap type.
239
240 \docparam{name}{The handler name.}
241
242 \docparam{extension}{The file extension, such as ``bmp".}
243
244 \docparam{bitmapType}{The bitmap type, such as wxBITMAP\_TYPE\_BMP.}
245
246 \wxheading{Return value}
247
248 A pointer to the handler if found, NULL otherwise.
249
250 \wxheading{See also}
251
252 \helpref{wxBitmapHandler}{wxbitmaphandler}
253
254 \membersection{wxBitmap::GetDepth}
255
256 \constfunc{int}{GetDepth}{\void}
257
258 Gets the colour depth of the bitmap. A value of 1 indicates a
259 monochrome bitmap.
260
261 \membersection{wxBitmap::GetHandlers}
262
263 \func{static wxList\&}{GetHandlers}{\void}
264
265 Returns the static list of bitmap format handlers.
266
267 \wxheading{See also}
268
269 \helpref{wxBitmapHandler}{wxbitmaphandler}
270
271 \membersection{wxBitmap::GetHeight}\label{wxbitmapgetheight}
272
273 \constfunc{int}{GetHeight}{\void}
274
275 Gets the height of the bitmap in pixels.
276
277 \membersection{wxBitmap::GetPalette}\label{wxbitmapgetpalette}
278
279 \constfunc{wxPalette*}{GetPalette}{\void}
280
281 Gets the associated palette (if any) which may have been loaded from a file
282 or set for the bitmap.
283
284 \wxheading{See also}
285
286 \helpref{wxPalette}{wxpalette}
287
288 \membersection{wxBitmap::GetMask}\label{wxbitmapgetmask}
289
290 \constfunc{wxMask*}{GetMask}{\void}
291
292 Gets the associated mask (if any) which may have been loaded from a file
293 or set for the bitmap.
294
295 \wxheading{See also}
296
297 \helpref{wxBitmap::SetMask}{wxbitmapsetmask}, \helpref{wxMask}{wxmask}
298
299 \membersection{wxBitmap::GetWidth}\label{wxbitmapgetwidth}
300
301 \constfunc{int}{GetWidth}{\void}
302
303 Gets the width of the bitmap in pixels.
304
305 \wxheading{See also}
306
307 \helpref{wxBitmap::GetHeight}{wxbitmapgetheight}
308
309 \membersection{wxBitmap::InitStandardHandlers}
310
311 \func{static void}{InitStandardHandlers}{\void}
312
313 Adds the standard bitmap format handlers, which, depending on wxWindows
314 configuration, can be handlers for Windows bitmap, Windows bitmap resource, and XPM.
315
316 This function is called by wxWindows on startup.
317
318 \wxheading{See also}
319
320 \helpref{wxBitmapHandler}{wxbitmaphandler}
321
322 \membersection{wxBitmap::InsertHandler}
323
324 \func{static void}{InsertHandler}{\param{wxBitmapHandler*}{ handler}}
325
326 Adds a handler at the start of the static list of format handlers.
327
328 \docparam{handler}{A new bitmap format handler object. There is usually only one instance
329 of a given handler class in an application session.}
330
331 \wxheading{See also}
332
333 \helpref{wxBitmapHandler}{wxbitmaphandler}
334
335 \membersection{wxBitmap::LoadFile}\label{wxbitmaploadfile}
336
337 \func{bool}{LoadFile}{\param{const wxString\&}{ name}, \param{long}{ type}}
338
339 Loads a bitmap from a file or resource.
340
341 \wxheading{Parameters}
342
343 \docparam{name}{Either a filename or a Windows resource name.
344 The meaning of {\it name} is determined by the {\it type} parameter.}
345
346 \docparam{type}{One of the following values:
347
348 \twocolwidtha{5cm}
349 \begin{twocollist}
350 \twocolitem{{\bf wxBITMAP\_TYPE\_BMP}}{Load a Windows bitmap file.}
351 \twocolitem{{\bf wxBITMAP\_TYPE\_BMP\_RESOURCE}}{Load a Windows bitmap from the resource database.}
352 \twocolitem{{\bf wxBITMAP\_TYPE\_GIF}}{Load a GIF bitmap file.}
353 \twocolitem{{\bf wxBITMAP\_TYPE\_XBM}}{Load an X bitmap file.}
354 \twocolitem{{\bf wxBITMAP\_TYPE\_XPM}}{Load an XPM bitmap file.}
355 \end{twocollist}
356
357 The validity of these flags depends on the platform and wxWindows configuration.}
358
359 \wxheading{Return value}
360
361 TRUE if the operation succeeded, FALSE otherwise.
362
363 \wxheading{Remarks}
364
365 A palette may be associated with the bitmap if one exists (especially for
366 colour Windows bitmaps), and if the code supports it. You can check
367 if one has been created by using the \helpref{GetPalette}{wxbitmapgetpalette} member.
368
369 \wxheading{See also}
370
371 \helpref{wxBitmap::SaveFile}{wxbitmapsavefile}
372
373 \membersection{wxBitmap::Ok}\label{wxbitmapok}
374
375 \constfunc{bool}{Ok}{\void}
376
377 Returns TRUE if bitmap data is present.
378
379 \membersection{wxBitmap::RemoveHandler}
380
381 \func{static bool}{RemoveHandler}{\param{const wxString\& }{name}}
382
383 Finds the handler with the given name, and removes it. The handler
384 is not deleted.
385
386 \docparam{name}{The handler name.}
387
388 \wxheading{Return value}
389
390 TRUE if the handler was found and removed, FALSE otherwise.
391
392 \wxheading{See also}
393
394 \helpref{wxBitmapHandler}{wxbitmaphandler}
395
396 \membersection{wxBitmap::SaveFile}\label{wxbitmapsavefile}
397
398 \func{bool}{SaveFile}{\param{const wxString\& }{name}, \param{int}{ type}, \param{wxPalette* }{palette = NULL}}
399
400 Saves a bitmap in the named file.
401
402 \wxheading{Parameters}
403
404 \docparam{name}{A filename. The meaning of {\it name} is determined by the {\it type} parameter.}
405
406 \docparam{type}{One of the following values:
407
408 \twocolwidtha{5cm}
409 \begin{twocollist}
410 \twocolitem{{\bf wxBITMAP\_TYPE\_BMP}}{Save a Windows bitmap file.}
411 \twocolitem{{\bf wxBITMAP\_TYPE\_GIF}}{Save a GIF bitmap file.}
412 \twocolitem{{\bf wxBITMAP\_TYPE\_XBM}}{Save an X bitmap file.}
413 \twocolitem{{\bf wxBITMAP\_TYPE\_XPM}}{Save an XPM bitmap file.}
414 \end{twocollist}
415
416 The validity of these flags depends on the platform and wxWindows configuration.}
417
418 \docparam{palette}{An optional palette used for saving the bitmap.}
419 % TODO: this parameter should
420 %probably be eliminated; instead the app should set the palette before saving.
421
422 \wxheading{Return value}
423
424 TRUE if the operation succeeded, FALSE otherwise.
425
426 \wxheading{Remarks}
427
428 Depending on how wxWindows has been configured, not all formats may be available.
429
430 \wxheading{See also}
431
432 \helpref{wxBitmap::LoadFile}{wxbitmaploadfile}
433
434 \membersection{wxBitmap::SetDepth}\label{wxbitmapsetdepth}
435
436 \func{void}{SetDepth}{\param{int }{depth}}
437
438 Sets the depth member (does not affect the bitmap data).
439
440 \wxheading{Parameters}
441
442 \docparam{depth}{Bitmap depth.}
443
444 \membersection{wxBitmap::SetHeight}\label{wxbitmapsetheight}
445
446 \func{void}{SetHeight}{\param{int }{height}}
447
448 Sets the height member (does not affect the bitmap data).
449
450 \wxheading{Parameters}
451
452 \docparam{height}{Bitmap height in pixels.}
453
454 \membersection{wxBitmap::SetMask}\label{wxbitmapsetmask}
455
456 \func{void}{SetMask}{\param{wxMask* }{mask}}
457
458 Sets the mask for this bitmap.
459
460 \wxheading{Remarks}
461
462 The bitmap object owns the mask once this has been called.
463
464 \wxheading{See also}
465
466 \helpref{wxBitmap::GetMask}{wxbitmapgetmask}, \helpref{wxMask}{wxmask}
467
468 \membersection{wxBitmap::SetOk}
469
470 \func{void}{SetOk}{\param{int }{isOk}}
471
472 Sets the validity member (does not affect the bitmap data).
473
474 \wxheading{Parameters}
475
476 \docparam{isOk}{Validity flag.}
477
478 \membersection{wxBitmap::SetPalette}\label{wxbitmapsetpalette}
479
480 \func{void}{SetPalette}{\param{wxPalette* }{palette}}
481
482 Sets the associated palette: it will be deleted in the wxBitmap
483 destructor, so if you do not wish it to be deleted automatically,
484 reset the palette to NULL before the bitmap is deleted.
485
486 \wxheading{Parameters}
487
488 \docparam{palette}{The palette to set.}
489
490 \wxheading{Remarks}
491
492 The bitmap object owns the palette once this has been called.
493
494 \wxheading{See also}
495
496 \helpref{wxPalette}{wxpalette}
497
498 \membersection{wxBitmap::SetWidth}
499
500 \func{void}{SetWidth}{\param{int }{width}}
501
502 Sets the width member (does not affect the bitmap data).
503
504 \wxheading{Parameters}
505
506 \docparam{width}{Bitmap width in pixels.}
507
508 \membersection{wxBitmap::operator $=$}
509
510 \func{wxBitmap\& }{operator $=$}{\param{const wxBitmap\& }{bitmap}}
511
512 Assignment operator. This operator does not copy any data, but instead
513 passes a pointer to the data in {\it bitmap} and increments a reference
514 counter. It is a fast operation.
515
516 \wxheading{Parameters}
517
518 \docparam{bitmap}{Bitmap to assign.}
519
520 \wxheading{Return value}
521
522 Returns 'this' object.
523
524 \membersection{wxBitmap::operator $==$}
525
526 \func{bool}{operator $==$}{\param{const wxBitmap\& }{bitmap}}
527
528 Equality operator. This operator tests whether the internal data pointers are
529 equal (a fast test).
530
531 \wxheading{Parameters}
532
533 \docparam{bitmap}{Bitmap to compare with 'this'}
534
535 \wxheading{Return value}
536
537 Returns TRUE if the bitmaps were effectively equal, FALSE otherwise.
538
539 \membersection{wxBitmap::operator $!=$}
540
541 \func{bool}{operator $!=$}{\param{const wxBitmap\& }{bitmap}}
542
543 Inequality operator. This operator tests whether the internal data pointers are
544 unequal (a fast test).
545
546 \wxheading{Parameters}
547
548 \docparam{bitmap}{Bitmap to compare with 'this'}
549
550 \wxheading{Return value}
551
552 Returns TRUE if the bitmaps were unequal, FALSE otherwise.
553
554 \section{\class{wxBitmapHandler}}\label{wxbitmaphandler}
555
556 \overview{Overview}{wxbitmapoverview}
557
558 This is the base class for implementing bitmap file loading/saving, and bitmap creation from data.
559 It is used within wxBitmap and is not normally seen by the application.
560
561 If you wish to extend the capabilities of wxBitmap, derive a class from wxBitmapHandler
562 and add the handler using \helpref{wxBitmap::AddHandler}{wxbitmapaddhandler} in your
563 application initialisation.
564
565 \wxheading{Derived from}
566
567 \helpref{wxObject}{wxobject}
568
569 \wxheading{Include files}
570
571 <wx/bitmap.h>
572
573 \wxheading{See also}
574
575 \helpref{wxBitmap}{wxbitmap}, \helpref{wxIcon}{wxicon}, \helpref{wxCursor}{wxcursor}
576
577 \latexignore{\rtfignore{\wxheading{Members}}}
578
579 \membersection{wxBitmapHandler::wxBitmapHandler}\label{wxbitmaphandlerconstr}
580
581 \func{}{wxBitmapHandler}{\void}
582
583 Default constructor. In your own default constructor, initialise the members
584 m\_name, m\_extension and m\_type.
585
586 \membersection{wxBitmapHandler::\destruct{wxBitmapHandler}}
587
588 \func{}{\destruct{wxBitmapHandler}}{\void}
589
590 Destroys the wxBitmapHandler object.
591
592 \membersection{wxBitmapHandler::Create}
593
594 \func{virtual bool}{Create}{\param{wxBitmap* }{bitmap}, \param{void*}{ data}, \param{int}{ type}, \param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}}
595
596 Creates a bitmap from the given data, which can be of arbitrary type. The wxBitmap object {\it bitmap} is
597 manipulated by this function.
598
599 \wxheading{Parameters}
600
601 \docparam{bitmap}{The wxBitmap object.}
602
603 \docparam{width}{The width of the bitmap in pixels.}
604
605 \docparam{height}{The height of the bitmap in pixels.}
606
607 \docparam{depth}{The depth of the bitmap in pixels. If this is -1, the screen depth is used.}
608
609 \docparam{data}{Data whose type depends on the value of {\it type}.}
610
611 \docparam{type}{A bitmap type identifier - see \helpref{wxBitmapHandler::wxBitmapHandler}{wxbitmapconstr} for a list
612 of possible values.}
613
614 \wxheading{Return value}
615
616 TRUE if the call succeeded, FALSE otherwise (the default).
617
618 \membersection{wxBitmapHandler::GetName}
619
620 \constfunc{wxString}{GetName}{\void}
621
622 Gets the name of this handler.
623
624 \membersection{wxBitmapHandler::GetExtension}
625
626 \constfunc{wxString}{GetExtension}{\void}
627
628 Gets the file extension associated with this handler.
629
630 \membersection{wxBitmapHandler::GetType}
631
632 \constfunc{long}{GetType}{\void}
633
634 Gets the bitmap type associated with this handler.
635
636 \membersection{wxBitmapHandler::LoadFile}\label{wxbitmaphandlerloadfile}
637
638 \func{bool}{LoadFile}{\param{wxBitmap* }{bitmap}, \param{const wxString\&}{ name}, \param{long}{ type}}
639
640 Loads a bitmap from a file or resource, putting the resulting data into {\it bitmap}.
641
642 \wxheading{Parameters}
643
644 \docparam{bitmap}{The bitmap object which is to be affected by this operation.}
645
646 \docparam{name}{Either a filename or a Windows resource name.
647 The meaning of {\it name} is determined by the {\it type} parameter.}
648
649 \docparam{type}{See \helpref{wxBitmap::wxBitmap}{wxbitmapconstr} for values this can take.}
650
651 \wxheading{Return value}
652
653 TRUE if the operation succeeded, FALSE otherwise.
654
655 \wxheading{See also}
656
657 \helpref{wxBitmap::LoadFile}{wxbitmaploadfile}\\
658 \helpref{wxBitmap::SaveFile}{wxbitmapsavefile}\\
659 \helpref{wxBitmapHandler::SaveFile}{wxbitmaphandlersavefile}
660
661 \membersection{wxBitmapHandler::SaveFile}\label{wxbitmaphandlersavefile}
662
663 \func{bool}{SaveFile}{\param{wxBitmap* }{bitmap}, \param{const wxString\& }{name}, \param{int}{ type}, \param{wxPalette* }{palette = NULL}}
664
665 Saves a bitmap in the named file.
666
667 \wxheading{Parameters}
668
669 \docparam{bitmap}{The bitmap object which is to be affected by this operation.}
670
671 \docparam{name}{A filename. The meaning of {\it name} is determined by the {\it type} parameter.}
672
673 \docparam{type}{See \helpref{wxBitmap::wxBitmap}{wxbitmapconstr} for values this can take.}
674
675 \docparam{palette}{An optional palette used for saving the bitmap.}
676
677 \wxheading{Return value}
678
679 TRUE if the operation succeeded, FALSE otherwise.
680
681 \wxheading{See also}
682
683 \helpref{wxBitmap::LoadFile}{wxbitmaploadfile}\\
684 \helpref{wxBitmap::SaveFile}{wxbitmapsavefile}\\
685 \helpref{wxBitmapHandler::LoadFile}{wxbitmaphandlerloadfile}
686
687 \membersection{wxBitmapHandler::SetName}
688
689 \func{void}{SetName}{\param{const wxString\& }{name}}
690
691 Sets the handler name.
692
693 \wxheading{Parameters}
694
695 \docparam{name}{Handler name.}
696
697 \membersection{wxBitmapHandler::SetExtension}
698
699 \func{void}{SetExtension}{\param{const wxString\& }{extension}}
700
701 Sets the handler extension.
702
703 \wxheading{Parameters}
704
705 \docparam{extension}{Handler extension.}
706
707 \membersection{wxBitmapHandler::SetType}
708
709 \func{void}{SetType}{\param{long }{type}}
710
711 Sets the handler type.
712
713 \wxheading{Parameters}
714
715 \docparam{name}{Handler type.}
716
717