]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/caret.tex
Some more wxGrid function docs.
[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
29\wxheading{Data structures}
30
31\latexignore{\rtfignore{\wxheading{Members}}}
32
33\membersection{wxCaret::wxCaret}\label{wxcaretwxcaret}
34
35\func{}{wxCaret}{\void}
36
37Default constructor: you must use one of Create() functions later.
38
39\func{}{wxCaret}{\param{wxWindow* }{window}, \param{int }{width}, \param{int }{height}}
40
41\func{}{wxCaret}{\param{wxWindowBase* }{window}, \param{const wxSize\& }{size}}
42
43Create the caret of given (in pixels) width and height and associates it
44with the given window.
45
46\membersection{wxCaret::Create}\label{wxcaretcreate}
47
48\func{bool}{Create}{\param{wxWindowBase* }{window}, \param{int }{width}, \param{int }{height}}
49
50\func{bool}{Create}{\param{wxWindowBase* }{window}, \param{const wxSize\& }{size}}
51
52Create the caret of given (in pixels) width and height and associates it
53with the given window (same as constructor).
54
55\membersection{wxCaret::GetBlinkTime}\label{wxcaretgetblinktime}
56
57\func{static int}{GetBlinkTime}{\void}
58
59Returns the blink time which is measured in milliseconds and is the time elapsed
60between 2 inversions of the caret (blink time of the caret is the same
61for all carets, so this functions is static).
62
63\membersection{wxCaret::GetPosition}\label{wxcaretgetposition}
64
65\constfunc{void}{GetPosition}{\param{int* }{x}, \param{int* }{y}}
66
67\constfunc{wxPoint}{GetPosition}{\void}
68
69Get the caret position (in pixels).
70
71\membersection{wxCaret::GetSize}\label{wxcaretgetsize}
72
73\constfunc{void}{GetSize}{\param{int* }{width}, \param{int* }{height}}
74
75\constfunc{wxSize}{GetSize}{\void}
76
77Get the caret size.
78
79\membersection{wxCaret::GetWindow}\label{wxcaretgetwindow}
80
81\constfunc{wxWindow*}{GetWindow}{\void}
82
83Get the window the caret is associated with.
84
85\membersection{wxCaret::Hide}\label{wxcarethide}
86
87\func{void}{Hide}{\void}
88
89Same as \helpref{wxCaret::Show(FALSE)}{wxcaretshow}.
90
91\membersection{wxCaret::IsOk}\label{wxcaretisok}
92
93\constfunc{bool}{IsOk}{\void}
94
95Returns TRUE if the caret was created successfully.
96
97\membersection{wxCaret::IsVisible}\label{wxcaretisvisible}
98
99\constfunc{bool}{IsVisible}{\void}
100
101Returns TRUE if the caret is visible and FALSE if it is permanently
102hidden (if it is is blinking and not shown currently but will be after the
103next blink, this method still returns TRUE).
104
105\membersection{wxCaret::Move}\label{wxcaretmove}
106
107\func{void}{Move}{\param{int }{x}, \param{int }{y}}
108
109\func{void}{Move}{\param{const wxPoint\& }{pt}}
110
111Move the caret to given position (in logical coordinates).
112
113\membersection{wxCaret::SetBlinkTime}\label{wxcaretsetblinktime}
114
115\func{static void}{SetBlinkTime}{\param{int }{milliseconds}}
116
117Sets the blink time for all the carets.
118
119\wxheading{Remarks}
120
121Under Windows, this function will change the blink time for {\bf all} carets
122permanently (until the next time it is called), even for the carets in other
123applications.
124
125\wxheading{See also}
126
127\helpref{GetBlinkTime}{wxcaretgetblinktime}
128
129\membersection{wxCaret::SetSize}\label{wxcaretsetsize}
130
131\func{void}{SetSize}{\param{int }{width}, \param{int }{height}}
132
133\func{void}{SetSize}{\param{const wxSize\& }{size}}
134
135Changes the size of the caret.
136
137\membersection{wxCaret::Show}\label{wxcaretshow}
138
139\func{void}{Show}{\param{bool }{show = TRUE}}
140
141Shows or hides the caret. Notice that if the caret was hidden $N$ times, it
142must be shown $N$ times as well to reappear on the screen.
143