Top | ![]() |
![]() |
![]() |
![]() |
gboolean | auto-indent | Read / Write |
gboolean | highlight-current-line | Read / Write |
gboolean | indent-on-tab | Read / Write |
gboolean | insert-spaces-instead-of-tabs | Read / Write |
guint | margin | Read / Write |
gboolean | show-line-markers | Read / Write |
gboolean | show-line-numbers | Read / Write |
gboolean | show-margin | Read / Write |
gboolean | smart-home-end | Read / Write |
guint | tabs-width | Read / Write |
gint | right-margin-line-alpha | Read |
GdkColor * | right-margin-line-color | Read |
gint | right-margin-overlay-alpha | Read |
GdkColor * | right-margin-overlay-color | Read |
gchar * | right-margin-overlay-toggle | Read |
GObject ╰── GInitiallyUnowned ╰── GtkObject ╰── GtkWidget ╰── GtkContainer ╰── GtkTextView ╰── GtkSourceView
GtkWidget *
gtk_source_view_new (void
);
Creates a new GtkSourceView. An empty default buffer will be
created for you. If you want to specify your own buffer, consider
gtk_source_view_new_with_buffer()
.
GtkWidget *
gtk_source_view_new_with_buffer (GtkSourceBuffer *buffer
);
Creates a new GtkSourceView widget displaying the buffer
buffer
. One buffer can be shared among many widgets.
void gtk_source_view_set_show_line_numbers (GtkSourceView *view
,gboolean show
);
If TRUE
line numbers will be displayed beside the text.
gboolean
gtk_source_view_get_show_line_numbers (GtkSourceView *view
);
Returns whether line numbers are displayed beside the text.
void gtk_source_view_set_show_line_markers (GtkSourceView *view
,gboolean show
);
If TRUE
line markers will be displayed beside the text.
gboolean
gtk_source_view_get_show_line_markers (GtkSourceView *view
);
Returns whether line markers are displayed beside the text.
void gtk_source_view_set_tabs_width (GtkSourceView *view
,guint width
);
Sets the width of tabulation in characters.
guint
gtk_source_view_get_tabs_width (GtkSourceView *view
);
Returns the width of tabulation in characters.
void gtk_source_view_set_auto_indent (GtkSourceView *view
,gboolean enable
);
If TRUE
auto indentation of text is enabled.
gboolean
gtk_source_view_get_auto_indent (GtkSourceView *view
);
Returns whether auto indentation of text is enabled.
void gtk_source_view_set_insert_spaces_instead_of_tabs (GtkSourceView *view
,gboolean enable
);
If TRUE
any tabulator character inserted is replaced by a group
of space characters.
gboolean
gtk_source_view_get_insert_spaces_instead_of_tabs
(GtkSourceView *view
);
Returns whether when inserting a tabulator character it should be replaced by a group of space characters.
void gtk_source_view_set_indent_on_tab (GtkSourceView *view
,gboolean enable
);
If TRUE
, when the tab key is pressed and there is a selection, the
selected text is indented of one level instead of being replaced with
the \t characters. Shift+Tab unindents the selection.
Since: 1.8
gboolean
gtk_source_view_get_indent_on_tab (GtkSourceView *view
);
Returns whether when the tab key is pressed the current selection should get indented instead of replaced with the \t character.
Since: 1.8
void gtk_source_view_set_show_margin (GtkSourceView *view
,gboolean show
);
If TRUE
a margin is displayed
gboolean
gtk_source_view_get_show_margin (GtkSourceView *view
);
Returns whether a margin is displayed.
void gtk_source_view_set_margin (GtkSourceView *view
,guint margin
);
Sets the position of the right margin in the given view
.
guint
gtk_source_view_get_margin (GtkSourceView *view
);
Gets the position of the right margin in the given view
.
void gtk_source_view_set_highlight_current_line (GtkSourceView *view
,gboolean show
);
If TRUE the current line is highlighted
gboolean
gtk_source_view_get_highlight_current_line
(GtkSourceView *view
);
Returns whether the current line is highlighted
void gtk_source_view_set_marker_pixbuf (GtkSourceView *view
,const gchar *marker_type
,GdkPixbuf *pixbuf
);
Associates a given pixbuf
with a given marker_type
.
GdkPixbuf * gtk_source_view_get_marker_pixbuf (GtkSourceView *view
,const gchar *marker_type
);
Gets the pixbuf which is associated with the given marker_type
.
void gtk_source_view_set_smart_home_end (GtkSourceView *view
,gboolean enable
);
If TRUE
HOME and END keys will move to the first/last non-space
character of the line before moving to the start/end.
gboolean
gtk_source_view_get_smart_home_end (GtkSourceView *view
);
Returns whether HOME and END keys will move to the first/last non-space character of the line before moving to the start/end.
“auto-indent”
property “auto-indent” gboolean
Whether to enable auto indentation.
Flags: Read / Write
Default value: FALSE
“highlight-current-line”
property “highlight-current-line” gboolean
Whether to highlight the current line.
Flags: Read / Write
Default value: FALSE
“indent-on-tab”
property “indent-on-tab” gboolean
Whether to indent the selected text when the tab key is pressed.
Flags: Read / Write
Default value: FALSE
“insert-spaces-instead-of-tabs”
property “insert-spaces-instead-of-tabs” gboolean
Whether to insert spaces instead of tabs.
Flags: Read / Write
Default value: FALSE
“margin”
property “margin” guint
Position of the right margin.
Flags: Read / Write
Allowed values: [1,200]
Default value: 80
“show-line-markers”
property “show-line-markers” gboolean
Whether to display line marker pixbufs.
Flags: Read / Write
Default value: FALSE
“show-line-numbers”
property “show-line-numbers” gboolean
Whether to display line numbers.
Flags: Read / Write
Default value: FALSE
“show-margin”
property “show-margin” gboolean
Whether to display the right margin.
Flags: Read / Write
Default value: FALSE
“smart-home-end”
property “smart-home-end” gboolean
HOME and END keys move to first/last non whitespace characters on line before going to the start/end of the line.
Flags: Read / Write
Default value: TRUE
“right-margin-line-alpha”
style property “right-margin-line-alpha” gint
The ::right-margin-line-alpha determines the alpha component with which the vertical line will be drawn. 0 means it is fully transparent (invisible). 255 means it has full opacity (text under the line won't be visible).
Flags: Read
Allowed values: [0,255]
Default value: 40
Since: 1.6
“right-margin-line-color”
style property “right-margin-line-color” GdkColor *
The ::right-margin-line-color property contains the color with which the right margin line (vertical line indicating the right margin) will be drawn.
Flags: Read
Since: 1.6
“right-margin-overlay-alpha”
style property “right-margin-overlay-alpha” gint
The ::right-margin-overlay-alpha determines the alpha component with which the overlay will be drawn. 0 means it is fully transparent (invisible). 255 means it has full opacity (text under the overlay won't be visible).
Flags: Read
Allowed values: [0,255]
Default value: 15
Since: 1.6
“right-margin-overlay-color”
style property “right-margin-overlay-color” GdkColor *
The ::right-margin-overlay-color property contains the color with which the right margin overlay will be drawn. Setting this property will only have an effect if ::right-margin-overlay-toggle is TRUE.
Flags: Read
Since: 1.6
“right-margin-overlay-toggle”
style property “right-margin-overlay-toggle” gchar *
The ::right-margin-overlay-toggle property determines whether the widget will draw a transparent overlay on top of the area on the right side of the right margin line. On some systems, this has a noticable performance impact, so this property is FALSE by default.
Flags: Read
Default value: "FALSE"
Since: 1.6
“redo”
signalvoid user_function (GtkSourceView *sourceview, gpointer user_data)
sourceview |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“undo”
signalvoid user_function (GtkSourceView *sourceview, gpointer user_data)
sourceview |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action