Class: GtkSource::View
- Inherits:
-
Gtk::TextView
- Object
- GObject::InitiallyUnowned
- Gtk::Widget
- Gtk::TextView
- GtkSource::View
- Extended by:
- GLib::Deprecatable
- Defined in:
- lib/gtksourceview3/deprecated.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#auto_indent ⇒ Boolean
Returns whether auto-indentation of text is enabled.
- #auto_indent=(auto_indent) ⇒ Boolean
-
#auto_indent? ⇒ Boolean
Auto-indent.
-
#background_pattern ⇒ GtkSource::BackgroundPatternType
Draw a specific background pattern on the view.
-
#background_pattern=(background_pattern) ⇒ GtkSource::BackgroundPatternType
Draw a specific background pattern on the view.
-
#completion ⇒ GtkSource::Completion
The completion object associated with the view.
-
#completion=(completion) ⇒ GtkSource::Completion
The completion object associated with the view.
-
#enable_snippets ⇒ Boolean
Gets the [propertyView:enable-snippets] property.
-
#enable_snippets=(enable_snippets) ⇒ Boolean
The property denotes if snippets should be expanded when the user presses Tab after having typed a word matching the snippets found in [classSnippetManager].
-
#enable_snippets? ⇒ Boolean
The property denotes if snippets should be expanded when the user presses Tab after having typed a word matching the snippets found in [classSnippetManager].
-
#get_gutter(window_type) ⇒ GtkSource::Gutter
Returns the [classGutter] object associated with window_type for view.
-
#get_mark_attributes(category, priority) ⇒ GtkSource::MarkAttributes
Gets attributes and priority for the category.
-
#get_visual_column(iter) ⇒ Integer
Determines the visual column at iter taking into consideration the [propertyView:tab-width] of view.
-
#highlight_current_line ⇒ Boolean
Returns whether the current line is highlighted.
- #highlight_current_line=(highlight_current_line) ⇒ Boolean
-
#highlight_current_line? ⇒ Boolean
Highlight-current-line.
-
#hover ⇒ GtkSource::Hover
Gets the [classHover] associated with view.
-
#indent_lines(start, end) ⇒ nil
Inserts one indentation level at the beginning of the specified lines.
-
#indent_on_tab ⇒ Boolean
Returns whether when the tab key is pressed the current selection should get indented instead of replaced with the
\tcharacter. - #indent_on_tab=(indent_on_tab) ⇒ Boolean
-
#indent_on_tab? ⇒ Boolean
Indent-on-tab.
-
#indent_width ⇒ Integer
Width of an indentation step expressed in number of spaces.
-
#indent_width=(indent_width) ⇒ Integer
Width of an indentation step expressed in number of spaces.
-
#indenter ⇒ GtkSource::Indenter
The property is a [ifaceIndenter] to use to indent as the user types into the [classView].
-
#indenter=(indenter) ⇒ GtkSource::Indenter
The property is a [ifaceIndenter] to use to indent as the user types into the [classView].
-
#initialize(buffer) ⇒ Gtk::Widget
constructor
Creates a new Gtk::SourceView widget displaying the buffer buffer.
-
#insert_spaces_instead_of_tabs ⇒ Boolean
Returns whether when inserting a tabulator character it should be replaced by a group of space characters.
- #insert_spaces_instead_of_tabs=(insert_spaces_instead_of_tabs) ⇒ Boolean
-
#insert_spaces_instead_of_tabs? ⇒ Boolean
Insert-spaces-instead-of-tabs.
-
#push_snippet(snippet, location) ⇒ nil
Inserts a new snippet at location.
-
#right_margin_position ⇒ Integer
Position of the right margin.
-
#right_margin_position=(right_margin_position) ⇒ Integer
Position of the right margin.
-
#set_mark_attributes(category, attributes, priority) ⇒ nil
Sets attributes and priority for the category.
-
#show_line_marks ⇒ Boolean
Returns whether line marks are displayed beside the text.
-
#show_line_marks=(show_line_marks) ⇒ Boolean
Whether to display line mark pixbufs.
-
#show_line_marks? ⇒ Boolean
Whether to display line mark pixbufs.
-
#show_line_numbers ⇒ Boolean
Returns whether line numbers are displayed beside the text.
-
#show_line_numbers=(show_line_numbers) ⇒ Boolean
Whether to display line numbers.
-
#show_line_numbers? ⇒ Boolean
Whether to display line numbers.
-
#show_right_margin ⇒ Boolean
Returns whether a right margin is displayed.
-
#show_right_margin=(show_right_margin) ⇒ Boolean
Whether to display the right margin.
-
#show_right_margin? ⇒ Boolean
Whether to display the right margin.
-
#smart_backspace ⇒ Boolean
Returns true if pressing the Backspace key will try to delete spaces up to the previous tab stop.
-
#smart_backspace=(smart_backspace) ⇒ Boolean
Whether smart Backspace should be used.
-
#smart_backspace? ⇒ Boolean
Whether smart Backspace should be used.
-
#smart_home_end ⇒ GtkSource::SmartHomeEndType
Set the behavior of the HOME and END keys.
-
#smart_home_end=(smart_home_end) ⇒ GtkSource::SmartHomeEndType
Set the behavior of the HOME and END keys.
-
#space_drawer ⇒ GtkSource::SpaceDrawer
The [classSpaceDrawer] object associated with the view.4.
-
#space_drawer=(space_drawer) ⇒ GtkSource::SpaceDrawer
The [classSpaceDrawer] object associated with the view.4.
-
#tab_width ⇒ Integer
Width of a tab character expressed in number of spaces.
-
#tab_width=(tab_width) ⇒ Integer
Width of a tab character expressed in number of spaces.
-
#unindent_lines(start, end) ⇒ nil
Removes one indentation level at the beginning of the specified lines.
Methods inherited from Gtk::TextView
#accepts_tab, #accepts_tab=, #accepts_tab?, #add_child_at_anchor, #add_overlay, #backward_display_line, #backward_display_line_start, #bottom_margin, #bottom_margin=, #buffer, #buffer=, #buffer_to_window_coords, #cursor_visible, #cursor_visible=, #cursor_visible?, #editable, #editable=, #editable?, #extra_menu, #extra_menu=, #forward_display_line, #forward_display_line_end, #get_cursor_locations, #get_iter_at_location, #get_iter_at_position, #get_iter_location, #get_line_at_y, #get_line_yrange, #get_visible_rect, #im_context_filter_keypress, #im_module, #im_module=, #indent, #indent=, #input_hints, #input_hints=, #input_purpose, #input_purpose=, #justification, #justification=, #left_margin, #left_margin=, #ltr_context, #monospace, #monospace=, #monospace?, #move_mark_onscreen, #move_overlay, #move_visually, #overwrite, #overwrite=, #overwrite?, #pixels_above_lines, #pixels_above_lines=, #pixels_below_lines, #pixels_below_lines=, #pixels_inside_wrap, #pixels_inside_wrap=, #place_cursor_onscreen, #remove, #reset_cursor_blink, #reset_im_context, #right_margin, #right_margin=, #rtl_context, #scroll_mark_onscreen, #scroll_to_iter, #scroll_to_mark, #set_gutter, #starts_display_line, #tabs, #tabs=, #top_margin, #top_margin=, #window_to_buffer_coords, #wrap_mode, #wrap_mode=
Methods inherited from Gtk::Widget
#accessible_role, #accessible_role=, #action_set_enabled, #activate, #activate_action, #activate_action_variant, #activate_default, #activate_signal, #activate_signal=, #activate_signal_from_name=, #add_binding, #add_binding_action, #add_binding_signal, #add_controller, #add_css_class, #add_mnemonic_label, #add_shortcut, #add_tick_callback, #allocate, #allocated_baseline, #allocated_height, #allocated_width, #baseline, #bind_template_callback_full, #bind_template_child_full, #can_focus, #can_focus=, #can_focus?, #can_target, #can_target=, #can_target?, #child_focus, #child_visible, #child_visible=, #clipboard, #compute_bounds, #compute_expand, #compute_point, #compute_transform, #contains, #create_pango_context, #create_pango_layout, #css_classes, #css_classes=, #css_name, #css_name=, #cursor, #cursor=, #cursor_from_name=, default_direction, default_direction=, #direction, #direction=, #display, #dispose_template, #drag_check_threshold, #error_bell, #first_child, #focus_child, #focus_child=, #focus_on_click, #focus_on_click=, #focus_on_click?, #focusable, #focusable=, #focusable?, #font_map, #font_map=, #font_options, #font_options=, #frame_clock, #get_allocation, #get_ancestor, #get_color, #get_preferred_size, #get_size, #get_size_request, #get_template_child, #grab_focus, #halign, #halign=, #has_css_class, #has_default, #has_default=, #has_default?, #has_focus, #has_focus=, #has_focus?, #has_tooltip, #has_tooltip=, #has_tooltip?, #has_visible_focus, #height, #height_request, #height_request=, #hexpand, #hexpand=, #hexpand?, #hexpand_set, #hexpand_set=, #hexpand_set?, #hide, #in_destruction, #init_template, #insert_action_group, #insert_after, #insert_before, #install_action, #install_property_action, #is_ancestor, #is_drawable, #is_focus, #is_sensitive, #is_visible, #keynav_failed, #last_child, #layout_manager, #layout_manager=, #layout_manager_type, #layout_manager_type=, #list_mnemonic_labels, #map, #mapped, #margin_bottom, #margin_bottom=, #margin_end, #margin_end=, #margin_start, #margin_start=, #margin_top, #margin_top=, #measure, #mnemonic_activate, #name, #name=, #native, #next_sibling, #observe_children, #observe_controllers, #opacity, #opacity=, #overflow, #overflow=, #pango_context, #parent, #parent=, #pick, #prev_sibling, #primary_clipboard, #query_action, #queue_allocate, #queue_draw, #queue_resize, #realize, #realized, #receives_default, #receives_default=, #receives_default?, #remove_controller, #remove_css_class, #remove_mnemonic_label, #remove_tick_callback, #request_mode, #root, #root=, #scale_factor, #scale_factor=, #sensitive, #sensitive=, #sensitive?, #set_size_request, #set_state_flags, #settings, #should_layout, #show, #size_allocate, #snapshot_child, #state_flags, #style_context, #template=, #template_from_resource=, #template_scope=, #tooltip_markup, #tooltip_markup=, #tooltip_text, #tooltip_text=, #translate_coordinates, #trigger_tooltip_query, #unmap, #unparent, #unrealize, #unset_state_flags, #valign, #valign=, #vexpand, #vexpand=, #vexpand?, #vexpand_set, #vexpand_set=, #vexpand_set?, #visible, #visible=, #visible?, #width, #width_request, #width_request=
Constructor Details
#initialize(buffer) ⇒ Gtk::Widget
Creates a new Gtk::SourceView widget displaying the buffer buffer.
One buffer can be shared among many widgets.
Instance Method Details
#auto_indent ⇒ Boolean
Returns whether auto-indentation of text is enabled.
#auto_indent=(auto_indent) ⇒ Boolean
#auto_indent? ⇒ Boolean
Returns auto-indent.
#background_pattern ⇒ GtkSource::BackgroundPatternType
Draw a specific background pattern on the view.
#background_pattern=(background_pattern) ⇒ GtkSource::BackgroundPatternType
Draw a specific background pattern on the view.
#completion ⇒ GtkSource::Completion
The completion object associated with the view
#completion=(completion) ⇒ GtkSource::Completion
The completion object associated with the view
#enable_snippets ⇒ Boolean
Gets the [propertyView:enable-snippets] property.
If true, matching snippets found in the [classSnippetManager] may be expanded when the user presses Tab after a word in the [classView].
#enable_snippets=(enable_snippets) ⇒ Boolean
The property denotes if snippets should be expanded when the user presses Tab after having typed a word matching the snippets found in [classSnippetManager].
The user may tab through focus-positions of the snippet if any are available by pressing Tab repeatedly until the desired focus position is selected.
#enable_snippets? ⇒ Boolean
The property denotes if snippets should be expanded when the user presses Tab after having typed a word matching the snippets found in [classSnippetManager].
The user may tab through focus-positions of the snippet if any are available by pressing Tab repeatedly until the desired focus position is selected.
#get_gutter(window_type) ⇒ GtkSource::Gutter
Returns the [classGutter] object associated with window_type for view.
Only %GTK_TEXT_WINDOW_LEFT and %GTK_TEXT_WINDOW_RIGHT are supported, respectively corresponding to the left and right gutter. The line numbers and mark category icons are rendered in the left gutter.
#get_mark_attributes(category, priority) ⇒ GtkSource::MarkAttributes
Gets attributes and priority for the category. The object belongs to view, so it must not be unreffed.
#get_visual_column(iter) ⇒ Integer
Determines the visual column at iter taking into consideration the [propertyView:tab-width] of view.
#highlight_current_line ⇒ Boolean
Returns whether the current line is highlighted.
#highlight_current_line=(highlight_current_line) ⇒ Boolean
#highlight_current_line? ⇒ Boolean
Returns highlight-current-line.
#hover ⇒ GtkSource::Hover
Gets the [classHover] associated with view.
The returned object is guaranteed to be the same for the lifetime of view. Each [classView] object has a different [classHover].
#indent_lines(start, end) ⇒ nil
Inserts one indentation level at the beginning of the specified lines. The empty lines are not indented.
#indent_on_tab ⇒ Boolean
Returns whether when the tab key is pressed the current selection
should get indented instead of replaced with the \t character.
#indent_on_tab=(indent_on_tab) ⇒ Boolean
#indent_on_tab? ⇒ Boolean
Returns indent-on-tab.
#indent_width ⇒ Integer
Width of an indentation step expressed in number of spaces.
#indent_width=(indent_width) ⇒ Integer
Width of an indentation step expressed in number of spaces.
#indenter ⇒ GtkSource::Indenter
The property is a [ifaceIndenter] to use to indent as the user types into the [classView].
#indenter=(indenter) ⇒ GtkSource::Indenter
The property is a [ifaceIndenter] to use to indent as the user types into the [classView].
#insert_spaces_instead_of_tabs ⇒ Boolean
Returns whether when inserting a tabulator character it should be replaced by a group of space characters.
#insert_spaces_instead_of_tabs=(insert_spaces_instead_of_tabs) ⇒ Boolean
#insert_spaces_instead_of_tabs? ⇒ Boolean
Returns insert-spaces-instead-of-tabs.
#push_snippet(snippet, location) ⇒ nil
Inserts a new snippet at location
If another snippet was already active, it will be paused and the new snippet will become active. Once the focus positions of snippet have been exhausted, editing will return to the previous snippet.
#right_margin_position ⇒ Integer
Position of the right margin.
#right_margin_position=(right_margin_position) ⇒ Integer
Position of the right margin.
#set_mark_attributes(category, attributes, priority) ⇒ nil
Sets attributes and priority for the category.
#show_line_marks ⇒ Boolean
Returns whether line marks are displayed beside the text.
#show_line_marks=(show_line_marks) ⇒ Boolean
Whether to display line mark pixbufs
#show_line_marks? ⇒ Boolean
Whether to display line mark pixbufs
#show_line_numbers ⇒ Boolean
Returns whether line numbers are displayed beside the text.
#show_line_numbers=(show_line_numbers) ⇒ Boolean
Whether to display line numbers
#show_line_numbers? ⇒ Boolean
Whether to display line numbers
#show_right_margin ⇒ Boolean
Returns whether a right margin is displayed.
#show_right_margin=(show_right_margin) ⇒ Boolean
Whether to display the right margin.
#show_right_margin? ⇒ Boolean
Whether to display the right margin.
#smart_backspace ⇒ Boolean
Returns true if pressing the Backspace key will try to delete spaces up to the previous tab stop.
#smart_backspace=(smart_backspace) ⇒ Boolean
Whether smart Backspace should be used.
#smart_backspace? ⇒ Boolean
Whether smart Backspace should be used.
#smart_home_end ⇒ GtkSource::SmartHomeEndType
Set the behavior of the HOME and END keys.
#smart_home_end=(smart_home_end) ⇒ GtkSource::SmartHomeEndType
Set the behavior of the HOME and END keys.
#space_drawer ⇒ GtkSource::SpaceDrawer
The [classSpaceDrawer] object associated with the view.4
#space_drawer=(space_drawer) ⇒ GtkSource::SpaceDrawer
The [classSpaceDrawer] object associated with the view.4
#tab_width ⇒ Integer
Width of a tab character expressed in number of spaces.
#tab_width=(tab_width) ⇒ Integer
Width of a tab character expressed in number of spaces.
#unindent_lines(start, end) ⇒ nil
Removes one indentation level at the beginning of the specified lines.