[−][src]Trait gtk::TextTagTableExt
Required methods
fn add<P: IsA<TextTag>>(&self, tag: &P) -> bool
Add a tag to the table. The tag is assigned the highest priority in the table.
tag
must not be in a tag table already, and may not have
the same name as an already-added tag.
tag
a TextTag
Returns
true
on success.
fn foreach<P: FnMut(&TextTag)>(&self, func: P)
Calls func
on each tag in self
, with user data data
.
Note that the table may not be modified while iterating
over it (you can’t add/remove tags).
func
a function to call on each tag
data
user data
fn get_size(&self) -> i32
fn lookup(&self, name: &str) -> Option<TextTag>
Look up a named tag.
name
name of a tag
Returns
The tag, or None
if none by that
name is in the table.
fn remove<P: IsA<TextTag>>(&self, tag: &P)
Remove a tag from the table. If a TextBuffer
has self
as its tag table,
the tag is removed from the buffer. The table’s reference to the tag is
removed, so the tag will end up destroyed if you don’t have a reference to
it.
tag
a TextTag
fn connect_tag_added<F: Fn(&Self, &TextTag) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
tag
the added tag.
fn connect_tag_changed<F: Fn(&Self, &TextTag, bool) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_tag_removed<F: Fn(&Self, &TextTag) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
tag
the removed tag.
Implementors
impl<O: IsA<TextTagTable>> TextTagTableExt for O
[src]
fn add<P: IsA<TextTag>>(&self, tag: &P) -> bool
[src]
fn foreach<P: FnMut(&TextTag)>(&self, func: P)
[src]
fn get_size(&self) -> i32
[src]
fn lookup(&self, name: &str) -> Option<TextTag>
[src]
fn remove<P: IsA<TextTag>>(&self, tag: &P)
[src]
fn connect_tag_added<F: Fn(&Self, &TextTag) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_tag_changed<F: Fn(&Self, &TextTag, bool) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_tag_removed<F: Fn(&Self, &TextTag) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId