]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/inputstr.tex
Set/GetWindowMenu added to MDI parent frame under MSW
[wxWidgets.git] / docs / latex / wx / inputstr.tex
CommitLineData
e2a6f233
JS
1% -----------------------------------------------------------------------------
2% wxInputStream
3% -----------------------------------------------------------------------------
4\section{\class{wxInputStream}}\label{wxinputstream}
5
d984207c
RR
6wxInputStream is an abstract base class which may not be used directly.
7
e2a6f233
JS
8\wxheading{Derived from}
9
10\helpref{wxStreamBase}{wxstreambase}
11
954b8ae6
JS
12\wxheading{Include files}
13
14<wx/stream.h>
15
e2a6f233
JS
16% -----------
17% ctor & dtor
18% -----------
19\membersection{wxInputStream::wxInputStream}
20
21\func{}{wxInputStream}{\void}
22
23Creates a dummy input stream.
24
e2a6f233
JS
25\membersection{wxInputStream::\destruct{wxInputStream}}
26
27\func{}{\destruct{wxInputStream}}{\void}
28
29Destructor.
30
e2a6f233
JS
31\membersection{wxInputStream::GetC}
32
33\func{char}{GetC}{\void}
34
35Returns the first character in the input queue and removes it.
36
39b91eca 37\membersection{wxInputStream::LastRead}\label{wxinputstreamlastread}
40b480c3
JS
38
39\constfunc{size\_t}{LastRead}{\void}
40
41Returns the last number of bytes read.
42
43\membersection{wxInputStream::Peek}
44
45\func{char}{Peek}{\void}
46
47Returns the first character in the input queue without removing it.
48
e2a6f233
JS
49\membersection{wxInputStream::Read}
50
40b480c3 51\func{wxInputStream\&}{Read}{\param{void *}{buffer}, \param{size\_t}{ size}}
e2a6f233 52
605d715d 53Reads the specified amount of bytes and stores the data in {\it buffer}.
e2a6f233 54
da3aea64
GL
55\wxheading{Warning}
56
57The buffer absolutely needs to have at least the specified size.
58
59\wxheading{Return value}
e2a6f233
JS
60
61This function returns a reference on the current object, so the user can test
62any states of the stream right away.
63
294e9a7a 64\func{wxInputStream\&}{Read}{\param{wxOutputStream\&}{ stream\_out}}
e2a6f233
JS
65
66Reads data from the input queue and stores it in the specified output stream.
67The data is read until an error is raised by one of the two streams.
68
da3aea64
GL
69\wxheading{Return value}
70
71This function returns a reference on the current object, so the user can test
72any states of the stream right away.
73
e2a6f233
JS
74\membersection{wxInputStream::SeekI}
75
40b480c3 76\func{off\_t}{SeekI}{\param{off\_t}{ pos}, \param{wxSeekMode}{ mode = wxFromStart}}
e2a6f233
JS
77
78Changes the stream current position.
79
80\membersection{wxInputStream::TellI}
81
40b480c3 82\constfunc{off\_t}{TellI}{\void}
e2a6f233
JS
83
84Returns the current stream position.
85
c7d9131a
GL
86\membersection{wxInputStream::Ungetch}\label{wxinputstream_ungetch}
87
88\func{size\_t}{Ungetch}{\param{const char*}{ buffer}, \param{size\_t}{ size}}
89
605d715d 90This function is only useful in {\it read} mode. It is the manager of the "Write-Back"
c7d9131a
GL
91buffer. This buffer acts like a temporary buffer where datas which has to be
92read during the next read IO call are put. This is useful when you get a big
93block of data which you didn't want to read: you can replace them at the top
94of the input queue by this way.
95
d984207c
RR
96Be very careful about this call in connection with calling SeekI() on the same
97stream. Any call to SeekI() will invalidate any previous call to this method
98(otherwise you could SeekI() to one position, "unread" a few bytes there, SeekI()
99to another position and data would be either lost or corrupted).
100
c7d9131a
GL
101\wxheading{Return value}
102
103Returns the amount of bytes saved in the Write-Back buffer.
104
105\func{bool}{Ungetch}{\param{char }{c}}
106
107This function acts like the previous one except that it takes only one
108character: it is sometimes shorter to use than the generic function.
109