[ruby-gnome2-doc-cvs] [Ruby-GNOME2 Project Website] update - Gtk::TextIter

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2014年 6月 12日 (木) 09:49:58 JST


-------------------------
REMOTE_ADDR = 106.188.0.234
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/ja/hiki.cgi?Gtk%3A%3ATextIter
-------------------------
@@ -1,17 +1,21 @@
-= class Gtk::TextIter
+= Gtk::TextIter クラス
+
 Gtk::TextIter represents iterators which most text manipulation is accomplished with.
 An iterator represents a position between two characters in the text buffer. Iterators are not valid indefinitely; whenever the buffer is modified in a way that affects the number of characters in the buffer, all outstanding iterators become invalid. (Note that deleting 5 characters and then reinserting 5 still invalidates iterators, though you end up with the same number of characters you pass through a state with a different number).
 Because of this, iterators can't be used to preserve positions across buffer modifications. To preserve a position, the Gtk::TextMark object is ideal.
 
-== Object Hierarchy
+== オブジェクト階層
+
 * Object
   * GLib::Boxed
     * Gtk::TextIter
 
-== Included Modules
+== インクルードされているモジュール
+
 * Comparable
 
-== Instance Methods
+== インスタンスメソッド
+
 --- <=>(rhs)
     Returns negative if self is less than rhs, positive if self is greater than rhs, and 0 if they're equal. Ordering is in character offset order, i.e. the first character in the buffer is less than the second character in the buffer.
     *rhs: a Gtk::TextIter
@@ -29,10 +33,16 @@
 --- offset
     Returns the character offset of an iterator. Each character in a Gtk::TextBuffer has an offset, starting with 0 for the first character in the buffer. Use Gtk::TextBuffer::get_iter_at_offset to convert an offset back into an iterator.
     * Returns: a character offset
+
 --- offset=(char_offset)
     Sets self to point to char_offset. char_offset counts from the start of the entire text buffer, starting with 0.
     * char_offset: a character number
     * Returns: char_offset
+
 --- set_offset(char_offset)
     Same as Gtk::TextIter#offset=.
     * char_offset: a character number
@@ -41,10 +47,18 @@
 --- line
     Returns the line number containing the iterator. Lines in a Gtk::TextBuffer are numbered beginning with 0 for the first line in the buffer.
     * Returns: a line number
+
 --- line=(line_number)
     Moves iterator self to the start of the line line_number. If line_number is negative or larger than the number of lines in the buffer, moves iter to the start of the last line in the buffer.
     * line_number: line number (counted from 0)
     * Returns: line_number
+
 --- set_line(line_number)
     Same as Gtk::TextIter#line=.
     * line_number: line number (counted from 0)
@@ -53,10 +61,20 @@
 --- line_offset
     Returns the character offset of the iterator, counting from the start of a newline-terminated line. The first character on the line has offset 0.
     * Returns: offset from start of line
+
 --- line_offset=(char_on_line)
     Moves self within a line, to a new character (not byte) offset. The given character offset must be less than or equal to the number of characters in the line; if equal, iter moves to the start of the next line. See Gtk::TextIter#set_line_index if you have a byte index rather than a character offset.
     * char_on_line: a character offset relative to the start of self's current line
     * Returns: char_on_line
+
 --- set_line_offset(char_on_line)
     Same as Gtk::TextIter#line_offset=.
     * char_on_line: a character offset relative to the start of self's current line
@@ -65,10 +75,22 @@
 --- line_index
     Returns the byte index of the iterator, counting from the start of a newline-terminated line. Remember that Gtk::TextBuffer encodes text in UTF-8, and that characters can require a variable number of bytes to represent.
     * Returns: distance from start of line, in bytes
+
 --- line_index=(byte_on_line)
     Same as Gtk::TextIter#set_line_offset, but works with a byte index. The given byte index must be at the start of a character, it can't be in the middle of a UTF-8 encoded character.
     * byte_on_line: a byte index relative to the start of self's current line
     * Returns: byte_on_line
