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