Class Mark
- All Implemented Interfaces:
Proxy
Mark object for 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(String, 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 TextMark
TextMark.TextMarkClassNested classes/interfaces inherited from class GObject
GObject.NotifyCallback, GObject.ObjectClass -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected MarkasParent()Return 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 TextMark
getBuffer, getDeleted, getLeftGravity, getName, getVisible, setVisibleMethods inherited from class 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 TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
Mark
Create a Mark 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. If name is NULL, the mark is anonymous; otherwise, the mark can be retrieved by name using TextBuffer#getMark. Normally marks are created using the utility function
Buffer.createSourceMark(String, String, 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()Create a new Mark.
-
-
Method Details
-
getType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
asParent
-
getCategory
-
next
Returns the next
GtkSourceMarkin 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 previous
GtkSourceMarkin 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
-