|
java-gnome version 4.0.19 | ||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectorg.freedesktop.bindings.Pointer
org.freedesktop.bindings.Proxy
org.gnome.glib.Object
org.gnome.gtk.Object
org.gnome.gtk.Widget
org.gnome.gtk.Container
org.gnome.gtk.TextView
org.gnome.sourceview.SourceView
public class SourceView
A text Widget for displaying and editing source code.
GtkSourceView extends GTK's TextView
and adds features that are
useful for building text or source-code editors. It provides syntax
highlighting for various languages, undo/redo, control over indentation and
more.
SourceView is the view part of the GtkSourceView library and is always used
together with a SourceBuffer
as its model.
SourceBuffer buffer; SourceView view; ... view = new SourceView(buffer);
Nested Class Summary | |
---|---|
static interface |
SourceView.Redo
The handler interface used for redo signals. |
static interface |
SourceView.Undo
The handler interface used for undo signals. |
Nested classes/interfaces inherited from class org.gnome.gtk.TextView |
---|
TextView.PopulatePopup |
Nested classes/interfaces inherited from class org.gnome.gtk.Widget |
---|
Widget.ButtonPressEvent, Widget.ButtonReleaseEvent, Widget.EnterNotifyEvent, Widget.ExposeEvent, Widget.FocusInEvent, Widget.FocusOutEvent, Widget.Hide, Widget.KeyPressEvent, Widget.KeyReleaseEvent, Widget.LeaveNotifyEvent, Widget.MapEvent, Widget.MotionNotifyEvent, Widget.PopupMenu, Widget.ScrollEvent, Widget.UnmapEvent, Widget.VisibilityNotifyEvent |
Nested classes/interfaces inherited from class org.gnome.gtk.Object |
---|
Object.Destroy |
Constructor Summary | |
---|---|
SourceView(SourceBuffer buffer)
Create a new SourceView that displays the SourceBuffer. |
Method Summary | |
---|---|
void |
connect(SourceView.Redo handler)
Connect a handler to receive SourceView.Redo signals. |
void |
connect(SourceView.Undo handler)
Connect a handler to receive SourceView.Undo signals. |
boolean |
getAutoIndent()
Return whether audo-indentation is enabled of not. |
boolean |
getHighlightCurrentLine()
Returns whether the current line is highlighted or not. |
boolean |
getInsertSpacesInsteadOfTabs()
Returns whether spaces are used instead of the tab character. |
int |
getRightMarginPosition()
Return the position of the line that indicates the right margin of the text. |
boolean |
getShowLineNumbers()
Returns whether line numbers are shown next to the text or not. |
boolean |
getShowRightMargin()
Returns whether the line indicating the right margin is shown or not. |
int |
getTabWidth()
Return the number of spaces that are used for the tab character. |
void |
setAutoIndent(boolean enable)
Enable/disable auto-indentation. |
void |
setHighlightCurrentLine(boolean highlight)
Enable or disable the highlighting of the current line. |
void |
setInsertSpacesInsteadOfTabs(boolean enable)
Insert spaces instead of the tab character. |
void |
setRightMarginPosition(int position)
Set the position of the line that indicates the right margin of the text. |
void |
setShowLineNumbers(boolean show)
Enable or disable the display of line numbers next to the text. |
void |
setShowRightMargin(boolean show)
Show a line that indicates the right margin of the text. |
void |
setTabWidth(int width)
Set the number of spaces that are used for the tab character. |
Methods inherited from class org.gnome.gtk.Container |
---|
add, getChildren, remove, setBorderWidth |
Methods inherited from class org.gnome.gtk.Widget |
---|
activate, addEvents, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, getAllocation, getCanDefault, getCanFocus, getHasFocus, getName, getParent, getRequisition, getSensitive, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, isSensitive, modifyBackground, modifyBase, modifyFont, modifyText, queueDraw, queueDrawArea, realize, setCanDefault, setCanFocus, setColormap, setEvents, setName, setSensitive, setSizeRequest, setTooltipMarkup, setTooltipText, show, showAll |
Methods inherited from class org.gnome.gtk.Object |
---|
connect, destroy |
Methods inherited from class org.freedesktop.bindings.Pointer |
---|
toString |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SourceView(SourceBuffer buffer)
Method Detail |
---|
public void connect(SourceView.Redo handler)
SourceView.Redo
signals. It
is emitted whenever something is redone in the editor window, e.g. by
hitting Shift+Ctrl+Z
.
public void connect(SourceView.Undo handler)
SourceView.Undo
signals. It
is emitted whenever something is undone in the editor window, e.g. by
hitting Ctrl+Z.
public boolean getAutoIndent()
public boolean getHighlightCurrentLine()
public boolean getInsertSpacesInsteadOfTabs()
public int getRightMarginPosition()
public boolean getShowLineNumbers()
public boolean getShowRightMargin()
public int getTabWidth()
public void setAutoIndent(boolean enable)
public void setHighlightCurrentLine(boolean highlight)
public void setInsertSpacesInsteadOfTabs(boolean enable)
public void setRightMarginPosition(int position)
public void setShowLineNumbers(boolean show)
public void setShowRightMargin(boolean show)
public void setTabWidth(int width)
|
![]() java-gnome |
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |