Create  Edit  FrontPage  Index  Search  Changes  History  RSS  Login

Gtk::SourceView

class Gtk::SourceView

A view on a source.

Class Methods

Gtk::SourceView.new(buffer=nil)
Creates a new Gtk::SourceView. If buffer is not provided or nil, an empty buffer will be created for you. Note that one buffer can be shared among many widgets.

Instance Methods

get_marker_type(marker_type)
Gets the pixbuf which is associated with the given marker_type.
  • marker_type: a marker type (as a string).
  • Returns: a Gdk::Pixbuf object if found, or nil if not found.
set_marker_pixbuf(marker_type, pixbuf)
Associates a given pixbuf with a given marker_type.
  • pixbuf: a Gdk::Pixbuf object.
  • marker_type: a marker type (as a string).
  • Returns: self.
auto_indent=(auto_indent)
Sets the value whether to enable auto indentation or not.
  • auto_indent: true if to enable auto indentation
  • Returns: auto_indent
auto_indent?
Gets the value whether to enable auto indentation or not.
  • Returns: true if to enable auto indentation
get_marker_pixbuf
  • Returns: self: FIXME
highlight_current_line=(highlight_current_line)
Sets the value whether to highlight the current line or not.
  • highlight_current_line: true if to highlight the current line
  • Returns: highlight_current_line
highlight_current_line?
Gets the value whether to highlight the current line or not.
  • Returns: true if to highlight the current line
indent_on_tab=(indent_on_tab)
Sets the value whether to indent the selected text when the tab key is pressed or not.
  • indent_on_tab: true if to indent the selected text when the tab key is pressed
  • Returns: indent_on_tab
indent_on_tab?
Gets the value whether to indent the selected text when the tab key is pressed or not.
  • Returns: true if to indent the selected text when the tab key is pressed
insert_spaces_instead_of_tabs=(insert_spaces_instead_of_tabs)
Sets the value whether to insert spaces instead of tabs or not.
  • insert_spaces_instead_of_tabs: true if to insert spaces instead of tabs
  • Returns: insert_spaces_instead_of_tabs
insert_spaces_instead_of_tabs?
Gets the value whether to insert spaces instead of tabs or not.
  • Returns: true if to insert spaces instead of tabs
margin
Gets the Position of the right margin.
  • Returns: Position of the right margin
margin=(margin)
Sets the Position of the right margin.
  • margin: Position of the right margin
  • Returns: margin
redo
  • Returns: self: FIXME
ref_accessible
See Atk::Implementor#ref_accessible.
set_auto_indent(auto_indent)
Same as auto_indent=.
  • auto_indent: true if to enable auto indentation
  • Returns: self
set_highlight_current_line(highlight_current_line)
Same as highlight_current_line=.
  • highlight_current_line: true if to highlight the current line
  • Returns: self
set_indent_on_tab(indent_on_tab)
Same as indent_on_tab=.
  • indent_on_tab: true if to indent the selected text when the tab key is pressed
  • Returns: self
set_insert_spaces_instead_of_tabs(insert_spaces_instead_of_tabs)
Same as insert_spaces_instead_of_tabs=.
  • insert_spaces_instead_of_tabs: true if to insert spaces instead of tabs
  • Returns: self
set_margin(margin)
Same as margin=.
  • margin: Position of the right margin
  • Returns: self
set_show_line_markers(show_line_markers)
Same as show_line_markers=.
  • show_line_markers: true if to display line marker pixbufs
  • Returns: self
set_show_line_numbers(show_line_numbers)
Same as show_line_numbers=.
  • show_line_numbers: true if to display line numbers
  • Returns: self
set_show_margin(show_margin)
Same as show_margin=.
  • show_margin: true if to display the right margin
  • Returns: self
set_smart_home_end(smart_home_end)
Same as smart_home_end=.
  • smart_home_end: HOME and END keys move to first/last non whitespace characters on line before going to the start/end of the line
  • Returns: self
set_tabs_width(tabs_width)
Same as tabs_width=.
  • tabs_width: Tabs Width
  • Returns: self
show_line_markers=(show_line_markers)
Sets the value whether to display line marker pixbufs or not.
  • show_line_markers: true if to display line marker pixbufs
  • Returns: show_line_markers
show_line_markers?
Gets the value whether to display line marker pixbufs or not.
  • Returns: true if to display line marker pixbufs
show_line_numbers=(show_line_numbers)
Sets the value whether to display line numbers or not.
  • show_line_numbers: true if to display line numbers
  • Returns: show_line_numbers
show_line_numbers?
Gets the value whether to display line numbers or not.
  • Returns: true if to display line numbers
show_margin=(show_margin)
Sets the value whether to display the right margin or not.
  • show_margin: true if to display the right margin
  • Returns: show_margin
show_margin?
Gets the value whether to display the right margin or not.
  • Returns: true if to display the right margin
smart_home_end=(smart_home_end)
Sets the HOME and END keys move to first/last non whitespace characters on line before going to the start/end of the line.
  • smart_home_end: HOME and END keys move to first/last non whitespace characters on line before going to the start/end of the line
  • Returns: smart_home_end
smart_home_end?
Gets the HOME and END keys move to first/last non whitespace characters on line before going to the start/end of the line.
  • Returns: HOME and END keys move to first/last non whitespace characters on line before going to the start/end of the line
tabs_width
Gets the Tabs Width.
  • Returns: Tabs Width
tabs_width=(tabs_width)
Sets the Tabs Width.
  • tabs_width: Tabs Width
  • Returns: tabs_width
undo
  • Returns: self: FIXME
