wxWidgets/docs/latex/wx/caret.tex
Julian Smart 9ec98f7c7f Typo correction
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7982 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-09 06:25:38 +00:00

148 lines
4.3 KiB
TeX

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: caret.tex
%% Purpose: wxCaret documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 20.06.00
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxCaret}}\label{wxcaret}
A caret is a blinking cursor showing the position where the typed text will
appear. The text controls usually have a caret but wxCaret class also allows
to use a caret in other windows.
Currently, the caret appears as a rectangle of the given size. In the future,
it will be possible to specify a bitmap to be used for the caret shape.
A caret is always associated with a window and the current caret can be
retrieved using \helpref{wxWindow::GetCaret}{wxwindowgetcaret}. The same caret
can't be reused in two different windows.
\wxheading{Derived from}
No base class
\wxheading{Include files}
<wx/caret.h>
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCaret::wxCaret}\label{wxcaretwxcaret}
\func{}{wxCaret}{\void}
Default constructor: you must use one of Create() functions later.
\func{}{wxCaret}{\param{wxWindow* }{window}, \param{int }{width}, \param{int }{height}}
\func{}{wxCaret}{\param{wxWindowBase* }{window}, \param{const wxSize\& }{size}}
Create the caret of given (in pixels) width and height and associates it
with the given window.
\membersection{wxCaret::Create}\label{wxcaretcreate}
\func{bool}{Create}{\param{wxWindowBase* }{window}, \param{int }{width}, \param{int }{height}}
\func{bool}{Create}{\param{wxWindowBase* }{window}, \param{const wxSize\& }{size}}
Create the caret of given (in pixels) width and height and associates it
with the given window (same as constructor).
\membersection{wxCaret::GetBlinkTime}\label{wxcaretgetblinktime}
\func{static int}{GetBlinkTime}{\void}
Returns the blink time which is measured in milliseconds and is the time elapsed
between 2 inversions of the caret (blink time of the caret is the same
for all carets, so this functions is static).
\membersection{wxCaret::GetPosition}\label{wxcaretgetposition}
\constfunc{void}{GetPosition}{\param{int* }{x}, \param{int* }{y}}
\constfunc{wxPoint}{GetPosition}{\void}
Get the caret position (in pixels).
\membersection{wxCaret::GetSize}\label{wxcaretgetsize}
\constfunc{void}{GetSize}{\param{int* }{width}, \param{int* }{height}}
\constfunc{wxSize}{GetSize}{\void}
Get the caret size.
\membersection{wxCaret::GetWindow}\label{wxcaretgetwindow}
\constfunc{wxWindow*}{GetWindow}{\void}
Get the window the caret is associated with.
\membersection{wxCaret::Hide}\label{wxcarethide}
\func{void}{Hide}{\void}
Same as \helpref{wxCaret::Show(FALSE)}{wxcaretshow}.
\membersection{wxCaret::IsOk}\label{wxcaretisok}
\constfunc{bool}{IsOk}{\void}
Returns TRUE if the caret was created successfully.
\membersection{wxCaret::IsVisible}\label{wxcaretisvisible}
\constfunc{bool}{IsVisible}{\void}
Returns TRUE if the caret is visible and FALSE if it is permanently
hidden (if it is is blinking and not shown currently but will be after the
next blink, this method still returns TRUE).
\membersection{wxCaret::Move}\label{wxcaretmove}
\func{void}{Move}{\param{int }{x}, \param{int }{y}}
\func{void}{Move}{\param{const wxPoint\& }{pt}}
Move the caret to given position (in logical coordinates).
\membersection{wxCaret::SetBlinkTime}\label{wxcaretsetblinktime}
\func{static void}{SetBlinkTime}{\param{int }{milliseconds}}
Sets the blink time for all the carets.
\wxheading{Remarks}
Under Windows, this function will change the blink time for {\bf all} carets
permanently (until the next time it is called), even for the carets in other
applications.
\wxheading{See also}
\helpref{GetBlinkTime}{wxcaretgetblinktime}
\membersection{wxCaret::SetSize}\label{wxcaretsetsize}
\func{void}{SetSize}{\param{int }{width}, \param{int }{height}}
\func{void}{SetSize}{\param{const wxSize\& }{size}}
Changes the size of the caret.
\membersection{wxCaret::Show}\label{wxcaretshow}
\func{void}{Show}{\param{bool }{show = TRUE}}
Shows or hides the caret. Notice that if the caret was hidden $N$ times, it
must be shown $N$ times as well to reappear on the screen.