]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/caret.tex
Added Set/Get/HasOption members and moved palette to ref data class.
[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{Data structures}
30
31 \latexignore{\rtfignore{\wxheading{Members}}}
32
33 \membersection{wxCaret::wxCaret}\label{wxcaretwxcaret}
34
35 \func{}{wxCaret}{\void}
36
37 Default 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
43 Create the caret of given (in pixels) width and height and associates it
44 with 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
52 Create the caret of given (in pixels) width and height and associates it
53 with the given window (same as constructor).
54
55 \membersection{wxCaret::GetBlinkTime}\label{wxcaretgetblinktime}
56
57 \func{static int}{GetBlinkTime}{\void}
58
59 Returns the blink time which is measured in milliseconds and is the time elapsed
60 between 2 inversions of the caret (blink time of the caret is the same
61 for 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
69 Get 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
77 Get the caret size.
78
79 \membersection{wxCaret::GetWindow}\label{wxcaretgetwindow}
80
81 \constfunc{wxWindow*}{GetWindow}{\void}
82
83 Get the window the caret is associated with.
84
85 \membersection{wxCaret::Hide}\label{wxcarethide}
86
87 \func{void}{Hide}{\void}
88
89 Same as \helpref{wxCaret::Show(FALSE)}{wxcaretshow}.
90
91 \membersection{wxCaret::IsOk}\label{wxcaretisok}
92
93 \constfunc{bool}{IsOk}{\void}
94
95 Returns TRUE if the caret was created successfully.
96
97 \membersection{wxCaret::IsVisible}\label{wxcaretisvisible}
98
99 \constfunc{bool}{IsVisible}{\void}
100
101 Returns TRUE if the caret is visible and FALSE if it is permanently
102 hidden (if it is is blinking and not shown currently but will be after the
103 next 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
111 Move 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
117 Sets the blink time for all the carets.
118
119 \wxheading{Remarks}
120
121 Under Windows, this function will change the blink time for {\bf all} carets
122 permanently (until the next time it is called), even for the carets in other
123 applications.
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
135 Changes the size of the caret.
136
137 \membersection{wxCaret::Show}\label{wxcaretshow}
138
139 \func{void}{Show}{\param{bool }{show = TRUE}}
140
141 Shows or hides the caret. Notice that if the caret was hidden $N$ times, it
142 must be shown $N$ times as well to reappear on the screen.
143