Class Mark
- All Implemented Interfaces:
Proxy
Buffer.
A GtkSourceMark marks a position in the text where you want to display
additional info. It is based on TextMark and thus is still valid after
the text has changed though its position may change.
GtkSourceMarks are organized in categories which you have to set
when you create the mark. Each category can have a priority, a pixbuf and
other associated attributes. See View.setMarkAttributes(java.lang.String, org.gnome.gtksourceview.MarkAttributes, int).
The pixbuf will be displayed in the margin at the line where the mark
residents if the View:show-line-marks property is set to true. If
there are multiple marks in the same line, the pixbufs will be drawn on top
of each other. The mark with the highest priority will be drawn on top.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classMark.Builder<B extends Mark.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static classNested classes/interfaces inherited from class org.gnome.gtk.TextMark
TextMark.TextMarkClassNested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected MarkasParent()Returns this instance as if it were its parent type.static Mark.Builder<? extends Mark.Builder> builder()AMark.Builderobject constructs aMarkwith the specified properties.Returns the mark category.static MemoryLayoutThe memory layout of the native struct.static @Nullable TypegetType()Get the GType of the Mark class@Nullable MarkReturns the nextGtkSourceMarkin the buffer ornullif the mark was not added to a buffer.@Nullable MarkReturns the previousGtkSourceMarkin the buffer ornullif the mark was not added to a buffer.Methods inherited from class org.gnome.gtk.TextMark
getBuffer, getDeleted, getLeftGravity, getName, getVisible, setVisibleMethods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newv, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withPropertiesMethods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
Mark
Create a Mark proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
Mark
Creates a text mark.Add it to a buffer using
TextBuffer.addMark(org.gnome.gtk.TextMark, org.gnome.gtk.TextIter). If name is NULL, the mark is anonymous; otherwise, the mark can be retrieved by name usingTextBuffer.getMark(java.lang.String). Normally marks are created using the utility functionBuffer.createSourceMark(java.lang.String, java.lang.String, org.gnome.gtk.TextIter).- Parameters:
name- Name of theGtkSourceMarkornullcategory- 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).
-
Mark
public Mark()Creates a new Mark.
-
-
Method Details
-
getType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuperkeyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName(). This will call the native function pointer of this virtual method in the typeclass of the parent type. -
getCategory
-
next
Returns the nextGtkSourceMarkin the buffer ornullif the mark was not added to a buffer.If there is no next mark,
nullwill be returned.If
categoryisnull, looks for marks of any category.- Parameters:
category- a string specifying the mark category, ornull.- Returns:
- the next
GtkSourceMark, ornull.
-
prev
Returns the previousGtkSourceMarkin the buffer ornullif the mark was not added to a buffer.If there is no previous mark,
nullis returned.If
categoryisnull, looks for marks of any category- Parameters:
category- a string specifying the mark category, ornull.- Returns:
- the previous
GtkSourceMark, ornull.
-
builder
AMark.Builderobject constructs aMarkwith the specified properties. Use the variousset...()methods to set properties, and finish construction withMark.Builder.build().- Returns:
- the builder object
-