gtksourceviewmm  2.10.3
Public Member Functions
gtksourceview::SourceIter Class Reference

An iterator type for SourceBuffer. More...

#include <gtksourceviewmm/sourceiter.h>

Inheritance diagram for gtksourceview::SourceIter:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 SourceIter ()
 Default constructor.
bool forward_search (const Glib::ustring& a_str, SearchFlags a_flags, Gtk::TextIter& a_match_start, Gtk::TextIter& a_match_end, const Gtk::TextIter& a_limit) const
 Searches forward for a_str.
bool backward_search (const Glib::ustring& a_str, SearchFlags a_flags, Gtk::TextIter& a_match_start, Gtk::TextIter& a_match_end, const Gtk::TextIter& a_limit) const
 Searches backward for a_str.
bool forward_search (const Glib::ustring& str, SourceSearchFlags flags, Gtk::TextIter& match_start, Gtk::TextIter& match_end, const Gtk::TextIter& limit) const
 Searches forward for str.
bool forward_search (const Glib::ustring& str, SourceSearchFlags flags, Gtk::TextIter& match_start, Gtk::TextIter& match_end) const
 Searches forward for str.
bool backward_search (const Glib::ustring& str, SourceSearchFlags flags, Gtk::TextIter& match_start, Gtk::TextIter& match_end, const Gtk::TextIter& limit) const
 Searches backward for str.
bool backward_search (const Glib::ustring& str, SourceSearchFlags flags, Gtk::TextIter& match_start, Gtk::TextIter& match_end) const
 Searches backward for str.

Detailed Description

An iterator type for SourceBuffer.

Provides search features.


Constructor & Destructor Documentation

gtksourceview::SourceIter::SourceIter ( )

Default constructor.

Returns:
New SourceIter.

Member Function Documentation

bool gtksourceview::SourceIter::backward_search ( const Glib::ustring a_str,
SearchFlags  a_flags,
Gtk::TextIter a_match_start,
Gtk::TextIter a_match_end,
const Gtk::TextIter a_limit 
) const

Searches backward for a_str.

Same as forward_search(), but backwards.

Parameters:
a_strA search string.
a_flagsFlags affecting how the search is done.
a_match_startReturn location for start of match.
a_match_endReturn location for end of match.
a_limitBound for the search.
Returns:
Whether a match was found.
Deprecated:
Use method using SourceSearchFlags.
bool gtksourceview::SourceIter::backward_search ( const Glib::ustring str,
SourceSearchFlags  flags,
Gtk::TextIter match_start,
Gtk::TextIter match_end,
const Gtk::TextIter limit 
) const

Searches backward for str.

Same as Same as forward_search(), but backwards.

Parameters:
strA search string.
flagsFlags affecting how the search is done.
match_startReturn location for start of match.
match_endReturn location for end of match.
limitBound for the search.
Returns:
Whether a match was found.
Since gtksourceviewmm 2.10:
bool gtksourceview::SourceIter::backward_search ( const Glib::ustring str,
SourceSearchFlags  flags,
Gtk::TextIter match_start,
Gtk::TextIter match_end 
) const

Searches backward for str.

Same as backward_search(), but searches to the start.

Parameters:
strA search string.
flagsFlags affecting how the search is done.
match_startReturn location for start of match.
match_endReturn location for end of match.
Returns:
Whether a match was found.
Since gtksourceviewmm 2.10:
bool gtksourceview::SourceIter::forward_search ( const Glib::ustring a_str,
SearchFlags  a_flags,
Gtk::TextIter a_match_start,
Gtk::TextIter a_match_end,
const Gtk::TextIter a_limit 
) const

Searches forward for a_str.

Any match is returned by setting a_match_start to the first character of the match and a_match_end to the first character after the match. The search will not continue past a_limit. Note that a search is a linear or O(n) operation, so you may wish to use a_limit to avoid locking up your UI on large buffers.

If the SEARCH_VISIBLE_ONLY flag is present, the match may have invisible text interspersed in a_str. i.e. a_str will be a possibly-noncontiguous subsequence of the matched range. Similarly, if you specify 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 a_str will match embedded pixbufs or child widgets. If you specify the SEARCH_CASE_INSENSITIVE flag, the text will be matched regardless of what case it is in.

Same as Gtk::TextIter::forward_search(), but supports case insensitive searching.

Parameters:
a_strA search string.
a_flagsFlags affecting how the search is done.
a_match_startReturn location for start of match.
a_match_endReturn location for end of match.
a_limitBound for the search.
Returns:
Whether a match was found
Deprecated:
Use method using SourceSearchFlags.
bool gtksourceview::SourceIter::forward_search ( const Glib::ustring str,
SourceSearchFlags  flags,
Gtk::TextIter match_start,
Gtk::TextIter match_end,
const Gtk::TextIter limit 
) const

Searches forward for str.

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 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 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 SEARCH_CASE_INSENSITIVE flag, the text will be matched regardless of what case it is in.

Same as Gtk::TextIter::forward_search(), but supports case insensitive searching.

Parameters:
strA search string.
flagsFlags affecting how the search is done.
match_startReturn location for start of match.
match_endReturn location for end of match.
limitBound for the search.
Returns:
Whether a match was found
Since gtksourceviewmm 2.10:
bool gtksourceview::SourceIter::forward_search ( const Glib::ustring str,
SourceSearchFlags  flags,
Gtk::TextIter match_start,
Gtk::TextIter match_end 
) const

Searches forward for str.

Same as forward_search(), but searches to the end.

Parameters:
strA search string.
flagsFlags affecting how the search is done.
match_startReturn location for start of match.
match_endReturn location for end of match.
Returns:
Whether a match was found.
Since gtksourceviewmm 2.10: