Class: Wx::Caret

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(window, size) ⇒ Wx::Caret #initializeWx::Caret

Returns a new instance of Caret.

Overloads:

  • #initialize(window, size) ⇒ Wx::Caret

    Creates a caret with the given size (in pixels) and associates it with the window.

    Parameters:

  • #initializeWx::Caret

    Default constructor.



27
# File 'lib/wx/doc/gen/caret.rb', line 27

def initialize(*args) end

Class Method Details

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).

Returns:

  • (Integer)


84
# File 'lib/wx/doc/gen/caret.rb', line 84

def self.get_blink_time; end

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.

Parameters:

  • milliseconds (Integer)

See Also:



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).

Parameters:

Returns:

  • (Boolean)


33
# File 'lib/wx/doc/gen/caret.rb', line 33

def create(window, size) end

#get_positionWx::Point Also known as: position

Get the caret position (in pixels).

Returns:



37
# File 'lib/wx/doc/gen/caret.rb', line 37

def get_position; end

#get_sizeWx::Size Also known as: size

Get the caret size.

Returns:



42
# File 'lib/wx/doc/gen/caret.rb', line 42

def get_size; end

#get_windowWx::Window Also known as: window

Get the window the caret is associated with.

Returns:



58
# File 'lib/wx/doc/gen/caret.rb', line 58

def get_window; end

#hidevoid

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_okBoolean Also known as: ok?

Returns true if the caret was created successfully.

Returns:

  • (Boolean)


67
# File 'lib/wx/doc/gen/caret.rb', line 67

def is_ok; end

#is_visibleBoolean 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).

Returns:

  • (Boolean)


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).

Parameters:



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.

Parameters:

  • size (Array(Integer, Integer), Wx::Size)


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.

Parameters:

  • show (Boolean) (defaults to: true)


80
# File 'lib/wx/doc/gen/caret.rb', line 80

def show(show=true) end