]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/bmphand.tex
fix ReceiveTimeout() reference
[wxWidgets.git] / docs / latex / wx / bmphand.tex
... / ...
CommitLineData
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{Library}
21
22\helpref{wxCore}{librarieslist}
23
24\wxheading{See also}
25
26\helpref{wxBitmap}{wxbitmap}, \helpref{wxIcon}{wxicon}, \helpref{wxCursor}{wxcursor}
27
28\latexignore{\rtfignore{\wxheading{Members}}}
29
30\membersection{wxBitmapHandler::wxBitmapHandler}\label{wxbitmaphandlerctor}
31
32\func{}{wxBitmapHandler}{\void}
33
34Default constructor. In your own default constructor, initialise the members
35m\_name, m\_extension and m\_type.
36
37\membersection{wxBitmapHandler::\destruct{wxBitmapHandler}}\label{wxbitmaphandlerdtor}
38
39\func{}{\destruct{wxBitmapHandler}}{\void}
40
41Destroys the wxBitmapHandler object.
42
43\membersection{wxBitmapHandler::Create}\label{wxbitmaphandlercreate}
44
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}}
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
62\docparam{type}{A bitmap type identifier - see \helpref{wxBitmapHandler::wxBitmapHandler}{wxbitmapctor} for a list
63of possible values.}
64
65\wxheading{Return value}
66
67true if the call succeeded, false otherwise (the default).
68
69\membersection{wxBitmapHandler::GetName}\label{wxbitmaphandlergetname}
70
71\constfunc{const wxString\&}{ GetName}{\void}
72
73Gets the name of this handler.
74
75\membersection{wxBitmapHandler::GetExtension}\label{wxbitmaphandlergetextension}
76
77\constfunc{const wxString\&}{ GetExtension}{\void}
78
79Gets the file extension associated with this handler.
80
81\membersection{wxBitmapHandler::GetType}\label{wxbitmaphandlergettype}
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
100\docparam{type}{See \helpref{wxBitmap::wxBitmap}{wxbitmapctor} for values this can take.}
101
102\wxheading{Return value}
103
104true if the operation succeeded, false otherwise.
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
124\docparam{type}{See \helpref{wxBitmap::wxBitmap}{wxbitmapctor} for values this can take.}
125
126\docparam{palette}{An optional palette used for saving the bitmap.}
127
128\wxheading{Return value}
129
130true if the operation succeeded, false otherwise.
131
132\wxheading{See also}
133
134\helpref{wxBitmap::LoadFile}{wxbitmaploadfile}\\
135\helpref{wxBitmap::SaveFile}{wxbitmapsavefile}\\
136\helpref{wxBitmapHandler::LoadFile}{wxbitmaphandlerloadfile}
137
138\membersection{wxBitmapHandler::SetName}\label{wxbitmaphandlersetname}
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
148\membersection{wxBitmapHandler::SetExtension}\label{wxbitmaphandlersetextension}
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
158\membersection{wxBitmapHandler::SetType}\label{wxbitmaphandlersettype}
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