SourceView
Object Hierarchy:
Description:
[ CCode ( type_id = "gtk_source_view_get_type ()" ) ]
[ GIR ( name = "View" ) ]
public class SourceView : TextView, Implementor, Buildable, Scrollable
[ GIR ( name = "View" ) ]
public class SourceView : TextView, Implementor, Buildable, Scrollable
All known sub-classes:
Namespace: Gtk
Package: gtksourceview-4
Content:
Properties:
- public bool auto_indent { get; set; }
- public SourceBackgroundPatternType background_pattern { get; set; }
Draw a specific background pattern on the view.
- public SourceCompletion completion { get; }
The completion object associated with the view
- public bool highlight_current_line { get; set; }
- public bool indent_on_tab { get; set; }
- public int indent_width { get; set; }
Width of an indentation step expressed in number of spaces.
- public bool insert_spaces_instead_of_tabs { get; set; }
- public uint right_margin_position { get; set; }
Position of the right margin.
- public bool show_line_marks { get; set; }
Whether to display line mark pixbufs
- public bool show_line_numbers { get; set; }
Whether to display line numbers
- public bool show_right_margin { get; set; }
Whether to display the right margin.
- public bool smart_backspace { get; set; }
Whether smart Backspace should be used.
- public SourceSmartHomeEndType smart_home_end { get; set; }
Set the behavior of the HOME and END keys.
- public SourceSpaceDrawer space_drawer { get; }
The SourceSpaceDrawer object associated with the view.
- public uint tab_width { get; set; }
Width of a tab character expressed in number of spaces.
Creation methods:
- public SourceView ()
Creates a new SourceView.
- public SourceView.with_buffer (SourceBuffer buffer)
Creates a new SourceView widget displaying the buffer
buffer
.
Methods:
- public bool get_auto_indent ()
Returns whether auto-indentation of text is enabled.
- public SourceBackgroundPatternType get_background_pattern ()
Returns the SourceBackgroundPatternType specifying if and how the background pattern should be displayed for this this.
- public unowned SourceCompletion get_completion ()
Gets the SourceCompletion associated with this.
- public unowned SourceGutter get_gutter (TextWindowType window_type)
Returns the SourceGutter object associated with
window_type
for this. - public bool get_highlight_current_line ()
Returns whether the current line is highlighted.
- public bool get_indent_on_tab ()
Returns whether when the tab key is pressed the current selection should get indented instead of replaced with the \t character.
- public int get_indent_width ()
Returns the number of spaces to use for each step of indent.
- public bool get_insert_spaces_instead_of_tabs ()
Returns whether when inserting a tabulator character it should be replaced by a group of space characters.
- public unowned SourceMarkAttributes get_mark_attributes (string category, int priority)
Gets attributes and priority for the
category
. - public uint get_right_margin_position ()
Gets the position of the right margin in the given this.
- public bool get_show_line_marks ()
Returns whether line marks are displayed beside the text.
- public bool get_show_line_numbers ()
Returns whether line numbers are displayed beside the text.
- public bool get_show_right_margin ()
Returns whether a right margin is displayed.
- public bool get_smart_backspace ()
Returns true if pressing the Backspace key will try to delete spaces up to the previous tab stop.
- public SourceSmartHomeEndType get_smart_home_end ()
Returns a SourceSmartHomeEndType end value specifying how the cursor will move when HOME and END keys are pressed.
- public unowned SourceSpaceDrawer get_space_drawer ()
Gets the SourceSpaceDrawer associated with this .
- public uint get_tab_width ()
Returns the width of tabulation in characters.
- public uint get_visual_column (TextIter iter)
Determines the visual column at
iter
taking into consideration the tab_width of this. - public void indent_lines (TextIter start, TextIter end)
Inserts one indentation level at the beginning of the specified lines.
- public void set_auto_indent (bool enable)
If true auto-indentation of text is enabled.
- public void set_background_pattern (SourceBackgroundPatternType background_pattern)
Set if and how the background pattern should be displayed.
- public void set_highlight_current_line (bool highlight)
If
highlight
is true the current line will be highlighted. - public void set_indent_on_tab (bool enable)
If true, when the tab key is pressed when several lines are selected, the selected lines are indented of one level instead of being replaced with a \t character.
- public void set_indent_width (int width)
Sets the number of spaces to use for each step of indent when the tab key is pressed.
- public void set_insert_spaces_instead_of_tabs (bool enable)
If true a tab key pressed is replaced by a group of space characters.
- public void set_mark_attributes (string category, SourceMarkAttributes attributes, int priority)
Sets attributes and priority for the
category
. - public void set_right_margin_position (uint pos)
Sets the position of the right margin in the given this.
- public void set_show_line_marks (bool show)
If true line marks will be displayed beside the text.
- public void set_show_line_numbers (bool show)
If true line numbers will be displayed beside the text.
- public void set_show_right_margin (bool show)
If true a right margin is displayed.
- public void set_smart_backspace (bool smart_backspace)
When set to true, pressing the Backspace key will try to delete spaces up to the previous tab stop.
- public void set_smart_home_end (SourceSmartHomeEndType smart_home_end)
Set the desired movement of the cursor when HOME and END keys are pressed.
- public void set_tab_width (uint width)
Sets the width of tabulation in characters.
- public void unindent_lines (TextIter start, TextIter end)
Removes one indentation level at the beginning of the specified lines.
Signals:
- public signal void change_case (SourceChangeCaseType case_type)
Keybinding signal to change case of the text at the current cursor position.
- public signal void change_number (int count)
Keybinding signal to edit a number at the current cursor position.
- public signal void join_lines ()
Keybinding signal to join the lines currently selected.
- public virtual signal void line_mark_activated (TextIter iter, Event event)
Emitted when a line mark has been activated (for instance when there was a button press in the line marks gutter).
- public virtual signal void move_lines (bool down)
The move_lines signal is a keybinding which gets emitted when the user initiates moving a line.
- public signal void move_to_matching_bracket (bool extend_selection)
Keybinding signal to move the cursor to the matching bracket.
- public virtual signal void move_words (int step)
The move_words signal is a keybinding which gets emitted when the user initiates moving a word.
- public virtual signal void redo ()
- public virtual signal void show_completion ()
The show_completion signal is a key binding signal which gets emitted when the user requests a completion, by pressing <keycombo><keycap>Control</keycap><keycap >space</keycap></keycombo>.
- public virtual signal void undo ()
Inherited Members:
All known members inherited from class Gtk.TextView
- accepts_tab
- add_child_at_anchor
- add_child_in_window
- backspace
- backward_display_line
- backward_display_line_start
- bottom_margin
- buffer
- buffer_to_window_coords
- copy_clipboard
- create_buffer
- cursor_visible
- cut_clipboard
- delete_from_cursor
- draw_layer
- editable
- extend_selection
- forward_display_line
- forward_display_line_end
- get_accepts_tab
- get_border_window_size
- get_bottom_margin
- get_buffer
- get_cursor_locations
- get_cursor_visible
- get_default_attributes
- get_editable
- get_hadjustment
- get_indent
- get_input_hints
- get_input_purpose
- get_iter_at_location
- get_iter_at_position
- get_iter_location
- get_justification
- get_left_margin
- get_line_at_y
- get_line_yrange
- get_monospace
- get_overwrite
- get_pixels_above_lines
- get_pixels_below_lines
- get_pixels_inside_wrap
- get_right_margin
- get_tabs
- get_top_margin
- get_vadjustment
- get_visible_rect
- get_window
- get_window_type
- get_wrap_mode
- im_context_filter_keypress
- im_module
- indent
- input_hints
- input_purpose
- insert_at_cursor
- insert_emoji
- justification
- left_margin
- monospace
- move_child
- move_cursor
- move_mark_onscreen
- move_viewport
- move_visually
- overwrite
- paste_clipboard
- pixels_above_lines
- pixels_below_lines
- pixels_inside_wrap
- place_cursor_onscreen
- populate_all
- populate_popup
- preedit_changed
- reset_cursor_blink
- reset_im_context
- right_margin
- scroll_mark_onscreen
- scroll_to_iter
- scroll_to_mark
- select_all
- set_accepts_tab
- set_anchor
- set_border_window_size
- set_bottom_margin
- set_buffer
- set_cursor_visible
- set_editable
- set_indent
- set_input_hints
- set_input_purpose
- set_justification
- set_left_margin
- set_monospace
- set_overwrite
- set_pixels_above_lines
- set_pixels_below_lines
- set_pixels_inside_wrap
- set_right_margin
- set_tabs
- set_top_margin
- set_wrap_mode
- starts_display_line
- tabs
- toggle_cursor_visible
- toggle_overwrite
- top_margin
- window_to_buffer_coords
- wrap_mode
All known members inherited from class Gtk.Container
All known members inherited from class Gtk.Widget
- accel_closures_changed
- activate
- add_accelerator
- add_device_events
- add_events
- add_mnemonic_label
- add_tick_callback
- adjust_baseline_allocation
- adjust_baseline_request
- adjust_size_allocation
- adjust_size_request
- app_paintable
- bind_template_callback_full
- bind_template_child_full
- button_press_event
- button_release_event
- can_activate_accel
- can_default
- can_focus
- child_focus
- child_notify
- class_path
- composite_child
- composited_changed
- compute_expand
- compute_expand_internal
- configure_event
- create_pango_context
- create_pango_layout
- damage_event
- delete_event
- destroy
- destroy_event
- destroyed
- device_is_shadowed
- direction_changed
- dispatch_child_properties_changed
- double_buffered
- drag_begin
- drag_data_delete
- drag_data_get
- drag_data_received
- drag_drop
- drag_end
- drag_failed
- drag_leave
- drag_motion
- draw
- draw_to_cairo_context
- ensure_style
- enter_notify_event
- error_bell
- event
- event_after
- events
- expand
- find_style_property
- focus
- focus_in_event
- focus_on_click
- focus_out_event
- freeze_child_notify
- get_accessible
- get_action_group
- get_allocated_baseline
- get_allocated_height
- get_allocated_size
- get_allocated_width
- get_allocation
- get_ancestor
- get_app_paintable
- get_can_default
- get_can_focus
- get_child_requisition
- get_child_visible
- get_clip
- get_clipboard
- get_composite_name
- get_css_name
- get_default_direction
- get_default_style
- get_device_enabled
- get_device_events
- get_direction
- get_display
- get_double_buffered
- get_events
- get_focus_on_click
- get_font_map
- get_font_options
- get_frame_clock
- get_halign
- get_has_tooltip
- get_has_window
- get_hexpand
- get_hexpand_set
- get_mapped
- get_margin_bottom
- get_margin_end
- get_margin_left
- get_margin_right
- get_margin_start
- get_margin_top
- get_modifier_mask
- get_modifier_style
- get_no_show_all
- get_opacity
- get_pango_context
- get_parent
- get_parent_window
- get_path
- get_pointer
- get_preferred_height
- get_preferred_height_and_baseline_for_width
- get_preferred_height_for_width
- get_preferred_height_for_width_internal
- get_preferred_height_internal
- get_preferred_size
- get_preferred_width
- get_preferred_width_for_height
- get_preferred_width_for_height_internal
- get_preferred_width_internal
- get_realized
- get_receives_default
- get_request_mode
- get_requisition
- get_root_window
- get_scale_factor
- get_screen
- get_sensitive
- get_settings
- get_size_request
- get_state
- get_state_flags
- get_style
- get_style_context
- get_support_multidevice
- get_template_child
- get_tooltip_markup
- get_tooltip_text
- get_tooltip_window
- get_toplevel
- get_valign
- get_valign_with_baseline
- get_vexpand
- get_vexpand_set
- get_visible
- get_visual
- get_window
- grab_broken_event
- grab_default
- grab_focus
- grab_notify
- halign
- has_default
- has_focus
- has_grab
- has_rc_style
- has_screen
- has_tooltip
- has_visible_focus
- height_request
- hexpand
- hexpand_set
- hide
- hide_on_delete
- hierarchy_changed
- in_destruction
- init_template
- input_shape_combine_region
- insert_action_group
- install_style_property
- install_style_property_parser
- intersect
- is_ancestor
- is_composited
- is_drawable
- is_focus
- is_sensitive
- is_toplevel
- is_visible
- key_press_event
- key_release_event
- keynav_failed
- leave_notify_event
- list_accel_closures
- list_action_prefixes
- list_mnemonic_labels
- list_style_properties
- map
- map_event
- margin
- margin_bottom
- margin_end
- margin_left
- margin_right
- margin_start
- margin_top
- mnemonic_activate
- modify_base
- modify_bg
- modify_cursor
- modify_fg
- modify_font
- modify_style
- modify_text
- motion_notify_event
- move_focus
- name
- no_show_all
- opacity
- override_background_color
- override_color
- override_cursor
- override_font
- override_symbolic_color
- parent
- parent_set
- path
- pop_composite_child
- popup_menu
- property_notify_event
- proximity_in_event
- proximity_out_event
- push_composite_child
- query_tooltip
- queue_allocate
- queue_compute_expand
- queue_draw
- queue_draw_area
- queue_draw_region
- queue_resize
- queue_resize_no_redraw
- realize
- receives_default
- region_intersect
- register_window
- remove_accelerator
- remove_mnemonic_label
- remove_tick_callback
- render_icon
- render_icon_pixbuf
- reparent
- reset_rc_styles
- reset_style
- scale_factor
- screen_changed
- scroll_event
- selection_clear_event
- selection_get
- selection_notify_event
- selection_received
- selection_request_event
- send_expose
- send_focus_change
- sensitive
- set_accel_path
- set_accessible_role
- set_accessible_type
- set_allocation
- set_app_paintable
- set_can_default
- set_can_focus
- set_child_visible
- set_clip
- set_composite_name
- set_connect_func
- set_css_name
- set_default_direction
- set_device_enabled
- set_device_events
- set_direction
- set_double_buffered
- set_events
- set_focus_on_click
- set_font_map
- set_font_options
- set_halign
- set_has_tooltip
- set_has_window
- set_hexpand
- set_hexpand_set
- set_mapped
- set_margin_bottom
- set_margin_end
- set_margin_left
- set_margin_right
- set_margin_start
- set_margin_top
- set_no_show_all
- set_opacity
- set_parent
- set_parent_window
- set_realized
- set_receives_default
- set_redraw_on_allocate
- set_sensitive
- set_size_request
- set_state
- set_state_flags
- set_style
- set_support_multidevice
- set_template
- set_template_from_resource
- set_tooltip_markup
- set_tooltip_text
- set_tooltip_window
- set_valign
- set_vexpand
- set_vexpand_set
- set_visible
- set_visual
- set_window
- shape_combine_region
- show
- show_all
- show_help
- show_now
- size_allocate
- size_allocate_with_baseline
- size_request
- state_changed
- state_flags_changed
- style
- style_attach
- style_get
- style_get_property
- style_get_valist
- style_set
- style_updated
- thaw_child_notify
- tooltip_markup
- tooltip_text
- touch_event
- translate_coordinates
- trigger_tooltip_query
- unmap
- unmap_event
- unparent
- unrealize
- unregister_window
- unset_state_flags
- valign
- vexpand
- vexpand_set
- visibility_notify_event
- visible
- width_request
- window_state_event
All known members inherited from class GLib.Object
All known members inherited from interface Atk.Implementor
All known members inherited from interface Gtk.Buildable
All known members inherited from interface Gtk.Scrollable