# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # A caret is a blinking cursor showing the position where the typed text will appear. # Text controls usually have their own caret but {Wx::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 {Wx::Window#get_caret}. The same caret can't be reused in two different windows. # === # # Category: {Wx::Miscellaneous} # class Caret < ::Object # @overload initialize(window, size) # Creates a caret with the given size (in pixels) and associates it with the window. # @param window [Wx::Window] # @param size [Array(Integer, Integer), Wx::Size] # @return [Caret] # @overload initialize() # Default constructor. # @return [Caret] def initialize(*args) end # Creates a caret with the given size (in pixels) and associates it with the window (same as the equivalent constructors). # @param window [Wx::Window] # @param size [Array(Integer, Integer), Wx::Size] # @return [true,false] def create(window, size) end # Get the caret position (in pixels). # {Wx::Perl} Note: In {Wx::Perl} there are two methods instead of a single overloaded method: # - {Wx::Caret#get_position}: returns a Wx::Point object.- GetPositionXY(): returns a 2-element list (x, y). # @return [Wx::Point] def get_position; end alias_method :position, :get_position # Get the caret size. # {Wx::Perl} Note: In {Wx::Perl} there are two methods instead of a single overloaded method: # - {Wx::Caret#get_size}: returns a Wx::Size object.- GetSizeWH(): returns a 2-element list (width, height). # @return [Wx::Size] def get_size; end alias_method :size, :get_size # Move the caret to given position (in logical coordinates). # @param pt [Array(Integer, Integer), Wx::Point] # @return [void] def move(pt) end # Changes the size of the caret. # @param size [Array(Integer, Integer), Wx::Size] # @return [void] def set_size(size) end alias_method :size=, :set_size # Get the window the caret is associated with. # @return [Wx::Window] def get_window; end alias_method :window, :get_window # Hides the caret, same as Show(false). # @return [void] def hide; end # Returns true if the caret was created successfully. # @return [true,false] def is_ok; end alias_method :ok?, :is_ok # 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). # @return [true,false] def is_visible; end alias_method :visible?, :is_visible # 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. # @param show [true,false] # @return [void] def show(show=true) end # 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). # @return [Integer] def self.get_blink_time; end # 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. # @see Wx::Caret.get_blink_time # @param milliseconds [Integer] # @return [void] def self.set_blink_time(milliseconds) end end # Caret end