+
 --- set_line_index(byte_on_line)
     Same as Gtk::TextIter#line_index=.
     * byte_on_line: a byte index relative to the start of self's current line
@@ -77,10 +89,24 @@
 --- visible_line_index
     Returns the number of bytes from the start of the line to the given self, not counting bytes that are invisible due to tags with the "invisible" flag toggled on.
     * Returns: byte index of self with respect to the start of the line
+
 --- visible_line_index=(byte_on_line)
     Like Gtk::TextIter#set_line_index, but the index is in visible bytes, i.e. text with a tag making it invisible is not counted in the index.
     * byte_on_line: a byte index 
     * Returns: byte_on_line
+
 --- set_visible_line_index(byte_on_line)
     Same as Gtk::TextIter#visible_line_index=.
     * byte_on_line: a byte index 
@@ -89,10 +103,26 @@
 --- visible_line_offset
     Returns the offset in characters from the start of the line to the given self, not counting characters that are invisible due to tags with the "invisible" flag toggled on.
     * Returns: offset in visible characters from the start of the line 
+
 --- visible_line_offset=(char_on_line)
     Like Gtk::TextIter#set_line_offset, but the offset is in visible characters, i.e. text with a tag making it invisible is not counted in the offset.
     * char_on_line: a character offset
     * Returns: char_on_line
+
 --- set_visible_line_offset(char_on_line)
     Same as Gtk::TextIter#visible_line_offset=.
     * char_on_line: a character offset
@@ -177,6 +193,23 @@
 --- starts_word?
     Determines whether self begins a natural-language word. Word breaks are determined by Pango and should be correct for nearly any language (if not, the correct fix would be to the Pango word break algorithms).
     * Returns: true if self is at the start of a word
+
 --- ends_word?
     Determines whether self ends a natural-language word. Word breaks are determined by Pango and should be correct for nearly any language (if not, the correct fix would be to the Pango word break algorithms).
     * Returns: true if self is at the end of a word
@@ -188,6 +205,24 @@
 --- starts_line?
     Returns true if self begins a paragraph, i.e. if Gtk::TextIter#line_offset would return 0. However this method is potentially more efficient than Gtk::TextIter#line_offset because it doesn't have to compute the offset, it just has to see whether it's 0.
     * Returns: whether self begins a line
+
 --- ends_line?
     Returns true if iter points to the start of the paragraph delimiter characters for a line (delimiters will be either a newline, a carriage return, a carriage return followed by a newline, or a Unicode paragraph separator character). Note that an iterator pointing to the \n of a \r\n pair will not be counted as the end of a line, the line ends before the \r. The end iterator is considered to be at the end of a line, even though there are no paragraph delimiter chars there.
     * Returns: whether self is at the end of a line 
@@ -195,6 +213,25 @@
 --- starts_sentence?
     Determines whether self begins a sentence. Sentence boundaries are determined by Pango and should be correct for nearly any language (if not, the correct fix would be to the Pango text boundary algorithms).
     * Returns: true if self is at the start of a sentence.
+
 --- ends_sentence?
     Determines whether self ends a sentence. Sentence boundaries are determined by Pango and should be correct for nearly any language (if not, the correct fix would be to the Pango text boundary algorithms).
     * Returns : true if self is at the end of a sentence.
@@ -228,6 +247,26 @@
 --- end?
     Returns true if self is the end iterator, i.e. one past the last dereferenceable iterator in the buffer. Gtk::TextIter#end? is the most efficient way to check whether an iterator is the end iterator.
     * Returns : whether self is the end iterator
+
 --- start?
     Returns true if self is the first iterator in the buffer, that is if iter has a character offset of 0.
     * Returns : whether self is the first in the buffer
