]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/bmphand.tex
another patch bring the docs more up to date (patch 1717776)
[wxWidgets.git] / docs / latex / wx / bmphand.tex
CommitLineData
f6106dae
VZ
1\section{\class{wxBitmapHandler}}\label{wxbitmaphandler}
2
3\overview{Overview}{wxbitmapoverview}
4
5This is the base class for implementing bitmap file loading/saving, and bitmap creation from data.
6It is used within wxBitmap and is not normally seen by the application.
7
8If you wish to extend the capabilities of wxBitmap, derive a class from wxBitmapHandler
9and add the handler using \helpref{wxBitmap::AddHandler}{wxbitmapaddhandler} in your
10application initialisation.
11
12\wxheading{Derived from}
13
14\helpref{wxObject}{wxobject}
15
16\wxheading{Include files}
17
18<wx/bitmap.h>
19
20\wxheading{See also}
21
22\helpref{wxBitmap}{wxbitmap}, \helpref{wxIcon}{wxicon}, \helpref{wxCursor}{wxcursor}
23
24\latexignore{\rtfignore{\wxheading{Members}}}
25
f510b7b2 26\membersection{wxBitmapHandler::wxBitmapHandler}\label{wxbitmaphandlerctor}
f6106dae
VZ
27
28\func{}{wxBitmapHandler}{\void}
29
30Default constructor. In your own default constructor, initialise the members
31m\_name, m\_extension and m\_type.
32
f510b7b2 33\membersection{wxBitmapHandler::\destruct{wxBitmapHandler}}\label{wxbitmaphandlerdtor}
f6106dae
VZ
34
35\func{}{\destruct{wxBitmapHandler}}{\void}
36
37Destroys the wxBitmapHandler object.
38
f510b7b2 39\membersection{wxBitmapHandler::Create}\label{wxbitmaphandlercreate}
f6106dae 40
452418c4 41\func{virtual bool}{Create}{\param{wxBitmap* }{bitmap}, \param{const void*}{ data}, \param{int}{ type}, \param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}}
f6106dae
VZ
42
43Creates a bitmap from the given data, which can be of arbitrary type. The wxBitmap object {\it bitmap} is
44manipulated by this function.
45
46\wxheading{Parameters}
47
48\docparam{bitmap}{The wxBitmap object.}
49
50\docparam{width}{The width of the bitmap in pixels.}
51
52\docparam{height}{The height of the bitmap in pixels.}
53
54\docparam{depth}{The depth of the bitmap in pixels. If this is -1, the screen depth is used.}
55
56\docparam{data}{Data whose type depends on the value of {\it type}.}
57
f510b7b2 58\docparam{type}{A bitmap type identifier - see \helpref{wxBitmapHandler::wxBitmapHandler}{wxbitmapctor} for a list
f6106dae
VZ
59of possible values.}
60
61\wxheading{Return value}
62
cc81d32f 63true if the call succeeded, false otherwise (the default).
f6106dae 64
f510b7b2 65\membersection{wxBitmapHandler::GetName}\label{wxbitmaphandlergetname}
f6106dae 66
452418c4 67\constfunc{const wxString\&}{ GetName}{\void}
f6106dae
VZ
68
69Gets the name of this handler.
70
f510b7b2 71\membersection{wxBitmapHandler::GetExtension}\label{wxbitmaphandlergetextension}
f6106dae 72
452418c4 73\constfunc{const wxString\&}{ GetExtension}{\void}
f6106dae
VZ
74
75Gets the file extension associated with this handler.
76
f510b7b2 77\membersection{wxBitmapHandler::GetType}\label{wxbitmaphandlergettype}
f6106dae
VZ
78
79\constfunc{long}{GetType}{\void}
80
81Gets the bitmap type associated with this handler.
82
83\membersection{wxBitmapHandler::LoadFile}\label{wxbitmaphandlerloadfile}
84
85\func{bool}{LoadFile}{\param{wxBitmap* }{bitmap}, \param{const wxString\&}{ name}, \param{long}{ type}}
86
87Loads a bitmap from a file or resource, putting the resulting data into {\it bitmap}.
88
89\wxheading{Parameters}
90
91\docparam{bitmap}{The bitmap object which is to be affected by this operation.}
92
93\docparam{name}{Either a filename or a Windows resource name.
94The meaning of {\it name} is determined by the {\it type} parameter.}
95
f510b7b2 96\docparam{type}{See \helpref{wxBitmap::wxBitmap}{wxbitmapctor} for values this can take.}
f6106dae
VZ
97
98\wxheading{Return value}
99
cc81d32f 100true if the operation succeeded, false otherwise.
f6106dae
VZ
101
102\wxheading{See also}
103
104\helpref{wxBitmap::LoadFile}{wxbitmaploadfile}\\
105\helpref{wxBitmap::SaveFile}{wxbitmapsavefile}\\
106\helpref{wxBitmapHandler::SaveFile}{wxbitmaphandlersavefile}
107
108\membersection{wxBitmapHandler::SaveFile}\label{wxbitmaphandlersavefile}
109
110\func{bool}{SaveFile}{\param{wxBitmap* }{bitmap}, \param{const wxString\& }{name}, \param{int}{ type}, \param{wxPalette* }{palette = NULL}}
111
112Saves a bitmap in the named file.
113
114\wxheading{Parameters}
115
116\docparam{bitmap}{The bitmap object which is to be affected by this operation.}
117
118\docparam{name}{A filename. The meaning of {\it name} is determined by the {\it type} parameter.}
119
f510b7b2 120\docparam{type}{See \helpref{wxBitmap::wxBitmap}{wxbitmapctor} for values this can take.}
f6106dae
VZ
121
122\docparam{palette}{An optional palette used for saving the bitmap.}
123
124\wxheading{Return value}
125
cc81d32f 126true if the operation succeeded, false otherwise.
f6106dae
VZ
127
128\wxheading{See also}
129
130\helpref{wxBitmap::LoadFile}{wxbitmaploadfile}\\
131\helpref{wxBitmap::SaveFile}{wxbitmapsavefile}\\
132\helpref{wxBitmapHandler::LoadFile}{wxbitmaphandlerloadfile}
133
f510b7b2 134\membersection{wxBitmapHandler::SetName}\label{wxbitmaphandlersetname}
f6106dae
VZ
135
136\func{void}{SetName}{\param{const wxString\& }{name}}
137
138Sets the handler name.
139
140\wxheading{Parameters}
141
142\docparam{name}{Handler name.}
143
f510b7b2 144\membersection{wxBitmapHandler::SetExtension}\label{wxbitmaphandlersetextension}
f6106dae
VZ
145
146\func{void}{SetExtension}{\param{const wxString\& }{extension}}
147
148Sets the handler extension.
149
150\wxheading{Parameters}
151
152\docparam{extension}{Handler extension.}
153
f510b7b2 154\membersection{wxBitmapHandler::SetType}\label{wxbitmaphandlersettype}
f6106dae
VZ
155
156\func{void}{SetType}{\param{long }{type}}
157
158Sets the handler type.
159
160\wxheading{Parameters}
161
162\docparam{name}{Handler type.}
163
164
165