Reference Manual
Inti Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

Inti::Gtk::SourceIter Class Reference

A GtkTextIter object that supports case-insensitive searching. More...

#include <inti/gtk-sourceview/sourceiter.h>

List of all members.

Public Member Functions

Constructors
Methods

Detailed Description

A GtkTextIter object that supports case-insensitive searching.

SourceIter is a Gtk::TextIter extension that supports case-insensitive forward and backward searching.


Constructor & Destructor Documentation

Inti::Gtk::SourceIter::SourceIter GtkTextIter *  iter  )  [explicit]
 

Construct a new source iterator from an existing GtkTextIter.

Parameters:
iter A pointer to a GtkTextIter.

The iter can be a newly created GtkTextIter or an existing GtkTextIter. The SourceIter object created is a temporary object. It doesn't take over the ownership of GtkTextIter and GtkTextIter is not freed by the destructor.

Inti::Gtk::SourceIter::SourceIter GtkTextIter *  iter,
bool  copy
 

Construct a new source iterator from an existing GtkTextIter.

Parameters:
iter A pointer to a GtkTextIter.
copy Whether the SourceIter object should make a copy of GtkTextIter or not.

The iter can be a newly created GtkTextIter or an existing GtkTextIter. If copy is true SourceIter will make a copy of GtkTextIter. If copy is false SourceIter wont make a copy but instead takes over the ownership of GtkTextIter. Either way, the destructor will free GtkTextIter when the SourceIter object is destroyed. This constructor is used by G::Boxed::wrap() to wrap GtkTextIter objects in a C++ wrapper.

Inti::Gtk::SourceIter::SourceIter const SourceIter src  ) 
 

Copy constructor.

Parameters:
src The source iterator.


Member Function Documentation

bool Inti::Gtk::SourceIter::backward_search const String &  str,
SourceSearchFlagsField  flags,
SourceIter match_start,
SourceIter match_end,
const SourceIter limit = 0
 

Searches backward for str.

Parameters:
str The search string.
flags The bitmask of flags specifying how the search is done.
match_start The return location for start of match, or null.
match_end The return location for end of match, or null.
limit The location of last possible match_start, or null for start of buffer.
Returns:
Whether a match was found.

bool Inti::Gtk::SourceIter::backward_search const String &  str,
SourceIter match_start,
SourceIter match_end,
const SourceIter limit = 0
 

Do a case-sensitive search backward for str.

Parameters:
str The search string.
match_start The return location for start of match, or null.
match_end The return location for end of match, or null.
limit The location of last possible match_start, or null for start of buffer.
Returns:
Whether a match was found.

The Gtk::SOURCE_SEARCH_VISIBLE_ONLY flag is used so the match may have invisible text interspersed in str (i.e. str will be a possibly-noncontiguous subsequence of the matched range).

bool Inti::Gtk::SourceIter::backward_search const String &  str,
const SourceIter limit = 0
 

Do a case-sensitive search backward for str.

Parameters:
str The search string.
limit The location of last possible match_start, or null for start of buffer.
Returns:
Whether a match was found.

The Gtk::SOURCE_SEARCH_VISIBLE_ONLY flag is used so the match may have invisible text interspersed in str (i.e. str will be a possibly-noncontiguous subsequence of the matched range).

bool Inti::Gtk::SourceIter::find_matching_bracket  ) 
 

Tries to match the bracket character currently at the iter with its opening/closing counterpart, and if found moves iter to the position where it was found.

Returns:
true if a matching bracket is found and the iter moved.

If the current bracket is an opening bracket the buffer is searched in a forward direction. If the current bracket is a closing bracket the buffer is searched in a backward direction.

bool Inti::Gtk::SourceIter::forward_search const String &  str,
SourceSearchFlagsField  flags,
SourceIter match_start,
SourceIter match_end,
const SourceIter limit = 0
 

Searches forward for str.

Parameters:
str The search string.
flags The bitmask of flags specifying how the search is done.
match_start The return location for start of match, or null.
match_end The return location for end of match, or null.
limit The bound for the search, or null for the end of the buffer.
Returns:
Whether a match was found

Any match is returned by setting match_start to the first character of the match and match_end to the first character after the match. The search will not continue past limit. Note that a search is a linear or O(n) operation, so you may wish to use limit to avoid locking up your UI on large buffers. If the Gtk::SOURCE_SEARCH_VISIBLE_ONLY flag is present, the match may have invisible text interspersed in str (i.e. str will be a possibly-noncontiguous subsequence of the matched range). Similarly, if you specify Gtk::SOURCE_SEARCH_TEXT_ONLY, the match may have pixbufs or child widgets mixed inside the matched range. If these flags are not given, the match must be exact; the special 0xFFFC character in str will match embedded pixbufs or child widgets. If you specify the Gtk::SOURCE_SEARCH_CASE_INSENSITIVE flag, the text will be matched regardless of what case it is in.

bool Inti::Gtk::SourceIter::forward_search const String &  str,
SourceIter match_start,
SourceIter match_end,
const SourceIter limit = 0
 

Do a case-sensitive search forward for str.

Parameters:
str The search string.
match_start The return location for start of match, or null.
match_end The return location for end of match, or null.
limit The bound for the search, or null for the end of the buffer.
Returns:
Whether a match was found

Any match is returned by setting match_start to the first character of the match and match_end to the first character after the match. The search will not continue past limit. Note that a search is a linear or O(n) operation, so you may wish to use limit to avoid locking up your UI on large buffers. The Gtk::SOURCE_SEARCH_VISIBLE_ONLY flag is used so the match may have invisible text interspersed in str (i.e. str will be a possibly-noncontiguous subsequence of the matched range).

bool Inti::Gtk::SourceIter::forward_search const String &  str,
const SourceIter limit = 0
 

Do a case-sensitive search forward for str.

Parameters:
str The search string.
limit The bound for the search, or null for the end of the buffer.
Returns:
Whether a match was found

The search will not continue past limit. Note that a search is a linear or O(n) operation, so you may wish to use limit to avoid locking up your UI on large buffers. The Gtk::SOURCE_SEARCH_VISIBLE_ONLY flag is used so the match may have invisible text interspersed in str (i.e. str will be a possibly-noncontiguous subsequence of the matched range).

SourceIter& Inti::Gtk::SourceIter::operator= const SourceIter src  ) 
 

Assignment operator.

Parameters:
src The source iterator.


The documentation for this class was generated from the following file: Main Page - Footer


Generated on Wed Aug 27 21:17:27 2003 for Inti-SourceView by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002