@@ -235,6 +255,27 @@
 --- forward_char
     Moves iter forward by one character offset. Note that images embedded in the buffer occupy 1 character slot, so Gtk::TextIter#forward_char may actually move onto an image instead of a character, if you have images in your buffer. If self is the end iterator or one character before it, iter will now point at the end iterator, and Gtk::TextIter#forward_char returns false for convenience when writing loops.
     * Returns: whether iter moved and is dereferenceable
+
 --- backward_char
     Moves backward by one character offset. Returns true if movement was possible; if iter was the first in the buffer (character offset 0), Gtk::TextIter#backward_char returns false for convenience when writing loops.
     * Returns: whether movement was possible
@@ -243,6 +264,28 @@
     Moves count characters if possible (if count would move past the start or end of the buffer, moves to the start or end of the buffer). The return value indicates whether the new position of iter is different from its original position, and dereferenceable (the last iterator in the buffer is not dereferenceable). If count is 0, the function does nothing and returns false.
     * count: number of characters to move, may be negative
     * Returns: whether self moved and is dereferenceable
+
 --- backward_chars(count)
     Moves count characters backward, if possible (if count would move past the start or end of the buffer, moves to the start or end of the buffer). The return value indicates whether the iterator moved onto a dereferenceable position; if the iterator didn't move, or moved onto the end iterator, then false is returned. If count is 0, the method does nothing and returns false.
     * count: number of characters to move
@@ -251,6 +273,29 @@
 --- forward_line
     Moves self to the start of the next line. Returns true if there was a next line to move to, and false if self was simply moved to the end of the buffer and is now not dereferenceable, or if iter was already at the end of the buffer.
     * Returns: whether self can be dereferenced
+
 --- backward_line
     Moves self to the start of the previous line. Returns true if self could be moved; i.e. if self was at character offset 0, this function returns false. Therefore if self was already on line 0, but not at the start of the line, iter is snapped to the start of the line and the method returns true. (Note that this implies that in a loop calling this method, the line number may not change on every iteration, if your first iteration is on line 0.)
     * Returns: whether iter moved
@@ -259,6 +282,30 @@
     Moves count lines forward, if possible (if count would move past the start or end of the buffer, moves to the start or end of the buffer). The return value indicates whether the iterator moved onto a dereferenceable position; if the iterator didn't move, or moved onto the end iterator, then false is returned. If count is 0, the method does nothing and returns false. If count is negative, moves backward by 0 - count lines.
     * count: number of lines to move forward
     * Returns: whether self moved and is dereferenceable 
+
 --- backward_lines(count)
     Moves count lines backward, if possible (if count would move past the start or end of the buffer, moves to the start or end of the buffer). The return value indicates whether the iterator moved onto a dereferenceable position; if the iterator didn't move, or moved onto the end iterator, then false is returned. If count is 0, the method does nothing and returns false. If count is negative, moves forward by 0 - count lines.
     * count: number of lines to move backward
@@ -268,6 +292,31 @@
     Calls Gtk::TextIter#forward_word_end up to count times.
     * count: number of times to move 
     * Returns: true if self moved and is not the end iterator
+
 --- backward_word_starts(count)
     Calls Gtk::TextIter#word_start up to count times.
     * count: number of times to move
@@ -276,6 +301,32 @@
 --- forward_word_end
     Moves forward to the next word end. (If self is currently on a word end, moves forward to the next one after that.) Word breaks are determined by Pango and should be correct for nearly any language (if not, the correct fix would be to the Pango word break algorithms).
     *Returns: true if self moved and is not the end iterator
+
 --- backward_word_start
     Moves backward to the previous word start. (If self is currently on a word start, moves backward to the next one after that.) Word breaks are determined by ((<Pango|Ruby/Pango>)) and should be correct for nearly any language (if not, the correct fix would be to the Pango word break algorithms).
     * Returns: true if self moved and is not the end iterator 
