Struct sourceview5::GutterLines[][src]

pub struct GutterLines(_);

Implementations

impl GutterLines[src]

pub fn add_class(&self, line: u32, name: &str)[src]

Adds the class name to line.

name will be converted to a glib::Quark as part of this process. A faster version of this function is available via GutterLines::add_qclass for situations where the glib::Quark is known ahead of time.

Feature: v5_0

line

a line number starting from zero

name

a class name

pub fn add_qclass(&self, line: u32, qname: Quark)[src]

Adds the class denoted by qname to line.

You may check if a line has qname by calling GutterLines::has_qclass.

You can remove qname by calling GutterLines::remove_qclass.

Feature: v5_0

line

a line number starting from zero

qname

a class name as a glib::Quark

pub fn get_buffer(&self) -> Option<TextBuffer>[src]

Gets the gtk::TextBuffer that the GutterLines represents.

Feature: v5_0

Returns

a gtk::TextBuffer

pub fn get_first(&self) -> u32[src]

Gets the line number (starting from 0) for the first line that is user visible.

Feature: v5_0

Returns

a line number starting from 0

pub fn get_iter_at_line(&self, line: u32) -> TextIter[src]

Gets a gtk::TextIter for the current buffer at line

Feature: v5_0

iter

a location for a gtk::TextIter

line

the line number

pub fn get_last(&self) -> u32[src]

Gets the line number (starting from 0) for the last line that is user visible.

Feature: v5_0

Returns

a line number starting from 0

pub fn get_line_yrange(
    &self,
    line: u32,
    mode: GutterRendererAlignmentMode
) -> (i32, i32)
[src]

Gets the Y range for a line based on mode.

The value for y is relative to the renderers widget coordinates.

Feature: v5_0

line

a line number starting from zero

mode

a GutterRendererAlignmentMode

y

a location for the Y position in widget coordinates

height

the line height based on mode

pub fn get_view(&self) -> Option<TextView>[src]

Gets the gtk::TextView that the GutterLines represents.

Feature: v5_0

Returns

a gtk::TextView

pub fn has_class(&self, line: u32, name: &str) -> bool[src]

Checks to see if GutterLines::add_class was called with the name for line.

A faster version of this function is provided via GutterLines::has_qclass for situations where the quark is known ahead of time.

Feature: v5_0

line

a line number starting from zero

name

a class name that may be converted, to a glib::Quark

Returns

true if line contains name

pub fn has_qclass(&self, line: u32, qname: Quark) -> bool[src]

Checks to see if GutterLines::add_qclass was called with the quark denoted by qname for line.

Feature: v5_0

line

a line number starting from zero

qname

a glib::Quark containing the class name

Returns

true if line contains qname

pub fn is_cursor(&self, line: u32) -> bool[src]

Checks to see if line contains the insertion cursor.

Feature: v5_0

line

a line number starting from zero

Returns

true if the insertion cursor is on line

pub fn is_prelit(&self, line: u32) -> bool[src]

Checks to see if line is marked as prelit. Generally, this means the mouse pointer is over the line within the gutter.

Feature: v5_0

line

a line number starting from zero

Returns

true if the line is prelit

pub fn is_selected(&self, line: u32) -> bool[src]

Checks to see if the view had a selection and if that selection overlaps line in some way.

Feature: v5_0

line

a line number starting from zero

Returns

true if the line contains a selection

pub fn remove_class(&self, line: u32, name: &str)[src]

Removes the class matching name from line.

A faster version of this function is available via GutterLines::remove_qclass for situations where the glib::Quark is known ahead of time.

Feature: v5_0

line

a line number starting from zero

name

a class name

pub fn remove_qclass(&self, line: u32, qname: Quark)[src]

Reverses a call to GutterLines::add_qclass by removing the glib::Quark matching qname.

Feature: v5_0

line

a line number starting from zero

qname

a glib::Quark to remove from line

Trait Implementations

impl Clone for GutterLines[src]

impl Debug for GutterLines[src]

impl Display for GutterLines[src]

impl Eq for GutterLines[src]

impl Hash for GutterLines[src]

impl Ord for GutterLines[src]

impl ParentClassIs for GutterLines[src]

type Parent = Object

impl<T: ObjectType> PartialEq<T> for GutterLines[src]

impl<T: ObjectType> PartialOrd<T> for GutterLines[src]

impl StaticType for GutterLines[src]

impl StructuralEq for GutterLines[src]

Auto Trait Implementations

impl RefUnwindSafe for GutterLines

impl !Send for GutterLines

impl !Sync for GutterLines

impl Unpin for GutterLines

impl UnwindSafe for GutterLines

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 

impl<T> Cast for T where
    T: ObjectType, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: SetValue + Send + ToValue + ?Sized

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.