Gsv::Mark Class Reference

Mark class for Buffer. More...

`#include <gtksourceviewmm/mark.h>`

Inheritance diagram for Gsv::Mark:
[legend]

List of all members.

## Public Member Functions

GtkSourceMark* | gobj ()
| Provides access to the underlying C GObject.
const GtkSourceMark* | gobj () const
| Provides access to the underlying C GObject.
GtkSourceMark* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Glib::ustring | get_category () const
| Returns the mark category.
Glib::RefPtr< Gsv::Mark > | next (const Glib::ustring& category)
| Returns the next Mark in the buffer.
Glib::RefPtr< const Gsv::Mark > | next (const Glib::ustring& category) const
| Returns the next Mark in the buffer.
Glib::RefPtr< Gsv::Mark > | next ()
| Returns the next Mark of any category in the buffer.
Glib::RefPtr< const Gsv::Mark > | next () const
| Returns the next Mark of any category in the buffer.
Glib::RefPtr< Gsv::Mark > | prev (const Glib::ustring& category)
| Returns the previous Mark in the buffer.
Glib::RefPtr< const Gsv::Mark > | prev (const Glib::ustring& category) const
| Returns the previous Mark in the buffer.
Glib::RefPtr< Gsv::Mark > | prev ()
| Returns the previous Mark of any category in the buffer.
Glib::RefPtr< const Gsv::Mark > | prev () const
| Returns the previous Mark of any category in the buffer.
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_category () const
| The mark category.

## Static Public Member Functions

static Glib::RefPtr< Mark > | create (const Glib::ustring& category)
| Creates an anonymous text mark.
static Glib::RefPtr< Mark > | create (const Glib::ustring& name, const Glib::ustring& category)
| Creates a text mark.

## Related Functions

(Note that these are not member functions.)
Glib::RefPtr< Gsv::Mark > | wrap (GtkSourceMark* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

Mark class for Buffer.

Since gtksourceviewmm 2.2:

## Member Function Documentation

static Glib::RefPtr<Mark> Gsv::Mark::create | ( | const Glib::ustring & | category | ) | `[static]`

Creates an anonymous text mark.

Add it to a buffer using Gtk::TextBuffer::add_mark(). Note that such marks cannot be retrieved by using Gtk::TextBuffer::get_mark(). Normally marks are created using the utility function Gsv::Buffer::create_source_mark().

Parameters:

  category | Is used to classify marks according to common characteristics (e.g. all the marks representing a bookmark could belong to the "bookmark" category, or all the marks representing a compilation error could belong to "error" category).

Returns:
  A new anonymous Mark that can be added using GtkTextBuffer::add_mark().

static Glib::RefPtr<Mark> Gsv::Mark::create | ( | const Glib::ustring & | name,
|  | const Glib::ustring & | category
| ) |  | `[static]`

Creates a text mark.

Add it to a buffer using Gtk::TextBuffer::add_mark(). The mark can be retrieved by name by using Gtk::TextBuffer::get_mark(). Normally marks are created using the utility function Buffer::create_source_mark().

Parameters:

  category | Is used to classify marks according to common characteristics (e.g. all the marks representing a bookmark could belong to the "bookmark" category, or all the marks representing a compilation error could belong to "error" category).
  name | Name of the Mark.

Returns:
  A new Mark that can be added using GtkTextBuffer::add_mark().

Glib::ustring Gsv::Mark::get_category | ( |  | ) | const

Returns the mark category.

Returns:
  The category of the Mark.

Since gtksourceviewmm 2.2:

Glib::RefPtr<const Gsv::Mark> Gsv::Mark::next | ( | const Glib::ustring & | category | ) | const

Returns the next Mark in the buffer.

If there is no next mark, empty refptr will be returned.

Parameters:

  category | A string specifying the mark category.

Returns:
  The next Mark or empty Glib::RefPtr.

Since gtksourceviewmm 2.2:

Glib::RefPtr<Gsv::Mark> Gsv::Mark::next | ( |  | ) |

Returns the next Mark of any category in the buffer.

If there is no next mark, empty refptr will be returned.

Returns:
  The next Mark or empty Glib::RefPtr.

Since gtksourceviewmm 2.2:

Glib::RefPtr<const Gsv::Mark> Gsv::Mark::next | ( |  | ) | const

Returns the next Mark of any category in the buffer.

If there is no next mark, empty refptr will be returned.

Returns:
  The next Mark or empty Glib::RefPtr.

Since gtksourceviewmm 2.2:

Glib::RefPtr<Gsv::Mark> Gsv::Mark::next | ( | const Glib::ustring & | category | ) |

Returns the next Mark in the buffer.

If there is no next mark, empty refptr will be returned.

Parameters:

  category | A string specifying the mark category.

Returns:
  The next Mark or empty Glib::RefPtr.

Since gtksourceviewmm 2.2:

Glib::RefPtr<const Gsv::Mark> Gsv::Mark::prev | ( |  | ) | const

Returns the previous Mark of any category in the buffer.

If there is no previous mark, empty refptr will be returned.

Returns:
  The previous Mark or empty Glib::RefPtr.

Since gtksourceviewmm 2.2:

Glib::RefPtr<const Gsv::Mark> Gsv::Mark::prev | ( | const Glib::ustring & | category | ) | const

Returns the previous Mark in the buffer.

If there is no previous mark, empty refptr will be returned.

Parameters:

  category | A string specifying the mark category.

Returns:
  The previous Mark or empty Glib::RefPtr.

Since gtksourceviewmm 2.2:

Glib::RefPtr<Gsv::Mark> Gsv::Mark::prev | ( |  | ) |

Returns the previous Mark of any category in the buffer.

If there is no previous mark, empty refptr will be returned.

Returns:
  The previous Mark or empty Glib::RefPtr.

Since gtksourceviewmm 2.2:

Glib::RefPtr<Gsv::Mark> Gsv::Mark::prev | ( | const Glib::ustring & | category | ) |

Returns the previous Mark in the buffer.

If there is no previous mark, empty refptr will be returned.

Parameters:

  category | A string specifying the mark category.

Returns:
  The previous Mark or empty Glib::RefPtr.

Since gtksourceviewmm 2.2:

Glib::PropertyProxy_ReadOnly<Glib::ustring> Gsv::Mark::property_category | ( |  | ) | const

The mark category.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

## Friends And Related Function Documentation

Glib::RefPtr< Gsv::Mark > wrap | ( | GtkSourceMark * | object,
|  | bool | take_copy = `false`
| ) |  | `[related]`

A Glib::wrap() method for this object.

Parameters:

  object | The C instance.
  take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns:
  A C++ instance that wraps this C instance.