Class: GtkSource::MarkAttributes

Inherits:
Object
  • Object
show all
Defined in:
lib/gtksourceview5/mark-attributes.rb

Instance Method Summary collapse

Constructor Details

#initializeGtkSource::MarkAttributes

Creates a new source mark attributes.

Instance Method Details

#backgroundGdk::RGBA

A color used for background of a line.

Returns:

  • (Gdk::RGBA)

    background



20
21
22
23
24
25
26
27
# File 'lib/gtksourceview5/mark-attributes.rb', line 20

def background
  set, rgba = background_raw
  if set
    rgba
  else
    nil
  end
end

#background=(background) ⇒ Gdk::RGBA

A color used for background of a line.

Parameters:

  • background (Gdk::RGBA)

Returns:

  • (Gdk::RGBA)

    background

  • (Gdk::RGBA)

    background

#background_rawGdk::RGBA

A color used for background of a line.

Returns:

  • (Gdk::RGBA)

    background



# File 'lib/gtksourceview5/mark-attributes.rb', line 19

#get_background(background) ⇒ Boolean

Stores background color in background.

Parameters:

  • background (Gdk::RGBA)

    a Gdk::RGBA.

Returns:

  • (Boolean)

    whether background color for attributes was set.

#get_tooltip_markup(mark) ⇒ String

Queries for a tooltip by emitting a [signalMarkAttributes::query-tooltip-markup] signal.

The tooltip may contain a markup. using g_free() when done with it.

Parameters:

Returns:

  • (String)

    A tooltip. The returned string should be freed by

#get_tooltip_text(mark) ⇒ String

Queries for a tooltip by emitting a [signalMarkAttributes::query-tooltip-text] signal.

The tooltip is a plain text. using g_free() when done with it.

Parameters:

Returns:

  • (String)

    A tooltip. The returned string should be freed by

#giconGio::Icon

A #GIcon that may be a base of a rendered icon.

Returns:

  • (Gio::Icon)

    gicon

#gicon=(gicon) ⇒ Gio::Icon

A #GIcon that may be a base of a rendered icon.

Parameters:

  • gicon (Gio::Icon)

Returns:

  • (Gio::Icon)

    gicon

  • (Gio::Icon)

    gicon

#icon_nameString

An icon name that may be a base of a rendered icon.

Returns:

  • (String)

    icon-name

#icon_name=(icon_name) ⇒ String

An icon name that may be a base of a rendered icon.

Parameters:

  • icon_name (String)

Returns:

  • (String)

    icon-name

  • (String)

    icon-name

#pixbufGdkPixbuf::Pixbuf

A Gdk::Pixbuf that may be a base of a rendered icon.

Returns:

  • (GdkPixbuf::Pixbuf)

    pixbuf

#pixbuf=(pixbuf) ⇒ GdkPixbuf::Pixbuf

A Gdk::Pixbuf that may be a base of a rendered icon.

Parameters:

  • pixbuf (GdkPixbuf::Pixbuf)

Returns:

  • (GdkPixbuf::Pixbuf)

    pixbuf

  • (GdkPixbuf::Pixbuf)

    pixbuf

#render_icon(widget, size) ⇒ Gdk::Paintable

Renders an icon of given size.

The base of the icon is set by the last call to one of:

  • [methodMarkAttributes.set_pixbuf]
  • [methodMarkAttributes.set_gicon]
  • [methodMarkAttributes.set_icon_name]

size cannot be lower than 1. and should not be unreffed.

Parameters:

  • widget (Gtk::Widget)

    widget of which style settings may be used.

  • size (Integer)

    size of the rendered icon.

Returns:

  • (Gdk::Paintable)

    A Gdk::Paintable. The paintable belongs to attributes