wxRuby Documentation Home

# Wx::RichTextRange

This class stores beginning and end positions for a range of data.

## Derived from

No base class

## Data structures

## Methods

- RichTextRange.new
- RichTextRange#contains
- RichTextRange#get_end
- RichTextRange#get_length
- RichTextRange#get_start
- RichTextRange#from_internal
- RichTextRange#is_outside
- RichTextRange#is_within
- RichTextRange#limit_to
- RichTextRange#set_end
- RichTextRange#set_range
- RichTextRange#set_start
- RichTextRange#swap
- RichTextRange#to_internal

### RichTextRange.new

RichTextRange.new(%(arg-type)Integer% start, Integer end) RichTextRange.new(%(arg-type)Range% range) destructor()

Destructor.

### RichTextRange#contains

Boolean contains(%(arg-type)Integer% pos)

Returns if the given position is within this range. Does not
match if the range is empty.

### RichTextRange#get_end

Integer get_end()

Returns the end position.

### RichTextRange#get_length

Integer get_length()

Returns the length of the range.

### RichTextRange#get_start

Integer get_start()

Returns the start of the range.

### RichTextRange#from_internal

Range from_internal()

Converts the internal range, which uses the first and last character positions of the range,
to the API-standard range, whose end is one past the last character in the range.
In other words, one is added to the end position.

### RichTextRange#is_outside

Boolean is_outside(%(arg-type)Range% range)

Returns if this range is completely outside range.

### RichTextRange#is_within

Boolean is_within(%(arg-type)Range% range)

Returns if this range is completely within range.

### RichTextRange#limit_to

Boolean limit_to(%(arg-type)Range% range)

Limits this range to be within range.

### RichTextRange#set_end

set_end(%(arg-type)Integer% end)

Sets the end of the range.

### RichTextRange#set_range

set_range(%(arg-type)Integer% start, Integer end)

Sets the range.

### RichTextRange#set_start

set_start(%(arg-type)Integer% start)

Sets the start of the range.

### RichTextRange#swap

swap()

Swaps the start and end.

### RichTextRange#to_internal

Range to_internal()

Converts the API-standard range, whose end is one past the last character in the range,
to the internal form, which uses the first and last character positions of the range.
In other words, one is subtracted from the end position.

### RichTextRange::operator+

Range operator+(%(arg-type)Range% range)

Adds range to this range.

### RichTextRange::operator-

Range operator-(%(arg-type)Range% range)

Subtracts range from this range.

### RichTextRange::operator=

operator=(%(arg-type)Range% range)

Assigns range to this range.

### RichTextRange::operator==

Boolean operator==(%(arg-type)Range% range)

Returns if range is the same as this range.

[This page automatically generated from the Textile source at 2023-06-09 00:45:31 +0000]