Class: Wx::Caret
- Inherits:
-
Object
- Object
- Wx::Caret
- Defined in:
- lib/wx/doc/gen/caret.rb
Overview
A caret is a blinking cursor showing the position where the typed text will appear.
Text controls usually have their own caret but Caret 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 Window#get_caret. The same caret can’t be reused in two different windows.
Category: Miscellaneous
Class Method Summary collapse
-
.get_blink_time ⇒ 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).
-
.set_blink_time(milliseconds) ⇒ void
Sets the blink time for all the carets.
Instance Method Summary collapse
-
#create(window, size) ⇒ Boolean
Creates a caret with the given size (in pixels) and associates it with the window (same as the equivalent constructors).
-
#get_position ⇒ Wx::Point
(also: #position)
Get the caret position (in pixels).
-
#get_size ⇒ Wx::Size
(also: #size)
Get the caret size.
-
#get_window ⇒ Wx::Window
(also: #window)
Get the window the caret is associated with.
-
#hide ⇒ void
Hides the caret, same as Show(false).
-
#initialize(*args) ⇒ Caret
constructor
A new instance of Caret.
-
#is_ok ⇒ Boolean
(also: #ok?)
Returns true if the caret was created successfully.
-
#is_visible ⇒ Boolean
(also: #visible?)
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(pt) ⇒ void
Move the caret to given position (in logical coordinates).
-
#set_size(size) ⇒ void
(also: #size=)
Changes the size of the caret.
-
#show(show = true) ⇒ void
Shows or hides the caret.
Constructor Details
Class Method Details
.get_blink_time ⇒ 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).
84 |
# File 'lib/wx/doc/gen/caret.rb', line 84 def self.get_blink_time; end |
.set_blink_time(milliseconds) ⇒ void
This method returns an undefined value.
Sets the blink time for all the carets.
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.
92 |
# File 'lib/wx/doc/gen/caret.rb', line 92 def self.set_blink_time(milliseconds) end |
Instance Method Details
#create(window, size) ⇒ Boolean
Creates a caret with the given size (in pixels) and associates it with the window (same as the equivalent constructors).
33 |
# File 'lib/wx/doc/gen/caret.rb', line 33 def create(window, size) end |
#get_position ⇒ Wx::Point Also known as: position
Get the caret position (in pixels).
37 |
# File 'lib/wx/doc/gen/caret.rb', line 37 def get_position; end |
#get_size ⇒ Wx::Size Also known as: size
Get the caret size.
42 |
# File 'lib/wx/doc/gen/caret.rb', line 42 def get_size; end |
#get_window ⇒ Wx::Window Also known as: window
Get the window the caret is associated with.
58 |
# File 'lib/wx/doc/gen/caret.rb', line 58 def get_window; end |
#hide ⇒ void
This method returns an undefined value.
Hides the caret, same as Show(false).
63 |
# File 'lib/wx/doc/gen/caret.rb', line 63 def hide; end |
#is_ok ⇒ Boolean Also known as: ok?
Returns true if the caret was created successfully.
67 |
# File 'lib/wx/doc/gen/caret.rb', line 67 def is_ok; end |
#is_visible ⇒ Boolean Also known as: visible?
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).
72 |
# File 'lib/wx/doc/gen/caret.rb', line 72 def is_visible; end |
#move(pt) ⇒ void
This method returns an undefined value.
Move the caret to given position (in logical coordinates).
48 |
# File 'lib/wx/doc/gen/caret.rb', line 48 def move(pt) end |
#set_size(size) ⇒ void Also known as: size=
This method returns an undefined value.
Changes the size of the caret.
53 |
# File 'lib/wx/doc/gen/caret.rb', line 53 def set_size(size) end |
#show(show = true) ⇒ void
This method returns an undefined value.
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.
80 |
# File 'lib/wx/doc/gen/caret.rb', line 80 def show(show=true) end |