add_child
See Gtk::Buildable#add_child.
construct_child
See Gtk::Buildable#construct_child.
get_internal_child
See Gtk::Buildable#get_internal_child.
name
See Gtk::Buildable#name.
name=
See Gtk::Buildable#name=.
set_buildable_property
See Gtk::Buildable#set_buildable_property.
set_name
See Gtk::Buildable#set_name.
builder_name
See Gtk::Buildable#builder_name.
builder_name=
See Gtk::Buildable#builder_name=.
completion
Gets the completion object associated with the view.
  • Returns: The completion object associated with the view
draw_spaces
Gets the Set if and how the spaces should be visualized.
  • Returns: Set if and how the spaces should be visualized
draw_spaces=(draw_spaces)
Sets the Set if and how the spaces should be visualized.
  • draw_spaces: Set if and how the spaces should be visualized
  • Returns: draw_spaces
get_mark_category_background
  • Returns: self: FIXME
get_mark_category_pixbuf
  • Returns: self: FIXME
get_mark_category_priority
  • Returns: self: FIXME
indent_width
Gets the Number of spaces to use for each step of indent.
  • Returns: Number of spaces to use for each step of indent
indent_width=(indent_width)
Sets the Number of spaces to use for each step of indent.
  • indent_width: Number of spaces to use for each step of indent
  • Returns: indent_width
move_lines
  • Returns: self: FIXME
right_margin_position
Gets the Position of the right margin.
  • Returns: Position of the right margin
right_margin_position=(right_margin_position)
Sets the Position of the right margin.
  • right_margin_position: Position of the right margin
  • Returns: right_margin_position
set_builder_name
See Gtk::Buildable#set_builder_name.
set_draw_spaces(draw_spaces)
Same as draw_spaces=.
  • draw_spaces: Set if and how the spaces should be visualized
  • Returns: self
set_indent_width(indent_width)
Same as indent_width=.
  • indent_width: Number of spaces to use for each step of indent
  • Returns: self
set_mark_category_background
  • Returns: self: FIXME
set_mark_category_pixbuf
  • Returns: self: FIXME
set_mark_category_priority
  • Returns: self: FIXME
set_right_margin_position(right_margin_position)
Same as right_margin_position=.
  • right_margin_position: Position of the right margin
  • Returns: self
set_show_line_marks(show_line_marks)
Same as show_line_marks=.
  • show_line_marks: true if to display line mark pixbufs
  • Returns: self
set_show_right_margin(show_right_margin)
Same as show_right_margin=.
  • show_right_margin: true if to display the right margin
  • Returns: self
set_tab_width(tab_width)
Same as tab_width=.
  • tab_width: Width of a tab character expressed in spaces
  • Returns: self
show_completion
  • Returns: self: FIXME
show_line_marks=(show_line_marks)
Sets the value whether to display line mark pixbufs or not.
  • show_line_marks: true if to display line mark pixbufs
  • Returns: show_line_marks
show_line_marks?
Gets the value whether to display line mark pixbufs or not.
  • Returns: true if to display line mark pixbufs
show_right_margin=(show_right_margin)
Sets the value whether to display the right margin or not.
  • show_right_margin: true if to display the right margin
  • Returns: show_right_margin
show_right_margin?
Gets the value whether to display the right margin or not.
  • Returns: true if to display the right margin
smart_home_end
Gets the HOME and END keys move to first/last non whitespace characters on line before going to the start/end of the line.
  • Returns: HOME and END keys move to first/last non whitespace characters on line before going to the start/end of the line
tab_width
Gets the Width of a tab character expressed in spaces.
  • Returns: Width of a tab character expressed in spaces
tab_width=(tab_width)
Sets the Width of a tab character expressed in spaces.
  • tab_width: Width of a tab character expressed in spaces
  • Returns: tab_width

Properties

auto-indent: true or false (Read/Write)
Whether to enable auto indentation.
insert-spaces-instead-of-tabs: true or false (Read/Write)
Whether to insert spaces instead of tabs.
margin: Integer (Read/Write)
Position of the right margin.
show-line-markers: true or false (Read/Write)
Whether to display line marker pixbufs.
show-line-numbers: true or false (Read/Write)
Whether to display line numbers.
show-margin: true or false (Read/Write)
Whether to display the right margin.
smart-home-end: true or false (Read/Write)
HOME and END keys move to first/last characters on line first before going to the start/end of the line.
tabs-width: Integer (Read/Write)
Tabs Width.
highlight-current-line: true or false (Read/Write)
Whether to highlight the current line
indent-on-tab: true or false (Read/Write)
Whether to indent the selected text when the tab key is pressed
completion: Gtk::SourceCompletion (Read)
The completion object associated with the view
draw-spaces: Gtk::SourceDrawSpacesFlags (Read/Write)
Set if and how the spaces should be visualized
indent-width: Integer (Read/Write)
Number of spaces to use for each step of indent
right-margin-position: Integer (Read/Write)
Position of the right margin
show-line-marks: true or false (Read/Write)
Whether to display line mark pixbufs
show-right-margin: true or false (Read/Write)
Whether to display the right margin
tab-width: Integer (Read/Write)
Width of a tab character expressed in spaces

Style Properties

right-margin-line-alpha: Integer (Read)
Transparency of the margin line
right-margin-line-color: Gdk::Color (Read)
Color to use for the right margin line
right-margin-overlay-alpha: Integer (Read)
Transparency of the margin overlay
right-margin-overlay-color: Gdk::Color (Read)
Color to use for drawing the margin overlay
right-margin-overlay-toggle: String (Read)
Whether to draw the right margin overlay