]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/caret.tex
Fixed a couple spelling typos
[wxWidgets.git] / docs / latex / wx / caret.tex
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% Name: caret.tex
3 %% Purpose: wxCaret documentation
4 %% Author: Vadim Zeitlin
5 %% Modified by:
6 %% Created: 20.06.00
7 %% RCS-ID: $Id$
8 %% Copyright: (c) Vadim Zeitlin
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12 \section{\class{wxCaret}}\label{wxcaret}
13
14 A caret is a blinking cursor showing the position where the typed text will
15 appear. The text controls usually have a caret but wxCaret class also allows
16 to use a caret in other windows.
17
18 Currently, the caret appears as a rectangle of the given size. In the future,
19 it will be possible to specify a bitmap to be used for the caret shape.
20
21 A caret is always associated with a window and the current caret can be
22 retrieved using \helpref{wxWindow::GetCaret}{wxwindowgetcaret}. The same caret
23 can't be reused in two different windows.
24
25 \wxheading{Derived from}
26
27 No base class
28
29 \wxheading{Include files}
30
31 <wx/caret.h>
32
33 \wxheading{Data structures}
34
35 \latexignore{\rtfignore{\wxheading{Members}}}
36
37 \membersection{wxCaret::wxCaret}\label{wxcaretwxcaret}
38
39 \func{}{wxCaret}{\void}
40
41 Default constructor: you must use one of Create() functions later.
42
43 \func{}{wxCaret}{\param{wxWindow* }{window}, \param{int }{width}, \param{int }{height}}
44
45 \func{}{wxCaret}{\param{wxWindowBase* }{window}, \param{const wxSize\& }{size}}
46
47 Create the caret of given (in pixels) width and height and associates it
48 with the given window.
49
50 \membersection{wxCaret::Create}\label{wxcaretcreate}
51
52 \func{bool}{Create}{\param{wxWindowBase* }{window}, \param{int }{width}, \param{int }{height}}
53
54 \func{bool}{Create}{\param{wxWindowBase* }{window}, \param{const wxSize\& }{size}}
55
56 Create the caret of given (in pixels) width and height and associates it
57 with the given window (same as constructor).
58
59 \membersection{wxCaret::GetBlinkTime}\label{wxcaretgetblinktime}
60
61 \func{static int}{GetBlinkTime}{\void}
62
63 Returns the blink time which is measured in milliseconds and is the time elapsed
64 between 2 inversions of the caret (blink time of the caret is the same
65 for all carets, so this functions is static).
66
67 \membersection{wxCaret::GetPosition}\label{wxcaretgetposition}
68
69 \constfunc{void}{GetPosition}{\param{int* }{x}, \param{int* }{y}}
70
71 \constfunc{wxPoint}{GetPosition}{\void}
72
73 Get the caret position (in pixels).
74
75 \membersection{wxCaret::GetSize}\label{wxcaretgetsize}
76
77 \constfunc{void}{GetSize}{\param{int* }{width}, \param{int* }{height}}
78
79 \constfunc{wxSize}{GetSize}{\void}
80
81 Get the caret size.
82
83 \membersection{wxCaret::GetWindow}\label{wxcaretgetwindow}
84
85 \constfunc{wxWindow*}{GetWindow}{\void}
86
87 Get the window the caret is associated with.
88
89 \membersection{wxCaret::Hide}\label{wxcarethide}
90
91 \func{void}{Hide}{\void}
92
93 Same as \helpref{wxCaret::Show(FALSE)}{wxcaretshow}.
94
95 \membersection{wxCaret::IsOk}\label{wxcaretisok}
96
97 \constfunc{bool}{IsOk}{\void}
98
99 Returns TRUE if the caret was created successfully.
100
101 \membersection{wxCaret::IsVisible}\label{wxcaretisvisible}
102
103 \constfunc{bool}{IsVisible}{\void}
104
105 Returns TRUE if the caret is visible and FALSE if it is permanently
106 hidden (if it is is blinking and not shown currently but will be after the
107 next blink, this method still returns TRUE).
108
109 \membersection{wxCaret::Move}\label{wxcaretmove}
110
111 \func{void}{Move}{\param{int }{x}, \param{int }{y}}
112
113 \func{void}{Move}{\param{const wxPoint\& }{pt}}
114
115 Move the caret to given position (in logical coordinates).
116
117 \membersection{wxCaret::SetBlinkTime}\label{wxcaretsetblinktime}
118
119 \func{static void}{SetBlinkTime}{\param{int }{milliseconds}}
120
121 Sets the blink time for all the carets.
122
123 \wxheading{Remarks}
124
125 Under Windows, this function will change the blink time for {\bf all} carets
126 permanently (until the next time it is called), even for the carets in other
127 applications.
128
129 \wxheading{See also}
130
131 \helpref{GetBlinkTime}{wxcaretgetblinktime}
132
133 \membersection{wxCaret::SetSize}\label{wxcaretsetsize}
134
135 \func{void}{SetSize}{\param{int }{width}, \param{int }{height}}
136
137 \func{void}{SetSize}{\param{const wxSize\& }{size}}
138
139 Changes the size of the caret.
140
141 \membersection{wxCaret::Show}\label{wxcaretshow}
142
143 \func{void}{Show}{\param{bool }{show = TRUE}}
144
145 Shows or hides the caret. Notice that if the caret was hidden $N$ times, it
146 must be shown $N$ times as well to reappear on the screen.
147