]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/caret.tex
Made the docs compile again.
[wxWidgets.git] / docs / latex / wx / caret.tex
CommitLineData
f6bcfd97
BP
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
14A caret is a blinking cursor showing the position where the typed text will
15appear. The text controls usually have a caret but wxCaret class also allows
16to use a caret in other windows.
17
18Currently, the caret appears as a rectangle of the given size. In the future,
19it will be possible to specify a bitmap to be used for the caret shape.
20
21A caret is always associated with a window and the current caret can be
22retrieved using \helpref{wxWindow::GetCaret}{wxwindowgetcaret}. The same caret
23can't be reused in two different windows.
24
25\wxheading{Derived from}
26
27No base class
28
9ec98f7c
JS
29\wxheading{Include files}
30
31<wx/caret.h>
32
f6bcfd97
BP
33\wxheading{Data structures}
34
35\latexignore{\rtfignore{\wxheading{Members}}}
36
37\membersection{wxCaret::wxCaret}\label{wxcaretwxcaret}
38
39\func{}{wxCaret}{\void}
40
41Default 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
47Create the caret of given (in pixels) width and height and associates it
48with 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
56Create the caret of given (in pixels) width and height and associates it
57with the given window (same as constructor).
58
59\membersection{wxCaret::GetBlinkTime}\label{wxcaretgetblinktime}
60
61\func{static int}{GetBlinkTime}{\void}
62
63Returns the blink time which is measured in milliseconds and is the time elapsed
64between 2 inversions of the caret (blink time of the caret is the same
65for 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
73Get 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
81Get the caret size.
82
83\membersection{wxCaret::GetWindow}\label{wxcaretgetwindow}
84
85\constfunc{wxWindow*}{GetWindow}{\void}
86
87Get the window the caret is associated with.
88
89\membersection{wxCaret::Hide}\label{wxcarethide}
90
91\func{void}{Hide}{\void}
92
93Same as \helpref{wxCaret::Show(FALSE)}{wxcaretshow}.
94
95\membersection{wxCaret::IsOk}\label{wxcaretisok}
96
97\constfunc{bool}{IsOk}{\void}
98
99Returns TRUE if the caret was created successfully.
100
101\membersection{wxCaret::IsVisible}\label{wxcaretisvisible}
102
103\constfunc{bool}{IsVisible}{\void}
104
105Returns TRUE if the caret is visible and FALSE if it is permanently
106hidden (if it is is blinking and not shown currently but will be after the
107next 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
115Move 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
121Sets the blink time for all the carets.
122
123\wxheading{Remarks}
124
125Under Windows, this function will change the blink time for {\bf all} carets
126permanently (until the next time it is called), even for the carets in other
127applications.
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
139Changes the size of the caret.
140
141\membersection{wxCaret::Show}\label{wxcaretshow}
142
143\func{void}{Show}{\param{bool }{show = TRUE}}
144
145Shows or hides the caret. Notice that if the caret was hidden $N$ times, it
146must be shown $N$ times as well to reappear on the screen.
147