@@ -283,6 +309,33 @@
 --- forward_cursor_position
     Moves self forward by a single cursor position. Cursor positions are (unsurprisingly) positions where the cursor can appear. Perhaps surprisingly, there may not be a cursor position between all characters. The most common example for European languages would be a carriage return/newline sequence. For some Unicode characters, the equivalent of say the letter "a" with an accent mark will be represented as two characters, first the letter then a "combining mark" that causes the accent to be rendered; so the cursor can't go between those two characters. See also the Pango::LogAttr and Pango.break method.
     * Returns : true if we moved and the new position is dereferenceable
+
 --- backward_cursor_position
     Like Gtk::TextIter#forward_cursor_position, but moves backward.
     * Returns: true if we moved
@@ -291,6 +318,34 @@
     Moves up to count cursor positions. See Gtk::TextIter#forward_cursor_position for details.
     * count: number of positions to move
     * Returns: true if we moved and the new position is dereferenceable
+
 --- backward_cursor_positions(count)
     Moves up to count cursor positions. See Gtk::TextIter#forward_cursor_position for details.
     * count: number of positions to move
@@ -299,6 +327,35 @@
 --- forward_sentence_end
     Moves forward to the next sentence end. (If self is at the end of a sentence, moves to the next end of sentence.) Sentence boundaries are determined by Pango and should be correct for nearly any language (if not, the correct fix would be to the Pango text boundary algorithms).
     * Returns: true if self moved and is not the end iterator
+
 --- backward_sentence_start
     Moves backward to the previous sentence start; if self is already at the start of a sentence, moves backward to the next one. Sentence boundaries are determined by Pango and should be correct for nearly any language (if not, the correct fix would be to the Pango text boundary algorithms).
     * Returns: true if self moved and is not the end iterator
@@ -307,6 +336,36 @@
     Calls Gtk::TextIter#forward_sentence_end count times (or until Gtk::TextIter#forward_sentence_end returns false). If count is negative, moves backward instead of forward.
     * count: number of sentences to move
     * Returns: true if self moved and is not the end iterator
+
 --- backward_sentence_starts(count)
     Calls Gtk::TextIter#backward_sentence_start up to count times, or until it returns false. If count is negative, moves forward instead of backward.
     * count: number of sentences to move
@@ -386,6 +416,37 @@
     * limit: search limit, or nil for none
     * ch: UCS-4 character code
     * Returns: whether a match was found
+
 --- backward_find_char(limit) { |ch| ... }
     Same as Gtk::TextIter#forward_find_char, but goes backward from iter.
     * limit: search limit, or nil for none
@@ -399,6 +430,38 @@
     * flags: flags affecting how the search is done (((<GtkTextSearchFlags|Gtk::TextIter#GtkTextSearchFlags>)))
     * limit: bound for the search, or nil for the end of the buffer
     * Returns: an array of Gtk::TextIter or nil
+
 --- backward_search(str, flags, limit)
     Same as Gtk::TextIter#forward_search, but moves backward.
     * str: search string
@@ -411,7 +443,40 @@
     * tag: a Gtk::TextTag or nil
     * Returns: whether we found a tag toggle before self
 
-== Constants
+== 定数
+
 --- SOURCE_SEARCH_CASE_INSENSITIVE (Gtk::TextIter::SourceSearchFlags)
     ((*要編集*))
 
@@ -435,10 +468,42 @@
 --- SEARCH_VISIBLE_ONLY
 --- SEARCH_CASE_INSENSITIVE
     ((*存在しない?or上位階層クラスのページに要移動?*))
-
 
 
-== ChangeLog
+== 更新履歴
 * 2014-06-11 クラスのメンバ項目の存在チェック("存在しない?or上位階層クラスのページに要移動?"とマーク)。リストから漏れているものを追加。
 * 2005-08-30 ((<gc>)): documented additions for Gtk+ 2.4 and Gtk+ 2.8.
 * 2003-08-07 ((<Masao>)): Revised.




ruby-gnome2-cvs メーリングリストの案内
Back to archive index