wxCaret(3erl)
π wxCaret β Erlang Module Definition π
Hey bestie! Welcome to wxCaret(3erl), aka the Erlang Module Definition page for the wxCaret class. Itβs giving blinking-cursor main-character energy, and honestly? Obsessed. π
β¨
πΈ NAME πΈ
wxCaret β Functions for wxCaret class.
π DESCRIPTION π
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. Cute, right? π«Ά
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. Future glow-up pending, bestie. π
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. No caret double-dipping, periodt. π
wxWidgets docs: wxCaret
π¦ DATA TYPES π¦
wxCaret() = wx:wx_object()
β¨ EXPORTS β¨
new(Window, Size) -> wxCaret()
Types:
Window = wxWindow:wxWindow()
Size = {W :: integer(), H :: integer()}
Thatβs the tuple-sized constructor signature, bestie. π
new(Window, Width, Height) -> wxCaret()
Types:
Window = wxWindow:wxWindow()
Width = Height = integer()
Creates a caret with the given size (in pixels) and associates it with the window. Iconic little rectangle behavior. β¨
create(This, Window, Size) -> boolean()
Types:
This = wxCaret()
Window = wxWindow:wxWindow()
Size = {W :: integer(), H :: integer()}
create(This, Window, Width, Height) -> boolean()
Types:
This = wxCaret()
Window = wxWindow:wxWindow()
Width = Height = integer()
Creates a caret with the given size (in pixels) and associates it with the window (same as the equivalent constructors). Same caret magic, different arg shape. πͺ
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 function is static). Blink-blink clock check. β±οΈ
getPosition(This) -> {X :: integer(), Y :: integer()}
Types:
This = wxCaret()
Getter vibes for the caret position. π
getSize(This) -> {W :: integer(), H :: integer()}
Types:
This = wxCaret()
Getter vibes for the caret size. π
getWindow(This) -> wxWindow:wxWindow()
Types:
This = wxCaret()
Get the window the caret is associated with. πͺ
hide(This) -> ok
Types:
This = wxCaret()
Hides the caret, same as Show(false). Bye-bye, blink. π
isOk(This) -> boolean()
Types:
This = wxCaret()
Returns true if the caret was created successfully. β
isVisible(This) -> boolean()
Types:
This = wxCaret()
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). Blink lore is real. π
move(This, Pt) -> ok
Types:
This = wxCaret()
Pt = {X :: integer(), Y :: integer()}
move(This, X, Y) -> ok
Types:
This = wxCaret()
X = Y = integer()
Move the caret to given position (in logical coordinates). Scoot scoot, little caret. πΌ
setBlinkTime(Milliseconds) -> ok
Types:
Milliseconds = integer()
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. Windows said βshared blink time,β and it meant it. π
See: getBlinkTime/0
setSize(This, Size) -> ok
Types:
This = wxCaret()
Size = {W :: integer(), H :: integer()}
setSize(This, Width, Height) -> ok
Types:
This = wxCaret()
Width = Height = integer()
Changes the size of the caret. Resize the rectangle, bestie. π
show(This) -> ok
Types:
This = wxCaret()
show(This, Options :: [Option]) -> ok
Types:
This = wxCaret()
Option = {show, boolean()}
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. Stacked hide/show lore, no cap. π
destroy(This :: wxCaret()) -> ok
Destroys the object. Cleanup era. π§Ή
Thatβs the whole page, bestie! Big thanks to the wxWidgets team β this icon is from wx 2.2.2.1, and the manual is wxCaret(3erl). Stay blinking, stay iconic. πβ¨π·
π¦ where this page comes from
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4.8 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms