Gtk2::TextView(3) User Contributed Perl Documentation Gtk2::TextView(3) NAME Gtk2::TextView - wrapper for GtkTextView HIERARCHY Glib::Object +----Glib::InitiallyUnowned +----Gtk2::Object +----Gtk2::Widget +----Gtk2::Container +----Gtk2::TextView INTERFACES Glib::Object::_Unregistered::AtkImplementorIface Gtk2::Buildable METHODS widget = Gtk2::TextView->new widget = Gtk2::TextView->new_with_buffer ($buffer) o $buffer (Gtk2::TextBuffer) boolean = $text_view->get_accepts_tab Since: gtk+ 2.4 $text_view->set_accepts_tab ($accepts_tab) o $accepts_tab (boolean) Since: gtk+ 2.4 $text_view->add_child_at_anchor ($child, $anchor) o $child (Gtk2::Widget) o $anchor (Gtk2::TextChildAnchor) $text_view->add_child_in_window ($child, $which_window, $xpos, $ypos) o $child (Gtk2::Widget) o $which_window (Gtk2::TextWindowType) o $xpos (integer) o $ypos (integer) boolean = $text_view->backward_display_line ($iter) o $iter (Gtk2::TextIter) boolean = $text_view->backward_display_line_start ($iter) o $iter (Gtk2::TextIter) integer = $text_view->get_border_window_size ($type) o $type (Gtk2::TextWindowType) $text_view->set_border_window_size ($type, $size) o $type (Gtk2::TextWindowType) o $size (integer) textbuffer = $text_view->get_buffer $text_view->set_buffer ($buffer) o $buffer (Gtk2::TextBuffer) (window_x, window_y) = $text_view->buffer_to_window_coords ($win, $buffer_x, $buffer_y) o $win (Gtk2::TextWindowType) o $buffer_x (integer) o $buffer_y (integer) boolean = $text_view->get_cursor_visible $text_view->set_cursor_visible ($setting) o $setting (boolean) textattributes = $text_view->get_default_attributes boolean = $text_view->get_editable $text_view->set_editable ($setting) o $setting (boolean) boolean = $text_view->forward_display_line ($iter) o $iter (Gtk2::TextIter) boolean = $text_view->forward_display_line_end ($iter) o $iter (Gtk2::TextIter) adjustment = $text_view->get_hadjustment Since: gtk+ 2.22 boolean = $text_view->im_context_filter_keypress ($event) o $event (Gtk2::Gdk::Event) Since: gtk+ 2.22 integer = $text_view->get_indent $text_view->set_indent ($indent) o $indent (integer) textiter = $text_view->get_iter_at_location ($x, $y) o $x (integer) o $y (integer) ($iter, $trailing) = $text_view->get_iter_at_position ($x, $y) $iter = $text_view->get_iter_at_position ($x, $y) o $x (integer) o $y (integer) Retrieves the iterator pointing to the character at buffer coordinates x and y. Buffer coordinates are coordinates for the entire buffer, not just the currently-displayed portion. If you have coordinates from an event, you have to convert those to buffer coordinates with "$text_view->window_to_buffer_coords()". Note that this is different from "$text_view->get_iter_at_location()", which returns cursor locations, i.e. positions between characters. Since: gtk+ 2.6 rectangle = $text_view->get_iter_location ($iter) o $iter (Gtk2::TextIter) justification = $text_view->get_justification $text_view->set_justification ($justification) o $justification (Gtk2::Justification) integer = $text_view->get_left_margin $text_view->set_left_margin ($left_margin) o $left_margin (integer) (target_iter, line_top) = $text_view->get_line_at_y ($y) o $y (integer) (y, height) = $text_view->get_line_yrange ($iter) o $iter (Gtk2::TextIter) $text_view->move_child ($child, $xpos, $ypos) o $child (Gtk2::Widget) o $xpos (integer) o $ypos (integer) boolean = $text_view->move_mark_onscreen ($mark) o $mark (Gtk2::TextMark) boolean = $text_view->move_visually ($iter, $count) o $iter (Gtk2::TextIter) o $count (integer) boolean = $text_view->get_overwrite Since: gtk+ 2.4 $text_view->set_overwrite ($overwrite) o $overwrite (boolean) Since: gtk+ 2.4 integer = $text_view->get_pixels_above_lines $text_view->set_pixels_above_lines ($pixels_above_lines) o $pixels_above_lines (integer) integer = $text_view->get_pixels_below_lines $text_view->set_pixels_below_lines ($pixels_below_lines) o $pixels_below_lines (integer) integer = $text_view->get_pixels_inside_wrap $text_view->set_pixels_inside_wrap ($pixels_inside_wrap) o $pixels_inside_wrap (integer) boolean = $text_view->place_cursor_onscreen $text_view->reset_im_context Since: gtk+ 2.22 integer = $text_view->get_right_margin $text_view->set_right_margin ($right_margin) o $right_margin (integer) $text_view->scroll_mark_onscreen ($mark) o $mark (Gtk2::TextMark) boolean = $text_view->scroll_to_iter ($iter, $within_margin, $use_align, $xalign, $yalign) o $iter (Gtk2::TextIter) o $within_margin (double) o $use_align (boolean) o $xalign (double) o $yalign (double) $text_view->scroll_to_mark ($mark, $within_margin, $use_align, $xalign, $yalign) o $mark (Gtk2::TextMark) o $within_margin (double) o $use_align (boolean) o $xalign (double) o $yalign (double) boolean = $text_view->starts_display_line ($iter) o $iter (Gtk2::TextIter) tabarray = $text_view->get_tabs $text_view->set_tabs ($tabs) o $tabs (Pango::TabArray) adjustment = $text_view->get_vadjustment Since: gtk+ 2.22 rectangle = $text_view->get_visible_rect window = $text_view->get_window ($win) o $win (Gtk2::TextWindowType) (buffer_x, buffer_y) = $text_view->window_to_buffer_coords ($win, $window_x, $window_y) o $win (Gtk2::TextWindowType) o $window_x (integer) o $window_y (integer) textwindowtype = $text_view->get_window_type ($window) o $window (Gtk2::Gdk::Window) wrapmode = $text_view->get_wrap_mode $text_view->set_wrap_mode ($wrap_mode) o $wrap_mode (Gtk2::WrapMode) PROPERTIES 'accepts-tab' (boolean : default true : readable / writable / private / static-nick / static-blurb) Whether Tab will result in a tab character being entered 'buffer' (Gtk2::TextBuffer : default undef : readable / writable / private / static-nick / static-blurb) The buffer which is displayed 'cursor-visible' (boolean : default true : readable / writable / private / static-nick / static-blurb) If the insertion cursor is shown 'editable' (boolean : default true : readable / writable / private / static-nick / static-blurb) Whether the text can be modified by the user 'im-module' (string : default undef : readable / writable / private / static-nick / static-blurb) Which IM module should be used 'indent' (integer : default 0 : readable / writable / private / static-nick / static-blurb) Amount to indent the paragraph, in pixels 'justification' (Gtk2::Justification : default "left" : readable / writable / private / static-nick / static-blurb) Left, right, or center justification 'left-margin' (integer : default 0 : readable / writable / private / static-nick / static-blurb) Width of the left margin in pixels 'overwrite' (boolean : default false : readable / writable / private / static-nick / static-blurb) Whether entered text overwrites existing contents 'pixels-above-lines' (integer : default 0 : readable / writable / private / static-nick / static-blurb) Pixels of blank space above paragraphs 'pixels-below-lines' (integer : default 0 : readable / writable / private / static-nick / static-blurb) Pixels of blank space below paragraphs 'pixels-inside-wrap' (integer : default 0 : readable / writable / private / static-nick / static-blurb) Pixels of blank space between wrapped lines in a paragraph 'right-margin' (integer : default 0 : readable / writable / private / static-nick / static-blurb) Width of the right margin in pixels 'tabs' (Pango::TabArray : default undef : readable / writable / private / static-nick / static-blurb) Custom tabs for this text 'wrap-mode' (Gtk2::WrapMode : default "none" : readable / writable / private / static-nick / static-blurb) Whether to wrap lines never, at word boundaries, or at character boundaries STYLE PROPERTIES 'error-underline-color' (Gtk2::Gdk::Color : default undef : readable / private / static-nick / static-blurb) Color with which to draw error-indication underlines SIGNALS backspace (Gtk2::TextView) copy-clipboard (Gtk2::TextView) cut-clipboard (Gtk2::TextView) delete-from-cursor (Gtk2::TextView, Gtk2::DeleteType, integer) insert-at-cursor (Gtk2::TextView, string) move-cursor (Gtk2::TextView, Gtk2::MovementStep, integer, boolean) move-viewport (Gtk2::TextView, GtkScrollStep, integer) page-horizontally (Gtk2::TextView, integer, boolean) paste-clipboard (Gtk2::TextView) populate-popup (Gtk2::TextView, Gtk2::Menu) preedit-changed (Gtk2::TextView, string) select-all (Gtk2::TextView, boolean) set-anchor (Gtk2::TextView) set-scroll-adjustments (Gtk2::TextView, Gtk2::Adjustment, Gtk2::Adjustment) toggle-cursor-visible (Gtk2::TextView) toggle-overwrite (Gtk2::TextView) ENUMS AND FLAGS enum Gtk2::DeleteType o 'chars' / 'GTK_DELETE_CHARS' o 'word-ends' / 'GTK_DELETE_WORD_ENDS' o 'words' / 'GTK_DELETE_WORDS' o 'display-lines' / 'GTK_DELETE_DISPLAY_LINES' o 'display-line-ends' / 'GTK_DELETE_DISPLAY_LINE_ENDS' o 'paragraph-ends' / 'GTK_DELETE_PARAGRAPH_ENDS' o 'paragraphs' / 'GTK_DELETE_PARAGRAPHS' o 'whitespace' / 'GTK_DELETE_WHITESPACE' enum Gtk2::Justification o 'left' / 'GTK_JUSTIFY_LEFT' o 'right' / 'GTK_JUSTIFY_RIGHT' o 'center' / 'GTK_JUSTIFY_CENTER' o 'fill' / 'GTK_JUSTIFY_FILL' enum Gtk2::MovementStep o 'logical-positions' / 'GTK_MOVEMENT_LOGICAL_POSITIONS' o 'visual-positions' / 'GTK_MOVEMENT_VISUAL_POSITIONS' o 'words' / 'GTK_MOVEMENT_WORDS' o 'display-lines' / 'GTK_MOVEMENT_DISPLAY_LINES' o 'display-line-ends' / 'GTK_MOVEMENT_DISPLAY_LINE_ENDS' o 'paragraphs' / 'GTK_MOVEMENT_PARAGRAPHS' o 'paragraph-ends' / 'GTK_MOVEMENT_PARAGRAPH_ENDS' o 'pages' / 'GTK_MOVEMENT_PAGES' o 'buffer-ends' / 'GTK_MOVEMENT_BUFFER_ENDS' o 'horizontal-pages' / 'GTK_MOVEMENT_HORIZONTAL_PAGES' enum Gtk2::TextWindowType o 'private' / 'GTK_TEXT_WINDOW_PRIVATE' o 'widget' / 'GTK_TEXT_WINDOW_WIDGET' o 'text' / 'GTK_TEXT_WINDOW_TEXT' o 'left' / 'GTK_TEXT_WINDOW_LEFT' o 'right' / 'GTK_TEXT_WINDOW_RIGHT' o 'top' / 'GTK_TEXT_WINDOW_TOP' o 'bottom' / 'GTK_TEXT_WINDOW_BOTTOM' enum Gtk2::WrapMode o 'none' / 'GTK_WRAP_NONE' o 'char' / 'GTK_WRAP_CHAR' o 'word' / 'GTK_WRAP_WORD' o 'word-char' / 'GTK_WRAP_WORD_CHAR' enum GtkScrollStep o 'steps' / 'GTK_SCROLL_STEPS' o 'pages' / 'GTK_SCROLL_PAGES' o 'ends' / 'GTK_SCROLL_ENDS' o 'horizontal-steps' / 'GTK_SCROLL_HORIZONTAL_STEPS' o 'horizontal-pages' / 'GTK_SCROLL_HORIZONTAL_PAGES' o 'horizontal-ends' / 'GTK_SCROLL_HORIZONTAL_ENDS' SEE ALSO Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container COPYRIGHT Copyright (C) 2003-2011 by the gtk2-perl team. This software is licensed under the LGPL. See Gtk2 for a full notice. perl v5.38.0 2023-07-25 Gtk2::TextView(3)