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