wxCaret(3erl) | Erlang Module Definition | wxCaret(3erl) |
wxCaret - Functions for wxCaret class
A caret is a blinking cursor showing the position where the typed text will appear. Text controls usually have their own caret but wxCaret provides a way 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 wxWindow:getCaret/1. The same caret can't be reused in two different windows.
wxWidgets docs: wxCaret
wxCaret() = wx:wx_object()
new(Window, Size) -> wxCaret()
Types:
new(Window, Width, Height) -> wxCaret()
Types:
Creates a caret with the given size (in pixels) and associates it with the window.
create(This, Window, Size) -> boolean()
Types:
create(This, Window, Width, Height) -> boolean()
Types:
Creates a caret with the given size (in pixels) and associates it with the window (same as the equivalent constructors).
getBlinkTime() -> integer()
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).
getPosition(This) -> {X :: integer(), Y :: integer()}
Types:
getSize(This) -> {W :: integer(), H :: integer()}
Types:
getWindow(This) -> wxWindow:wxWindow()
Types:
Get the window the caret is associated with.
hide(This) -> ok
Types:
Hides the caret, same as Show(false).
isOk(This) -> boolean()
Types:
Returns true if the caret was created successfully.
isVisible(This) -> boolean()
Types:
Returns true if the caret is visible and false if it is permanently hidden (if it is blinking and not shown currently but will be after the next blink, this method still returns true).
move(This, Pt) -> ok
Types:
move(This, X, Y) -> ok
Types:
Move the caret to given position (in logical coordinates).
setBlinkTime(Milliseconds) -> ok
Types:
Sets the blink time for all the carets.
Warning: Under Windows, this function will change the blink time for all carets permanently (until the next time it is called), even for carets in other applications.
See: getBlinkTime/0
setSize(This, Size) -> ok
Types:
setSize(This, Width, Height) -> ok
Types:
Changes the size of the caret.
show(This) -> ok
Types:
show(This, Options :: [Option]) -> ok
Types:
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.
destroy(This :: wxCaret()) -> ok
Destroys the object.
wx 2.2.1 | wxWidgets team. |