Class: Wx::RTC::RichTextSelection

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/rtc/rich_text_object.rb

Overview

Note:

This class is untracked and should not be derived from nor instances extended!

Stores selection information.

The selection does not have to be contiguous, though currently non-contiguous selections are only supported for a range of table cells (a geometric block of cells can consist of a set of non-contiguous positions). The selection consists of an array of ranges, and the container that is the context for the selection. It follows that a single selection object can only represent ranges with the same parent container.

Category: Rich Text

See Also:

Requires:

  • USE_RICHTEXT

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sel) ⇒ Wx::RTC::RichTextSelection #initialize(range, container) ⇒ Wx::RTC::RichTextSelection #initializeWx::RTC::RichTextSelection

Returns a new instance of RichTextSelection.

Overloads:



2649
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 2649

def initialize(*args) end

Class Method Details

.self.within_selection(pos, ranges) ⇒ Boolean .self.within_selection(range, ranges) ⇒ Boolean

Overloads:

  • .self.within_selection(pos, ranges) ⇒ Boolean

    Returns true if the given position is within the selection range.

    Parameters:

    • pos (Integer)
    • ranges (Array<Range>)

    Returns:

    • (Boolean)
  • .self.within_selection(range, ranges) ⇒ Boolean

    Returns true if the given range is within the selection range.

    Parameters:

    • range (Range)
    • ranges (Array<Range>)

    Returns:

    • (Boolean)


2757
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 2757

def self.within_selection(*args) end

Instance Method Details

#==(sel) ⇒ Boolean

Equality operator.

Parameters:

Returns:

  • (Boolean)


2680
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 2680

def ==(sel) end

#add(range) ⇒ void

This method returns an undefined value.

Adds a range to the selection.

Parameters:

  • range (Range)


2670
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 2670

def add(range) end

#copy(sel) ⇒ void

This method returns an undefined value.

Copies from sel.

Parameters:



2675
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 2675

def copy(sel) end

#get_containerWx::RTC::RichTextParagraphLayoutBox Also known as: container

Returns the container for which the selection is valid.



2716
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 2716

def get_container; end

#get_countInteger Also known as: count

Returns the number of ranges in the selection.

Returns:

  • (Integer)


2695
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 2695

def get_count; end

#get_range(i) ⇒ Range #get_rangeRange Also known as: range

Overloads:

  • #get_range(i) ⇒ Range

    Returns the range at the given index.

    Parameters:

    • i (Integer)

    Returns:

    • (Range)
  • #get_rangeRange

    Returns the first range if there is one, otherwise Wx::RICHTEXT_NO_SELECTION.

    Returns:

    • (Range)


2705
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 2705

def get_range(*args) end

#get_rangesArray<Range> Also known as: ranges

Returns the selection ranges.

Returns:

  • (Array<Range>)


2684
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 2684

def get_ranges; end

#get_selection_for_object(obj) ⇒ Array<Range> Also known as: selection_for_object

Returns the selection appropriate to the specified object, if any; returns an empty array if none at the level of the object’s container.

Parameters:

Returns:

  • (Array<Range>)


2733
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 2733

def get_selection_for_object(obj) end

#is_validBoolean Also known as: valid?

Returns true if the selection is valid.

Returns:

  • (Boolean)


2727
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 2727

def is_valid; end

#resetvoid

This method returns an undefined value.

Resets the selection.



2653
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 2653

def reset; end

#set(range, container) ⇒ void #set(ranges, container) ⇒ void

Overloads:

  • #set(range, container) ⇒ void

    This method returns an undefined value.

    Sets the selection.

    Parameters:

  • #set(ranges, container) ⇒ void

    This method returns an undefined value.

    Sets the selections from an array of ranges and a container object.

    Parameters:



2665
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 2665

def set(*args) end

#set_container(container) ⇒ void Also known as: container=

This method returns an undefined value.

Sets the container for which the selection is valid.

Parameters:



2722
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 2722

def set_container(container) end

#set_range(range) ⇒ void Also known as: range=

This method returns an undefined value.

Sets a single range.

Parameters:

  • range (Range)


2711
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 2711

def set_range(range) end

#set_ranges(ranges) ⇒ void Also known as: ranges=

This method returns an undefined value.

Sets the selection ranges.

Parameters:

  • ranges (Array<Range>)


2690
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 2690

def set_ranges(ranges) end

#within_selection(pos, obj) ⇒ Boolean #within_selection(pos) ⇒ Boolean

Overloads:

  • #within_selection(pos, obj) ⇒ Boolean

    Returns true if the given position is within the selection.

    Parameters:

    Returns:

    • (Boolean)
  • #within_selection(pos) ⇒ Boolean

    Returns true if the given position is within the selection.

    Parameters:

    • pos (Integer)

    Returns:

    • (Boolean)


2745
# File 'lib/wx/doc/gen/rtc/rich_text_object.rb', line 2745

def within_selection(*args) end