{-# LINE 2 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}-- -*-haskell-*--- GIMP Toolkit (GTK) Widget TextView---- Author : Axel Simon---- Created: 23 February 2002---- Copyright (C) 2002-2005 Axel Simon---- This library is free software; you can redistribute it and/or-- modify it under the terms of the GNU Lesser General Public-- License as published by the Free Software Foundation; either-- version 2.1 of the License, or (at your option) any later version.---- This library is distributed in the hope that it will be useful,-- but WITHOUT ANY WARRANTY; without even the implied warranty of-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU-- Lesser General Public License for more details.---- TODO---- If PangoTabArray is bound:-- Fucntions: textViewSetTabs and textViewGetTabs-- Properties: textViewTabs---- All on... and after... signales had incorrect names (underscore instead of hypens). Thus-- they could not have been used in applications and removing them can't break anything.-- Thus, I've removed them. Also, all key-binding singals are now removed as there is-- no way to add additional key bindings programatically in a type-safe way, let alone-- use these signals.---- |-- Maintainer : gtk2hs-users@lists.sourceforge.net-- Stability : provisional-- Portability : portable (depends on GHC)---- Widget that displays a 'TextBuffer'--moduleGraphics.UI.Gtk.Multiline.TextView(-- * Detail---- | You may wish to begin by reading the text widget conceptual overview-- which gives an overview of all the objects and data types related to the-- text widget and how they work together.---- Throughout we distinguish between buffer coordinates which are pixels with-- the origin at the upper left corner of the first character on the first-- line. Window coordinates are relative to the top left pixel which is visible-- in the current 'TextView'. Coordinates from Events are in the latter-- relation. The conversion can be done with 'textViewWindowToBufferCoords'.-- * Class Hierarchy-- |-- @-- | 'GObject'-- | +----'Object'-- | +----'Widget'-- | +----'Container'-- | +----TextView-- |-- |-- | 'GObject'-- | +----TextChildAnchor-- @-- * TypesTextView,TextViewClass,TextChildAnchor,TextChildAnchorClass,castToTextView,gTypeTextView,toTextView,DeleteType(..),DirectionType(..),Justification(..),MovementStep(..),TextWindowType(..),WrapMode(..),-- * ConstructorstextViewNew,textViewNewWithBuffer,-- * MethodstextViewSetBuffer,textViewGetBuffer,textViewScrollToMark,textViewScrollToIter,textViewScrollMarkOnscreen,textViewMoveMarkOnscreen,textViewPlaceCursorOnscreen,textViewGetLineAtY,textViewGetLineYrange,textViewGetIterAtLocation,textViewBufferToWindowCoords,textViewWindowToBufferCoords,textViewGetWindow,textViewGetWindowType,textViewSetBorderWindowSize,textViewGetBorderWindowSize,textViewForwardDisplayLine,textViewBackwardDisplayLine,textViewForwardDisplayLineEnd,textViewBackwardDisplayLineStart,textViewStartsDisplayLine,textViewMoveVisually,textViewAddChildAtAnchor,textChildAnchorNew,textChildAnchorGetWidgets,textChildAnchorGetDeleted,textViewAddChildInWindow,textViewMoveChild,textViewSetWrapMode,textViewGetWrapMode,textViewSetEditable,textViewGetEditable,textViewSetCursorVisible,textViewGetCursorVisible,textViewSetPixelsAboveLines,textViewGetPixelsAboveLines,textViewSetPixelsBelowLines,textViewGetPixelsBelowLines,textViewSetPixelsInsideWrap,textViewGetPixelsInsideWrap,textViewSetJustification,textViewGetJustification,textViewSetLeftMargin,textViewGetLeftMargin,textViewSetRightMargin,textViewGetRightMargin,textViewSetIndent,textViewGetIndent,textViewGetDefaultAttributes,textViewGetVisibleRect,textViewGetIterLocation,textViewGetIterAtPosition,textViewSetOverwrite,textViewGetOverwrite,textViewSetAcceptsTab,textViewGetAcceptsTab,textViewGetHadjustment,textViewGetVadjustment,textViewImContextFilterKeypress,textViewResetImContext,-- * AttributestextViewPixelsAboveLines,textViewPixelsBelowLines,textViewPixelsInsideWrap,textViewEditable,textViewImModule,textViewWrapMode,textViewJustification,textViewLeftMargin,textViewRightMargin,textViewIndent,textViewCursorVisible,textViewBuffer,textViewOverwrite,textViewAcceptsTab,-- * Signalsbackspace,copyClipboard,cutClipboard,deleteFromCursor,insertAtCursor,moveCursor,moveViewport,moveFocus,pageHorizontally,pasteClipboard,populatePopup,selectAll,setAnchor,setTextViewScrollAdjustments,toggleCursorVisible,toggleOverwrite,textViewPreeditChanged)whereimportControl.Monad(liftM)importSystem.Glib.FFIimportSystem.Glib.AttributesimportSystem.Glib.Properties(newAttrFromStringProperty)importGraphics.UI.Gtk.Abstract.Object(makeNewObject)importSystem.Glib.GObject(wrapNewGObject,makeNewGObject)importGraphics.UI.Gtk.Gdk.EventM(EventM,EKey)importControl.Monad.Reader(ask)importControl.Monad.Trans(liftIO)importGraphics.UI.Gtk.Types{-# LINE 202 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}importGraphics.UI.Gtk.Signals{-# LINE 203 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}importGraphics.UI.Gtk.Multiline.Types{-# LINE 204 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}importGraphics.UI.Gtk.Multiline.TextIter{-# LINE 205 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}importGraphics.UI.Gtk.Multiline.TextTag{-# LINE 206 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}importGraphics.UI.Gtk.General.Enums(TextWindowType(..),DeleteType(..),DirectionType(..),Justification(..),MovementStep(..),WrapMode(..),ScrollStep(..))importSystem.Glib.GList(fromGList)importGraphics.UI.Gtk.General.Structs(Rectangle(..)){-# LINE 214 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}---------------------- Constructors-- | Creates a new 'TextView'. If you don't call 'textViewSetBuffer' before-- using the text view, an empty default buffer will be created for you. Get-- the buffer with 'textViewGetBuffer'. If you want to specify your own buffer,-- consider 'textViewNewWithBuffer'.--textViewNew::IOTextViewtextViewNew=makeNewObjectmkTextView$liftM(castPtr::PtrWidget->PtrTextView)$gtk_text_view_new{-# LINE 228 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}-- | Creates a new 'TextView' widget displaying the buffer @buffer@. One-- buffer can be shared among many widgets.--textViewNewWithBuffer::TextBufferClassbuffer=>buffer->IOTextViewtextViewNewWithBufferbuffer=makeNewObjectmkTextView$liftM(castPtr::PtrWidget->PtrTextView)$(\(TextBufferarg1)->withForeignPtrarg1$\argPtr1->gtk_text_view_new_with_bufferargPtr1){-# LINE 237 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextBufferbuffer)---------------------- Methods-- | Sets the given buffer as the buffer being displayed by the text view.--textViewSetBuffer::(TextViewClassself,TextBufferClassbuffer)=>self->buffer->IO()textViewSetBufferselfbuffer=(\(TextViewarg1)(TextBufferarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_text_view_set_bufferargPtr1argPtr2){-# LINE 247 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)(toTextBufferbuffer)-- | Returns the 'TextBuffer' being displayed by this text view.--textViewGetBuffer::TextViewClassself=>self->IOTextBuffertextViewGetBufferself=makeNewGObjectmkTextBuffer$(\(TextViewarg1)->withForeignPtrarg1$\argPtr1->gtk_text_view_get_bufferargPtr1){-# LINE 256 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)-- | Scrolls the text view so that @mark@ is on the screen in the position-- indicated by @xalign@ and @yalign@. An alignment of 0.0 indicates left or-- top, 1.0 indicates right or bottom, 0.5 means center. If the alignment is-- @Nothing@, the text scrolls the minimal distance to get the mark onscreen,-- possibly not scrolling at all. The effective screen for purposes of this-- function is reduced by a margin of size @withinMargin@.--textViewScrollToMark::(TextViewClassself,TextMarkClassmark)=>self->mark-- ^ @mark@ - a 'TextMark'->Double-- ^ @withinMargin@ - margin as a [0.0,0.5) fraction of screen size-- and imposes an extra margin at all four sides of the window-- within which @xalign@ and @yalign@ are evaluated.->Maybe(Double,Double)-- ^ @Just (xalign, yalign)@ - horizontal and-- vertical alignment of mark within visible area (if @Nothing@,-- scroll just enough to get the mark onscreen)->IO()textViewScrollToMarkselfmarkwithinMarginalign=let(useAlign,xalign,yalign)=casealignofNothing->(False,0,0)Just(xalign,yalign)->(True,xalign,yalign)in(\(TextViewarg1)(TextMarkarg2)arg3arg4arg5arg6->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_text_view_scroll_to_markargPtr1argPtr2arg3arg4arg5arg6){-# LINE 280 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)(toTextMarkmark)(realToFracwithinMargin)(fromBooluseAlign)(realToFracxalign)(realToFracyalign)-- | Scrolls the text view so that @iter@ is on the screen in the position-- indicated by @xalign@ and @yalign@. An alignment of 0.0 indicates left or-- top, 1.0 indicates right or bottom, 0.5 means center. If the alignment is-- @Nothing@, the text scrolls the minimal distance to get the mark onscreen,-- possibly not scrolling at all. The effective screen for purposes of this-- function is reduced by a margin of size @withinMargin@.---- * This function-- uses the currently-computed height of the lines in the text buffer. Note-- that line heights are computed in an idle handler; so this function may-- not-- have the desired effect if it's called before the height computations. To-- avoid oddness, consider using 'textViewScrollToMark' which saves a point-- to be scrolled to after line validation. This is particularly important-- if you add new text to the buffer and immediately ask the view to scroll-- to it (which it can't since it is not updated until the main loop runs).--textViewScrollToIter::TextViewClassself=>self->TextIter-- ^ @iter@ - a 'TextIter'->Double-- ^ @withinMargin@ - margin as a [0.0,0.5) fraction of screen-- size->Maybe(Double,Double)-- ^ @Just (xalign, yalign)@ - horizontal and-- vertical alignment of mark within visible area (if @Nothing@,-- scroll just enough to get the iterator onscreen)->IOBool-- ^ returns @True@ if scrolling occurredtextViewScrollToIterselfiterwithinMarginalign=let(useAlign,xalign,yalign)=casealignofNothing->(False,0,0)Just(xalign,yalign)->(True,xalign,yalign)inliftMtoBool$(\(TextViewarg1)(TextIterarg2)arg3arg4arg5arg6->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_text_view_scroll_to_iterargPtr1argPtr2arg3arg4arg5arg6){-# LINE 319 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)iter(realToFracwithinMargin)(fromBooluseAlign)(realToFracxalign)(realToFracyalign)-- | Scrolls the text view the minimum distance such that @mark@ is contained-- within the visible area of the widget.--textViewScrollMarkOnscreen::(TextViewClassself,TextMarkClassmark)=>self->mark-- ^ @mark@ - a mark in the buffer for the text view->IO()textViewScrollMarkOnscreenselfmark=(\(TextViewarg1)(TextMarkarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_text_view_scroll_mark_onscreenargPtr1argPtr2){-# LINE 334 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)(toTextMarkmark)-- | Moves a mark within the buffer so that it's located within the-- currently-visible text area.--textViewMoveMarkOnscreen::(TextViewClassself,TextMarkClassmark)=>self->mark-- ^ @mark@ - a 'TextMark'->IOBool-- ^ returns @True@ if the mark moved (wasn't already onscreen)textViewMoveMarkOnscreenselfmark=liftMtoBool$(\(TextViewarg1)(TextMarkarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_text_view_move_mark_onscreenargPtr1argPtr2){-# LINE 346 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)(toTextMarkmark)-- | Moves the cursor to the currently visible region of the buffer, it it-- isn't there already.--textViewPlaceCursorOnscreen::TextViewClassself=>self->IOBool-- ^ returns @True@ if the cursor had to be moved.textViewPlaceCursorOnscreenself=liftMtoBool$(\(TextViewarg1)->withForeignPtrarg1$\argPtr1->gtk_text_view_place_cursor_onscreenargPtr1){-# LINE 357 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)-- | Returns the currently-visible region of the buffer, in-- buffer coordinates. Convert to window coordinates with-- 'textViewBufferToWindowCoords'.--textViewGetVisibleRect::TextViewClassself=>self->IORectangletextViewGetVisibleRectself=alloca$\rectPtr->do(\(TextViewarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_text_view_get_visible_rectargPtr1arg2){-# LINE 367 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)(castPtrrectPtr)peekrectPtr-- | Gets a rectangle which roughly contains the character at @iter@. The-- rectangle position is in buffer coordinates; use-- 'textViewBufferToWindowCoords' to convert these coordinates to coordinates-- for one of the windows in the text view.--textViewGetIterLocation::TextViewClassself=>self->TextIter->IORectangletextViewGetIterLocationselfiter=alloca$\rectPtr->do(\(TextViewarg1)(TextIterarg2)arg3->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_text_view_get_iter_locationargPtr1argPtr2arg3){-# LINE 380 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)iter(castPtrrectPtr)peekrectPtr-- | Gets the 'TextIter' at the start of the line containing the coordinate-- @y@. @y@ is in buffer coordinates, convert from window coordinates with-- 'textViewWindowToBufferCoords'. Also returns @lineTop@ the-- coordinate of the top edge of the line.--textViewGetLineAtY::TextViewClassself=>self->Int-- ^ @y@ - a y coordinate->IO(TextIter,Int)-- ^ @(targetIter, lineTop)@ - returns the iter and the-- top coordinate of the linetextViewGetLineAtYselfy=makeEmptyTextIter>>=\targetIter->alloca$\lineTopPtr->do(\(TextViewarg1)(TextIterarg2)arg3arg4->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_text_view_get_line_at_yargPtr1argPtr2arg3arg4){-# LINE 398 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)targetIter(fromIntegraly)lineTopPtrlineTop<-peeklineTopPtrreturn(targetIter,fromIntegrallineTop)-- | Gets the y coordinate of the top of the line containing @iter@, and the-- height of the line. The coordinate is a buffer coordinate; convert to window-- coordinates with 'textViewBufferToWindowCoords'.--textViewGetLineYrange::TextViewClassself=>self->TextIter-- ^ @iter@ - a 'TextIter'->IO(Int,Int)-- ^ @(y, height)@ - y coordinate and height of the linetextViewGetLineYrangeselfiter=alloca$\yPtr->alloca$\heightPtr->do(\(TextViewarg1)(TextIterarg2)arg3arg4->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_text_view_get_line_yrangeargPtr1argPtr2arg3arg4){-# LINE 416 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)iteryPtrheightPtry<-peekyPtrheight<-peekheightPtrreturn(fromIntegraly,fromIntegralheight)-- | Retrieves the iterator 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 'textViewWindowToBufferCoords'.--textViewGetIterAtLocation::TextViewClassself=>self->Int-- ^ @x@ - x position, in buffer coordinates->Int-- ^ @y@ - y position, in buffer coordinates->IOTextItertextViewGetIterAtLocationselfxy=doiter<-makeEmptyTextIter(\(TextViewarg1)(TextIterarg2)arg3arg4->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_text_view_get_iter_at_locationargPtr1argPtr2arg3arg4){-# LINE 436 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)iter(fromIntegralx)(fromIntegraly)returniter-- | Converts coordinate @(bufferX, bufferY)@ to coordinates for the window-- @win@---- Note that you can't convert coordinates for a nonexisting window (see-- 'textViewSetBorderWindowSize').--textViewBufferToWindowCoords::TextViewClassself=>self->TextWindowType-- ^ @win@ - a 'TextWindowType' except 'TextWindowPrivate'->(Int,Int)-- ^ @(bufferX, bufferY)@ - buffer x and y coordinates->IO(Int,Int)-- ^ returns window x and y coordinatestextViewBufferToWindowCoordsselfwin(bufferX,bufferY)=alloca$\windowXPtr->alloca$\windowYPtr->do(\(TextViewarg1)arg2arg3arg4arg5arg6->withForeignPtrarg1$\argPtr1->gtk_text_view_buffer_to_window_coordsargPtr1arg2arg3arg4arg5arg6){-# LINE 456 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)((fromIntegral.fromEnum)win)(fromIntegralbufferX)(fromIntegralbufferY)windowXPtrwindowYPtrwindowX<-peekwindowXPtrwindowY<-peekwindowYPtrreturn(fromIntegralwindowX,fromIntegralwindowY)-- | Converts coordinates on the window identified by @win@ to buffer-- coordinates.---- Note that you can't convert coordinates for a nonexisting window (see-- 'textViewSetBorderWindowSize').--textViewWindowToBufferCoords::TextViewClassself=>self->TextWindowType-- ^ @win@ - a 'TextWindowType' except 'TextWindowPrivate'->(Int,Int)-- ^ @(windowX, windowY)@ - window x and y coordinates->IO(Int,Int)-- ^ returns buffer x and y coordinatestextViewWindowToBufferCoordsselfwin(windowX,windowY)=alloca$\bufferXPtr->alloca$\bufferYPtr->do(\(TextViewarg1)arg2arg3arg4arg5arg6->withForeignPtrarg1$\argPtr1->gtk_text_view_window_to_buffer_coordsargPtr1arg2arg3arg4arg5arg6){-# LINE 480 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)((fromIntegral.fromEnum)win)(fromIntegralwindowX)(fromIntegralwindowY)bufferXPtrbufferYPtrbufferX<-peekbufferXPtrbufferY<-peekbufferYPtrreturn(fromIntegralbufferX,fromIntegralbufferY)-- | Retrieves the 'DrawWindow' corresponding to an area of the text view;-- possible windows include the overall widget window, child windows on the-- left, right, top, bottom, and the window that displays the text buffer.-- Windows are @Nothing@ and nonexistent if their width or height is 0, and are-- nonexistent before the widget has been realized.--textViewGetWindow::TextViewClassself=>self->TextWindowType-- ^ @win@ - window to get->IO(MaybeDrawWindow)-- ^ returns a 'DrawWindow', or @Nothing@textViewGetWindowselfwin=maybeNull(makeNewGObjectmkDrawWindow)$(\(TextViewarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_text_view_get_windowargPtr1arg2){-# LINE 502 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)((fromIntegral.fromEnum)win)-- | Retrieve the type of window the 'TextView' widget contains.---- Usually used to find out which window an event corresponds to. An emission-- of an event signal of 'TextView' yields a 'DrawWindow'. This function can be-- used to see if the event actually belongs to the main text window.--textViewGetWindowType::TextViewClassself=>self->DrawWindow->IOTextWindowTypetextViewGetWindowTypeselfwindow=liftM(toEnum.fromIntegral)$(\(TextViewarg1)(DrawWindowarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_text_view_get_window_typeargPtr1argPtr2){-# LINE 517 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)window-- | Sets the width of 'TextWindowLeft' or 'TextWindowRight', or the height of-- 'TextWindowTop' or 'TextWindowBottom'. Automatically destroys the-- corresponding window if the size is set to 0, and creates the window if the-- size is set to non-zero. This function can only be used for the \"border-- windows\", it doesn't work with 'TextWindowWidget', 'TextWindowText', or-- 'TextWindowPrivate'.--textViewSetBorderWindowSize::TextViewClassself=>self->TextWindowType-- ^ @type@ - window to affect->Int-- ^ @size@ - width or height of the window->IO()textViewSetBorderWindowSizeselftype_size=(\(TextViewarg1)arg2arg3->withForeignPtrarg1$\argPtr1->gtk_text_view_set_border_window_sizeargPtr1arg2arg3){-# LINE 533 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)((fromIntegral.fromEnum)type_)(fromIntegralsize)-- | Gets the width of the specified border window. See-- 'textViewSetBorderWindowSize'.--textViewGetBorderWindowSize::TextViewClassself=>self->TextWindowType-- ^ @type@ - window to return size from->IOInt-- ^ returns width of windowtextViewGetBorderWindowSizeselftype_=liftMfromIntegral$(\(TextViewarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_text_view_get_border_window_sizeargPtr1arg2){-# LINE 546 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)((fromIntegral.fromEnum)type_)-- | Moves the given @iter@ forward by one display (wrapped) line. A display-- line is different from a paragraph. Paragraphs are separated by newlines or-- other paragraph separator characters. Display lines are created by-- line-wrapping a paragraph. If wrapping is turned off, display lines and-- paragraphs will be the same. Display lines are divided differently for each-- view, since they depend on the view's width; paragraphs are the same in all-- views, since they depend on the contents of the 'TextBuffer'.--textViewForwardDisplayLine::TextViewClassself=>self->TextIter-- ^ @iter@ - a 'TextIter'->IOBool-- ^ returns @True@ if @iter@ was moved and is not on the end-- iteratortextViewForwardDisplayLineselfiter=liftMtoBool$(\(TextViewarg1)(TextIterarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_text_view_forward_display_lineargPtr1argPtr2){-# LINE 564 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)iter-- | Moves the given @iter@ backward by one display (wrapped) line. A display-- line is different from a paragraph. Paragraphs are separated by newlines or-- other paragraph separator characters. Display lines are created by-- line-wrapping a paragraph. If wrapping is turned off, display lines and-- paragraphs will be the same. Display lines are divided differently for each-- view, since they depend on the view's width; paragraphs are the same in all-- views, since they depend on the contents of the 'TextBuffer'.--textViewBackwardDisplayLine::TextViewClassself=>self->TextIter-- ^ @iter@ - a 'TextIter'->IOBool-- ^ returns @True@ if @iter@ was moved and is not on the end-- iteratortextViewBackwardDisplayLineselfiter=liftMtoBool$(\(TextViewarg1)(TextIterarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_text_view_backward_display_lineargPtr1argPtr2){-# LINE 582 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)iter-- | Moves the given @iter@ forward to the next display line end. A display-- line is different from a paragraph. Paragraphs are separated by newlines or-- other paragraph separator characters. Display lines are created by-- line-wrapping a paragraph. If wrapping is turned off, display lines and-- paragraphs will be the same. Display lines are divided differently for each-- view, since they depend on the view's width; paragraphs are the same in all-- views, since they depend on the contents of the 'TextBuffer'.--textViewForwardDisplayLineEnd::TextViewClassself=>self->TextIter-- ^ @iter@ - a 'TextIter'->IOBool-- ^ returns @True@ if @iter@ was moved and is not on the end-- iteratortextViewForwardDisplayLineEndselfiter=liftMtoBool$(\(TextViewarg1)(TextIterarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_text_view_forward_display_line_endargPtr1argPtr2){-# LINE 600 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)iter-- | Moves the given @iter@ backward to the next display line start. A display-- line is different from a paragraph. Paragraphs are separated by newlines or-- other paragraph separator characters. Display lines are created by-- line-wrapping a paragraph. If wrapping is turned off, display lines and-- paragraphs will be the same. Display lines are divided differently for each-- view, since they depend on the view's width; paragraphs are the same in all-- views, since they depend on the contents of the 'TextBuffer'.--textViewBackwardDisplayLineStart::TextViewClassself=>self->TextIter-- ^ @iter@ - a 'TextIter'->IOBool-- ^ returns @True@ if @iter@ was moved and is not on the end-- iteratortextViewBackwardDisplayLineStartselfiter=liftMtoBool$(\(TextViewarg1)(TextIterarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_text_view_backward_display_line_startargPtr1argPtr2){-# LINE 618 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)iter-- | Determines whether @iter@ is at the start of a display line. See-- 'textViewForwardDisplayLine' for an explanation of display lines vs.-- paragraphs.--textViewStartsDisplayLine::TextViewClassself=>self->TextIter-- ^ @iter@ - a 'TextIter'->IOBool-- ^ returns @True@ if @iter@ begins a wrapped linetextViewStartsDisplayLineselfiter=liftMtoBool$(\(TextViewarg1)(TextIterarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_text_view_starts_display_lineargPtr1argPtr2){-# LINE 631 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)iter-- | Move the iterator a given number of characters visually, treating it as-- the strong cursor position. If @count@ is positive, then the new strong-- cursor position will be @count@ positions to the right of the old cursor-- position. If @count@ is negative then the new strong cursor position will be-- @count@ positions to the left of the old cursor position.---- In the presence of bidirection text, the correspondence between logical-- and visual order will depend on the direction of the current run, and there-- may be jumps when the cursor is moved off of the end of a run.--textViewMoveVisually::TextViewClassself=>self->TextIter-- ^ @iter@ - a 'TextIter'->Int-- ^ @count@ - number of characters to move (negative moves left,-- positive moves right)->IOBool-- ^ returns @True@ if @iter@ moved and is not on the end-- iteratortextViewMoveVisuallyselfitercount=liftMtoBool$(\(TextViewarg1)(TextIterarg2)arg3->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_text_view_move_visuallyargPtr1argPtr2arg3){-# LINE 653 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)iter(fromIntegralcount)-- | Adds a child widget in the text buffer, at the given @anchor@.--textViewAddChildAtAnchor::(TextViewClassself,WidgetClasschild)=>self->child-- ^ @child@ - a 'Widget'->TextChildAnchor-- ^ @anchor@ - a 'TextChildAnchor' in the 'TextBuffer'-- for the text view->IO()textViewAddChildAtAnchorselfchildanchor=(\(TextViewarg1)(Widgetarg2)(TextChildAnchorarg3)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->withForeignPtrarg3$\argPtr3->gtk_text_view_add_child_at_anchorargPtr1argPtr2argPtr3){-# LINE 666 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)(toWidgetchild)anchor-- | Create a new 'TextChildAnchor'.---- * Using 'textBufferCreateChildAnchor' is usually simpler then-- executing this function and 'textBufferInsertChildAnchor'.--textChildAnchorNew::IOTextChildAnchortextChildAnchorNew=wrapNewGObjectmkTextChildAnchorgtk_text_child_anchor_new{-# LINE 679 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}-- | Retrieve all 'Widget's at this-- 'TextChildAnchor'.---- * The widgets in the returned list need to be upcasted to what they were.--textChildAnchorGetWidgets::TextChildAnchor->IO[Widget]textChildAnchorGetWidgetstca=dogList<-(\(TextChildAnchorarg1)->withForeignPtrarg1$\argPtr1->gtk_text_child_anchor_get_widgetsargPtr1)tcawList<-fromGListgListmapM(makeNewObjectmkWidget)(mapreturnwList)-- | Query if an anchor was deleted.--textChildAnchorGetDeleted::TextChildAnchor->IOBooltextChildAnchorGetDeletedtca=liftMtoBool$(\(TextChildAnchorarg1)->withForeignPtrarg1$\argPtr1->gtk_text_child_anchor_get_deletedargPtr1)tca-- | Adds a child at fixed coordinates in one of the text widget's windows.-- The window must have nonzero size (see 'textViewSetBorderWindowSize'). Note-- that the child coordinates are given relative to the 'DrawWindow' in-- question, and that these coordinates have no sane relationship to scrolling.-- When placing a child in 'TextWindowWidget', scrolling is irrelevant, the-- child floats above all scrollable areas. If you want the widget to move when-- the text view scrolls, use 'textViewAddChildAtAnchor' instead.--textViewAddChildInWindow::(TextViewClassself,WidgetClasschild)=>self->child-- ^ @child@ - a 'Widget'->TextWindowType-- ^ @whichWindow@ - which window the child should appear-- in->Int-- ^ @xpos@ - X position of child in window coordinates->Int-- ^ @ypos@ - Y position of child in window coordinates->IO()textViewAddChildInWindowselfchildwhichWindowxposypos=(\(TextViewarg1)(Widgetarg2)arg3arg4arg5->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_text_view_add_child_in_windowargPtr1argPtr2arg3arg4arg5){-# LINE 715 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)(toWidgetchild)((fromIntegral.fromEnum)whichWindow)(fromIntegralxpos)(fromIntegralypos)-- | Move a child widget within the 'TextView'. This is really only apprpriate-- for \"floating\" child widgets added using 'textViewAddChildInWindow'.--textViewMoveChild::(TextViewClassself,WidgetClasschild)=>self->child-- ^ @child@ - child widget already added to the text view->Int-- ^ @xpos@ - new X position in window coordinates->Int-- ^ @ypos@ - new Y position in window coordinates->IO()textViewMoveChildselfchildxposypos=(\(TextViewarg1)(Widgetarg2)arg3arg4->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_text_view_move_childargPtr1argPtr2arg3arg4){-# LINE 731 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)(toWidgetchild)(fromIntegralxpos)(fromIntegralypos)-- | Sets the line wrapping for the view.--textViewSetWrapMode::TextViewClassself=>self->WrapMode->IO()textViewSetWrapModeselfwrapMode=(\(TextViewarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_text_view_set_wrap_modeargPtr1arg2){-# LINE 741 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)((fromIntegral.fromEnum)wrapMode)-- | Gets the line wrapping for the view.--textViewGetWrapMode::TextViewClassself=>self->IOWrapModetextViewGetWrapModeself=liftM(toEnum.fromIntegral)$(\(TextViewarg1)->withForeignPtrarg1$\argPtr1->gtk_text_view_get_wrap_modeargPtr1){-# LINE 750 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)-- | Sets the default editability of the 'TextView'. You can override this-- default setting with tags in the buffer, using the \"editable\" attribute of-- tags.--textViewSetEditable::TextViewClassself=>self->Bool->IO()textViewSetEditableselfsetting=(\(TextViewarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_text_view_set_editableargPtr1arg2){-# LINE 759 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)(fromBoolsetting)-- | Returns the default editability of the 'TextView'. Tags in the buffer may-- override this setting for some ranges of text.--textViewGetEditable::TextViewClassself=>self->IOBooltextViewGetEditableself=liftMtoBool$(\(TextViewarg1)->withForeignPtrarg1$\argPtr1->gtk_text_view_get_editableargPtr1){-# LINE 769 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)-- | Toggles whether the insertion point is displayed. A buffer with no-- editable text probably shouldn't have a visible cursor, so you may want to-- turn the cursor off.--textViewSetCursorVisible::TextViewClassself=>self->Bool->IO()textViewSetCursorVisibleselfsetting=(\(TextViewarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_text_view_set_cursor_visibleargPtr1arg2){-# LINE 778 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)(fromBoolsetting)-- | Find out whether the cursor is being displayed.--textViewGetCursorVisible::TextViewClassself=>self->IOBooltextViewGetCursorVisibleself=liftMtoBool$(\(TextViewarg1)->withForeignPtrarg1$\argPtr1->gtk_text_view_get_cursor_visibleargPtr1){-# LINE 787 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)-- | Sets the default number of blank pixels above paragraphs in the text view.-- Tags in the buffer for the text view may override the defaults.---- * Tags in the buffer may override this default.--textViewSetPixelsAboveLines::TextViewClassself=>self->Int->IO()textViewSetPixelsAboveLinesselfpixelsAboveLines=(\(TextViewarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_text_view_set_pixels_above_linesargPtr1arg2){-# LINE 797 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)(fromIntegralpixelsAboveLines)-- | Gets the default number of pixels to put above paragraphs.--textViewGetPixelsAboveLines::TextViewClassself=>self->IOInttextViewGetPixelsAboveLinesself=liftMfromIntegral$(\(TextViewarg1)->withForeignPtrarg1$\argPtr1->gtk_text_view_get_pixels_above_linesargPtr1){-# LINE 806 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)-- | Sets the default number of pixels of blank space to put below paragraphs-- in the text view. May be overridden by tags applied to the text view's-- buffer.--textViewSetPixelsBelowLines::TextViewClassself=>self->Int->IO()textViewSetPixelsBelowLinesselfpixelsBelowLines=(\(TextViewarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_text_view_set_pixels_below_linesargPtr1arg2){-# LINE 815 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)(fromIntegralpixelsBelowLines)-- | Gets the default number of blank pixels below each paragraph.--textViewGetPixelsBelowLines::TextViewClassself=>self->IOInttextViewGetPixelsBelowLinesself=liftMfromIntegral$(\(TextViewarg1)->withForeignPtrarg1$\argPtr1->gtk_text_view_get_pixels_below_linesargPtr1){-# LINE 824 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)-- | Sets the default number of pixels of blank space to leave between-- display\/wrapped lines within a paragraph. May be overridden by tags in-- the text view's buffer.--textViewSetPixelsInsideWrap::TextViewClassself=>self->Int->IO()textViewSetPixelsInsideWrapselfpixelsInsideWrap=(\(TextViewarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_text_view_set_pixels_inside_wrapargPtr1arg2){-# LINE 833 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)(fromIntegralpixelsInsideWrap)-- | Gets the default number of pixels of blank space between lines in a-- wrapped paragraph.--textViewGetPixelsInsideWrap::TextViewClassself=>self->IOInttextViewGetPixelsInsideWrapself=liftMfromIntegral$(\(TextViewarg1)->withForeignPtrarg1$\argPtr1->gtk_text_view_get_pixels_inside_wrapargPtr1){-# LINE 843 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)-- | Sets the default justification of text in the text view. Tags in the-- view's buffer may override the default.--textViewSetJustification::TextViewClassself=>self->Justification->IO()textViewSetJustificationselfjustification=(\(TextViewarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_text_view_set_justificationargPtr1arg2){-# LINE 851 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)((fromIntegral.fromEnum)justification)-- | Gets the default justification of paragraphs in the text view. Tags in the-- buffer may override the default.--textViewGetJustification::TextViewClassself=>self->IOJustificationtextViewGetJustificationself=liftM(toEnum.fromIntegral)$(\(TextViewarg1)->withForeignPtrarg1$\argPtr1->gtk_text_view_get_justificationargPtr1){-# LINE 861 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)-- | Sets the default left margin for text in the text view. Tags in the buffer-- may override the default.--textViewSetLeftMargin::TextViewClassself=>self->Int-- ^ @leftMargin@ - left margin in pixels->IO()textViewSetLeftMarginselfleftMargin=(\(TextViewarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_text_view_set_left_marginargPtr1arg2){-# LINE 871 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)(fromIntegralleftMargin)-- | Gets the default left margin size of paragraphs in the text view. Tags-- in the buffer may override the default.--textViewGetLeftMargin::TextViewClassself=>self->IOInt-- ^ returns left margin in pixelstextViewGetLeftMarginself=liftMfromIntegral$(\(TextViewarg1)->withForeignPtrarg1$\argPtr1->gtk_text_view_get_left_marginargPtr1){-# LINE 882 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)-- | Sets the default right margin for text in the text view. Tags in the-- buffer may override the default.--textViewSetRightMargin::TextViewClassself=>self->Int-- ^ @rightMargin@ - right margin in pixels->IO()textViewSetRightMarginselfrightMargin=(\(TextViewarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_text_view_set_right_marginargPtr1arg2){-# LINE 892 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)(fromIntegralrightMargin)-- | Gets the default right margin for text in the text view. Tags in the-- buffer may override the default.--textViewGetRightMargin::TextViewClassself=>self->IOInt-- ^ returns right margin in pixelstextViewGetRightMarginself=liftMfromIntegral$(\(TextViewarg1)->withForeignPtrarg1$\argPtr1->gtk_text_view_get_right_marginargPtr1){-# LINE 903 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)-- | Sets the default indentation for paragraphs in the text view. Tags in the-- buffer may override the default.--textViewSetIndent::TextViewClassself=>self->Int-- ^ @indent@ - indentation in pixels (may be negative)->IO()textViewSetIndentselfindent=(\(TextViewarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_text_view_set_indentargPtr1arg2){-# LINE 913 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)(fromIntegralindent)-- | Gets the default indentation of paragraphs in the text view. Tags in the-- view's buffer may override the default. The indentation may be negative.--textViewGetIndent::TextViewClassself=>self->IOInt-- ^ returns number of pixels of indentationtextViewGetIndentself=liftMfromIntegral$(\(TextViewarg1)->withForeignPtrarg1$\argPtr1->gtk_text_view_get_indentargPtr1){-# LINE 924 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)-- | Obtains a copy of the default text attributes. These are the attributes-- used for text unless a tag overrides them. You'd typically pass the default-- attributes in to 'textIterGetAttributes' in order to get the attributes in-- effect at a given text position.--textViewGetDefaultAttributes::TextViewClassself=>self->IOTextAttributestextViewGetDefaultAttributesself=(\(TextViewarg1)->withForeignPtrarg1$\argPtr1->gtk_text_view_get_default_attributesargPtr1){-# LINE 934 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)>>=makeNewTextAttributes-- | 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-- 'textViewWindowToBufferCoords'.---- Note that this is different from 'textViewGetIterAtLocation', which-- returns cursor locations, i.e. positions /between/ characters.---- * Available since Gtk+ version 2.6--textViewGetIterAtPosition::TextViewClassself=>self->Int-- ^ @x@ - x position, in buffer coordinates->Int-- ^ @y@ - y position, in buffer coordinates->IO(TextIter,Int)-- ^ @(iter, trailing)@ - returns the iterator and-- an integer indicating where in the grapheme the-- user clicked. It will either be zero, or the-- number of characters in the grapheme. 0 represents-- the trailing edge of the grapheme.textViewGetIterAtPositionselfxy=alloca$\trailingPtr->doiter<-makeEmptyTextIter(\(TextViewarg1)(TextIterarg2)arg3arg4arg5->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_text_view_get_iter_at_positionargPtr1argPtr2arg3arg4arg5){-# LINE 961 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)itertrailingPtr(fromIntegralx)(fromIntegraly)trailing<-peektrailingPtrreturn(iter,fromIntegraltrailing)-- | Changes the 'TextView' overwrite mode.---- * Available since Gtk+ version 2.4--textViewSetOverwrite::TextViewClassself=>self->Bool-- ^ @overwrite@ - @True@ to turn on overwrite mode, @False@ to turn-- it off->IO()textViewSetOverwriteselfoverwrite=(\(TextViewarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_text_view_set_overwriteargPtr1arg2){-# LINE 981 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)(fromBooloverwrite)-- | Returns whether the 'TextView' is in overwrite mode or not.---- * Available since Gtk+ version 2.4--textViewGetOverwrite::TextViewClassself=>self->IOBooltextViewGetOverwriteself=liftMtoBool$(\(TextViewarg1)->withForeignPtrarg1$\argPtr1->gtk_text_view_get_overwriteargPtr1){-# LINE 992 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)-- | Sets the behavior of the text widget when the Tab key is pressed. If-- @acceptsTab@ is @True@ a tab character is inserted. If @acceptsTab@ is-- @False@ the keyboard focus is moved to the next widget in the focus chain.---- * Available since Gtk+ version 2.4--textViewSetAcceptsTab::TextViewClassself=>self->Bool-- ^ @acceptsTab@ - @True@ if pressing the Tab key should insert a-- tab character, @False@, if pressing the Tab key should move the-- keyboard focus.->IO()textViewSetAcceptsTabselfacceptsTab=(\(TextViewarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_text_view_set_accepts_tabargPtr1arg2){-# LINE 1007 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)(fromBoolacceptsTab)-- | Returns whether pressing the Tab key inserts a tab characters.-- 'textViewSetAcceptsTab'.---- * Available since Gtk+ version 2.4--textViewGetAcceptsTab::TextViewClassself=>self->IOBool-- ^ returns @True@ if pressing the Tab key inserts a tab-- character, @False@ if pressing the Tab key moves the keyboard-- focus.textViewGetAcceptsTabself=liftMtoBool$(\(TextViewarg1)->withForeignPtrarg1$\argPtr1->gtk_text_view_get_accepts_tabargPtr1){-# LINE 1022 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)-- | Gets the horizontal-scrolling 'Adjustment'.---- * Available since Gtk+ version 2.22--textViewGetHadjustment::TextViewClassself=>self->IOAdjustmenttextViewGetHadjustmentself=makeNewObjectmkAdjustment$(\(TextViewarg1)->withForeignPtrarg1$\argPtr1->gtk_text_view_get_hadjustmentargPtr1){-# LINE 1034 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)-- | Gets the vertical-scrolling 'Adjustment'.---- * Available since Gtk+ version 2.22--textViewGetVadjustment::TextViewClassself=>self->IOAdjustmenttextViewGetVadjustmentself=makeNewObjectmkAdjustment$(\(TextViewarg1)->withForeignPtrarg1$\argPtr1->gtk_text_view_get_vadjustmentargPtr1){-# LINE 1044 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)-- | Allow the 'TextView' input method to internally handle key press and release events. If this-- function returns 'True', then no further processing should be done for this key event. See-- 'imContextFilterKeypress'.---- Note that you are expected to call this function from your handler when overriding key event-- handling. This is needed in the case when you need to insert your own key handling between the input-- method and the default key event handling of the 'TextView'.---- * Available since Gtk+ version 2.22--textViewImContextFilterKeypress::TextViewClassself=>self->EventMEKeyBooltextViewImContextFilterKeypressself=doptr<-askliftIO$liftMtoBool$(\(TextViewarg1)arg2->withForeignPtrarg1$\argPtr1->gtk_text_view_im_context_filter_keypressargPtr1arg2){-# LINE 1061 "./Graphics/UI/Gtk/Multiline/TextView.chs" #-}(toTextViewself)(castPtrptr)-- | Reset the input method context of the text view if needed.---- This can be necessary in the case where modifying the buffer would confuse on-going input method-- behavior.---- * Available since Gtk+ version 2.22--textViewResetImContext::TextViewClassself=>self->IO()textViewResetImContextself=(\(TextViewarg1)->withForeignPtrarg1$\argPtr1->gtk_text_view_reset_im_contextargPtr1)(toTextViewself)---------------------- Attributes-- | Pixels of blank space above paragraphs.---- Allowed values: >= 0---- Default value: 0--textViewPixelsAboveLines::TextViewClassself=>AttrselfInttextViewPixelsAboveLines=newAttrtextViewGetPixelsAboveLinestextViewSetPixelsAboveLines-- | Pixels of blank space below paragraphs.---- Allowed values: >= 0---- Default value: 0--textViewPixelsBelowLines::TextViewClassself=>AttrselfInttextViewPixelsBelowLines=newAttrtextViewGetPixelsBelowLinestextViewSetPixelsBelowLines-- | Pixels of blank space between wrapped lines in a paragraph.---- Allowed values: >= 0---- Default value: 0--textViewPixelsInsideWrap::TextViewClassself=>AttrselfInttextViewPixelsInsideWrap=newAttrtextViewGetPixelsInsideWraptextViewSetPixelsInsideWrap-- | Whether the text can be modified by the user.---- Default value: @True@--textViewEditable::TextViewClassself=>AttrselfBooltextViewEditable=newAttrtextViewGetEditabletextViewSetEditable-- | Which IM (input method) module should be used for this entry. See GtkIMContext.-- Setting this to a non-empty value overrides the system-wide IM module setting.-- See the GtkSettings "gtk-im-module" property.---- Default value: \"\"--textViewImModule::TextViewClassself=>AttrselfStringtextViewImModule=newAttrFromStringProperty"im-module"-- | Whether to wrap lines never, at word boundaries, or at character-- boundaries.---- Default value: 'WrapNone'--textViewWrapMode::TextViewClassself=>AttrselfWrapModetextViewWrapMode=newAttrtextViewGetWrapModetextViewSetWrapMode-- | Left, right, or center justification.---- Default value: 'JustifyLeft'--textViewJustification::TextViewClassself=>AttrselfJustificationtextViewJustification=newAttrtextViewGetJustificationtextViewSetJustification-- | Width of the left margin in pixels.---- Allowed values: >= 0---- Default value: 0--textViewLeftMargin::TextViewClassself=>AttrselfInttextViewLeftMargin=newAttrtextViewGetLeftMargintextViewSetLeftMargin-- | Width of the right margin in pixels.---- Allowed values: >= 0---- Default value: 0--textViewRightMargin::TextViewClassself=>AttrselfInttextViewRightMargin=newAttrtextViewGetRightMargintextViewSetRightMargin-- | Amount to indent the paragraph, in pixels.---- Allowed values: >= 0---- Default value: 0--textViewIndent::TextViewClassself=>AttrselfInttextViewIndent=newAttrtextViewGetIndenttextViewSetIndent-- | If the insertion cursor is shown.---- Default value: @True@--textViewCursorVisible::TextViewClassself=>AttrselfBooltextViewCursorVisible=newAttrtextViewGetCursorVisibletextViewSetCursorVisible-- | The buffer which is displayed.--textViewBuffer::TextViewClassself=>AttrselfTextBuffertextViewBuffer=newAttrtextViewGetBuffertextViewSetBuffer-- | Whether entered text overwrites existing contents.---- Default value: @False@--textViewOverwrite::TextViewClassself=>AttrselfBooltextViewOverwrite=newAttrtextViewGetOverwritetextViewSetOverwrite-- | Whether Tab will result in a tab character being entered.---- Default value: @True@--textViewAcceptsTab::TextViewClassself=>AttrselfBooltextViewAcceptsTab=newAttrtextViewGetAcceptsTabtextViewSetAcceptsTab---------------------- Signals-- | The 'backspace' signal is a keybinding signal which gets emitted when the user asks for it.---- The default bindings for this signal are Backspace and Shift-Backspace.--backspace::TextViewClassself=>Signalself(IO())backspace=Signal(connect_NONE__NONE"on-backspace")-- | Copying to the clipboard.---- * This signal is emitted when a selection is copied to the clipboard.---- * The action itself happens when the 'TextView' processes this-- signal.--copyClipboard::TextViewClassself=>Signalself(IO())copyClipboard=Signal(connect_NONE__NONE"copy-clipboard")-- | Cutting to the clipboard.---- * This signal is emitted when a selection is cut out and copied to the-- clipboard. The action itself happens when the textview processed this-- request.--cutClipboard::TextViewClassself=>Signalself(IO())cutClipboard=Signal(connect_NONE__NONE"cut-clipboard")-- | Deleting text.---- * The widget will remove the specified number of units in the text where-- the meaning of units depends on the kind of deletion.---- * The action itself happens when the 'TextView' processes this-- signal.--deleteFromCursor::TextViewClassself=>Signalself(DeleteType->Int->IO())deleteFromCursor=Signal(connect_ENUM_INT__NONE"delete-from-cursor")-- | Inserting text.---- * The widget will insert the string into the text where the meaning-- of units depends on the kind of deletion.---- * The action itself happens when the 'TextView' processes this-- signal.--insertAtCursor::TextViewClassself=>Signalself(String->IO())insertAtCursor=Signal(connect_STRING__NONE"insert-at-cursor")-- | Moving the cursor.---- * The signal specifies what kind and how many steps the cursor will do.-- The flag is set to @True@ if this movement extends a selection.---- * The action itself happens when the 'TextView' processes this-- signal.--moveCursor::TextViewClassself=>Signalself(MovementStep->Int->Bool->IO())moveCursor=Signal(connect_ENUM_INT_BOOL__NONE"move-cursor")-- | The 'moveViewport' signal is a keybinding signal which can be bound to key combinations-- to allow the user to move the viewport, i.e.-- change what part of the text view is visible in a containing scrolled window.-- There are no default bindings for this signal.--moveViewport::TextViewClassself=>Signalself(ScrollStep->Int->IO())moveViewport=Signal(connect_ENUM_INT__NONE"move-viewport")-- | Moving the focus.---- * The action itself happens when the 'TextView' processes this-- signal.--moveFocus::TextViewClassself=>Signalself(DirectionType->IO())moveFocus=Signal(connect_ENUM__NONE"move-focus")-- | Page change signals.---- * The signal specifies how many pages the view should move up or down.-- The flag is set to @True@ if this movement extends a selection.---- * The action itself happens when the 'TextView' processes this-- signal.---- * Figure out why this signal is called horizontally, not vertically.--pageHorizontally::TextViewClassself=>Signalself(Int->Bool->IO())pageHorizontally=Signal(connect_INT_BOOL__NONE"page-horizontally")-- | Pasting from the clipboard.---- * This signal is emitted when something is pasted from the clipboard.---- * The action itself happens when the 'TextView' processes this-- signal.--pasteClipboard::TextViewClassself=>Signalself(IO())pasteClipboard=Signal(connect_NONE__NONE"paste-clipboard")-- | Add menu entries to context menus.---- * This signal is emitted if a context menu within the 'TextView'-- is opened. This signal can be used to add application specific menu-- items to this popup.--populatePopup::TextViewClassself=>Signalself(Menu->IO())populatePopup=Signal(connect_OBJECT__NONE"populate-popup")-- | Inserting an anchor.---- * This signal is emitted when anchor is inserted into the text.---- * The action itself happens when the 'TextView' processes this-- signal.--selectAll::TextViewClassself=>Signalself(Bool->IO())selectAll=Signal(connect_BOOL__NONE"select-all")-- | The scroll-bars changed.--setAnchor::TextViewClassself=>Signalself(IO())setAnchor=Signal(connect_NONE__NONE"set-anchor")-- | The 'setTextViewScrollAdjustments' signal is a keybinding signal which-- gets emitted to toggle the visibility of the cursor.-- The default binding for this signal is F7.--setTextViewScrollAdjustments::TextViewClassself=>Signalself(Adjustment->Adjustment->IO())setTextViewScrollAdjustments=Signal(connect_OBJECT_OBJECT__NONE"set-scroll-adjustments")-- | The 'toggleCursorVisible' signal is a keybinding signal-- which gets emitted to toggle the visibility of the cursor.-- The default binding for this signal is F7.--toggleCursorVisible::TextViewClassself=>Signalself(IO())toggleCursorVisible=Signal(connect_NONE__NONE"toggle-cursor-visible")-- | Insert Overwrite mode has changed.---- * This signal is emitted when the 'TextView' changes from-- inserting mode to overwriting mode and vice versa.---- * The action itself happens when the 'TextView' processes this-- signal.--toggleOverwrite::TextViewClassself=>Signalself(IO())toggleOverwrite=Signal(connect_NONE__NONE"toggle-overwrite")-- | If an input method is used, the typed text will not immediately be committed to the buffer. So if-- you are interested in the text, connect to this signal.---- This signal is only emitted if the text at the given position is actually editable.textViewPreeditChanged::TextViewClassself=>Signalself(String->IO())textViewPreeditChanged=Signal(connect_STRING__NONE"preedit-changed")foreignimportccallunsafe"gtk_text_view_new"gtk_text_view_new::(IO(PtrWidget))foreignimportccallsafe"gtk_text_view_new_with_buffer"gtk_text_view_new_with_buffer::((PtrTextBuffer)->(IO(PtrWidget)))foreignimportccallsafe"gtk_text_view_set_buffer"gtk_text_view_set_buffer::((PtrTextView)->((PtrTextBuffer)->(IO())))foreignimportccallunsafe"gtk_text_view_get_buffer"gtk_text_view_get_buffer::((PtrTextView)->(IO(PtrTextBuffer)))foreignimportccallsafe"gtk_text_view_scroll_to_mark"gtk_text_view_scroll_to_mark::((PtrTextView)->((PtrTextMark)->(CDouble->(CInt->(CDouble->(CDouble->(IO())))))))foreignimportccallsafe"gtk_text_view_scroll_to_iter"gtk_text_view_scroll_to_iter::((PtrTextView)->((PtrTextIter)->(CDouble->(CInt->(CDouble->(CDouble->(IOCInt)))))))foreignimportccallsafe"gtk_text_view_scroll_mark_onscreen"gtk_text_view_scroll_mark_onscreen::((PtrTextView)->((PtrTextMark)->(IO())))foreignimportccallsafe"gtk_text_view_move_mark_onscreen"gtk_text_view_move_mark_onscreen::((PtrTextView)->((PtrTextMark)->(IOCInt)))foreignimportccallsafe"gtk_text_view_place_cursor_onscreen"gtk_text_view_place_cursor_onscreen::((PtrTextView)->(IOCInt))foreignimportccallunsafe"gtk_text_view_get_visible_rect"gtk_text_view_get_visible_rect::((PtrTextView)->((Ptr())->(IO())))foreignimportccallunsafe"gtk_text_view_get_iter_location"gtk_text_view_get_iter_location::((PtrTextView)->((PtrTextIter)->((Ptr())->(IO()))))foreignimportccallunsafe"gtk_text_view_get_line_at_y"gtk_text_view_get_line_at_y::((PtrTextView)->((PtrTextIter)->(CInt->((PtrCInt)->(IO())))))foreignimportccallunsafe"gtk_text_view_get_line_yrange"gtk_text_view_get_line_yrange::((PtrTextView)->((PtrTextIter)->((PtrCInt)->((PtrCInt)->(IO())))))foreignimportccallunsafe"gtk_text_view_get_iter_at_location"gtk_text_view_get_iter_at_location::((PtrTextView)->((PtrTextIter)->(CInt->(CInt->(IO())))))foreignimportccallunsafe"gtk_text_view_buffer_to_window_coords"gtk_text_view_buffer_to_window_coords::((PtrTextView)->(CInt->(CInt->(CInt->((PtrCInt)->((PtrCInt)->(IO())))))))foreignimportccallunsafe"gtk_text_view_window_to_buffer_coords"gtk_text_view_window_to_buffer_coords::((PtrTextView)->(CInt->(CInt->(CInt->((PtrCInt)->((PtrCInt)->(IO())))))))foreignimportccallunsafe"gtk_text_view_get_window"gtk_text_view_get_window::((PtrTextView)->(CInt->(IO(PtrDrawWindow))))foreignimportccallunsafe"gtk_text_view_get_window_type"gtk_text_view_get_window_type::((PtrTextView)->((PtrDrawWindow)->(IOCInt)))foreignimportccallsafe"gtk_text_view_set_border_window_size"gtk_text_view_set_border_window_size::((PtrTextView)->(CInt->(CInt->(IO()))))foreignimportccallunsafe"gtk_text_view_get_border_window_size"gtk_text_view_get_border_window_size::((PtrTextView)->(CInt->(IOCInt)))foreignimportccallunsafe"gtk_text_view_forward_display_line"gtk_text_view_forward_display_line::((PtrTextView)->((PtrTextIter)->(IOCInt)))foreignimportccallunsafe"gtk_text_view_backward_display_line"gtk_text_view_backward_display_line::((PtrTextView)->((PtrTextIter)->(IOCInt)))foreignimportccallunsafe"gtk_text_view_forward_display_line_end"gtk_text_view_forward_display_line_end::((PtrTextView)->((PtrTextIter)->(IOCInt)))foreignimportccallunsafe"gtk_text_view_backward_display_line_start"gtk_text_view_backward_display_line_start::((PtrTextView)->((PtrTextIter)->(IOCInt)))foreignimportccallunsafe"gtk_text_view_starts_display_line"gtk_text_view_starts_display_line::((PtrTextView)->((PtrTextIter)->(IOCInt)))foreignimportccallunsafe"gtk_text_view_move_visually"gtk_text_view_move_visually::((PtrTextView)->((PtrTextIter)->(CInt->(IOCInt))))foreignimportccallsafe"gtk_text_view_add_child_at_anchor"gtk_text_view_add_child_at_anchor::((PtrTextView)->((PtrWidget)->((PtrTextChildAnchor)->(IO()))))foreignimportccallunsafe"gtk_text_child_anchor_new"gtk_text_child_anchor_new::(IO(PtrTextChildAnchor))foreignimportccallsafe"gtk_text_child_anchor_get_widgets"gtk_text_child_anchor_get_widgets::((PtrTextChildAnchor)->(IO(Ptr())))foreignimportccallunsafe"gtk_text_child_anchor_get_deleted"gtk_text_child_anchor_get_deleted::((PtrTextChildAnchor)->(IOCInt))foreignimportccallsafe"gtk_text_view_add_child_in_window"gtk_text_view_add_child_in_window::((PtrTextView)->((PtrWidget)->(CInt->(CInt->(CInt->(IO()))))))foreignimportccallsafe"gtk_text_view_move_child"gtk_text_view_move_child::((PtrTextView)->((PtrWidget)->(CInt->(CInt->(IO())))))foreignimportccallsafe"gtk_text_view_set_wrap_mode"gtk_text_view_set_wrap_mode::((PtrTextView)->(CInt->(IO())))foreignimportccallunsafe"gtk_text_view_get_wrap_mode"gtk_text_view_get_wrap_mode::((PtrTextView)->(IOCInt))foreignimportccallsafe"gtk_text_view_set_editable"gtk_text_view_set_editable::((PtrTextView)->(CInt->(IO())))foreignimportccallunsafe"gtk_text_view_get_editable"gtk_text_view_get_editable::((PtrTextView)->(IOCInt))foreignimportccallsafe"gtk_text_view_set_cursor_visible"gtk_text_view_set_cursor_visible::((PtrTextView)->(CInt->(IO())))foreignimportccallunsafe"gtk_text_view_get_cursor_visible"gtk_text_view_get_cursor_visible::((PtrTextView)->(IOCInt))foreignimportccallsafe"gtk_text_view_set_pixels_above_lines"gtk_text_view_set_pixels_above_lines::((PtrTextView)->(CInt->(IO())))foreignimportccallunsafe"gtk_text_view_get_pixels_above_lines"gtk_text_view_get_pixels_above_lines::((PtrTextView)->(IOCInt))foreignimportccallsafe"gtk_text_view_set_pixels_below_lines"gtk_text_view_set_pixels_below_lines::((PtrTextView)->(CInt->(IO())))foreignimportccallunsafe"gtk_text_view_get_pixels_below_lines"gtk_text_view_get_pixels_below_lines::((PtrTextView)->(IOCInt))foreignimportccallsafe"gtk_text_view_set_pixels_inside_wrap"gtk_text_view_set_pixels_inside_wrap::((PtrTextView)->(CInt->(IO())))foreignimportccallunsafe"gtk_text_view_get_pixels_inside_wrap"gtk_text_view_get_pixels_inside_wrap::((PtrTextView)->(IOCInt))foreignimportccallsafe"gtk_text_view_set_justification"gtk_text_view_set_justification::((PtrTextView)->(CInt->(IO())))foreignimportccallunsafe"gtk_text_view_get_justification"gtk_text_view_get_justification::((PtrTextView)->(IOCInt))foreignimportccallsafe"gtk_text_view_set_left_margin"gtk_text_view_set_left_margin::((PtrTextView)->(CInt->(IO())))foreignimportccallunsafe"gtk_text_view_get_left_margin"gtk_text_view_get_left_margin::((PtrTextView)->(IOCInt))foreignimportccallsafe"gtk_text_view_set_right_margin"gtk_text_view_set_right_margin::((PtrTextView)->(CInt->(IO())))foreignimportccallunsafe"gtk_text_view_get_right_margin"gtk_text_view_get_right_margin::((PtrTextView)->(IOCInt))foreignimportccallsafe"gtk_text_view_set_indent"gtk_text_view_set_indent::((PtrTextView)->(CInt->(IO())))foreignimportccallunsafe"gtk_text_view_get_indent"gtk_text_view_get_indent::((PtrTextView)->(IOCInt))foreignimportccallsafe"gtk_text_view_get_default_attributes"gtk_text_view_get_default_attributes::((PtrTextView)->(IO(PtrTextAttributes)))foreignimportccallsafe"gtk_text_view_get_iter_at_position"gtk_text_view_get_iter_at_position::((PtrTextView)->((PtrTextIter)->((PtrCInt)->(CInt->(CInt->(IO()))))))foreignimportccallsafe"gtk_text_view_set_overwrite"gtk_text_view_set_overwrite::((PtrTextView)->(CInt->(IO())))foreignimportccallsafe"gtk_text_view_get_overwrite"gtk_text_view_get_overwrite::((PtrTextView)->(IOCInt))foreignimportccallsafe"gtk_text_view_set_accepts_tab"gtk_text_view_set_accepts_tab::((PtrTextView)->(CInt->(IO())))foreignimportccallsafe"gtk_text_view_get_accepts_tab"gtk_text_view_get_accepts_tab::((PtrTextView)->(IOCInt))foreignimportccallsafe"gtk_text_view_get_hadjustment"gtk_text_view_get_hadjustment::((PtrTextView)->(IO(PtrAdjustment)))foreignimportccallsafe"gtk_text_view_get_vadjustment"gtk_text_view_get_vadjustment::((PtrTextView)->(IO(PtrAdjustment)))foreignimportccallsafe"gtk_text_view_im_context_filter_keypress"gtk_text_view_im_context_filter_keypress::((PtrTextView)->((Ptr())->(IOCInt)))foreignimportccallsafe"gtk_text_view_reset_im_context"gtk_text_view_reset_im_context::((PtrTextView)->(IO()))